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
|
@@ -1,164 +1,120 @@
|
|
|
1
1
|
import { resetComponent } from "../../style/index.mjs";
|
|
2
|
-
import { genStyleHooks } from "../../theme/util/genStyleUtils.mjs";
|
|
2
|
+
import { genCssVar, genStyleHooks } from "../../theme/util/genStyleUtils.mjs";
|
|
3
3
|
import { mergeToken } from "../../theme/internal.mjs";
|
|
4
|
-
import
|
|
4
|
+
import horizontal_default from "./horizontal.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/timeline/style/index.ts
|
|
7
7
|
const genTimelineStyle = (token) => {
|
|
8
|
-
const { componentCls,
|
|
9
|
-
|
|
8
|
+
const { componentCls, tailColor, fontHeight, dotSize, dotBg, dotBorderWidth, fontSize, lineHeight, colorText, tailWidth, colorPrimary, colorError, colorSuccess, colorTextDisabled, antCls } = token;
|
|
9
|
+
const itemCls = `${componentCls}-item`;
|
|
10
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
11
|
+
return { [componentCls]: [{
|
|
10
12
|
...resetComponent(token),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
height: `calc(100% - ${unit(token.itemHeadSize)})`,
|
|
25
|
-
borderInlineStart: `${unit(token.tailWidth)} ${token.lineType} ${token.tailColor}`
|
|
26
|
-
},
|
|
27
|
-
"&-pending": {
|
|
28
|
-
[`${componentCls}-item-head`]: {
|
|
29
|
-
fontSize: token.fontSizeSM,
|
|
30
|
-
backgroundColor: "transparent"
|
|
31
|
-
},
|
|
32
|
-
[`${componentCls}-item-tail`]: { display: "none" }
|
|
13
|
+
[itemCls]: {
|
|
14
|
+
[varName("title-horizontal-title-height")]: fontHeight,
|
|
15
|
+
[varName("vertical-rail-margin")]: "0px",
|
|
16
|
+
[varName("title-horizontal-rail-gap")]: "0px",
|
|
17
|
+
[varName("icon-dot-size-origin")]: varRef("icon-size-active"),
|
|
18
|
+
[varName("icon-dot-size-custom")]: dotSize,
|
|
19
|
+
[varName("item-icon-dot-bg-color-origin")]: varRef("item-icon-dot-bg-color"),
|
|
20
|
+
[varName("item-icon-dot-bg-color-custom")]: dotBg,
|
|
21
|
+
[varName("icon-size")]: varRef("icon-dot-size-custom", varRef("icon-dot-size-origin")),
|
|
22
|
+
[`${itemCls}-icon`]: {
|
|
23
|
+
[varName("dot-icon-border-width")]: dotBorderWidth,
|
|
24
|
+
[varName("dot-icon-size")]: varRef("icon-size"),
|
|
25
|
+
[varName("item-icon-dot-bg-color")]: varRef("item-icon-dot-bg-color-custom", varRef("item-icon-dot-bg-color-origin"))
|
|
33
26
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"height": token.itemHeadSize,
|
|
38
|
-
"backgroundColor": token.dotBg,
|
|
39
|
-
"border": `${unit(token.dotBorderWidth)} ${token.lineType} transparent`,
|
|
40
|
-
"borderRadius": "50%",
|
|
41
|
-
"&-blue": {
|
|
42
|
-
color: token.colorPrimary,
|
|
43
|
-
borderColor: token.colorPrimary
|
|
44
|
-
},
|
|
45
|
-
"&-red": {
|
|
46
|
-
color: token.colorError,
|
|
47
|
-
borderColor: token.colorError
|
|
48
|
-
},
|
|
49
|
-
"&-green": {
|
|
50
|
-
color: token.colorSuccess,
|
|
51
|
-
borderColor: token.colorSuccess
|
|
52
|
-
},
|
|
53
|
-
"&-gray": {
|
|
54
|
-
color: token.colorTextDisabled,
|
|
55
|
-
borderColor: token.colorTextDisabled
|
|
56
|
-
}
|
|
27
|
+
[`${itemCls}-title`]: {
|
|
28
|
+
fontSize,
|
|
29
|
+
lineHeight
|
|
57
30
|
},
|
|
58
|
-
|
|
31
|
+
[`${itemCls}-content`]: { color: colorText },
|
|
32
|
+
[`${itemCls}-rail`]: {
|
|
33
|
+
[varName("item-solid-line-color")]: tailColor,
|
|
34
|
+
[varName("rail-size")]: tailWidth
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
[itemCls]: { [varName("item-process-rail-line-style")]: "dotted" },
|
|
39
|
+
[`${itemCls}${itemCls}${itemCls}-color`]: {
|
|
40
|
+
"&-blue": { [varName("item-icon-dot-color")]: colorPrimary },
|
|
41
|
+
"&-red": { [varName("item-icon-dot-color")]: colorError },
|
|
42
|
+
"&-green": { [varName("item-icon-dot-color")]: colorSuccess },
|
|
43
|
+
"&-gray": { [varName("item-icon-dot-color")]: colorTextDisabled }
|
|
44
|
+
}
|
|
45
|
+
}] };
|
|
46
|
+
};
|
|
47
|
+
const genVerticalStyle = (token) => {
|
|
48
|
+
const { calc, componentCls, itemPaddingBottom, margin, antCls } = token;
|
|
49
|
+
const itemCls = `${componentCls}-item`;
|
|
50
|
+
const [, stepsVarRef] = genCssVar(antCls, "cmp-steps");
|
|
51
|
+
const [timelineVarName, timelineVarRef] = genCssVar(antCls, "timeline");
|
|
52
|
+
return { [`${componentCls}:not(${componentCls}-horizontal)`]: {
|
|
53
|
+
[timelineVarName("head-span")]: "12",
|
|
54
|
+
[timelineVarName("head-span-ptg")]: `calc(${timelineVarRef("head-span")} / 24 * 100%)`,
|
|
55
|
+
[`&${componentCls}-layout-alternate`]: { [itemCls]: {
|
|
56
|
+
[timelineVarName("alternate-gap")]: calc(margin).mul(2).add(stepsVarRef("dot-icon-size")).equal(),
|
|
57
|
+
"minHeight": "auto",
|
|
58
|
+
"paddingBottom": itemPaddingBottom,
|
|
59
|
+
[`${itemCls}-icon, ${itemCls}-rail`]: {
|
|
59
60
|
position: "absolute",
|
|
60
|
-
|
|
61
|
-
insetInlineStart: calc(token.itemHeadSize).div(2).equal(),
|
|
62
|
-
width: "auto",
|
|
63
|
-
height: "auto",
|
|
64
|
-
marginBlockStart: 0,
|
|
65
|
-
paddingBlock: token.customHeadPaddingVertical,
|
|
66
|
-
lineHeight: 1,
|
|
67
|
-
textAlign: "center",
|
|
68
|
-
border: 0,
|
|
69
|
-
borderRadius: 0,
|
|
70
|
-
transform: "translate(-50%, -50%)"
|
|
61
|
+
insetInlineStart: timelineVarRef("head-span-ptg")
|
|
71
62
|
},
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
marginBlockStart: 0,
|
|
78
|
-
marginBlockEnd: 0,
|
|
79
|
-
wordBreak: "break-word"
|
|
63
|
+
[`${itemCls}-icon`]: { marginInlineStart: `calc(${stepsVarRef("icon-size")} / -2)` },
|
|
64
|
+
[`${itemCls}-section`]: {
|
|
65
|
+
display: "flex",
|
|
66
|
+
flexWrap: "nowrap",
|
|
67
|
+
gap: timelineVarRef("alternate-gap")
|
|
80
68
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
[`&${componentCls}-alternate,
|
|
87
|
-
&${componentCls}-right,
|
|
88
|
-
&${componentCls}-label`]: { [`${componentCls}-item`]: {
|
|
89
|
-
"&-tail, &-head, &-head-custom": { insetInlineStart: "50%" },
|
|
90
|
-
"&-head": {
|
|
91
|
-
"marginInlineStart": calc(token.marginXXS).mul(-1).equal(),
|
|
92
|
-
"&-custom": { marginInlineStart: calc(token.tailWidth).div(2).equal() }
|
|
69
|
+
[`${itemCls}-header`]: {
|
|
70
|
+
textAlign: "end",
|
|
71
|
+
flexDirection: "column",
|
|
72
|
+
alignItems: "stretch",
|
|
73
|
+
flex: `1 1 calc(${timelineVarRef("head-span-ptg")} - ${timelineVarRef("alternate-gap")} / 2)`
|
|
93
74
|
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
textAlign: "start"
|
|
98
|
-
} },
|
|
99
|
-
"&-right": { [`${componentCls}-item-content`]: {
|
|
100
|
-
width: `calc(50% - ${unit(token.marginSM)})`,
|
|
101
|
-
margin: 0,
|
|
102
|
-
textAlign: "end"
|
|
103
|
-
} }
|
|
104
|
-
} },
|
|
105
|
-
[`&${componentCls}-right`]: { [`${componentCls}-item-right`]: {
|
|
106
|
-
[`${componentCls}-item-tail,
|
|
107
|
-
${componentCls}-item-head,
|
|
108
|
-
${componentCls}-item-head-custom`]: { insetInlineStart: `calc(100% - ${unit(calc(calc(token.itemHeadSize).add(token.tailWidth)).div(2).equal())})` },
|
|
109
|
-
[`${componentCls}-item-content`]: { width: `calc(100% - ${unit(calc(token.itemHeadSize).add(token.marginXS).equal())})` }
|
|
110
|
-
} },
|
|
111
|
-
[`&${componentCls}-pending
|
|
112
|
-
${componentCls}-item-last
|
|
113
|
-
${componentCls}-item-tail`]: {
|
|
114
|
-
display: "block",
|
|
115
|
-
height: `calc(100% - ${unit(token.margin)})`,
|
|
116
|
-
borderInlineStart: `${unit(token.tailWidth)} dotted ${token.tailColor}`
|
|
117
|
-
},
|
|
118
|
-
[`&${componentCls}-reverse
|
|
119
|
-
${componentCls}-item-last
|
|
120
|
-
${componentCls}-item-tail`]: { display: "none" },
|
|
121
|
-
[`&${componentCls}-reverse ${componentCls}-item-pending`]: {
|
|
122
|
-
[`${componentCls}-item-tail`]: {
|
|
123
|
-
insetBlockStart: token.margin,
|
|
124
|
-
display: "block",
|
|
125
|
-
height: `calc(100% - ${unit(token.margin)})`,
|
|
126
|
-
borderInlineStart: `${unit(token.tailWidth)} dotted ${token.tailColor}`
|
|
127
|
-
},
|
|
128
|
-
[`${componentCls}-item-content`]: { minHeight: calc(token.controlHeightLG).mul(1.2).equal() }
|
|
129
|
-
},
|
|
130
|
-
[`&${componentCls}-label`]: {
|
|
131
|
-
[`${componentCls}-item-label`]: {
|
|
132
|
-
position: "absolute",
|
|
133
|
-
insetBlockStart: calc(calc(token.fontSize).mul(token.lineHeight).sub(token.fontSize)).mul(-1).add(token.tailWidth).equal(),
|
|
134
|
-
width: `calc(50% - ${unit(token.marginSM)})`,
|
|
135
|
-
textAlign: "end"
|
|
75
|
+
[`${itemCls}-content`]: {
|
|
76
|
+
textAlign: "start",
|
|
77
|
+
flex: `1 1 calc(100% - ${timelineVarRef("head-span-ptg")} - ${timelineVarRef("alternate-gap")} / 2)`
|
|
136
78
|
},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
79
|
+
"&-placement-end": {
|
|
80
|
+
[`${itemCls}-header`]: {
|
|
81
|
+
textAlign: "start",
|
|
82
|
+
order: 1
|
|
83
|
+
},
|
|
84
|
+
[`${itemCls}-content`]: { textAlign: "end" },
|
|
85
|
+
[`${itemCls}-icon, ${itemCls}-rail`]: { insetInlineStart: `calc(100% - ${timelineVarRef("head-span-ptg")})` }
|
|
86
|
+
}
|
|
87
|
+
} },
|
|
88
|
+
[`&:not(${componentCls}-layout-alternate)`]: { [`${itemCls}-placement-end`]: {
|
|
89
|
+
textAlign: "end",
|
|
90
|
+
[`${itemCls}-icon`]: { order: 1 },
|
|
91
|
+
[`${itemCls}-rail`]: {
|
|
92
|
+
insetInlineStart: "auto",
|
|
93
|
+
insetInlineEnd: `calc(${stepsVarRef("icon-size")} / 2)`,
|
|
94
|
+
marginInlineEnd: `calc(${stepsVarRef("rail-size")} / -2)`
|
|
95
|
+
}
|
|
96
|
+
} }
|
|
147
97
|
} };
|
|
148
98
|
};
|
|
149
99
|
const prepareComponentToken = (token) => ({
|
|
150
100
|
tailColor: token.colorSplit,
|
|
151
101
|
tailWidth: token.lineWidthBold,
|
|
152
|
-
dotBorderWidth: token.
|
|
153
|
-
dotBg:
|
|
102
|
+
dotBorderWidth: token.lineWidthBold,
|
|
103
|
+
dotBg: void 0,
|
|
104
|
+
dotSize: void 0,
|
|
154
105
|
itemPaddingBottom: token.padding * 1.25
|
|
155
106
|
});
|
|
156
107
|
var style_default = genStyleHooks("Timeline", (token) => {
|
|
157
|
-
|
|
108
|
+
const timeLineToken = mergeToken(token, {
|
|
158
109
|
itemHeadSize: 10,
|
|
159
110
|
customHeadPaddingVertical: token.paddingXXS,
|
|
160
111
|
paddingInlineEnd: 2
|
|
161
|
-
})
|
|
112
|
+
});
|
|
113
|
+
return [
|
|
114
|
+
genTimelineStyle(timeLineToken),
|
|
115
|
+
genVerticalStyle(timeLineToken),
|
|
116
|
+
horizontal_default(timeLineToken)
|
|
117
|
+
];
|
|
162
118
|
}, prepareComponentToken);
|
|
163
119
|
|
|
164
120
|
//#endregion
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { genCssVar } from "../theme/util/genStyleUtils.mjs";
|
|
2
|
+
import { computed, createVNode } from "vue";
|
|
3
|
+
import { classNames } from "@v-c/util";
|
|
4
|
+
import { LoadingOutlined } from "@antdv-next/icons";
|
|
5
|
+
|
|
6
|
+
//#region src/timeline/useItems.tsx
|
|
7
|
+
function useItems(rootPrefixCls, prefixCls, mode, items, pending, pendingDot) {
|
|
8
|
+
return computed(() => {
|
|
9
|
+
const itemCls = `${prefixCls.value}-item`;
|
|
10
|
+
const [varName] = genCssVar(rootPrefixCls.value, "cmp-steps");
|
|
11
|
+
const mergedItems = computed(() => {
|
|
12
|
+
return items && Array.isArray(items.value) ? items.value : [];
|
|
13
|
+
}).value.map((item, index) => {
|
|
14
|
+
const { label, children, title, content, color, classes, style, icon, dot, placement, position, loading, ...restProps } = item;
|
|
15
|
+
let mergedStyle = style;
|
|
16
|
+
let mergedClassName = classes;
|
|
17
|
+
if (color) if ([
|
|
18
|
+
"blue",
|
|
19
|
+
"red",
|
|
20
|
+
"green",
|
|
21
|
+
"gray"
|
|
22
|
+
].includes(color)) mergedClassName = classNames(classes, `${itemCls}-color-${color}`);
|
|
23
|
+
else mergedStyle = {
|
|
24
|
+
[varName("item-icon-dot-color")]: color,
|
|
25
|
+
...style
|
|
26
|
+
};
|
|
27
|
+
const mergedPlacement = placement ?? position ?? (mode.value === "alternate" ? index % 2 === 0 ? "start" : "end" : mode.value);
|
|
28
|
+
mergedClassName = classNames(mergedClassName, `${itemCls}-placement-${mergedPlacement}`);
|
|
29
|
+
let mergedIcon = icon ?? dot;
|
|
30
|
+
if (!mergedIcon && loading) mergedIcon = createVNode(LoadingOutlined, null, null);
|
|
31
|
+
return {
|
|
32
|
+
...restProps,
|
|
33
|
+
title: title ?? label,
|
|
34
|
+
content: content ?? children,
|
|
35
|
+
style: mergedStyle,
|
|
36
|
+
class: mergedClassName,
|
|
37
|
+
icon: mergedIcon,
|
|
38
|
+
status: loading ? "process" : "finish"
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
if (pending?.value) mergedItems.push({
|
|
42
|
+
icon: pendingDot?.value ?? createVNode(LoadingOutlined, null, null),
|
|
43
|
+
content: pending.value,
|
|
44
|
+
status: "process"
|
|
45
|
+
});
|
|
46
|
+
return mergedItems;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
var useItems_default = useItems;
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { useItems_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TooltipProps } from "./index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue360 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/tooltip/PurePanel.d.ts
|
|
5
5
|
interface PurePanelProps extends TooltipProps {}
|
|
6
6
|
/** @private Internal Component. Do not use in your production. */
|
|
7
|
-
declare const PurePanel:
|
|
7
|
+
declare const PurePanel: vue360.DefineSetupFnComponent<PurePanelProps, {}, {}, PurePanelProps & {}, vue360.PublicProps>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { PurePanel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue362 from "vue";
|
|
2
2
|
|
|
3
3
|
//#region src/tooltip/UniqueProvider/index.d.ts
|
|
4
|
-
declare const UniqueProvider:
|
|
4
|
+
declare const UniqueProvider: vue362.DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, vue362.PublicProps>;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { UniqueProvider };
|
package/dist/tooltip/index.d.mts
CHANGED
|
@@ -6,8 +6,8 @@ import { AdjustOverflow } from "../_util/placements.mjs";
|
|
|
6
6
|
import { PurePanel } from "./PurePanel.mjs";
|
|
7
7
|
import { UniqueProvider as UniqueProvider$1 } from "./UniqueProvider/index.mjs";
|
|
8
8
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
9
|
-
import * as
|
|
10
|
-
import { SlotsType } from "vue";
|
|
9
|
+
import * as vue178 from "vue";
|
|
10
|
+
import { CSSProperties, SlotsType } from "vue";
|
|
11
11
|
import { TooltipProps, placements } from "@v-c/tooltip";
|
|
12
12
|
import { ActionType, AlignType } from "@v-c/trigger";
|
|
13
13
|
import { LiteralUnion } from "@v-c/util/dist/type";
|
|
@@ -35,9 +35,18 @@ interface TooltipAlignConfig {
|
|
|
35
35
|
useCssBottom?: boolean;
|
|
36
36
|
useCssTransform?: boolean;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
interface TooltipSemanticClassNames {
|
|
39
|
+
root?: string;
|
|
40
|
+
container?: string;
|
|
41
|
+
arrow?: string;
|
|
42
|
+
}
|
|
43
|
+
interface TooltipSemanticStyles {
|
|
44
|
+
root?: CSSProperties;
|
|
45
|
+
container?: CSSProperties;
|
|
46
|
+
arrow?: CSSProperties;
|
|
47
|
+
}
|
|
48
|
+
type TooltipClassNamesType = SemanticClassNamesType<TooltipProps$1, TooltipSemanticClassNames>;
|
|
49
|
+
type TooltipStylesType = SemanticStylesType<TooltipProps$1, TooltipSemanticStyles>;
|
|
41
50
|
interface TriggerCommonApi extends ComponentBaseProps {
|
|
42
51
|
align?: AlignType;
|
|
43
52
|
arrow?: boolean | {
|
|
@@ -84,12 +93,12 @@ interface TooltipSlots {
|
|
|
84
93
|
interface InternalTooltipProps extends TooltipProps$1 {
|
|
85
94
|
dataPopoverInject?: boolean;
|
|
86
95
|
}
|
|
87
|
-
declare const InternalTooltip:
|
|
96
|
+
declare const InternalTooltip: vue178.DefineSetupFnComponent<InternalTooltipProps, TooltipEmits, SlotsType<TooltipSlots>, InternalTooltipProps & {
|
|
88
97
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
89
|
-
},
|
|
98
|
+
}, vue178.PublicProps>;
|
|
90
99
|
declare const _default: typeof InternalTooltip & {
|
|
91
100
|
UniqueProvider: typeof UniqueProvider$1;
|
|
92
101
|
_InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
|
|
93
102
|
};
|
|
94
103
|
//#endregion
|
|
95
|
-
export {
|
|
104
|
+
export { TooltipAlignConfig, TooltipEmits, TooltipPlacement, TooltipProps$1 as TooltipProps, TooltipRef, TooltipSemanticClassNames, TooltipSemanticStyles, TooltipSlots, TriggerCommonApi, _default };
|
package/dist/tooltip/index.mjs
CHANGED
|
@@ -30,9 +30,10 @@ function _isSlot(s) {
|
|
|
30
30
|
}
|
|
31
31
|
const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
|
|
32
32
|
const [, token] = useToken();
|
|
33
|
-
const { prefixCls, rootPrefixCls, direction, arrow: contextArrow, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPopupContainer: getContextPopupContainer } = useComponentBaseConfig("tooltip", props, ["arrow"]);
|
|
33
|
+
const { prefixCls, rootPrefixCls, direction, arrow: contextArrow, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, trigger: contextTrigger, getPopupContainer: getContextPopupContainer } = useComponentBaseConfig("tooltip", props, ["arrow", "trigger"]);
|
|
34
34
|
const { arrow: tooltipArrow, builtinPlacements, autoAdjustOverflow, classes, styles } = toPropsRefs(props, "arrow", "builtinPlacements", "autoAdjustOverflow", "classes", "styles");
|
|
35
35
|
const mergedArrow = useMergedArrow_default(tooltipArrow, contextArrow);
|
|
36
|
+
const mergedTrigger = computed(() => props?.trigger ?? contextTrigger.value ?? "hover");
|
|
36
37
|
const mergedShowArrow = computed(() => mergedArrow.value?.show);
|
|
37
38
|
const tooltipRef = shallowRef();
|
|
38
39
|
const forceAlign = () => {
|
|
@@ -66,7 +67,10 @@ const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
66
67
|
});
|
|
67
68
|
});
|
|
68
69
|
const mergedProps = computed(() => {
|
|
69
|
-
return
|
|
70
|
+
return {
|
|
71
|
+
...props,
|
|
72
|
+
trigger: mergedTrigger.value
|
|
73
|
+
};
|
|
70
74
|
});
|
|
71
75
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
|
|
72
76
|
const injectFromPopover = props.dataPopoverInject;
|
|
@@ -79,7 +83,10 @@ const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
79
83
|
const overlay = getSlotPropsFnRun(slots, props, "overlay");
|
|
80
84
|
noTitle = !title && !overlay && title !== 0;
|
|
81
85
|
const memoOverlay = title === 0 ? title : overlay || title || "";
|
|
82
|
-
const memoOverlayWrapper = createVNode(ContextIsolator, {
|
|
86
|
+
const memoOverlayWrapper = createVNode(ContextIsolator, {
|
|
87
|
+
"space": true,
|
|
88
|
+
"form": true
|
|
89
|
+
}, _isSlot(memoOverlay) ? memoOverlay : { default: () => [memoOverlay] });
|
|
83
90
|
let child = filterEmpty(slots.default?.())?.[0];
|
|
84
91
|
child = isVNode(child) ? child : createVNode("span", null, [child]);
|
|
85
92
|
const childProps = child?.props ?? {};
|
|
@@ -95,6 +102,7 @@ const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
95
102
|
let tempOpen = open.value;
|
|
96
103
|
if (!(props.open !== void 0) && noTitle) tempOpen = false;
|
|
97
104
|
const content = createVNode(VcTooltip, mergeProps({ "unique": true }, removeUndefined(restProps), attrs, {
|
|
105
|
+
"trigger": mergedTrigger.value,
|
|
98
106
|
"zIndex": zIndex.value,
|
|
99
107
|
"showArrow": mergedShowArrow.value,
|
|
100
108
|
"placement": placement,
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { ArrowToken } from "../../style/roundedArrow.mjs";
|
|
2
2
|
import { ArrowOffsetToken } from "../../style/placementArrow.mjs";
|
|
3
3
|
import "../../theme/internal.mjs";
|
|
4
|
-
import
|
|
4
|
+
import "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/tooltip/style/index.d.ts
|
|
7
7
|
interface ComponentToken extends ArrowOffsetToken, ArrowToken {
|
|
8
|
+
/**
|
|
9
|
+
* @since 6.2.0
|
|
10
|
+
* @desc 文字提示最大宽度
|
|
11
|
+
* @descEN Max width of tooltip
|
|
12
|
+
*/
|
|
13
|
+
maxWidth: number;
|
|
8
14
|
/**
|
|
9
15
|
* @desc 文字提示 z-index
|
|
10
16
|
* @descEN z-index of tooltip
|
|
@@ -89,6 +89,7 @@ const genTooltipStyle = (token) => {
|
|
|
89
89
|
};
|
|
90
90
|
const prepareComponentToken = (token) => ({
|
|
91
91
|
zIndexPopup: token.zIndexPopupBase + 70,
|
|
92
|
+
maxWidth: 250,
|
|
92
93
|
...getArrowOffsetToken({
|
|
93
94
|
contentRadius: token.borderRadius,
|
|
94
95
|
limitVerticalRadius: true
|
|
@@ -97,9 +98,9 @@ const prepareComponentToken = (token) => ({
|
|
|
97
98
|
});
|
|
98
99
|
var style_default = (prefixCls, rootCls, injectStyle = true) => {
|
|
99
100
|
return genStyleHooks("Tooltip", (token) => {
|
|
100
|
-
const { borderRadius, colorTextLightSolid, colorBgSpotlight } = token;
|
|
101
|
+
const { borderRadius, colorTextLightSolid, colorBgSpotlight, maxWidth } = token;
|
|
101
102
|
return [genTooltipStyle(mergeToken(token, {
|
|
102
|
-
tooltipMaxWidth:
|
|
103
|
+
tooltipMaxWidth: maxWidth,
|
|
103
104
|
tooltipColor: colorTextLightSolid,
|
|
104
105
|
tooltipBorderRadius: borderRadius,
|
|
105
106
|
tooltipBg: colorBgSpotlight
|
package/dist/tour/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TourEmits, TourLocale, TourProps, TourSemanticName, TourSlots, TourStepProps, TourStylesType } from "./interface.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue59 from "vue";
|
|
3
3
|
import { SlotsType } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/tour/index.d.ts
|
|
6
|
-
declare const Tour:
|
|
6
|
+
declare const Tour: vue59.DefineSetupFnComponent<TourProps, TourEmits, SlotsType<TourSlots>, TourProps & {
|
|
7
7
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
8
|
-
},
|
|
8
|
+
}, vue59.PublicProps>;
|
|
9
9
|
type TourStepItem = TourStepProps;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Tour, TourStepItem };
|
package/dist/tour/index.mjs
CHANGED
|
@@ -6,8 +6,8 @@ import { ZIndexProvider } from "../_util/zindexContext.mjs";
|
|
|
6
6
|
import { useZIndex } from "../_util/hooks/useZIndex.mjs";
|
|
7
7
|
import "../_util/hooks/index.mjs";
|
|
8
8
|
import { toPropsRefs } from "../_util/tools.mjs";
|
|
9
|
-
import { checkRenderNode } from "../_util/vueNode.mjs";
|
|
10
9
|
import getPlacements from "../_util/placements.mjs";
|
|
10
|
+
import { checkRenderNode } from "../_util/vueNode.mjs";
|
|
11
11
|
import panelRender_default from "./panelRender.mjs";
|
|
12
12
|
import style_default from "./style/index.mjs";
|
|
13
13
|
import PurePanel_default from "./PurePanel.mjs";
|
|
@@ -6,9 +6,35 @@ import { CSSProperties } from "vue";
|
|
|
6
6
|
import { TourProps, TourStepProps } from "@v-c/tour";
|
|
7
7
|
|
|
8
8
|
//#region src/tour/interface.d.ts
|
|
9
|
-
type TourSemanticName =
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
type TourSemanticName = keyof TourSemanticClassNames & keyof TourSemanticStyles;
|
|
10
|
+
interface TourSemanticClassNames {
|
|
11
|
+
root?: string;
|
|
12
|
+
cover?: string;
|
|
13
|
+
mask?: string;
|
|
14
|
+
section?: string;
|
|
15
|
+
footer?: string;
|
|
16
|
+
actions?: string;
|
|
17
|
+
indicator?: string;
|
|
18
|
+
indicators?: string;
|
|
19
|
+
header?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
}
|
|
23
|
+
interface TourSemanticStyles {
|
|
24
|
+
root?: CSSProperties;
|
|
25
|
+
cover?: CSSProperties;
|
|
26
|
+
mask?: CSSProperties;
|
|
27
|
+
section?: CSSProperties;
|
|
28
|
+
footer?: CSSProperties;
|
|
29
|
+
actions?: CSSProperties;
|
|
30
|
+
indicator?: CSSProperties;
|
|
31
|
+
indicators?: CSSProperties;
|
|
32
|
+
header?: CSSProperties;
|
|
33
|
+
title?: CSSProperties;
|
|
34
|
+
description?: CSSProperties;
|
|
35
|
+
}
|
|
36
|
+
type TourClassNamesType = SemanticClassNamesType<TourProps$1, TourSemanticClassNames>;
|
|
37
|
+
type TourStylesType = SemanticStylesType<TourProps$1, TourSemanticStyles>;
|
|
12
38
|
interface TourProps$1 extends ComponentBaseProps, Omit<TourProps, 'classNames' | 'styles' | 'renderPanel' | 'rootClassName' | 'onClose' | 'onFinish' | 'onChange' | 'onPopupAlign' | 'className'> {
|
|
13
39
|
steps?: TourStepProps$1[];
|
|
14
40
|
prefixCls?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VueNode } from "../_util/type.mjs";
|
|
2
2
|
import { DirectionType } from "../config-provider/context.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue215 from "vue";
|
|
4
4
|
import { CSSProperties } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/transfer/Actions.d.ts
|
|
@@ -16,6 +16,6 @@ interface TransferOperationProps {
|
|
|
16
16
|
direction?: DirectionType;
|
|
17
17
|
oneWay?: boolean;
|
|
18
18
|
}
|
|
19
|
-
declare const Actions:
|
|
19
|
+
declare const Actions: vue215.DefineSetupFnComponent<TransferOperationProps, {}, {}, TransferOperationProps & {}, vue215.PublicProps>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { Actions, TransferOperationProps };
|
|
@@ -9,16 +9,16 @@ import { DeleteOutlined } from "@antdv-next/icons";
|
|
|
9
9
|
const ListItem = /* @__PURE__ */ defineComponent((props) => {
|
|
10
10
|
const [contextLocale] = useLocale_default("Transfer", en_US_default.Transfer);
|
|
11
11
|
return () => {
|
|
12
|
-
const { prefixCls, classes: classNames
|
|
12
|
+
const { prefixCls, classes: classNames, styles, renderedText, renderedEl, item, checked, disabled, onClick, onRemove, showRemove } = props;
|
|
13
13
|
const mergedDisabled = disabled || item?.disabled;
|
|
14
|
-
const classes = clsx(`${prefixCls}-content-item`, classNames
|
|
14
|
+
const classes = clsx(`${prefixCls}-content-item`, classNames.item, {
|
|
15
15
|
[`${prefixCls}-content-item-disabled`]: mergedDisabled,
|
|
16
16
|
[`${prefixCls}-content-item-checked`]: checked && !item.disabled
|
|
17
17
|
});
|
|
18
18
|
let title;
|
|
19
19
|
if (typeof renderedText === "string" || typeof renderedText === "number") title = String(renderedText);
|
|
20
20
|
const labelNode = createVNode("span", {
|
|
21
|
-
"class": clsx(`${prefixCls}-content-item-text`, classNames
|
|
21
|
+
"class": clsx(`${prefixCls}-content-item-text`, classNames.itemContent),
|
|
22
22
|
"style": styles.itemContent
|
|
23
23
|
}, [renderedEl]);
|
|
24
24
|
if (showRemove) return createVNode("li", {
|
|
@@ -38,7 +38,7 @@ const ListItem = /* @__PURE__ */ defineComponent((props) => {
|
|
|
38
38
|
"title": title,
|
|
39
39
|
"onClick": mergedDisabled ? void 0 : (event) => onClick(item, event)
|
|
40
40
|
}, [createVNode(checkbox_default, {
|
|
41
|
-
"class": clsx(`${prefixCls}-checkbox`, classNames
|
|
41
|
+
"class": clsx(`${prefixCls}-checkbox`, classNames.itemIcon),
|
|
42
42
|
"style": styles.itemIcon,
|
|
43
43
|
"checked": checked,
|
|
44
44
|
"disabled": mergedDisabled
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KeyWiseTransferItem, TransferListProps } from "./interface.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue219 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/transfer/Section.d.ts
|
|
5
|
-
declare const TransferSection:
|
|
5
|
+
declare const TransferSection: vue219.DefineSetupFnComponent<TransferListProps<KeyWiseTransferItem>, {}, {}, TransferListProps<KeyWiseTransferItem> & {}, vue219.PublicProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { TransferSection };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TransferEmits, TransferProps, TransferSlots } from "./interface.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue221 from "vue";
|
|
3
3
|
import { SlotsType } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/transfer/Transfer.d.ts
|
|
6
|
-
declare const Transfer:
|
|
6
|
+
declare const Transfer: vue221.DefineSetupFnComponent<TransferProps<any>, TransferEmits, SlotsType<TransferSlots<any>>, TransferProps<any> & {
|
|
7
7
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
8
|
-
},
|
|
8
|
+
}, vue221.PublicProps>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Transfer };
|
|
@@ -52,9 +52,9 @@ const Transfer = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit })
|
|
|
52
52
|
const [rightMultipleSelect, updateRightPrevSelectedIndex] = useMultipleSelect((item) => item.key);
|
|
53
53
|
const setStateKeys = (directionValue, keys) => {
|
|
54
54
|
if (directionValue === "left") {
|
|
55
|
-
const nextKeys
|
|
56
|
-
setSourceSelectedKeys(nextKeys
|
|
57
|
-
return nextKeys
|
|
55
|
+
const nextKeys = typeof keys === "function" ? keys(sourceSelectedKeys.value || []) : keys;
|
|
56
|
+
setSourceSelectedKeys(nextKeys);
|
|
57
|
+
return nextKeys;
|
|
58
58
|
}
|
|
59
59
|
const nextKeys = typeof keys === "function" ? keys(targetSelectedKeys.value || []) : keys;
|
|
60
60
|
setTargetSelectedKeys(nextKeys);
|
|
@@ -231,7 +231,7 @@ const Transfer = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit })
|
|
|
231
231
|
createVNode(Section_default, mergeProps({
|
|
232
232
|
"prefixCls": prefixCls.value,
|
|
233
233
|
"style": handleListStyle("left"),
|
|
234
|
-
"
|
|
234
|
+
"classes": mergedClassNames.value,
|
|
235
235
|
"styles": mergedStyles.value,
|
|
236
236
|
"titleText": leftTitle,
|
|
237
237
|
"dataSource": leftDataSource.value,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Actions, TransferOperationProps } from "./Actions.mjs";
|
|
2
2
|
import { Search, TransferSearchEmits, TransferSearchProps, TransferSearchSlots } from "./search.mjs";
|
|
3
|
-
import { KeyWise, KeyWiseTransferItem, ListStyle, PaginationType, RenderResult, RenderResultObject, SelectAllLabel, TransferClassNamesType, TransferCustomListBodyProps, TransferDirection, TransferEmits, TransferItem, TransferKey, TransferListBodyProps, TransferListProps, TransferLocale, TransferProps, TransferRender, TransferSearchOption,
|
|
3
|
+
import { KeyWise, KeyWiseTransferItem, ListStyle, PaginationType, RenderResult, RenderResultObject, SelectAllLabel, TransferClassNamesType, TransferCustomListBodyProps, TransferDirection, TransferEmits, TransferItem, TransferKey, TransferListBodyProps, TransferListProps, TransferLocale, TransferProps, TransferRender, TransferSearchOption, TransferSlots, TransferStylesType } from "./interface.mjs";
|
|
4
4
|
import { TransferSection } from "./Section.mjs";
|
|
5
5
|
import { Transfer } from "./Transfer.mjs";
|
|
6
6
|
import { App } from "vue";
|