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.
Files changed (266) hide show
  1. package/dist/_util/PurePanel.js +106 -0
  2. package/dist/_util/hooks/useMergeSemantic.js +3 -3
  3. package/dist/_util/styleUtils.js +10 -0
  4. package/dist/_util/tools.js +2 -1
  5. package/dist/_util/wave/WaveEffect.js +6 -1
  6. package/dist/_util/wave/style.js +4 -3
  7. package/dist/affix/index.d.ts +3 -3
  8. package/dist/alert/Alert.d.ts +4 -3
  9. package/dist/alert/Alert.js +1 -1
  10. package/dist/anchor/Anchor.d.ts +5 -5
  11. package/dist/anchor/AnchorLink.js +2 -2
  12. package/dist/anchor/index.d.ts +1 -1
  13. package/dist/antd.js +123 -115
  14. package/dist/app/App.d.ts +2 -2
  15. package/dist/auto-complete/index.d.ts +78 -0
  16. package/dist/auto-complete/index.js +634 -0
  17. package/dist/avatar/Avatar.d.ts +3 -3
  18. package/dist/avatar/AvatarGroup.d.ts +2 -2
  19. package/dist/badge/Ribbon.d.ts +3 -3
  20. package/dist/badge/ScrollNumber.js +1 -1
  21. package/dist/badge/SingleNumber.js +1 -1
  22. package/dist/badge/index.d.ts +3 -3
  23. package/dist/badge/index.js +5 -3
  24. package/dist/badge/style/index.js +1 -1
  25. package/dist/breadcrumb/Breadcrumb.d.ts +5 -5
  26. package/dist/breadcrumb/Breadcrumb.js +0 -8
  27. package/dist/breadcrumb/BreadcrumbItem.d.ts +1 -1
  28. package/dist/breadcrumb/BreadcrumbItem.js +1 -17
  29. package/dist/breadcrumb/index.d.ts +1 -1
  30. package/dist/button/Button.d.ts +3 -3
  31. package/dist/button/style/variant.js +116 -104
  32. package/dist/calendar/Header.js +1 -1
  33. package/dist/calendar/generateCalendar.d.ts +3 -3
  34. package/dist/calendar/index.d.ts +3 -3
  35. package/dist/calendar/style/index.d.ts +1 -1
  36. package/dist/calendar/style/index.js +1 -1
  37. package/dist/card/Card.d.ts +3 -3
  38. package/dist/card/CardGrid.d.ts +2 -2
  39. package/dist/card/CardMeta.d.ts +3 -3
  40. package/dist/card/style/index.js +11 -2
  41. package/dist/carousel/index.d.ts +3 -3
  42. package/dist/cascader/Panel.d.ts +3 -3
  43. package/dist/cascader/index.d.ts +4 -3
  44. package/dist/cascader/index.js +3 -1
  45. package/dist/checkbox/Checkbox.d.ts +3 -3
  46. package/dist/checkbox/Group.d.ts +3 -3
  47. package/dist/checkbox/style/index.d.ts +1 -1
  48. package/dist/collapse/Collapse.d.ts +3 -3
  49. package/dist/color-picker/ColorPicker.d.ts +3 -3
  50. package/dist/color-picker/ColorPicker.js +13 -2
  51. package/dist/components.d.ts +11 -8
  52. package/dist/components.js +7 -4
  53. package/dist/config-provider/context.d.ts +2 -1
  54. package/dist/config-provider/context.js +3 -3
  55. package/dist/config-provider/define.d.ts +14 -0
  56. package/dist/config-provider/index.d.ts +3 -3
  57. package/dist/config-provider/index.js +21 -2
  58. package/dist/date-picker/generatePicker/generateRangePicker.js +2 -2
  59. package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -2
  60. package/dist/date-picker/generatePicker/index.d.ts +17 -17
  61. package/dist/date-picker/index.d.ts +29 -27
  62. package/dist/date-picker/index.js +3 -0
  63. package/dist/date-picker/style/panel.js +4 -4
  64. package/dist/descriptions/index.d.ts +3 -3
  65. package/dist/divider/index.d.ts +2 -2
  66. package/dist/drawer/index.d.ts +6 -4
  67. package/dist/drawer/index.js +17 -5
  68. package/dist/drawer/useFocusable.d.ts +10 -0
  69. package/dist/drawer/useFocusable.js +18 -0
  70. package/dist/dropdown/dropdown.d.ts +4 -4
  71. package/dist/dropdown/dropdown.js +12 -3
  72. package/dist/empty/index.d.ts +3 -3
  73. package/dist/flex/index.d.ts +3 -3
  74. package/dist/flex/index.js +1 -1
  75. package/dist/float-button/BackTop.d.ts +3 -3
  76. package/dist/float-button/BackTop.js +4 -1
  77. package/dist/float-button/FloatButton.d.ts +3 -3
  78. package/dist/float-button/FloatButtonGroup.d.ts +3 -3
  79. package/dist/float-button/PurePanel.js +5 -5
  80. package/dist/float-button/style/button.js +4 -4
  81. package/dist/float-button/style/group.js +12 -12
  82. package/dist/form/ErrorList.js +4 -7
  83. package/dist/form/Form.d.ts +7 -3
  84. package/dist/form/Form.js +39 -22
  85. package/dist/form/FormItem/ItemHolder.js +0 -1
  86. package/dist/form/FormItem/index.d.ts +5 -5
  87. package/dist/form/FormItem/index.js +48 -29
  88. package/dist/form/FormItemInput.js +17 -19
  89. package/dist/form/style/index.js +3 -2
  90. package/dist/form/utils/valueUtil.js +4 -1
  91. package/dist/grid/col.js +7 -2
  92. package/dist/grid/index.d.ts +2 -2
  93. package/dist/grid/row.d.ts +2 -2
  94. package/dist/grid/style/index.js +7 -5
  95. package/dist/image/PreviewGroup.d.ts +2 -2
  96. package/dist/image/index.d.ts +7 -4
  97. package/dist/image/index.js +2 -0
  98. package/dist/image/style/index.d.ts +1 -1
  99. package/dist/index.d.ts +16 -12
  100. package/dist/index.js +7 -4
  101. package/dist/input/Input.js +1 -1
  102. package/dist/input/OTP/index.js +1 -1
  103. package/dist/input/TextArea.d.ts +3 -3
  104. package/dist/input/TextArea.js +1 -1
  105. package/dist/input/index.d.ts +11 -11
  106. package/dist/input/style/index.d.ts +2 -2
  107. package/dist/input-number/index.d.ts +4 -4
  108. package/dist/input-number/index.js +2 -6
  109. package/dist/input-number/style/index.js +18 -17
  110. package/dist/layout/index.d.ts +6 -6
  111. package/dist/layout/layout.d.ts +2 -2
  112. package/dist/layout/style/sider.js +1 -1
  113. package/dist/masonry/Masonry.d.ts +3 -3
  114. package/dist/masonry/Masonry.js +8 -6
  115. package/dist/mentions/index.d.ts +4 -3
  116. package/dist/mentions/index.js +4 -2
  117. package/dist/mentions/style/index.js +18 -17
  118. package/dist/menu/MenuDivider.d.ts +2 -2
  119. package/dist/menu/MenuItem.d.ts +3 -3
  120. package/dist/menu/index.d.ts +5 -5
  121. package/dist/menu/style/horizontal.js +1 -1
  122. package/dist/menu/style/index.js +5 -5
  123. package/dist/message/PurePanel.d.ts +2 -2
  124. package/dist/message/useMessage.d.ts +1 -0
  125. package/dist/modal/ConfirmDialog.js +1 -1
  126. package/dist/modal/Modal.d.ts +3 -3
  127. package/dist/modal/Modal.js +17 -6
  128. package/dist/modal/PurePanel.js +305 -0
  129. package/dist/modal/index.js +2 -0
  130. package/dist/modal/interface.d.ts +3 -1
  131. package/dist/notification/PurePanel.d.ts +2 -2
  132. package/dist/notification/PurePanel.js +4 -3
  133. package/dist/notification/style/index.d.ts +1 -1
  134. package/dist/notification/useNotification.d.ts +2 -1
  135. package/dist/notification/useNotification.js +7 -7
  136. package/dist/package.d.ts +143 -3
  137. package/dist/package.js +1 -1
  138. package/dist/pagination/Pagination.d.ts +3 -3
  139. package/dist/pagination/Pagination.js +1 -1
  140. package/dist/pagination/style/index.js +61 -50
  141. package/dist/popconfirm/PurePanel.d.ts +2 -2
  142. package/dist/popconfirm/PurePanel.js +2 -1
  143. package/dist/popconfirm/index.d.ts +3 -3
  144. package/dist/popover/PurePanel.js +4 -2
  145. package/dist/popover/index.d.ts +9 -6
  146. package/dist/popover/index.js +2 -1
  147. package/dist/popover/style/index.js +11 -8
  148. package/dist/progress/progress.d.ts +3 -3
  149. package/dist/qrcode/index.d.ts +3 -3
  150. package/dist/radio/index.d.ts +5 -5
  151. package/dist/radio/radio.d.ts +3 -3
  152. package/dist/radio/style/index.js +1 -1
  153. package/dist/rate/index.d.ts +3 -3
  154. package/dist/rate/style/index.d.ts +1 -1
  155. package/dist/result/index.d.ts +3 -3
  156. package/dist/result/noFound.d.ts +2 -2
  157. package/dist/result/serverError.d.ts +2 -2
  158. package/dist/segmented/index.d.ts +3 -3
  159. package/dist/select/index.d.ts +6 -6
  160. package/dist/select/index.js +5 -3
  161. package/dist/select/style/dropdown.js +1 -1
  162. package/dist/select/style/select-input-multiple.js +31 -29
  163. package/dist/select/style/select-input.js +50 -44
  164. package/dist/skeleton/Avatar.d.ts +2 -2
  165. package/dist/skeleton/Button.d.ts +2 -2
  166. package/dist/skeleton/Image.d.ts +2 -2
  167. package/dist/skeleton/Input.d.ts +2 -2
  168. package/dist/skeleton/Node.d.ts +3 -3
  169. package/dist/skeleton/Skeleton.d.ts +3 -3
  170. package/dist/skeleton/Skeleton.js +1 -1
  171. package/dist/skeleton/Title.d.ts +1 -2
  172. package/dist/skeleton/Title.js +0 -5
  173. package/dist/slider/index.d.ts +3 -3
  174. package/dist/space/Compact.d.ts +2 -0
  175. package/dist/space/Compact.js +17 -4
  176. package/dist/space/index.d.ts +5 -5
  177. package/dist/space/style/addon.js +20 -19
  178. package/dist/spin/index.d.ts +3 -3
  179. package/dist/spin/index.js +7 -6
  180. package/dist/splitter/SplitBar.js +9 -2
  181. package/dist/splitter/Splitter.d.ts +3 -3
  182. package/dist/splitter/Splitter.js +2 -1
  183. package/dist/splitter/index.d.ts +2 -2
  184. package/dist/splitter/style/index.js +6 -6
  185. package/dist/statistic/Statistic.d.ts +3 -3
  186. package/dist/statistic/Timer.d.ts +5 -5
  187. package/dist/statistic/index.d.ts +5 -5
  188. package/dist/steps/ProgressIcon.js +9 -2
  189. package/dist/steps/index.d.ts +3 -3
  190. package/dist/steps/index.js +7 -4
  191. package/dist/steps/style/horizontal.js +13 -10
  192. package/dist/steps/style/icon.js +12 -9
  193. package/dist/steps/style/index.js +19 -18
  194. package/dist/steps/style/inline.js +20 -17
  195. package/dist/steps/style/label-placement.js +22 -20
  196. package/dist/steps/style/nav.js +7 -5
  197. package/dist/steps/style/panel.js +34 -32
  198. package/dist/steps/style/progress-dot.js +10 -8
  199. package/dist/steps/style/progress.js +29 -58
  200. package/dist/steps/style/rtl.js +6 -4
  201. package/dist/steps/style/small.js +10 -8
  202. package/dist/steps/style/status.js +124 -121
  203. package/dist/steps/style/util.js +7 -4
  204. package/dist/steps/style/vertical.js +17 -14
  205. package/dist/style/placementArrow.js +7 -5
  206. package/dist/switch/index.d.ts +3 -3
  207. package/dist/table/Column.d.ts +3 -3
  208. package/dist/table/ColumnGroup.d.ts +3 -3
  209. package/dist/table/InternalTable.js +20 -6
  210. package/dist/table/Table.d.ts +3 -3
  211. package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
  212. package/dist/table/style/index.js +3 -3
  213. package/dist/table/style/radius.js +6 -0
  214. package/dist/table/style/virtual.js +1 -1
  215. package/dist/tabs/TabPane.d.ts +3 -3
  216. package/dist/tabs/index.d.ts +3 -3
  217. package/dist/tag/CheckableTag.d.ts +3 -3
  218. package/dist/tag/CheckableTagGroup.d.ts +3 -3
  219. package/dist/tag/CheckableTagGroup.js +3 -3
  220. package/dist/tag/index.d.ts +3 -3
  221. package/dist/theme/context.d.ts +2 -2
  222. package/dist/theme/index.d.ts +1 -1
  223. package/dist/theme/useToken.d.ts +2 -2
  224. package/dist/theme/useToken.js +1 -1
  225. package/dist/theme/util/genStyleUtils.d.ts +2 -2
  226. package/dist/theme/util/genStyleUtils.js +8 -5
  227. package/dist/theme/util/useResetIconStyle.js +1 -1
  228. package/dist/time-picker/index.d.ts +8 -7
  229. package/dist/time-picker/index.js +17 -13
  230. package/dist/timeline/Timeline.d.ts +3 -3
  231. package/dist/tooltip/PurePanel.d.ts +2 -2
  232. package/dist/tooltip/PurePanel.js +12 -8
  233. package/dist/tooltip/UniqueProvider/index.d.ts +2 -2
  234. package/dist/tooltip/index.d.ts +3 -3
  235. package/dist/tooltip/index.js +2 -3
  236. package/dist/tooltip/style/index.js +10 -8
  237. package/dist/tooltip/util.js +5 -3
  238. package/dist/tour/PurePanel.js +243 -0
  239. package/dist/tour/index.d.ts +3 -3
  240. package/dist/tour/index.js +2 -0
  241. package/dist/tour/style/index.js +5 -4
  242. package/dist/transfer/Actions.d.ts +2 -2
  243. package/dist/transfer/Section.d.ts +2 -2
  244. package/dist/transfer/Transfer.d.ts +3 -3
  245. package/dist/transfer/Transfer.js +2 -2
  246. package/dist/transfer/search.d.ts +3 -3
  247. package/dist/tree/DirectoryTree.d.ts +3 -3
  248. package/dist/tree/Tree.d.ts +3 -3
  249. package/dist/tree/style/index.d.ts +1 -1
  250. package/dist/tree-select/index.d.ts +5 -4
  251. package/dist/tree-select/index.js +3 -1
  252. package/dist/typography/Link.d.ts +3 -3
  253. package/dist/typography/Paragraph.d.ts +3 -3
  254. package/dist/typography/Text.d.ts +3 -3
  255. package/dist/typography/Title.d.ts +3 -3
  256. package/dist/typography/Typography.d.ts +3 -3
  257. package/dist/typography/index.d.ts +9 -9
  258. package/dist/upload/Dragger.d.ts +6 -3
  259. package/dist/upload/Upload.d.ts +3 -3
  260. package/dist/upload/Upload.js +15 -1
  261. package/dist/upload/index.d.ts +6 -3
  262. package/dist/upload/interface.d.ts +4 -4
  263. package/global.d.ts +3 -0
  264. package/package.json +69 -17
  265. package/web-tags.json +5069 -0
  266. package/web-types.json +14335 -0
