antdv-next 1.0.0-alpha.4 → 1.0.0-alpha.5
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/tools.js +2 -1
- package/dist/_util/wave/WaveEffect.js +6 -1
- package/dist/_util/wave/style.js +4 -3
- package/dist/affix/index.d.ts +3 -3
- package/dist/alert/Alert.d.ts +4 -3
- package/dist/alert/Alert.js +1 -1
- package/dist/anchor/Anchor.d.ts +5 -5
- package/dist/anchor/AnchorLink.js +2 -2
- package/dist/anchor/index.d.ts +1 -1
- package/dist/antd.js +76 -76
- package/dist/app/App.d.ts +2 -2
- package/dist/auto-complete/index.d.ts +77 -0
- package/dist/auto-complete/index.js +627 -0
- package/dist/avatar/Avatar.d.ts +3 -3
- package/dist/avatar/AvatarGroup.d.ts +2 -2
- package/dist/badge/Ribbon.d.ts +3 -3
- package/dist/badge/index.d.ts +3 -3
- package/dist/breadcrumb/Breadcrumb.d.ts +5 -5
- package/dist/breadcrumb/Breadcrumb.js +0 -8
- package/dist/breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/breadcrumb/BreadcrumbItem.js +1 -17
- package/dist/breadcrumb/index.d.ts +1 -1
- package/dist/button/Button.d.ts +3 -3
- package/dist/button/style/variant.js +116 -104
- package/dist/calendar/Header.js +1 -1
- package/dist/calendar/generateCalendar.d.ts +3 -3
- package/dist/calendar/index.d.ts +3 -3
- package/dist/card/Card.d.ts +3 -3
- package/dist/card/CardGrid.d.ts +2 -2
- package/dist/card/CardMeta.d.ts +3 -3
- package/dist/carousel/index.d.ts +3 -3
- package/dist/cascader/Panel.d.ts +3 -3
- package/dist/cascader/index.d.ts +3 -3
- package/dist/cascader/index.js +1 -1
- package/dist/checkbox/Checkbox.d.ts +3 -3
- package/dist/checkbox/Group.d.ts +3 -3
- package/dist/collapse/Collapse.d.ts +3 -3
- package/dist/color-picker/ColorPicker.d.ts +4 -4
- package/dist/color-picker/ColorPicker.js +2 -2
- package/dist/components.d.ts +3 -2
- package/dist/components.js +7 -4
- package/dist/config-provider/context.js +2 -2
- package/dist/config-provider/index.d.ts +3 -3
- package/dist/date-picker/generatePicker/generateRangePicker.js +1 -1
- package/dist/date-picker/generatePicker/generateSinglePicker.js +1 -1
- package/dist/date-picker/generatePicker/index.d.ts +15 -15
- package/dist/date-picker/index.d.ts +25 -25
- package/dist/descriptions/index.d.ts +3 -3
- package/dist/divider/index.d.ts +2 -2
- package/dist/drawer/index.d.ts +3 -3
- package/dist/dropdown/dropdown.d.ts +4 -4
- package/dist/dropdown/dropdown.js +5 -3
- package/dist/empty/index.d.ts +3 -3
- package/dist/flex/index.d.ts +3 -3
- package/dist/float-button/BackTop.d.ts +3 -3
- package/dist/float-button/FloatButton.d.ts +3 -3
- package/dist/float-button/FloatButtonGroup.d.ts +3 -3
- package/dist/float-button/style/button.js +4 -4
- package/dist/float-button/style/group.js +12 -12
- package/dist/form/Form.d.ts +3 -3
- package/dist/form/FormItem/index.d.ts +3 -3
- package/dist/form/style/index.js +3 -2
- package/dist/grid/row.d.ts +2 -2
- package/dist/grid/style/index.js +5 -4
- package/dist/image/PreviewGroup.d.ts +2 -2
- package/dist/image/index.d.ts +4 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -4
- package/dist/input/Input.js +1 -1
- package/dist/input/OTP/index.js +1 -1
- package/dist/input/TextArea.d.ts +3 -3
- package/dist/input/TextArea.js +1 -1
- package/dist/input/index.d.ts +11 -11
- package/dist/input-number/index.d.ts +3 -3
- package/dist/input-number/index.js +1 -1
- package/dist/input-number/style/index.js +18 -17
- package/dist/layout/index.d.ts +6 -6
- package/dist/layout/layout.d.ts +2 -2
- package/dist/masonry/Masonry.d.ts +3 -3
- package/dist/masonry/Masonry.js +8 -6
- package/dist/mentions/index.d.ts +3 -3
- package/dist/mentions/index.js +1 -1
- package/dist/mentions/style/index.js +18 -17
- package/dist/menu/MenuDivider.d.ts +2 -2
- package/dist/menu/SubMenu.d.ts +3 -3
- package/dist/menu/index.d.ts +5 -5
- package/dist/message/PurePanel.d.ts +2 -2
- package/dist/modal/Modal.d.ts +3 -3
- package/dist/notification/PurePanel.d.ts +2 -2
- package/dist/notification/useNotification.d.ts +2 -2
- package/dist/package.d.ts +109 -3
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.d.ts +3 -3
- package/dist/pagination/Pagination.js +1 -1
- package/dist/pagination/style/index.js +61 -50
- package/dist/popconfirm/PurePanel.d.ts +2 -2
- package/dist/popconfirm/index.d.ts +3 -3
- package/dist/popover/index.d.ts +3 -3
- package/dist/popover/style/index.js +11 -8
- package/dist/progress/progress.d.ts +3 -3
- package/dist/qrcode/index.d.ts +3 -3
- package/dist/radio/index.d.ts +5 -5
- package/dist/radio/radio.d.ts +3 -3
- package/dist/rate/index.d.ts +3 -3
- package/dist/result/index.d.ts +3 -3
- package/dist/result/noFound.d.ts +2 -2
- package/dist/result/serverError.d.ts +2 -2
- package/dist/segmented/index.d.ts +3 -3
- package/dist/select/index.d.ts +6 -6
- package/dist/select/index.js +2 -2
- package/dist/select/style/select-input-multiple.js +31 -29
- package/dist/select/style/select-input.js +50 -44
- package/dist/skeleton/Button.d.ts +2 -2
- package/dist/skeleton/Input.d.ts +2 -2
- package/dist/skeleton/Node.d.ts +3 -3
- package/dist/skeleton/Skeleton.d.ts +3 -3
- package/dist/slider/index.d.ts +3 -3
- package/dist/space/Compact.d.ts +2 -0
- package/dist/space/Compact.js +17 -4
- package/dist/space/index.d.ts +5 -5
- package/dist/space/style/addon.js +20 -19
- package/dist/spin/index.d.ts +3 -3
- package/dist/splitter/SplitBar.js +9 -2
- package/dist/splitter/Splitter.d.ts +3 -3
- package/dist/splitter/Splitter.js +2 -1
- package/dist/splitter/index.d.ts +2 -2
- package/dist/splitter/style/index.js +6 -6
- package/dist/statistic/Statistic.d.ts +3 -3
- package/dist/statistic/Timer.d.ts +5 -5
- package/dist/statistic/index.d.ts +5 -5
- package/dist/steps/ProgressIcon.js +9 -2
- package/dist/steps/index.d.ts +3 -3
- package/dist/steps/index.js +7 -4
- package/dist/steps/style/horizontal.js +13 -10
- package/dist/steps/style/icon.js +11 -8
- package/dist/steps/style/index.js +19 -18
- package/dist/steps/style/inline.js +19 -16
- package/dist/steps/style/label-placement.js +22 -20
- package/dist/steps/style/nav.js +7 -5
- package/dist/steps/style/panel.js +34 -32
- package/dist/steps/style/progress-dot.js +10 -8
- package/dist/steps/style/progress.js +29 -58
- package/dist/steps/style/rtl.js +6 -4
- package/dist/steps/style/small.js +10 -8
- package/dist/steps/style/status.js +124 -121
- package/dist/steps/style/util.js +7 -4
- package/dist/steps/style/vertical.js +17 -14
- package/dist/style/placementArrow.js +7 -5
- package/dist/switch/index.d.ts +3 -3
- package/dist/table/Column.d.ts +3 -3
- package/dist/table/ColumnGroup.d.ts +3 -3
- package/dist/table/InternalTable.js +1 -1
- package/dist/table/Table.d.ts +3 -3
- package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
- package/dist/tabs/TabPane.d.ts +3 -3
- package/dist/tabs/index.d.ts +3 -3
- package/dist/tag/CheckableTag.d.ts +3 -3
- package/dist/tag/CheckableTagGroup.d.ts +3 -3
- package/dist/tag/index.d.ts +3 -3
- package/dist/theme/index.d.ts +4 -4
- package/dist/theme/util/genStyleUtils.js +8 -5
- package/dist/time-picker/index.d.ts +7 -7
- package/dist/timeline/Timeline.d.ts +3 -3
- package/dist/tooltip/PurePanel.d.ts +2 -2
- package/dist/tooltip/PurePanel.js +3 -3
- package/dist/tooltip/UniqueProvider/index.d.ts +2 -2
- package/dist/tooltip/index.d.ts +3 -3
- package/dist/tooltip/index.js +2 -3
- package/dist/tooltip/style/index.js +10 -8
- package/dist/tooltip/util.js +5 -3
- package/dist/tour/index.d.ts +3 -3
- package/dist/tour/style/index.js +5 -4
- package/dist/transfer/Actions.d.ts +2 -2
- package/dist/transfer/Section.d.ts +2 -2
- package/dist/transfer/Transfer.d.ts +3 -3
- package/dist/transfer/Transfer.js +1 -1
- package/dist/transfer/search.d.ts +3 -3
- package/dist/tree/DirectoryTree.d.ts +3 -3
- package/dist/tree/Tree.d.ts +3 -3
- package/dist/tree-select/index.d.ts +4 -4
- package/dist/tree-select/index.js +1 -1
- package/dist/typography/Link.d.ts +3 -3
- package/dist/typography/Paragraph.d.ts +3 -3
- package/dist/typography/Text.d.ts +3 -3
- package/dist/typography/Title.d.ts +3 -3
- package/dist/typography/Typography.d.ts +3 -3
- package/dist/typography/index.d.ts +9 -9
- package/dist/upload/Dragger.d.ts +6 -3
- package/dist/upload/Upload.d.ts +3 -3
- package/dist/upload/index.d.ts +6 -3
- package/dist/watermark/index.d.ts +2 -2
- package/global.d.ts +2 -0
- package/package.json +22 -4
- package/web-tags.json +4524 -0
- package/web-types.json +12779 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
1
2
|
import { unit } from "@antdv-next/cssinjs";
|
|
2
3
|
|
|
3
4
|
//#region src/steps/style/panel.ts
|
|
4
5
|
const genPanelStyle = (token) => {
|
|
5
|
-
const { componentCls,
|
|
6
|
+
const { componentCls, lineWidthBold, borderRadius, borderRadiusSM, motionDurationMid, paddingXS, lineType, paddingSM, antCls, calc } = token;
|
|
6
7
|
const itemCls = `${componentCls}-item`;
|
|
7
|
-
const
|
|
8
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
9
|
+
const borderStyle = `${unit(lineWidthBold)} ${lineType} ${varRef("panel-border-color")}`;
|
|
8
10
|
return { [`${componentCls}${componentCls}-panel`]: [
|
|
9
11
|
{
|
|
10
12
|
[`${itemCls}-rail`]: { display: "none" },
|
|
@@ -18,17 +20,17 @@ const genPanelStyle = (token) => {
|
|
|
18
20
|
},
|
|
19
21
|
{
|
|
20
22
|
"&": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
+
[varName("panel-padding")]: paddingSM,
|
|
24
|
+
[varName("item-border-radius")]: borderRadius,
|
|
23
25
|
[itemCls]: {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
26
|
+
[varName("panel-bg-color")]: varRef("item-icon-bg-color"),
|
|
27
|
+
[varName("panel-border-color")]: varRef("item-icon-border-color"),
|
|
28
|
+
[varName("panel-active-bg-color")]: varRef("item-icon-active-bg-color"),
|
|
29
|
+
[varName("panel-active-border-color")]: varRef("item-icon-active-border-color"),
|
|
30
|
+
[varName("panel-title-height")]: `calc(${varRef("title-font-size")} * ${varRef("title-line-height")})`,
|
|
31
|
+
[varName("item-base-height")]: calc(varRef("panel-padding")).mul(2).add(varRef("icon-size")).add(varRef("panel-title-height")).equal(),
|
|
32
|
+
[varName("item-base-width")]: `calc(${varRef("item-base-height")} * 0.7071)`,
|
|
33
|
+
transition: `background ${motionDurationMid}`
|
|
32
34
|
}
|
|
33
35
|
},
|
|
34
36
|
[`${itemCls}-icon`]: { display: "none" },
|
|
@@ -39,12 +41,12 @@ const genPanelStyle = (token) => {
|
|
|
39
41
|
insetInlineStart: "100%",
|
|
40
42
|
zIndex: 1,
|
|
41
43
|
height: calc(lineWidthBold).mul(2).add("100%").equal(),
|
|
42
|
-
width: "
|
|
44
|
+
width: varRef("item-base-width"),
|
|
43
45
|
overflow: "visible",
|
|
44
46
|
strokeLinecap: "round",
|
|
45
47
|
path: {
|
|
46
|
-
fill: "
|
|
47
|
-
stroke: "
|
|
48
|
+
fill: varRef("panel-bg-color"),
|
|
49
|
+
stroke: varRef("panel-border-color"),
|
|
48
50
|
strokeWidth: lineWidthBold,
|
|
49
51
|
vectorEffect: "non-scaling-stroke",
|
|
50
52
|
transition: `fill ${motionDurationMid}`
|
|
@@ -52,42 +54,42 @@ const genPanelStyle = (token) => {
|
|
|
52
54
|
},
|
|
53
55
|
[`${itemCls}:last-child ${componentCls}-panel-arrow`]: { display: "none" },
|
|
54
56
|
[itemCls]: {
|
|
55
|
-
"padding": "
|
|
56
|
-
"background": "
|
|
57
|
+
"padding": varRef("panel-padding"),
|
|
58
|
+
"background": varRef("panel-bg-color"),
|
|
57
59
|
"position": "relative",
|
|
58
60
|
"borderBlock": borderStyle,
|
|
59
|
-
"&:not(:first-child)": { paddingInlineStart: `calc(
|
|
61
|
+
"&:not(:first-child)": { paddingInlineStart: `calc(${varRef("panel-padding")} + ${varRef("item-base-width")})` },
|
|
60
62
|
"&:first-child": {
|
|
61
63
|
borderInlineStart: borderStyle,
|
|
62
|
-
borderStartStartRadius: "
|
|
63
|
-
borderEndStartRadius: "
|
|
64
|
+
borderStartStartRadius: varRef("item-border-radius"),
|
|
65
|
+
borderEndStartRadius: varRef("item-border-radius")
|
|
64
66
|
},
|
|
65
67
|
"&:last-child": {
|
|
66
68
|
borderInlineEnd: borderStyle,
|
|
67
|
-
borderStartEndRadius: "
|
|
68
|
-
borderEndEndRadius: "
|
|
69
|
+
borderStartEndRadius: varRef("item-border-radius"),
|
|
70
|
+
borderEndEndRadius: varRef("item-border-radius")
|
|
69
71
|
},
|
|
70
72
|
"&-active": {
|
|
71
|
-
background: "
|
|
72
|
-
borderColor: "
|
|
73
|
+
background: varRef("panel-active-bg-color"),
|
|
74
|
+
borderColor: varRef("panel-active-border-color"),
|
|
73
75
|
[`${componentCls}-panel-arrow`]: { path: {
|
|
74
|
-
fill: "
|
|
75
|
-
stroke: "
|
|
76
|
+
fill: varRef("panel-active-bg-color"),
|
|
77
|
+
stroke: varRef("panel-active-border-color")
|
|
76
78
|
} },
|
|
77
|
-
[`${itemCls}-title, ${itemCls}-subtitle, ${itemCls}-content`]: { color: "
|
|
79
|
+
[`${itemCls}-title, ${itemCls}-subtitle, ${itemCls}-content`]: { color: varRef("item-icon-active-text-color") }
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
},
|
|
81
83
|
{ [`&${componentCls}-small`]: {
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
+
[varName("panel-padding")]: paddingXS,
|
|
85
|
+
[varName("item-border-radius")]: borderRadiusSM
|
|
84
86
|
} },
|
|
85
87
|
{ [`&${componentCls}-filled`]: { [itemCls]: { "&:not(:first-child)": { clipPath: `polygon(${[
|
|
86
88
|
`${unit(lineWidthBold)} 0`,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
`calc(100% + ${varRef("item-base-width")}) 0`,
|
|
90
|
+
`calc(100% + ${varRef("item-base-width")}) 100%`,
|
|
89
91
|
`${unit(lineWidthBold)} 100%`,
|
|
90
|
-
`calc(
|
|
92
|
+
`calc(${varRef("item-base-width")} + ${unit(lineWidthBold)}) 50%`
|
|
91
93
|
].join(",")})` } } } },
|
|
92
94
|
{ [`&${componentCls}-outlined`]: { [`${componentCls}-panel-arrow`]: {
|
|
93
95
|
top: calc(lineWidthBold).div(2).mul(-1).equal(),
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
1
2
|
import { getItemWithWidthStyle } from "./util.js";
|
|
2
3
|
|
|
3
4
|
//#region src/steps/style/progress-dot.ts
|
|
4
5
|
const genDotStyle = (token) => {
|
|
5
|
-
const { componentCls, iconSize, dotSize, dotCurrentSize, marginXXS, lineWidthBold, fontSizeSM } = token;
|
|
6
|
+
const { componentCls, iconSize, dotSize, dotCurrentSize, marginXXS, lineWidthBold, fontSizeSM, antCls } = token;
|
|
6
7
|
const itemCls = `${componentCls}-item`;
|
|
8
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
7
9
|
return { [`${componentCls}${componentCls}-dot`]: {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
10
|
+
[varName("icon-size-active")]: dotCurrentSize,
|
|
11
|
+
[varName("icon-size")]: dotSize,
|
|
12
|
+
[varName("dot-icon-size")]: dotSize,
|
|
13
|
+
[varName("dot-icon-border-width")]: lineWidthBold,
|
|
14
|
+
[varName("rail-size")]: lineWidthBold,
|
|
15
|
+
[varName("icon-border-width")]: lineWidthBold,
|
|
14
16
|
[`${itemCls}-custom ${itemCls}-icon`]: { fontSize: fontSizeSM },
|
|
15
17
|
[`${itemCls}-icon`]: {
|
|
16
18
|
"position": "relative",
|
|
@@ -28,7 +30,7 @@ const genDotStyle = (token) => {
|
|
|
28
30
|
transform: "translate(-50%, -50%)"
|
|
29
31
|
}
|
|
30
32
|
},
|
|
31
|
-
[`${itemCls}-active ${itemCls}-icon`]: { "
|
|
33
|
+
[`${itemCls}-active ${itemCls}-icon`]: { [varName("icon-size")]: varRef("icon-size-active") },
|
|
32
34
|
[`&${componentCls}-horizontal`]: { [`&, &${componentCls}-small`]: getItemWithWidthStyle(token, marginXXS) }
|
|
33
35
|
} };
|
|
34
36
|
};
|
|
@@ -1,68 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
2
2
|
|
|
3
3
|
//#region src/steps/style/progress.ts
|
|
4
4
|
const genStepsProgressStyle = (token) => {
|
|
5
|
-
const { calc, antCls, componentCls,
|
|
5
|
+
const { calc, antCls, componentCls, lineWidthBold, motionDurationSlow } = token;
|
|
6
6
|
const itemCls = `${componentCls}-item`;
|
|
7
|
-
const
|
|
8
|
-
const progressSizeSM = token.calc(iconSizeSM).add(token.calc(token.lineWidth).mul(4).equal()).equal();
|
|
7
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
9
8
|
const enhanceSize = calc(lineWidthBold).add(lineWidthBold).equal();
|
|
10
|
-
return {
|
|
11
|
-
[
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"height": "auto"
|
|
24
|
-
},
|
|
25
|
-
"&-circle": {
|
|
26
|
-
"lineHeight": `var(--icon-size-ptg-unitless)`,
|
|
27
|
-
"strokeWidth": calc(`var(--icon-size-ptg-unitless)`).mul(lineWidthBold).equal(),
|
|
28
|
-
"--progress-r": calc(`var(--steps-svg-size)`).sub(lineWidthBold).mul(`var(--icon-size-ptg-unitless)`).div(2).equal(),
|
|
29
|
-
"r": `var(--progress-r)`,
|
|
30
|
-
"fill": "none",
|
|
31
|
-
"cx": 50,
|
|
32
|
-
"cy": 50,
|
|
33
|
-
"transition": `all ${token.motionDurationSlow} ease-in-out`,
|
|
34
|
-
"&-rail": { stroke: token.colorSplit },
|
|
35
|
-
"&-ptg": { stroke: token.colorPrimary }
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
[`&${componentCls}-with-progress11`]: {
|
|
40
|
-
[itemCls]: {
|
|
41
|
-
paddingTop: paddingXXS,
|
|
42
|
-
paddingInlineStart: paddingXXS
|
|
43
|
-
},
|
|
44
|
-
[`${itemCls}-icon`]: {
|
|
45
|
-
position: "relative",
|
|
46
|
-
[`${antCls}-progress`]: {
|
|
47
|
-
"position": "absolute",
|
|
48
|
-
"left": {
|
|
49
|
-
_skip_check_: true,
|
|
50
|
-
value: "50%"
|
|
51
|
-
},
|
|
52
|
-
"top": "50%",
|
|
53
|
-
"transform": "translate(-50%, -50%)",
|
|
54
|
-
"&-body": {
|
|
55
|
-
width: `${unit(progressSize)} !important`,
|
|
56
|
-
height: `${unit(progressSize)} !important`
|
|
57
|
-
}
|
|
58
|
-
}
|
|
9
|
+
return { [`${componentCls}${componentCls}-with-progress`]: {
|
|
10
|
+
[varName("item-wrapper-padding-top")]: enhanceSize,
|
|
11
|
+
[`${itemCls}${itemCls}-process`]: { [`${itemCls}-icon`]: { position: "relative" } },
|
|
12
|
+
[`${itemCls}-progress-icon`]: {
|
|
13
|
+
"&-svg": {
|
|
14
|
+
[varName("svg-size")]: calc(enhanceSize).mul(2).add(varRef("icon-size")).equal(),
|
|
15
|
+
[varName("icon-size-ptg-unitless")]: `calc(100 / tan(atan2(${varRef("svg-size")}, 1px)))`,
|
|
16
|
+
fontSize: varRef("svg-size"),
|
|
17
|
+
lineHeight: varRef("icon-size-ptg-unitless"),
|
|
18
|
+
position: "absolute",
|
|
19
|
+
inset: calc(enhanceSize).mul(-1).equal(),
|
|
20
|
+
width: "auto",
|
|
21
|
+
height: "auto"
|
|
59
22
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
23
|
+
"&-circle": {
|
|
24
|
+
"lineHeight": varRef("icon-size-ptg-unitless"),
|
|
25
|
+
"strokeWidth": calc(varRef("icon-size-ptg-unitless")).mul(lineWidthBold).equal(),
|
|
26
|
+
[varName("progress-radius")]: calc(varRef("svg-size")).sub(lineWidthBold).mul(varRef("icon-size-ptg-unitless")).div(2).equal(),
|
|
27
|
+
"r": varRef("progress-radius"),
|
|
28
|
+
"fill": "none",
|
|
29
|
+
"cx": 50,
|
|
30
|
+
"cy": 50,
|
|
31
|
+
"transition": `all ${motionDurationSlow} ease-in-out`,
|
|
32
|
+
"&-rail": { stroke: token.colorSplit },
|
|
33
|
+
"&-ptg": { stroke: token.colorPrimary }
|
|
34
|
+
}
|
|
64
35
|
}
|
|
65
|
-
};
|
|
36
|
+
} };
|
|
66
37
|
};
|
|
67
38
|
var progress_default = genStepsProgressStyle;
|
|
68
39
|
|
package/dist/steps/style/rtl.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
1
2
|
import { unit } from "@antdv-next/cssinjs";
|
|
2
3
|
|
|
3
4
|
//#region src/steps/style/rtl.ts
|
|
4
5
|
const genRTLStyle = (token) => {
|
|
5
|
-
const { componentCls, lineWidthBold } = token;
|
|
6
|
+
const { componentCls, lineWidthBold, antCls } = token;
|
|
6
7
|
const itemCls = `${componentCls}-item`;
|
|
8
|
+
const [, varRef] = genCssVar(antCls, "cmp-steps");
|
|
7
9
|
return { [`${componentCls}${componentCls}-rtl`]: {
|
|
8
10
|
direction: "rtl",
|
|
9
11
|
[`&${componentCls}-navigation${componentCls}-horizontal`]: { [`${itemCls}:after`]: { transform: "translateY(-50%) rotate(-45deg)" } },
|
|
10
12
|
[`&${componentCls}-panel`]: {
|
|
11
13
|
[`${componentCls}-panel-arrow`]: { transform: `scaleX(-1)` },
|
|
12
14
|
[`&${componentCls}-filled`]: { [itemCls]: { "&:not(:first-child)": { clipPath: `polygon(${[
|
|
13
|
-
`calc(0px -
|
|
15
|
+
`calc(0px - ${varRef("item-base-width")}) 0px`,
|
|
14
16
|
`calc(100% - ${unit(lineWidthBold)}) 0px`,
|
|
15
|
-
`calc(100% -
|
|
17
|
+
`calc(100% - ${varRef("item-base-width")} - ${unit(lineWidthBold)}) 50%`,
|
|
16
18
|
`calc(100% - ${unit(lineWidthBold)}) 100%`,
|
|
17
|
-
`calc(0px -
|
|
19
|
+
`calc(0px - ${varRef("item-base-width")}) 100%`
|
|
18
20
|
].join(",")})` } } }
|
|
19
21
|
}
|
|
20
22
|
} };
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
1
2
|
import { getItemWithWidthStyle } from "./util.js";
|
|
2
3
|
|
|
3
4
|
//#region src/steps/style/small.ts
|
|
4
5
|
const genSmallStyle = (token) => {
|
|
5
|
-
const { componentCls, iconSizeSM, fontSize, lineHeight, marginXS } = token;
|
|
6
|
+
const { componentCls, iconSizeSM, fontSize, lineHeight, marginXS, fontHeight, marginSM, paddingXS, antCls } = token;
|
|
7
|
+
const [varName] = genCssVar(antCls, "cmp-steps");
|
|
6
8
|
return { [`${componentCls}${componentCls}-small`]: {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
9
|
+
[varName("icon-size")]: iconSizeSM,
|
|
10
|
+
[varName("title-horizontal-item-margin")]: marginSM,
|
|
11
|
+
[varName("title-vertical-row-gap")]: paddingXS,
|
|
12
|
+
[varName("title-font-size")]: fontSize,
|
|
13
|
+
[varName("title-line-height")]: lineHeight,
|
|
14
|
+
[varName("title-horizontal-rail-margin")]: marginXS,
|
|
15
|
+
[varName("title-horizontal-title-height")]: fontHeight,
|
|
14
16
|
[`&${componentCls}-horizontal${componentCls}-title-vertical`]: getItemWithWidthStyle(token, marginXS)
|
|
15
17
|
} };
|
|
16
18
|
};
|
|
@@ -1,64 +1,67 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
2
|
+
|
|
1
3
|
//#region src/steps/style/status.ts
|
|
2
4
|
const STATUS_WAIT = "wait";
|
|
3
5
|
const STATUS_PROCESS = "process";
|
|
4
6
|
const STATUS_FINISH = "finish";
|
|
5
7
|
const STATUS_ERROR = "error";
|
|
6
8
|
const genStatusStyle = (token) => {
|
|
7
|
-
const { componentCls, colorTextDisabled, colorTextLightSolid, colorPrimary, colorTextLabel, colorError, colorText, colorTextDescription, colorBgContainer, colorPrimaryHover } = token;
|
|
9
|
+
const { componentCls, colorTextDisabled, colorTextLightSolid, colorPrimary, colorTextLabel, colorError, colorErrorHover, colorErrorBgFilledHover, colorFillTertiary, colorErrorBg, colorPrimaryBgHover, colorPrimaryBg, colorText, colorTextDescription, colorBgContainer, colorPrimaryHover, lineType, antCls } = token;
|
|
8
10
|
const itemCls = `${componentCls}-item`;
|
|
11
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
9
12
|
return { [componentCls]: [
|
|
10
13
|
{
|
|
11
14
|
[itemCls]: {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
15
|
+
[varName("item-solid-line-color")]: "#000",
|
|
16
|
+
[varName("item-title-color")]: "#000",
|
|
17
|
+
[varName("item-content-color")]: "#000",
|
|
18
|
+
[varName("item-subtitle-color")]: varRef("item-content-color"),
|
|
19
|
+
[varName("item-icon-custom-color")]: "#000",
|
|
20
|
+
[varName("item-icon-bg-color")]: "#000",
|
|
21
|
+
[varName("item-icon-border-color")]: "#000",
|
|
22
|
+
[varName("item-icon-text-color")]: "#fff",
|
|
23
|
+
[varName("item-icon-dot-color")]: "#000",
|
|
24
|
+
[varName("item-icon-dot-bg-color")]: varRef("item-icon-dot-color"),
|
|
25
|
+
[varName("item-icon-dot-border-color")]: varRef("item-icon-dot-color"),
|
|
26
|
+
[varName("item-text-hover-color")]: "#000",
|
|
27
|
+
[varName("item-icon-bg-hover-color")]: varRef("item-icon-bg-color"),
|
|
28
|
+
[varName("item-icon-border-hover-color")]: varRef("item-icon-border-color"),
|
|
29
|
+
[varName("item-icon-text-hover-color")]: varRef("item-icon-text-color"),
|
|
30
|
+
[varName("item-content-active-color")]: varRef("item-content-color"),
|
|
31
|
+
[varName("item-icon-active-bg-color")]: varRef("item-icon-bg-color"),
|
|
32
|
+
[varName("item-icon-active-border-color")]: varRef("item-icon-border-color"),
|
|
33
|
+
[varName("item-icon-active-text-color")]: varRef("item-icon-text-color"),
|
|
34
|
+
[varName("item-process-rail-line-style")]: lineType
|
|
32
35
|
},
|
|
33
|
-
[`${itemCls}-rail`]: { borderColor:
|
|
34
|
-
[`${itemCls}-custom ${itemCls}-icon`]: { color:
|
|
35
|
-
[`${itemCls}-title`]: { color:
|
|
36
|
-
[`${itemCls}-subtitle`]: { color:
|
|
37
|
-
[`${itemCls}-content`]: { color:
|
|
36
|
+
[`${itemCls}-rail`]: { borderColor: varRef("item-solid-line-color") },
|
|
37
|
+
[`${itemCls}-custom ${itemCls}-icon`]: { color: varRef("item-icon-custom-color") },
|
|
38
|
+
[`${itemCls}-title`]: { color: varRef("item-title-color") },
|
|
39
|
+
[`${itemCls}-subtitle`]: { color: varRef("item-subtitle-color") },
|
|
40
|
+
[`${itemCls}-content`]: { color: varRef("item-content-color") },
|
|
38
41
|
[`${itemCls}-active ${itemCls}-icon`]: {},
|
|
39
|
-
[`${itemCls}-active ${itemCls}-content`]: { color:
|
|
40
|
-
[`${itemCls}[role='button']:not(${itemCls}-active):hover`]: { [`${itemCls}-title, ${itemCls}-content`]: { color:
|
|
42
|
+
[`${itemCls}-active ${itemCls}-content`]: { color: varRef("item-content-active-color") },
|
|
43
|
+
[`${itemCls}[role='button']:not(${itemCls}-active):hover`]: { [`${itemCls}-title, ${itemCls}-content`]: { color: varRef("item-text-hover-color") } },
|
|
41
44
|
[`&:not(${componentCls}-dot)`]: { [`${itemCls}:not(${itemCls}-custom)`]: {
|
|
42
45
|
[`${itemCls}-icon`]: {
|
|
43
|
-
background:
|
|
44
|
-
borderColor:
|
|
45
|
-
color:
|
|
46
|
+
background: varRef("item-icon-bg-color"),
|
|
47
|
+
borderColor: varRef("item-icon-border-color"),
|
|
48
|
+
color: varRef("item-icon-text-color")
|
|
46
49
|
},
|
|
47
50
|
[`&[role='button']:not(${itemCls}-active):hover`]: { [`${itemCls}-icon`]: {
|
|
48
|
-
background:
|
|
49
|
-
borderColor:
|
|
50
|
-
color:
|
|
51
|
+
background: varRef("item-icon-bg-hover-color"),
|
|
52
|
+
borderColor: varRef("item-icon-border-hover-color"),
|
|
53
|
+
color: varRef("item-icon-text-hover-color")
|
|
51
54
|
} },
|
|
52
55
|
[`&${itemCls}-active`]: { [`${itemCls}-icon`]: {
|
|
53
|
-
background:
|
|
54
|
-
borderColor:
|
|
55
|
-
color:
|
|
56
|
+
background: varRef("item-icon-active-bg-color"),
|
|
57
|
+
borderColor: varRef("item-icon-active-border-color"),
|
|
58
|
+
color: varRef("item-icon-active-text-color")
|
|
56
59
|
} }
|
|
57
60
|
} },
|
|
58
61
|
[`&${componentCls}-dot`]: { [`${itemCls}-icon`]: {
|
|
59
|
-
background:
|
|
60
|
-
borderColor:
|
|
61
|
-
color:
|
|
62
|
+
background: varRef("item-icon-dot-bg-color"),
|
|
63
|
+
borderColor: varRef("item-icon-dot-border-color"),
|
|
64
|
+
color: varRef("item-icon-dot-color"),
|
|
62
65
|
[`&${itemCls}-icon-dot-custom`]: {
|
|
63
66
|
background: "transparent",
|
|
64
67
|
border: "none"
|
|
@@ -67,111 +70,111 @@ const genStatusStyle = (token) => {
|
|
|
67
70
|
},
|
|
68
71
|
{
|
|
69
72
|
[`${itemCls}-${STATUS_WAIT}`]: {
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
73
|
+
[varName("item-icon-custom-color")]: colorTextDisabled,
|
|
74
|
+
[varName("item-title-color")]: colorTextDescription,
|
|
75
|
+
[varName("item-content-color")]: colorTextDescription,
|
|
76
|
+
[varName("item-content-active-color")]: colorText,
|
|
77
|
+
[varName("item-text-hover-color")]: colorPrimaryHover
|
|
75
78
|
},
|
|
76
|
-
[`${itemCls}-rail-${STATUS_WAIT}`]: { "
|
|
79
|
+
[`${itemCls}-rail-${STATUS_WAIT}`]: { [varName("item-solid-line-color")]: colorTextDisabled },
|
|
77
80
|
[`${itemCls}-${STATUS_PROCESS}`]: {
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
81
|
+
[varName("item-icon-custom-color")]: colorPrimary,
|
|
82
|
+
[varName("item-title-color")]: colorText,
|
|
83
|
+
[varName("item-content-color")]: colorTextDescription,
|
|
84
|
+
[varName("item-content-active-color")]: colorText,
|
|
85
|
+
[varName("item-text-hover-color")]: colorPrimaryHover
|
|
83
86
|
},
|
|
84
87
|
[`${itemCls}-rail-${STATUS_PROCESS}`]: {
|
|
85
|
-
"
|
|
86
|
-
"
|
|
88
|
+
[varName("item-solid-line-color")]: colorPrimary,
|
|
89
|
+
[varName("rail-line-style")]: varRef("item-process-rail-line-style")
|
|
87
90
|
},
|
|
88
91
|
[`${itemCls}-${STATUS_FINISH}`]: {
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
92
|
+
[varName("item-icon-custom-color")]: colorPrimary,
|
|
93
|
+
[varName("item-title-color")]: colorText,
|
|
94
|
+
[varName("item-content-color")]: colorTextDescription,
|
|
95
|
+
[varName("item-content-active-color")]: colorText,
|
|
96
|
+
[varName("item-text-hover-color")]: colorPrimaryHover
|
|
94
97
|
},
|
|
95
|
-
[`${itemCls}-rail-${STATUS_FINISH}`]: { "
|
|
98
|
+
[`${itemCls}-rail-${STATUS_FINISH}`]: { [varName("item-solid-line-color")]: colorPrimary },
|
|
96
99
|
[`${itemCls}-${STATUS_ERROR}`]: {
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
100
|
+
[varName("item-icon-custom-color")]: colorError,
|
|
101
|
+
[varName("item-title-color")]: colorError,
|
|
102
|
+
[varName("item-content-color")]: colorError,
|
|
103
|
+
[varName("item-content-active-color")]: colorError,
|
|
104
|
+
[varName("item-text-hover-color")]: colorErrorHover
|
|
102
105
|
},
|
|
103
|
-
[`${itemCls}-rail-${STATUS_ERROR}`]: { "
|
|
106
|
+
[`${itemCls}-rail-${STATUS_ERROR}`]: { [varName("item-solid-line-color")]: colorError }
|
|
104
107
|
},
|
|
105
108
|
{ [`&${componentCls}-filled`]: {
|
|
106
|
-
[itemCls]: { "
|
|
109
|
+
[itemCls]: { [varName("item-icon-dot-border-color")]: "transparent" },
|
|
107
110
|
[`${itemCls}-${STATUS_WAIT}`]: {
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
111
|
+
[varName("item-icon-bg-color")]: colorFillTertiary,
|
|
112
|
+
[varName("item-icon-border-color")]: "transparent",
|
|
113
|
+
[varName("item-icon-text-color")]: colorTextLabel,
|
|
114
|
+
[varName("item-icon-dot-bg-color")]: colorTextDisabled,
|
|
115
|
+
[varName("item-icon-bg-hover-color")]: colorPrimaryBgHover,
|
|
116
|
+
[varName("item-icon-border-hover-color")]: "transparent",
|
|
117
|
+
[varName("item-icon-text-hover-color")]: colorPrimary,
|
|
118
|
+
[varName("item-icon-active-bg-color")]: colorPrimary,
|
|
119
|
+
[varName("item-icon-active-border-color")]: "transparent",
|
|
120
|
+
[varName("item-icon-active-text-color")]: colorTextLightSolid
|
|
118
121
|
},
|
|
119
122
|
[`${itemCls}-${STATUS_PROCESS}, ${itemCls}-${STATUS_FINISH}`]: {
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
123
|
+
[varName("item-icon-bg-color")]: colorPrimaryBg,
|
|
124
|
+
[varName("item-icon-border-color")]: "transparent",
|
|
125
|
+
[varName("item-icon-text-color")]: colorPrimary,
|
|
126
|
+
[varName("item-icon-dot-bg-color")]: colorPrimary,
|
|
127
|
+
[varName("item-icon-bg-hover-color")]: colorPrimaryBgHover,
|
|
128
|
+
[varName("item-icon-border-hover-color")]: "transparent",
|
|
129
|
+
[varName("item-icon-text-hover-color")]: colorPrimary,
|
|
130
|
+
[varName("item-icon-active-bg-color")]: colorPrimary,
|
|
131
|
+
[varName("item-icon-active-border-color")]: "transparent",
|
|
132
|
+
[varName("item-icon-active-text-color")]: colorTextLightSolid
|
|
130
133
|
},
|
|
131
134
|
[`${itemCls}-${STATUS_ERROR}`]: {
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
135
|
+
[varName("item-icon-bg-color")]: colorErrorBg,
|
|
136
|
+
[varName("item-icon-border-color")]: "transparent",
|
|
137
|
+
[varName("item-icon-text-color")]: colorError,
|
|
138
|
+
[varName("item-icon-dot-bg-color")]: colorError,
|
|
139
|
+
[varName("item-icon-bg-hover-color")]: colorErrorBgFilledHover,
|
|
140
|
+
[varName("item-icon-border-hover-color")]: "transparent",
|
|
141
|
+
[varName("item-icon-text-hover-color")]: colorError,
|
|
142
|
+
[varName("item-icon-active-bg-color")]: colorError,
|
|
143
|
+
[varName("item-icon-active-border-color")]: "transparent",
|
|
144
|
+
[varName("item-icon-active-text-color")]: colorTextLightSolid
|
|
142
145
|
}
|
|
143
146
|
} },
|
|
144
147
|
{ [`&${componentCls}-outlined`]: {
|
|
145
|
-
[itemCls]: { "
|
|
148
|
+
[itemCls]: { [varName("item-icon-dot-bg-color")]: "transparent" },
|
|
146
149
|
[`${itemCls}-${STATUS_WAIT}`]: {
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
150
|
+
[varName("item-icon-bg-color")]: colorBgContainer,
|
|
151
|
+
[varName("item-icon-border-color")]: colorTextDisabled,
|
|
152
|
+
[varName("item-icon-text-color")]: colorTextDisabled,
|
|
153
|
+
[varName("item-icon-dot-color")]: colorTextDisabled,
|
|
154
|
+
[varName("item-icon-bg-hover-color")]: "transparent",
|
|
155
|
+
[varName("item-icon-border-hover-color")]: colorPrimaryHover,
|
|
156
|
+
[varName("item-icon-text-hover-color")]: colorPrimaryHover,
|
|
157
|
+
[varName("item-icon-active-bg-color")]: colorFillTertiary
|
|
155
158
|
},
|
|
156
159
|
[`${itemCls}-${STATUS_PROCESS}, ${itemCls}-${STATUS_FINISH}`]: {
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"
|
|
160
|
+
[varName("item-icon-bg-color")]: colorBgContainer,
|
|
161
|
+
[varName("item-icon-border-color")]: colorPrimary,
|
|
162
|
+
[varName("item-icon-text-color")]: colorPrimary,
|
|
163
|
+
[varName("item-icon-dot-color")]: colorPrimary,
|
|
164
|
+
[varName("item-icon-bg-hover-color")]: "transparent",
|
|
165
|
+
[varName("item-icon-border-hover-color")]: colorPrimaryHover,
|
|
166
|
+
[varName("item-icon-text-hover-color")]: colorPrimaryHover,
|
|
167
|
+
[varName("item-icon-active-bg-color")]: colorPrimaryBg
|
|
165
168
|
},
|
|
166
169
|
[`${itemCls}-${STATUS_ERROR}`]: {
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
170
|
+
[varName("item-icon-bg-color")]: colorBgContainer,
|
|
171
|
+
[varName("item-icon-border-color")]: colorError,
|
|
172
|
+
[varName("item-icon-text-color")]: colorError,
|
|
173
|
+
[varName("item-icon-dot-color")]: colorError,
|
|
174
|
+
[varName("item-icon-bg-hover-color")]: "transparent",
|
|
175
|
+
[varName("item-icon-border-hover-color")]: colorErrorHover,
|
|
176
|
+
[varName("item-icon-text-hover-color")]: colorErrorHover,
|
|
177
|
+
[varName("item-icon-active-bg-color")]: colorErrorBg
|
|
175
178
|
}
|
|
176
179
|
} }
|
|
177
180
|
] };
|