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.
Files changed (195) hide show
  1. package/dist/_util/tools.js +2 -1
  2. package/dist/_util/wave/WaveEffect.js +6 -1
  3. package/dist/_util/wave/style.js +4 -3
  4. package/dist/affix/index.d.ts +3 -3
  5. package/dist/alert/Alert.d.ts +4 -3
  6. package/dist/alert/Alert.js +1 -1
  7. package/dist/anchor/Anchor.d.ts +5 -5
  8. package/dist/anchor/AnchorLink.js +2 -2
  9. package/dist/anchor/index.d.ts +1 -1
  10. package/dist/antd.js +76 -76
  11. package/dist/app/App.d.ts +2 -2
  12. package/dist/auto-complete/index.d.ts +77 -0
  13. package/dist/auto-complete/index.js +627 -0
  14. package/dist/avatar/Avatar.d.ts +3 -3
  15. package/dist/avatar/AvatarGroup.d.ts +2 -2
  16. package/dist/badge/Ribbon.d.ts +3 -3
  17. package/dist/badge/index.d.ts +3 -3
  18. package/dist/breadcrumb/Breadcrumb.d.ts +5 -5
  19. package/dist/breadcrumb/Breadcrumb.js +0 -8
  20. package/dist/breadcrumb/BreadcrumbItem.d.ts +1 -1
  21. package/dist/breadcrumb/BreadcrumbItem.js +1 -17
  22. package/dist/breadcrumb/index.d.ts +1 -1
  23. package/dist/button/Button.d.ts +3 -3
  24. package/dist/button/style/variant.js +116 -104
  25. package/dist/calendar/Header.js +1 -1
  26. package/dist/calendar/generateCalendar.d.ts +3 -3
  27. package/dist/calendar/index.d.ts +3 -3
  28. package/dist/card/Card.d.ts +3 -3
  29. package/dist/card/CardGrid.d.ts +2 -2
  30. package/dist/card/CardMeta.d.ts +3 -3
  31. package/dist/carousel/index.d.ts +3 -3
  32. package/dist/cascader/Panel.d.ts +3 -3
  33. package/dist/cascader/index.d.ts +3 -3
  34. package/dist/cascader/index.js +1 -1
  35. package/dist/checkbox/Checkbox.d.ts +3 -3
  36. package/dist/checkbox/Group.d.ts +3 -3
  37. package/dist/collapse/Collapse.d.ts +3 -3
  38. package/dist/color-picker/ColorPicker.d.ts +4 -4
  39. package/dist/color-picker/ColorPicker.js +2 -2
  40. package/dist/components.d.ts +3 -2
  41. package/dist/components.js +7 -4
  42. package/dist/config-provider/context.js +2 -2
  43. package/dist/config-provider/index.d.ts +3 -3
  44. package/dist/date-picker/generatePicker/generateRangePicker.js +1 -1
  45. package/dist/date-picker/generatePicker/generateSinglePicker.js +1 -1
  46. package/dist/date-picker/generatePicker/index.d.ts +15 -15
  47. package/dist/date-picker/index.d.ts +25 -25
  48. package/dist/descriptions/index.d.ts +3 -3
  49. package/dist/divider/index.d.ts +2 -2
  50. package/dist/drawer/index.d.ts +3 -3
  51. package/dist/dropdown/dropdown.d.ts +4 -4
  52. package/dist/dropdown/dropdown.js +5 -3
  53. package/dist/empty/index.d.ts +3 -3
  54. package/dist/flex/index.d.ts +3 -3
  55. package/dist/float-button/BackTop.d.ts +3 -3
  56. package/dist/float-button/FloatButton.d.ts +3 -3
  57. package/dist/float-button/FloatButtonGroup.d.ts +3 -3
  58. package/dist/float-button/style/button.js +4 -4
  59. package/dist/float-button/style/group.js +12 -12
  60. package/dist/form/Form.d.ts +3 -3
  61. package/dist/form/FormItem/index.d.ts +3 -3
  62. package/dist/form/style/index.js +3 -2
  63. package/dist/grid/row.d.ts +2 -2
  64. package/dist/grid/style/index.js +5 -4
  65. package/dist/image/PreviewGroup.d.ts +2 -2
  66. package/dist/image/index.d.ts +4 -4
  67. package/dist/index.d.ts +5 -4
  68. package/dist/index.js +5 -4
  69. package/dist/input/Input.js +1 -1
  70. package/dist/input/OTP/index.js +1 -1
  71. package/dist/input/TextArea.d.ts +3 -3
  72. package/dist/input/TextArea.js +1 -1
  73. package/dist/input/index.d.ts +11 -11
  74. package/dist/input-number/index.d.ts +3 -3
  75. package/dist/input-number/index.js +1 -1
  76. package/dist/input-number/style/index.js +18 -17
  77. package/dist/layout/index.d.ts +6 -6
  78. package/dist/layout/layout.d.ts +2 -2
  79. package/dist/masonry/Masonry.d.ts +3 -3
  80. package/dist/masonry/Masonry.js +8 -6
  81. package/dist/mentions/index.d.ts +3 -3
  82. package/dist/mentions/index.js +1 -1
  83. package/dist/mentions/style/index.js +18 -17
  84. package/dist/menu/MenuDivider.d.ts +2 -2
  85. package/dist/menu/SubMenu.d.ts +3 -3
  86. package/dist/menu/index.d.ts +5 -5
  87. package/dist/message/PurePanel.d.ts +2 -2
  88. package/dist/modal/Modal.d.ts +3 -3
  89. package/dist/notification/PurePanel.d.ts +2 -2
  90. package/dist/notification/useNotification.d.ts +2 -2
  91. package/dist/package.d.ts +109 -3
  92. package/dist/package.js +1 -1
  93. package/dist/pagination/Pagination.d.ts +3 -3
  94. package/dist/pagination/Pagination.js +1 -1
  95. package/dist/pagination/style/index.js +61 -50
  96. package/dist/popconfirm/PurePanel.d.ts +2 -2
  97. package/dist/popconfirm/index.d.ts +3 -3
  98. package/dist/popover/index.d.ts +3 -3
  99. package/dist/popover/style/index.js +11 -8
  100. package/dist/progress/progress.d.ts +3 -3
  101. package/dist/qrcode/index.d.ts +3 -3
  102. package/dist/radio/index.d.ts +5 -5
  103. package/dist/radio/radio.d.ts +3 -3
  104. package/dist/rate/index.d.ts +3 -3
  105. package/dist/result/index.d.ts +3 -3
  106. package/dist/result/noFound.d.ts +2 -2
  107. package/dist/result/serverError.d.ts +2 -2
  108. package/dist/segmented/index.d.ts +3 -3
  109. package/dist/select/index.d.ts +6 -6
  110. package/dist/select/index.js +2 -2
  111. package/dist/select/style/select-input-multiple.js +31 -29
  112. package/dist/select/style/select-input.js +50 -44
  113. package/dist/skeleton/Button.d.ts +2 -2
  114. package/dist/skeleton/Input.d.ts +2 -2
  115. package/dist/skeleton/Node.d.ts +3 -3
  116. package/dist/skeleton/Skeleton.d.ts +3 -3
  117. package/dist/slider/index.d.ts +3 -3
  118. package/dist/space/Compact.d.ts +2 -0
  119. package/dist/space/Compact.js +17 -4
  120. package/dist/space/index.d.ts +5 -5
  121. package/dist/space/style/addon.js +20 -19
  122. package/dist/spin/index.d.ts +3 -3
  123. package/dist/splitter/SplitBar.js +9 -2
  124. package/dist/splitter/Splitter.d.ts +3 -3
  125. package/dist/splitter/Splitter.js +2 -1
  126. package/dist/splitter/index.d.ts +2 -2
  127. package/dist/splitter/style/index.js +6 -6
  128. package/dist/statistic/Statistic.d.ts +3 -3
  129. package/dist/statistic/Timer.d.ts +5 -5
  130. package/dist/statistic/index.d.ts +5 -5
  131. package/dist/steps/ProgressIcon.js +9 -2
  132. package/dist/steps/index.d.ts +3 -3
  133. package/dist/steps/index.js +7 -4
  134. package/dist/steps/style/horizontal.js +13 -10
  135. package/dist/steps/style/icon.js +11 -8
  136. package/dist/steps/style/index.js +19 -18
  137. package/dist/steps/style/inline.js +19 -16
  138. package/dist/steps/style/label-placement.js +22 -20
  139. package/dist/steps/style/nav.js +7 -5
  140. package/dist/steps/style/panel.js +34 -32
  141. package/dist/steps/style/progress-dot.js +10 -8
  142. package/dist/steps/style/progress.js +29 -58
  143. package/dist/steps/style/rtl.js +6 -4
  144. package/dist/steps/style/small.js +10 -8
  145. package/dist/steps/style/status.js +124 -121
  146. package/dist/steps/style/util.js +7 -4
  147. package/dist/steps/style/vertical.js +17 -14
  148. package/dist/style/placementArrow.js +7 -5
  149. package/dist/switch/index.d.ts +3 -3
  150. package/dist/table/Column.d.ts +3 -3
  151. package/dist/table/ColumnGroup.d.ts +3 -3
  152. package/dist/table/InternalTable.js +1 -1
  153. package/dist/table/Table.d.ts +3 -3
  154. package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
  155. package/dist/tabs/TabPane.d.ts +3 -3
  156. package/dist/tabs/index.d.ts +3 -3
  157. package/dist/tag/CheckableTag.d.ts +3 -3
  158. package/dist/tag/CheckableTagGroup.d.ts +3 -3
  159. package/dist/tag/index.d.ts +3 -3
  160. package/dist/theme/index.d.ts +4 -4
  161. package/dist/theme/util/genStyleUtils.js +8 -5
  162. package/dist/time-picker/index.d.ts +7 -7
  163. package/dist/timeline/Timeline.d.ts +3 -3
  164. package/dist/tooltip/PurePanel.d.ts +2 -2
  165. package/dist/tooltip/PurePanel.js +3 -3
  166. package/dist/tooltip/UniqueProvider/index.d.ts +2 -2
  167. package/dist/tooltip/index.d.ts +3 -3
  168. package/dist/tooltip/index.js +2 -3
  169. package/dist/tooltip/style/index.js +10 -8
  170. package/dist/tooltip/util.js +5 -3
  171. package/dist/tour/index.d.ts +3 -3
  172. package/dist/tour/style/index.js +5 -4
  173. package/dist/transfer/Actions.d.ts +2 -2
  174. package/dist/transfer/Section.d.ts +2 -2
  175. package/dist/transfer/Transfer.d.ts +3 -3
  176. package/dist/transfer/Transfer.js +1 -1
  177. package/dist/transfer/search.d.ts +3 -3
  178. package/dist/tree/DirectoryTree.d.ts +3 -3
  179. package/dist/tree/Tree.d.ts +3 -3
  180. package/dist/tree-select/index.d.ts +4 -4
  181. package/dist/tree-select/index.js +1 -1
  182. package/dist/typography/Link.d.ts +3 -3
  183. package/dist/typography/Paragraph.d.ts +3 -3
  184. package/dist/typography/Text.d.ts +3 -3
  185. package/dist/typography/Title.d.ts +3 -3
  186. package/dist/typography/Typography.d.ts +3 -3
  187. package/dist/typography/index.d.ts +9 -9
  188. package/dist/upload/Dragger.d.ts +6 -3
  189. package/dist/upload/Upload.d.ts +3 -3
  190. package/dist/upload/index.d.ts +6 -3
  191. package/dist/watermark/index.d.ts +2 -2
  192. package/global.d.ts +2 -0
  193. package/package.json +22 -4
  194. package/web-tags.json +4524 -0
  195. package/web-types.json +12779 -0
