antdv-next 1.0.0-alpha.4 → 1.0.0-beta.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.js +106 -0
- package/dist/_util/hooks/useMergeSemantic.js +3 -3
- package/dist/_util/styleUtils.js +10 -0
- 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 +123 -115
- package/dist/app/App.d.ts +2 -2
- package/dist/auto-complete/index.d.ts +78 -0
- package/dist/auto-complete/index.js +634 -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/ScrollNumber.js +1 -1
- package/dist/badge/SingleNumber.js +1 -1
- package/dist/badge/index.d.ts +3 -3
- package/dist/badge/index.js +5 -3
- package/dist/badge/style/index.js +1 -1
- 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/calendar/style/index.d.ts +1 -1
- package/dist/calendar/style/index.js +1 -1
- 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/card/style/index.js +11 -2
- package/dist/carousel/index.d.ts +3 -3
- package/dist/cascader/Panel.d.ts +3 -3
- package/dist/cascader/index.d.ts +4 -3
- package/dist/cascader/index.js +3 -1
- package/dist/checkbox/Checkbox.d.ts +3 -3
- package/dist/checkbox/Group.d.ts +3 -3
- package/dist/checkbox/style/index.d.ts +1 -1
- package/dist/collapse/Collapse.d.ts +3 -3
- package/dist/color-picker/ColorPicker.d.ts +3 -3
- package/dist/color-picker/ColorPicker.js +13 -2
- package/dist/components.d.ts +11 -8
- package/dist/components.js +7 -4
- package/dist/config-provider/context.d.ts +2 -1
- package/dist/config-provider/context.js +3 -3
- package/dist/config-provider/define.d.ts +14 -0
- package/dist/config-provider/index.d.ts +3 -3
- package/dist/config-provider/index.js +21 -2
- package/dist/date-picker/generatePicker/generateRangePicker.js +2 -2
- package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -2
- package/dist/date-picker/generatePicker/index.d.ts +17 -17
- package/dist/date-picker/index.d.ts +29 -27
- package/dist/date-picker/index.js +3 -0
- package/dist/date-picker/style/panel.js +4 -4
- package/dist/descriptions/index.d.ts +3 -3
- package/dist/divider/index.d.ts +2 -2
- package/dist/drawer/index.d.ts +6 -4
- package/dist/drawer/index.js +17 -5
- package/dist/drawer/useFocusable.d.ts +10 -0
- package/dist/drawer/useFocusable.js +18 -0
- package/dist/dropdown/dropdown.d.ts +4 -4
- package/dist/dropdown/dropdown.js +12 -3
- package/dist/empty/index.d.ts +3 -3
- package/dist/flex/index.d.ts +3 -3
- package/dist/flex/index.js +1 -1
- package/dist/float-button/BackTop.d.ts +3 -3
- package/dist/float-button/BackTop.js +4 -1
- package/dist/float-button/FloatButton.d.ts +3 -3
- package/dist/float-button/FloatButtonGroup.d.ts +3 -3
- package/dist/float-button/PurePanel.js +5 -5
- package/dist/float-button/style/button.js +4 -4
- package/dist/float-button/style/group.js +12 -12
- package/dist/form/ErrorList.js +4 -7
- package/dist/form/Form.d.ts +7 -3
- package/dist/form/Form.js +39 -22
- package/dist/form/FormItem/ItemHolder.js +0 -1
- package/dist/form/FormItem/index.d.ts +5 -5
- package/dist/form/FormItem/index.js +48 -29
- package/dist/form/FormItemInput.js +17 -19
- package/dist/form/style/index.js +3 -2
- package/dist/form/utils/valueUtil.js +4 -1
- package/dist/grid/col.js +7 -2
- package/dist/grid/index.d.ts +2 -2
- package/dist/grid/row.d.ts +2 -2
- package/dist/grid/style/index.js +7 -5
- package/dist/image/PreviewGroup.d.ts +2 -2
- package/dist/image/index.d.ts +7 -4
- package/dist/image/index.js +2 -0
- package/dist/image/style/index.d.ts +1 -1
- package/dist/index.d.ts +16 -12
- package/dist/index.js +7 -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/style/index.d.ts +2 -2
- package/dist/input-number/index.d.ts +4 -4
- package/dist/input-number/index.js +2 -6
- 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/layout/style/sider.js +1 -1
- package/dist/masonry/Masonry.d.ts +3 -3
- package/dist/masonry/Masonry.js +8 -6
- package/dist/mentions/index.d.ts +4 -3
- package/dist/mentions/index.js +4 -2
- package/dist/mentions/style/index.js +18 -17
- package/dist/menu/MenuDivider.d.ts +2 -2
- package/dist/menu/MenuItem.d.ts +3 -3
- package/dist/menu/index.d.ts +5 -5
- package/dist/menu/style/horizontal.js +1 -1
- package/dist/menu/style/index.js +5 -5
- package/dist/message/PurePanel.d.ts +2 -2
- package/dist/message/useMessage.d.ts +1 -0
- package/dist/modal/ConfirmDialog.js +1 -1
- package/dist/modal/Modal.d.ts +3 -3
- package/dist/modal/Modal.js +17 -6
- package/dist/modal/PurePanel.js +305 -0
- package/dist/modal/index.js +2 -0
- package/dist/modal/interface.d.ts +3 -1
- package/dist/notification/PurePanel.d.ts +2 -2
- package/dist/notification/PurePanel.js +4 -3
- package/dist/notification/style/index.d.ts +1 -1
- package/dist/notification/useNotification.d.ts +2 -1
- package/dist/notification/useNotification.js +7 -7
- package/dist/package.d.ts +143 -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/PurePanel.js +2 -1
- package/dist/popconfirm/index.d.ts +3 -3
- package/dist/popover/PurePanel.js +4 -2
- package/dist/popover/index.d.ts +9 -6
- package/dist/popover/index.js +2 -1
- 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/radio/style/index.js +1 -1
- package/dist/rate/index.d.ts +3 -3
- package/dist/rate/style/index.d.ts +1 -1
- 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 +5 -3
- package/dist/select/style/dropdown.js +1 -1
- package/dist/select/style/select-input-multiple.js +31 -29
- package/dist/select/style/select-input.js +50 -44
- package/dist/skeleton/Avatar.d.ts +2 -2
- package/dist/skeleton/Button.d.ts +2 -2
- package/dist/skeleton/Image.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/skeleton/Skeleton.js +1 -1
- package/dist/skeleton/Title.d.ts +1 -2
- package/dist/skeleton/Title.js +0 -5
- 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/spin/index.js +7 -6
- 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 +12 -9
- package/dist/steps/style/index.js +19 -18
- package/dist/steps/style/inline.js +20 -17
- 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 +20 -6
- package/dist/table/Table.d.ts +3 -3
- package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
- package/dist/table/style/index.js +3 -3
- package/dist/table/style/radius.js +6 -0
- package/dist/table/style/virtual.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/CheckableTagGroup.js +3 -3
- package/dist/tag/index.d.ts +3 -3
- package/dist/theme/context.d.ts +2 -2
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/useToken.d.ts +2 -2
- package/dist/theme/useToken.js +1 -1
- package/dist/theme/util/genStyleUtils.d.ts +2 -2
- package/dist/theme/util/genStyleUtils.js +8 -5
- package/dist/theme/util/useResetIconStyle.js +1 -1
- package/dist/time-picker/index.d.ts +8 -7
- package/dist/time-picker/index.js +17 -13
- package/dist/timeline/Timeline.d.ts +3 -3
- package/dist/tooltip/PurePanel.d.ts +2 -2
- package/dist/tooltip/PurePanel.js +12 -8
- 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/PurePanel.js +243 -0
- package/dist/tour/index.d.ts +3 -3
- package/dist/tour/index.js +2 -0
- 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 +2 -2
- 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/style/index.d.ts +1 -1
- package/dist/tree-select/index.d.ts +5 -4
- package/dist/tree-select/index.js +3 -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/Upload.js +15 -1
- package/dist/upload/index.d.ts +6 -3
- package/dist/upload/interface.d.ts +4 -4
- package/global.d.ts +3 -0
- package/package.json +69 -17
- package/web-tags.json +5069 -0
- package/web-types.json +14335 -0
package/dist/steps/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
|
+
import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
2
3
|
import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
4
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
4
5
|
import "../_util/hooks/index.js";
|
|
@@ -25,7 +26,7 @@ function _isSlot(s) {
|
|
|
25
26
|
const waveEffectClassNames = { itemIcon: TARGET_CLS };
|
|
26
27
|
const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) => {
|
|
27
28
|
const internalContent = useInternalContext();
|
|
28
|
-
const { direction: rtlDirection, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, prefixCls } = useComponentBaseConfig("steps", props);
|
|
29
|
+
const { direction: rtlDirection, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, prefixCls, rootPrefixCls } = useComponentBaseConfig("steps", props);
|
|
29
30
|
const { size, items, responsive, type, classes, styles } = toPropsRefs(props, "size", "items", "responsive", "type", "classes", "styles");
|
|
30
31
|
const components = computed(() => {
|
|
31
32
|
return {
|
|
@@ -35,10 +36,11 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
35
36
|
});
|
|
36
37
|
const itemIconCls = computed(() => `${prefixCls.value}-item-icon`);
|
|
37
38
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
39
|
+
const [varName] = genCssVar(rootPrefixCls.value, "cmp-steps");
|
|
38
40
|
const mergedSize = useSize(size);
|
|
39
41
|
const mergedItems = computed(() => (items.value || []).filter(Boolean));
|
|
40
42
|
const breakpoint = useBreakpoint_default(responsive);
|
|
41
|
-
const
|
|
43
|
+
const xs = computed(() => breakpoint.value?.xs);
|
|
42
44
|
const mergedType = computed(() => {
|
|
43
45
|
if (type.value && type.value !== "default") return type.value;
|
|
44
46
|
if (props.progressDot) return "dot";
|
|
@@ -49,7 +51,7 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
49
51
|
const mergedOrientation = computed(() => {
|
|
50
52
|
const nextOrientation = props.orientation || props.direction;
|
|
51
53
|
if (mergedType.value === "panel") return "horizontal";
|
|
52
|
-
return responsive.value &&
|
|
54
|
+
return responsive.value && xs.value || nextOrientation === "vertical" ? "vertical" : "horizontal";
|
|
53
55
|
});
|
|
54
56
|
const mergedTitlePlacement = computed(() => {
|
|
55
57
|
if (isDot.value || mergedOrientation.value === "vertical") return mergedOrientation.value === "vertical" ? "horizontal" : "vertical";
|
|
@@ -104,6 +106,7 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
104
106
|
}();
|
|
105
107
|
numNode = createVNode(ProgressIcon_default, {
|
|
106
108
|
"prefixCls": prefixCls.value,
|
|
109
|
+
"rootPrefixCls": rootPrefixCls.value,
|
|
107
110
|
"percent": mergedPercent.value
|
|
108
111
|
}, _isSlot(numNode) ? numNode : { default: () => [_numNode] });
|
|
109
112
|
}
|
|
@@ -146,7 +149,7 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
146
149
|
return createVNode(Fragment, null, [itemNode, createVNode(PanelArrow_default, { "prefixCls": prefixCls.value }, null)]);
|
|
147
150
|
} : void 0;
|
|
148
151
|
const mergedStyle = {
|
|
149
|
-
"
|
|
152
|
+
[varName("items-offset")]: `${offset}`,
|
|
150
153
|
...contextStyle.value,
|
|
151
154
|
...style
|
|
152
155
|
};
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
2
|
+
|
|
1
3
|
//#region src/steps/style/horizontal.ts
|
|
2
4
|
const genHorizontalStyle = (token) => {
|
|
3
|
-
const { componentCls } = token;
|
|
5
|
+
const { componentCls, antCls } = token;
|
|
4
6
|
const itemCls = `${componentCls}-item`;
|
|
7
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
5
8
|
return { [`${componentCls}-horizontal`]: { [`> ${itemCls}`]: {
|
|
6
9
|
flex: "1 1 auto",
|
|
7
10
|
minWidth: token.iconSize,
|
|
8
11
|
[`${itemCls}-rail`]: {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
[varName("horizontal-rail-margin")]: `calc(${varRef("icon-size-max")} / 2 + ${varRef("item-wrapper-padding-top")})`,
|
|
13
|
+
position: "static",
|
|
14
|
+
marginTop: varRef("horizontal-rail-margin"),
|
|
15
|
+
width: "auto",
|
|
16
|
+
borderBlockStartWidth: varRef("rail-size"),
|
|
17
|
+
flex: 1,
|
|
18
|
+
minWidth: 0,
|
|
19
|
+
alignSelf: "flex-start",
|
|
20
|
+
transform: "translateY(-50%)"
|
|
18
21
|
}
|
|
19
22
|
} } };
|
|
20
23
|
};
|
package/dist/steps/style/icon.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
2
|
+
|
|
1
3
|
//#region src/steps/style/icon.ts
|
|
2
4
|
const genIconStyle = (token) => {
|
|
3
|
-
const { componentCls, customIconFontSize, motionDurationSlow } = token;
|
|
5
|
+
const { componentCls, customIconFontSize, motionDurationSlow, iconSize, lineWidth, lineType, antCls } = token;
|
|
4
6
|
const itemCls = `${componentCls}-item`;
|
|
7
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
5
8
|
return { [componentCls]: {
|
|
6
|
-
"
|
|
7
|
-
"
|
|
9
|
+
[varName("icon-size")]: iconSize,
|
|
10
|
+
[varName("icon-border-width")]: lineWidth,
|
|
8
11
|
[`${itemCls}-icon`]: {
|
|
9
|
-
width: "
|
|
10
|
-
height: "
|
|
12
|
+
width: varRef("icon-size"),
|
|
13
|
+
height: varRef("icon-size"),
|
|
11
14
|
margin: 0,
|
|
12
15
|
flex: "none",
|
|
13
16
|
display: "flex",
|
|
@@ -15,12 +18,12 @@ const genIconStyle = (token) => {
|
|
|
15
18
|
justifyContent: "center",
|
|
16
19
|
fontSize: token.iconFontSize,
|
|
17
20
|
fontFamily: token.fontFamily,
|
|
18
|
-
lineHeight: "
|
|
21
|
+
lineHeight: varRef("icon-size"),
|
|
19
22
|
textAlign: "center",
|
|
20
|
-
borderRadius: "
|
|
21
|
-
border:
|
|
23
|
+
borderRadius: varRef("icon-size"),
|
|
24
|
+
border: `${varRef("icon-border-width")} ${lineType} transparent`,
|
|
22
25
|
transition: [
|
|
23
|
-
"background",
|
|
26
|
+
"background-color",
|
|
24
27
|
"border",
|
|
25
28
|
"color",
|
|
26
29
|
"inset",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resetComponent, textEllipsis } from "../../style/index.js";
|
|
2
|
-
import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
2
|
+
import { genCssVar, genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
3
3
|
import { mergeToken } from "../../theme/internal.js";
|
|
4
4
|
import horizontal_default from "./horizontal.js";
|
|
5
5
|
import icon_default from "./icon.js";
|
|
@@ -16,20 +16,21 @@ import vertical_default from "./vertical.js";
|
|
|
16
16
|
|
|
17
17
|
//#region src/steps/style/index.ts
|
|
18
18
|
const genBasicStyle = (token) => {
|
|
19
|
-
const { componentCls } = token;
|
|
19
|
+
const { componentCls, antCls } = token;
|
|
20
20
|
const itemCls = `${componentCls}-item`;
|
|
21
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
21
22
|
return { [componentCls]: {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
23
|
+
[varName("title-font-size")]: token.fontSizeLG,
|
|
24
|
+
[varName("title-line-height")]: token.lineHeightLG,
|
|
25
|
+
[varName("subtitle-font-size")]: token.fontSize,
|
|
26
|
+
[varName("subtitle-line-height")]: token.lineHeight,
|
|
27
|
+
[varName("item-wrapper-padding-top")]: "0px",
|
|
28
|
+
[varName("rail-size")]: token.lineWidth,
|
|
29
|
+
[varName("rail-line-style")]: token.lineType,
|
|
29
30
|
...resetComponent(token),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
display: "flex",
|
|
32
|
+
flexWrap: "nowrap",
|
|
33
|
+
alignItems: "flex-start",
|
|
33
34
|
[itemCls]: {
|
|
34
35
|
flex: "none",
|
|
35
36
|
position: "relative"
|
|
@@ -37,7 +38,7 @@ const genBasicStyle = (token) => {
|
|
|
37
38
|
[`${itemCls}-wrapper`]: {
|
|
38
39
|
display: "flex",
|
|
39
40
|
flexWrap: "nowrap",
|
|
40
|
-
paddingTop:
|
|
41
|
+
paddingTop: varRef("item-wrapper-padding-top")
|
|
41
42
|
},
|
|
42
43
|
[`${itemCls}-header`]: {
|
|
43
44
|
display: "flex",
|
|
@@ -46,15 +47,15 @@ const genBasicStyle = (token) => {
|
|
|
46
47
|
},
|
|
47
48
|
[`${itemCls}-title`]: {
|
|
48
49
|
color: token.colorText,
|
|
49
|
-
fontSize:
|
|
50
|
-
lineHeight:
|
|
50
|
+
fontSize: varRef("title-font-size"),
|
|
51
|
+
lineHeight: varRef("title-line-height"),
|
|
51
52
|
wordBreak: "break-word"
|
|
52
53
|
},
|
|
53
54
|
[`${itemCls}-subtitle`]: {
|
|
54
55
|
color: token.colorTextDescription,
|
|
55
56
|
fontWeight: "normal",
|
|
56
|
-
fontSize:
|
|
57
|
-
lineHeight:
|
|
57
|
+
fontSize: varRef("subtitle-font-size"),
|
|
58
|
+
lineHeight: varRef("subtitle-line-height"),
|
|
58
59
|
marginInlineStart: token.marginXS,
|
|
59
60
|
wordBreak: "break-word"
|
|
60
61
|
},
|
|
@@ -65,7 +66,7 @@ const genBasicStyle = (token) => {
|
|
|
65
66
|
wordBreak: "break-word"
|
|
66
67
|
},
|
|
67
68
|
[`${itemCls}-rail`]: {
|
|
68
|
-
borderStyle: "
|
|
69
|
+
borderStyle: varRef("rail-line-style"),
|
|
69
70
|
borderWidth: 0
|
|
70
71
|
},
|
|
71
72
|
[`${itemCls}-title, ${itemCls}-subtitle, ${itemCls}-content, ${itemCls}-rail`]: { transition: `all ${token.motionDurationSlow}` },
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
2
|
+
|
|
1
3
|
//#region src/steps/style/inline.ts
|
|
2
4
|
const genInlineStyle = (token) => {
|
|
3
|
-
const { componentCls, inlineDotSize } = token;
|
|
4
|
-
const containerPaddingTop =
|
|
5
|
+
const { componentCls, inlineDotSize, paddingXS, lineWidth, antCls, calc } = token;
|
|
6
|
+
const containerPaddingTop = calc(paddingXS).add(lineWidth).equal();
|
|
5
7
|
const itemCls = `${componentCls}-item`;
|
|
8
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
6
9
|
return { [`${componentCls}-inline`]: {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
10
|
+
[varName("items-offset")]: "0",
|
|
11
|
+
[varName("item-wrapper-padding-top")]: containerPaddingTop,
|
|
9
12
|
"display": "inline-flex",
|
|
10
13
|
"&:before": {
|
|
11
14
|
content: "\"\"",
|
|
12
|
-
flex: "
|
|
15
|
+
flex: varRef("items-offset")
|
|
13
16
|
},
|
|
14
17
|
[itemCls]: {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
18
|
+
[varName("title-vertical-row-gap")]: paddingXS,
|
|
19
|
+
[varName("icon-size")]: inlineDotSize,
|
|
20
|
+
[varName("icon-size-active")]: inlineDotSize,
|
|
21
|
+
[varName("title-font-size")]: token.fontSizeSM,
|
|
22
|
+
[varName("title-line-height")]: token.lineHeightSM,
|
|
23
|
+
[varName("item-title-color")]: token.colorTextSecondary,
|
|
24
|
+
[varName("subtitle-font-size")]: token.fontSizeSM,
|
|
25
|
+
[varName("subtitle-line-height")]: token.lineHeightSM,
|
|
26
|
+
[varName("item-subtitle-color")]: token.colorTextQuaternary,
|
|
27
|
+
[varName("rail-size")]: token.lineWidth,
|
|
28
|
+
[varName("title-horizontal-rail-gap")]: "0px",
|
|
26
29
|
"flex": 1,
|
|
27
30
|
"&-wrapper": {
|
|
28
31
|
"paddingInline": token.paddingXXS,
|
|
29
32
|
"marginInline": token.calc(token.marginXXS).div(2).equal(),
|
|
30
33
|
"borderRadius": token.borderRadiusSM,
|
|
31
34
|
"cursor": "pointer",
|
|
32
|
-
"transition": `background ${token.motionDurationMid}`,
|
|
35
|
+
"transition": `background-color ${token.motionDurationMid}`,
|
|
33
36
|
"&:hover": { background: token.controlItemBgHover }
|
|
34
37
|
},
|
|
35
38
|
"&-icon": { [`${itemCls}-icon-dot`]: { "&:after": { display: "none" } } },
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
1
2
|
import { getItemWithWidthStyle } from "./util.js";
|
|
2
3
|
|
|
3
4
|
//#region src/steps/style/label-placement.ts
|
|
4
5
|
const genLabelPlacementStyle = (token) => {
|
|
5
|
-
const { componentCls, descriptionMaxWidth, marginXS, fontHeightLG, calc } = token;
|
|
6
|
+
const { componentCls, descriptionMaxWidth, marginXS, fontHeightLG, margin, paddingSM, marginXXS, antCls, calc } = token;
|
|
6
7
|
const itemCls = `${componentCls}-item`;
|
|
8
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
7
9
|
return {
|
|
8
10
|
[componentCls]: {
|
|
9
|
-
"
|
|
10
|
-
[`${itemCls}-icon`]: { marginBlockStart: `calc((
|
|
11
|
+
[varName("icon-size-max")]: `max(${varRef("icon-size")}, ${varRef("icon-size-active", varRef("icon-size"))})`,
|
|
12
|
+
[`${itemCls}-icon`]: { marginBlockStart: `calc((${varRef("heading-height")} - ${varRef("icon-size")}) / 2)` }
|
|
11
13
|
},
|
|
12
14
|
[`${componentCls}-title-horizontal`]: {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
[varName("title-horizontal-item-margin")]: margin,
|
|
16
|
+
[varName("title-horizontal-rail-margin")]: margin,
|
|
17
|
+
[varName("title-horizontal-title-height")]: fontHeightLG,
|
|
18
|
+
[varName("heading-height")]: `max(${varRef("icon-size")}, ${varRef("title-horizontal-title-height")})`,
|
|
17
19
|
[`&${componentCls}-horizontal, &${componentCls}-horizontal-alternate`]: {
|
|
18
|
-
[`${itemCls}:not(:first-child)`]: { marginInlineStart:
|
|
20
|
+
[`${itemCls}:not(:first-child)`]: { marginInlineStart: varRef("title-horizontal-item-margin") },
|
|
19
21
|
[`${itemCls}:last-child`]: { flex: "0 1 auto" },
|
|
20
22
|
[`${itemCls}-wrapper`]: { columnGap: token.marginXS }
|
|
21
23
|
},
|
|
@@ -23,32 +25,32 @@ const genLabelPlacementStyle = (token) => {
|
|
|
23
25
|
[`${itemCls}-wrapper`]: { columnGap: token.margin },
|
|
24
26
|
[`${itemCls}-empty-header`]: {
|
|
25
27
|
[`${itemCls}-header`]: { minHeight: "auto" },
|
|
26
|
-
[`${itemCls}-content`]: { marginTop: calc("
|
|
28
|
+
[`${itemCls}-content`]: { marginTop: calc(varRef("heading-height")).sub(token.fontHeight).div(2).equal() }
|
|
27
29
|
}
|
|
28
30
|
},
|
|
29
31
|
[`${itemCls}-section`]: {
|
|
30
32
|
flex: 1,
|
|
31
33
|
minWidth: 0
|
|
32
34
|
},
|
|
33
|
-
[`${itemCls}-header`]: { minHeight: "
|
|
35
|
+
[`${itemCls}-header`]: { minHeight: varRef("heading-height") },
|
|
34
36
|
[`${itemCls}-title`]: { flex: "0 1 auto" },
|
|
35
37
|
[`${itemCls}-content`]: { maxWidth: descriptionMaxWidth },
|
|
36
38
|
[`${itemCls}-subtitle`]: { flex: "0 9999 auto" },
|
|
37
39
|
[`&${componentCls}-horizontal ${itemCls}-rail`]: {
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
[varName("item-wrapper-padding-top")]: "0px",
|
|
41
|
+
flex: "1 1 0%",
|
|
42
|
+
marginInlineStart: varRef("title-horizontal-rail-margin")
|
|
41
43
|
}
|
|
42
44
|
},
|
|
43
45
|
[`${componentCls}-title-vertical`]: {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
46
|
+
[varName("title-vertical-row-gap")]: paddingSM,
|
|
47
|
+
[varName("title-horizontal-rail-gap")]: marginXXS,
|
|
48
|
+
[varName("heading-height")]: varRef("icon-size-max"),
|
|
47
49
|
[`> ${itemCls}`]: {
|
|
48
|
-
flex: 1,
|
|
50
|
+
flex: "1 1 0%",
|
|
49
51
|
[`${itemCls}-wrapper`]: {
|
|
50
52
|
flexDirection: "column",
|
|
51
|
-
rowGap:
|
|
53
|
+
rowGap: varRef("title-vertical-row-gap"),
|
|
52
54
|
alignItems: "center"
|
|
53
55
|
},
|
|
54
56
|
[`${itemCls}-section`]: { alignSelf: "stretch" },
|
|
@@ -64,8 +66,8 @@ const genLabelPlacementStyle = (token) => {
|
|
|
64
66
|
[`${itemCls}-rail`]: {
|
|
65
67
|
position: "absolute",
|
|
66
68
|
top: 0,
|
|
67
|
-
width: `calc(100% -
|
|
68
|
-
insetInlineStart: `calc(50% +
|
|
69
|
+
width: `calc(100% - ${varRef("icon-size")} - ${varRef("title-horizontal-rail-gap")} * 2)`,
|
|
70
|
+
insetInlineStart: `calc(50% + ${varRef("icon-size")} / 2 + ${varRef("title-horizontal-rail-gap")})`
|
|
69
71
|
}
|
|
70
72
|
},
|
|
71
73
|
...getItemWithWidthStyle(token, marginXS, {
|
package/dist/steps/style/nav.js
CHANGED
|
@@ -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/nav.ts
|
|
4
5
|
const genLegacyNavStyle = (token) => {
|
|
5
|
-
const { componentCls, fontSizeIcon,
|
|
6
|
+
const { componentCls, fontSizeIcon, navContentMaxWidth, navArrowColor, colorPrimary, motionDurationSlow, antCls, calc } = token;
|
|
6
7
|
const itemCls = `${componentCls}-item`;
|
|
7
8
|
const stepsNavActiveColor = colorPrimary;
|
|
9
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
8
10
|
return { [`${componentCls}${componentCls}-navigation`]: {
|
|
9
11
|
[itemCls.repeat(4)]: {
|
|
10
12
|
"display": "flex",
|
|
@@ -33,10 +35,10 @@ const genLegacyNavStyle = (token) => {
|
|
|
33
35
|
content: "\"\""
|
|
34
36
|
},
|
|
35
37
|
[`&${itemCls}-active`]: {
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
38
|
+
[varName("item-content-active-color")]: varRef("item-content-color"),
|
|
39
|
+
[varName("item-icon-active-bg-color")]: varRef("item-icon-bg-color"),
|
|
40
|
+
[varName("item-icon-active-border-color")]: varRef("item-icon-border-color"),
|
|
41
|
+
[varName("item-icon-active-text-color")]: varRef("item-icon-text-color")
|
|
40
42
|
}
|
|
41
43
|
},
|
|
42
44
|
[`&${componentCls}-horizontal`]: { [itemCls]: {
|
|
@@ -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-color ${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
|
|