@@ -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 xl = computed(() => breakpoint.value?.xl);
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 && xl.value || nextOrientation === "vertical" ? "vertical" : "horizontal";
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
- "--steps-items-offset": offset,
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
- "--steps-horizontal-rail-margin": "calc(var(--steps-icon-size-max) / 2 + var(--steps-item-wrapper-padding-top))",
10
- "position": "static",
11
- "marginTop": "var(--steps-horizontal-rail-margin)",
12
- "width": "auto",
13
- "borderBlockStartWidth": "var(--steps-rail-size)",
14
- "flex": 1,
15
- "minWidth": 0,
16
- "alignSelf": "flex-start",
17
- "transform": "translateY(-50%)"
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
  };
@@ -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
- "--steps-icon-size": token.iconSize,
7
- "--steps-icon-border-width": token.lineWidth,
9
+ [varName("icon-size")]: iconSize,
10
+ [varName("icon-border-width")]: lineWidth,
8
11
  [`${itemCls}-icon`]: {
9
- width: "var(--steps-icon-size)",
10
- height: "var(--steps-icon-size)",
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: "var(--steps-icon-size)",
21
+ lineHeight: varRef("icon-size"),
19
22
  textAlign: "center",
20
- borderRadius: "var(--steps-icon-size)",
21
- border: `var(--steps-icon-border-width) ${token.lineType} transparent`,
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
- "--steps-title-font-size": token.fontSizeLG,
23
- "--steps-title-line-height": token.lineHeightLG,
24
- "--steps-subtitle-font-size": token.fontSize,
25
- "--steps-subtitle-line-height": token.lineHeight,
26
- "--steps-item-wrapper-padding-top": "0px",
27
- "--steps-rail-size": token.lineWidth,
28
- "--steps-rail-line-style": token.lineType,
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
- "display": "flex",
31
- "flexWrap": "nowrap",
32
- "alignItems": "flex-start",
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: `var(--steps-item-wrapper-padding-top)`
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: `var(--steps-title-font-size)`,
50
- lineHeight: `var(--steps-title-line-height)`,
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: `var(--steps-subtitle-font-size)`,
57
- lineHeight: `var(--steps-subtitle-line-height)`,
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: "var(--steps-rail-line-style)",
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 = token.calc(token.paddingXS).add(token.lineWidth).equal();
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
- "--steps-items-offset": "0",
8
- "--steps-item-wrapper-padding-top": containerPaddingTop,
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: "var(--steps-items-offset)"
15
+ flex: varRef("items-offset")
13
16
  },