@@ -1,5 +1,5 @@
1
1
  import { resetComponent } from "../../style/index.js";
2
- import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
2
+ import { genCssVar, genStyleHooks } from "../../theme/util/genStyleUtils.js";
3
3
  import "../../theme/internal.js";
4
4
 
5
5
  //#region src/splitter/style/index.ts
@@ -38,12 +38,12 @@ const centerStyle = {
38
38
  transform: "translate(-50%, -50%)"
39
39
  };
40
40
  const genSplitterStyle = (token) => {
41
- const { componentCls, colorFill, splitBarDraggableSize, splitBarSize, splitTriggerSize, controlItemBgHover, controlItemBgActive, controlItemBgActiveHover, prefixCls, colorPrimary } = token;
41
+ const { componentCls, colorFill, splitBarDraggableSize, splitBarSize, splitTriggerSize, controlItemBgHover, controlItemBgActive, controlItemBgActiveHover, colorPrimary, antCls, calc } = token;
42
42
  const splitBarCls = `${componentCls}-bar`;
43
43
  const splitMaskCls = `${componentCls}-mask`;
44
44
  const splitPanelCls = `${componentCls}-panel`;
45
- const halfTriggerSize = token.calc(splitTriggerSize).div(2).equal();
46
- const splitterBarPreviewOffsetVar = `${prefixCls}-bar-preview-offset`;
45
+ const [, varRef] = genCssVar(antCls, "splitter");
46
+ const halfTriggerSize = calc(splitTriggerSize).div(2).equal();
47
47
  const splitterBarPreviewStyle = {
48
48
  position: "absolute",
49
49
  background: token.colorPrimary,
@@ -143,7 +143,7 @@ const genSplitterStyle = (token) => {
143
143
  ...splitterBarPreviewStyle,
144
144
  [`&${splitBarCls}-preview-active`]: {
145
145
  display: "block",
146
- transform: `translateX(var(--${splitterBarPreviewOffsetVar}))`
146
+ transform: `translate3d(${varRef("bar-preview-offset")}, 0, 0)`
147
147
  }
148
148
  },
149
149
  [`${splitBarCls}-dragger`]: {
@@ -197,7 +197,7 @@ const genSplitterStyle = (token) => {
197
197
  ...splitterBarPreviewStyle,
198
198
  [`&${splitBarCls}-preview-active`]: {
199
199
  display: "block",
200
- transform: `translateY(var(--${splitterBarPreviewOffsetVar}))`
200
+ transform: `translate3d(0, ${varRef("bar-preview-offset")}, 0)`
201
201
  }
202
202
  },
203
203
  [`${splitBarCls}-dragger`]: {
@@ -3,7 +3,7 @@ import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMe
3
3
  import "../_util/hooks/index.js";
4
4
  import { FormatConfig, valueType } from "./utils.js";
5
5
  import { ComponentBaseProps } from "../config-provider/context.js";
6
- import * as vue363 from "vue";
6
+ import * as vue268 from "vue";
7
7
  import { CSSProperties, SlotsType, VNodeChild } from "vue";
8
8
 
9
9
  //#region src/statistic/Statistic.d.ts
@@ -33,7 +33,7 @@ interface StatisticSlots {
33
33
  prefix: () => any;
34
34
  suffix: () => any;
35
35
  }
36
- declare const Statistic: vue363.DefineSetupFnComponent<StatisticRectProps, StatisticEmits, SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
36
+ declare const Statistic: vue268.DefineSetupFnComponent<StatisticRectProps, StatisticEmits, SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
37
37
  value?: valueType;
38
38
  valueStyle?: CSSProperties;
39
39
  valueRender?: (node: any) => VNodeChild;
@@ -45,6 +45,6 @@ declare const Statistic: vue363.DefineSetupFnComponent<StatisticRectProps, Stati
45
45
  styles?: StatisticStylesType;
46
46
  } & {
47
47
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
48
- }, vue363.PublicProps>;
48
+ }, vue268.PublicProps>;
49
49
  //#endregion
50
50
  export { Statistic, StatisticClassNamesType, StatisticProps, StatisticSlots, StatisticStylesType };
@@ -2,7 +2,7 @@ import { VueNode } from "../_util/type.js";
2
2
  import { FormatConfig, valueType } from "./utils.js";
3
3
  import { StatisticClassNamesType, StatisticProps, StatisticSlots, StatisticStylesType } from "./Statistic.js";
4
4
  import { ComponentBaseProps } from "../config-provider/context.js";
5
- import * as vue359 from "vue";
5
+ import * as vue264 from "vue";
6
6
  import { SlotsType } from "vue";
7
7
 
8
8
  //#region src/statistic/Timer.d.ts
@@ -19,10 +19,10 @@ interface StatisticTimeEmits {
19
19
  change: (value?: valueType) => void;
20
20
  [key: string]: (...args: any[]) => any;
21
21
  }
22
- declare const StatisticTimer: vue359.DefineSetupFnComponent<StatisticTimerProps, StatisticTimeEmits, SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
22
+ declare const StatisticTimer: vue264.DefineSetupFnComponent<StatisticTimerProps, StatisticTimeEmits, SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
23
23
  value?: valueType;
24
- valueStyle?: vue359.CSSProperties;
25
- valueRender?: (node: any) => vue359.VNodeChild;
24
+ valueStyle?: vue264.CSSProperties;
25
+ valueRender?: (node: any) => vue264.VNodeChild;
26
26
  title?: VueNode;
27
27
  prefix?: VueNode;
28
28
  suffix?: VueNode;
@@ -34,6 +34,6 @@ declare const StatisticTimer: vue359.DefineSetupFnComponent<StatisticTimerProps,
34
34
  format?: string;
35
35
  } & {
36
36
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
37
- }, vue359.PublicProps>;
37
+ }, vue264.PublicProps>;
38
38
  //#endregion
39
39
  export { StatisticTimeEmits, StatisticTimer, StatisticTimerProps, TimerType };
@@ -3,13 +3,13 @@ import { FormatConfig, valueType } from "./utils.js";
3
3
  import { Statistic, StatisticClassNamesType, StatisticProps, StatisticSlots, StatisticStylesType } from "./Statistic.js";
4
4
  import { StatisticTimeEmits, StatisticTimer, StatisticTimerProps, TimerType } from "./Timer.js";
5
5
  import { ComponentBaseProps } from "../config-provider/context.js";
6
- import * as vue183 from "vue";
6
+ import * as vue112 from "vue";
7
7
 
8
8
  //#region src/statistic/index.d.ts
9
- declare const StatisticTimer$1: vue183.DefineSetupFnComponent<StatisticTimerProps, StatisticTimeEmits, vue183.SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
9
+ declare const StatisticTimer$1: vue112.DefineSetupFnComponent<StatisticTimerProps, StatisticTimeEmits, vue112.SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
10
10
  value?: valueType;
11
- valueStyle?: vue183.CSSProperties;
12
- valueRender?: (node: any) => vue183.VNodeChild;
11
+ valueStyle?: vue112.CSSProperties;
12
+ valueRender?: (node: any) => vue112.VNodeChild;
13
13
  title?: VueNode;