14
17
  [itemCls]: {
15
- "--steps-title-vertical-row-gap": token.paddingXS,
16
- "--steps-icon-size": inlineDotSize,
17
- "--steps-icon-size-active": inlineDotSize,
18
- "--steps-title-font-size": token.fontSizeSM,
19
- "--steps-title-line-height": token.lineHeightSM,
20
- "--steps-item-title-color": token.colorTextSecondary,
21
- "--steps-subtitle-font-size": token.fontSizeSM,
22
- "--steps-subtitle-line-height": token.lineHeightSM,
23
- "--steps-item-subtitle-color": token.colorTextQuaternary,
24
- "--steps-rail-size": token.lineWidth,
25
- "--steps-title-horizontal-rail-gap": "0px",
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
- "--steps-icon-size-max": "max(var(--steps-icon-size), var(--steps-icon-size-active, var(--steps-icon-size)))",
10
- [`${itemCls}-icon`]: { marginBlockStart: `calc((var(--steps-heading-height) - var(--steps-icon-size)) / 2)` }
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
- "--steps-title-horizontal-item-margin": token.margin,
14
- "--steps-title-horizontal-rail-margin": token.margin,
15
- "--steps-title-horizontal-title-height": fontHeightLG,
16
- "--steps-heading-height": `max(var(--steps-icon-size), var(--steps-title-horizontal-title-height))`,
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: `var(--steps-title-horizontal-item-margin)` },
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("var(--steps-heading-height)").sub(token.fontHeight).div(2).equal() }
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: "var(--steps-heading-height)" },
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
- "--steps-item-wrapper-padding-top": "0px",
39
- "flex": 1,
40
- "marginInlineStart": `var(--steps-title-horizontal-rail-margin)`
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
- "--steps-title-vertical-row-gap": token.paddingSM,
45
- "--steps-title-horizontal-rail-gap": token.marginXXS,
46
- "--steps-heading-height": "var(--steps-icon-size-max)",
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: `var(--steps-title-vertical-row-gap)`,
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% - var(--steps-icon-size) - var(--steps-title-horizontal-rail-gap) * 2)`,
68
- insetInlineStart: `calc(50% + var(--steps-icon-size) / 2 + var(--steps-title-horizontal-rail-gap))`
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, {
@@ -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, calc, navContentMaxWidth, navArrowColor, colorPrimary, motionDurationSlow } = token;
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
- "--steps-item-content-active-color": `var(--steps-item-content-color)`,
37
- "--steps-item-icon-active-bg-color": "var(--steps-item-icon-bg-color)",
38
- "--steps-item-icon-active-border-color": "var(--steps-item-icon-border-color)",
39
- "--steps-item-icon-active-text-color": "var(--steps-item-icon-text-color)"
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, calc, lineWidthBold, borderRadius, borderRadiusSM, motionDurationMid } = token;
6
+ const { componentCls, lineWidthBold, borderRadius, borderRadiusSM, motionDurationMid, paddingXS, lineType, paddingSM, antCls, calc } = token;
6
7
  const itemCls = `${componentCls}-item`;
7
- const borderStyle = `${unit(lineWidthBold)} ${token.lineType} var(--steps-panel-border-color)`;
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
- "--steps-panel-padding": token.paddingSM,
22
- "--steps-item-border-radius": borderRadius,
23
+ [varName("panel-padding")]: paddingSM,
24
+ [varName("item-border-radius")]: borderRadius,
23
25
  [itemCls]: {
24
- "--steps-panel-bg-color": "var(--steps-item-icon-bg-color)",
25
- "--steps-panel-border-color": "var(--steps-item-icon-border-color)",
26
- "--steps-panel-active-bg-color": "var(--steps-item-icon-active-bg-color)",
27
- "--steps-panel-active-border-color": "var(--steps-item-icon-active-border-color)",
28
- "--steps-panel-title-height": `calc(var(--steps-title-font-size) * var(--steps-title-line-height))`,
29
- "--steps-item-base-height": calc("var(--steps-panel-padding)").mul(2).add("var(--steps-icon-size)").add("var(--steps-panel-title-height)").equal(),
30
- "--steps-item-base-width": "calc(var(--steps-item-base-height) * 0.7071)",
31
- "transition": `background ${motionDurationMid}`
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: "var(--steps-item-base-width)",
44
+ width: varRef("item-base-width"),
43
45
  overflow: "visible",
44
46
  strokeLinecap: "round",
45
47
  path: {
46
- fill: "var(--steps-panel-bg-color)",
47
- stroke: "var(--steps-panel-border-color)",
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": "var(--steps-panel-padding)",
56
- "background": "var(--steps-panel-bg-color)",
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(var(--steps-panel-padding) + var(--steps-item-base-width))` },
61
+ "&:not(:first-child)": { paddingInlineStart: `calc(${varRef("panel-padding")} + ${varRef("item-base-width")})` },
60
62
  "&:first-child": {
61
63
  borderInlineStart: borderStyle,
62
- borderStartStartRadius: "var(--steps-item-border-radius)",
63
- borderEndStartRadius: "var(--steps-item-border-radius)"
64
+ borderStartStartRadius: varRef("item-border-radius"),
65
+ borderEndStartRadius: varRef("item-border-radius")
64
66
  },