14
14
  prefix?: VueNode;
15
15
  suffix?: VueNode;
@@ -21,7 +21,7 @@ declare const StatisticTimer$1: vue183.DefineSetupFnComponent<StatisticTimerProp
21
21
  format?: string;
22
22
  } & {
23
23
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
24
- }, vue183.PublicProps>;
24
+ }, vue112.PublicProps>;
25
25
  declare const _default: typeof Statistic & {
26
26
  Timer: typeof StatisticTimer;
27
27
  };
@@ -1,13 +1,15 @@
1
+ import { genCssVar } from "../theme/util/genStyleUtils.js";
1
2
  import { Fragment, createTextVNode, createVNode, defineComponent } from "vue";
2
3
  import { clsx } from "@v-c/util";
3
4
 
4
5
  //#region src/steps/ProgressIcon.tsx
5
6
  const ProgressIcon = /* @__PURE__ */ defineComponent((props, { slots }) => {
6
7
  return () => {
7
- const { prefixCls, percent } = props;
8
+ const { prefixCls, rootPrefixCls, percent } = props;
8
9
  const progressCls = `${prefixCls}-item-progress-icon`;
9
10
  const circleCls = `${progressCls}-circle`;
10
- const dashArray = `calc(var(--progress-r) * 2 * ${Math.PI * percent / 100}) 9999`;
11
+ const [, varRef] = genCssVar(rootPrefixCls, "cmp-steps");
12
+ const dashArray = `calc(${varRef("progress-radius")} * 2 * ${Math.PI * percent / 100}) 9999`;
11
13
  return createVNode(Fragment, null, [createVNode("svg", {
12
14
  "class": `${progressCls}-svg`,
13
15
  "viewBox": "0 0 100 100",
@@ -34,6 +36,11 @@ const ProgressIcon = /* @__PURE__ */ defineComponent((props, { slots }) => {
34
36
  required: true,
35
37
  default: void 0
36
38
  },
39
+ rootPrefixCls: {
40
+ type: String,
41
+ required: true,
42
+ default: void 0
43
+ },
37
44
  percent: {
38
45
  type: Number,
39
46
  required: true,
@@ -1,7 +1,7 @@
1
1
  import { VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import "../_util/hooks/index.js";
4
- import * as vue188 from "vue";
4
+ import * as vue136 from "vue";
5
5
  import { CSSProperties, SlotsType } from "vue";
6
6
  import { StepsProps } from "@v-c/steps";
7
7
 
@@ -80,8 +80,8 @@ interface StepsSlots {
80
80
  default: () => any;
81
81
  iconRender?: IconRenderType;
82
82
  }
83
- declare const Steps: vue188.DefineSetupFnComponent<StepsProps$1, StepsEmits, SlotsType<StepsSlots>, StepsProps$1 & {
83
+ declare const Steps: vue136.DefineSetupFnComponent<StepsProps$1, StepsEmits, SlotsType<StepsSlots>, StepsProps$1 & {
84
84
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
85
- }, vue188.PublicProps>;
85
+ }, vue136.PublicProps>;
86
86
  //#endregion
87
87
  export { Steps, StepsProps$1 as StepsProps };
@@ -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,10 +18,10 @@ 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
26
  "background",
24
27
  "border",
@@ -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,28 +1,31 @@
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,
@@ -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]: {