65
67
  "&:last-child": {
66
68
  borderInlineEnd: borderStyle,
67
- borderStartEndRadius: "var(--steps-item-border-radius)",
68
- borderEndEndRadius: "var(--steps-item-border-radius)"
69
+ borderStartEndRadius: varRef("item-border-radius"),
70
+ borderEndEndRadius: varRef("item-border-radius")
69
71
  },
70
72
  "&-active": {
71
- background: "var(--steps-panel-active-bg-color)",
72
- borderColor: "var(--steps-panel-active-border-color)",
73
+ background: varRef("panel-active-bg-color"),
74
+ borderColor: varRef("panel-active-border-color"),
73
75
  [`${componentCls}-panel-arrow`]: { path: {
74
- fill: "var(--steps-panel-active-bg-color)",
75
- stroke: "var(--steps-panel-active-border-color)"
76
+ fill: varRef("panel-active-bg-color"),
77
+ stroke: varRef("panel-active-border-color")
76
78
  } },
77
- [`${itemCls}-title, ${itemCls}-subtitle, ${itemCls}-content`]: { color: "var(--steps-item-icon-active-text-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
- "--steps-panel-padding": token.paddingXS,
83
- "--steps-item-border-radius": borderRadiusSM
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
- "calc(100% + var(--steps-item-base-width)) 0",
88
- "calc(100% + var(--steps-item-base-width)) 100%",
89
+ `calc(100% + ${varRef("item-base-width")}) 0`,
90
+ `calc(100% + ${varRef("item-base-width")}) 100%`,
89
91
  `${unit(lineWidthBold)} 100%`,
90
- `calc(var(--steps-item-base-width) + ${unit(lineWidthBold)}) 50%`
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
- "--steps-icon-size-active": dotCurrentSize,
9
- "--steps-icon-size": dotSize,
10
- "--steps-dot-icon-size": dotSize,
11
- "--steps-dot-icon-border-width": token.lineWidthBold,
12
- "--steps-rail-size": lineWidthBold,
13
- "--steps-icon-border-width": lineWidthBold,
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`]: { "--steps-icon-size": "var(--steps-icon-size-active)" },
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 { unit } from "@antdv-next/cssinjs";
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, iconSize, iconSizeSM, lineWidthBold, paddingXXS } = token;
5
+ const { calc, antCls, componentCls, lineWidthBold, motionDurationSlow } = token;
6
6
  const itemCls = `${componentCls}-item`;
7
- const progressSize = token.calc(iconSize).add(token.calc(lineWidthBold).mul(4).equal()).equal();
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
- [`${componentCls}${componentCls}-with-progress`]: {
12
- "--steps-item-wrapper-padding-top": enhanceSize,
13
- [`${itemCls}${itemCls}-process`]: { [`${itemCls}-icon`]: { position: "relative" } },
14
- [`${itemCls}-progress-icon`]: {
15
- "&-svg": {
16
- "--steps-svg-size": calc(enhanceSize).mul(2).add(`var(--steps-icon-size)`).equal(),
17
- "--icon-size-ptg-unitless": `calc(100 / tan(atan2(var(--steps-svg-size),1px)))`,
18
- "fontSize": `var(--steps-svg-size)`,
19
- "lineHeight": `var(--icon-size-ptg-unitless)`,
20
- "position": "absolute",
21
- "inset": calc(enhanceSize).mul(-1).equal(),
22
- "width": "auto",
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
- [`&${componentCls}-small`]: { [`${itemCls}-icon ${antCls}-progress-body`]: {
61
- width: `${unit(progressSizeSM)} !important`,
62
- height: `${unit(progressSizeSM)} !important`
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