antdv-next 1.0.0-alpha.4 → 1.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_util/tools.js +2 -1
- package/dist/_util/wave/WaveEffect.js +6 -1
- package/dist/_util/wave/style.js +4 -3
- package/dist/affix/index.d.ts +3 -3
- package/dist/alert/Alert.d.ts +4 -3
- package/dist/alert/Alert.js +1 -1
- package/dist/anchor/Anchor.d.ts +5 -5
- package/dist/anchor/AnchorLink.js +2 -2
- package/dist/anchor/index.d.ts +1 -1
- package/dist/antd.js +76 -76
- package/dist/app/App.d.ts +2 -2
- package/dist/auto-complete/index.d.ts +77 -0
- package/dist/auto-complete/index.js +627 -0
- package/dist/avatar/Avatar.d.ts +3 -3
- package/dist/avatar/AvatarGroup.d.ts +2 -2
- package/dist/badge/Ribbon.d.ts +3 -3
- package/dist/badge/index.d.ts +3 -3
- package/dist/breadcrumb/Breadcrumb.d.ts +5 -5
- package/dist/breadcrumb/Breadcrumb.js +0 -8
- package/dist/breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/breadcrumb/BreadcrumbItem.js +1 -17
- package/dist/breadcrumb/index.d.ts +1 -1
- package/dist/button/Button.d.ts +3 -3
- package/dist/button/style/variant.js +116 -104
- package/dist/calendar/Header.js +1 -1
- package/dist/calendar/generateCalendar.d.ts +3 -3
- package/dist/calendar/index.d.ts +3 -3
- package/dist/card/Card.d.ts +3 -3
- package/dist/card/CardGrid.d.ts +2 -2
- package/dist/card/CardMeta.d.ts +3 -3
- package/dist/carousel/index.d.ts +3 -3
- package/dist/cascader/Panel.d.ts +3 -3
- package/dist/cascader/index.d.ts +3 -3
- package/dist/cascader/index.js +1 -1
- package/dist/checkbox/Checkbox.d.ts +3 -3
- package/dist/checkbox/Group.d.ts +3 -3
- package/dist/collapse/Collapse.d.ts +3 -3
- package/dist/color-picker/ColorPicker.d.ts +4 -4
- package/dist/color-picker/ColorPicker.js +2 -2
- package/dist/components.d.ts +3 -2
- package/dist/components.js +7 -4
- package/dist/config-provider/context.js +2 -2
- package/dist/config-provider/index.d.ts +3 -3
- package/dist/date-picker/generatePicker/generateRangePicker.js +1 -1
- package/dist/date-picker/generatePicker/generateSinglePicker.js +1 -1
- package/dist/date-picker/generatePicker/index.d.ts +15 -15
- package/dist/date-picker/index.d.ts +25 -25
- package/dist/descriptions/index.d.ts +3 -3
- package/dist/divider/index.d.ts +2 -2
- package/dist/drawer/index.d.ts +3 -3
- package/dist/dropdown/dropdown.d.ts +4 -4
- package/dist/dropdown/dropdown.js +5 -3
- package/dist/empty/index.d.ts +3 -3
- package/dist/flex/index.d.ts +3 -3
- package/dist/float-button/BackTop.d.ts +3 -3
- package/dist/float-button/FloatButton.d.ts +3 -3
- package/dist/float-button/FloatButtonGroup.d.ts +3 -3
- package/dist/float-button/style/button.js +4 -4
- package/dist/float-button/style/group.js +12 -12
- package/dist/form/Form.d.ts +3 -3
- package/dist/form/FormItem/index.d.ts +3 -3
- package/dist/form/style/index.js +3 -2
- package/dist/grid/row.d.ts +2 -2
- package/dist/grid/style/index.js +5 -4
- package/dist/image/PreviewGroup.d.ts +2 -2
- package/dist/image/index.d.ts +4 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -4
- package/dist/input/Input.js +1 -1
- package/dist/input/OTP/index.js +1 -1
- package/dist/input/TextArea.d.ts +3 -3
- package/dist/input/TextArea.js +1 -1
- package/dist/input/index.d.ts +11 -11
- package/dist/input-number/index.d.ts +3 -3
- package/dist/input-number/index.js +1 -1
- package/dist/input-number/style/index.js +18 -17
- package/dist/layout/index.d.ts +6 -6
- package/dist/layout/layout.d.ts +2 -2
- package/dist/masonry/Masonry.d.ts +3 -3
- package/dist/masonry/Masonry.js +8 -6
- package/dist/mentions/index.d.ts +3 -3
- package/dist/mentions/index.js +1 -1
- package/dist/mentions/style/index.js +18 -17
- package/dist/menu/MenuDivider.d.ts +2 -2
- package/dist/menu/SubMenu.d.ts +3 -3
- package/dist/menu/index.d.ts +5 -5
- package/dist/message/PurePanel.d.ts +2 -2
- package/dist/modal/Modal.d.ts +3 -3
- package/dist/notification/PurePanel.d.ts +2 -2
- package/dist/notification/useNotification.d.ts +2 -2
- package/dist/package.d.ts +109 -3
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.d.ts +3 -3
- package/dist/pagination/Pagination.js +1 -1
- package/dist/pagination/style/index.js +61 -50
- package/dist/popconfirm/PurePanel.d.ts +2 -2
- package/dist/popconfirm/index.d.ts +3 -3
- package/dist/popover/index.d.ts +3 -3
- package/dist/popover/style/index.js +11 -8
- package/dist/progress/progress.d.ts +3 -3
- package/dist/qrcode/index.d.ts +3 -3
- package/dist/radio/index.d.ts +5 -5
- package/dist/radio/radio.d.ts +3 -3
- package/dist/rate/index.d.ts +3 -3
- package/dist/result/index.d.ts +3 -3
- package/dist/result/noFound.d.ts +2 -2
- package/dist/result/serverError.d.ts +2 -2
- package/dist/segmented/index.d.ts +3 -3
- package/dist/select/index.d.ts +6 -6
- package/dist/select/index.js +2 -2
- package/dist/select/style/select-input-multiple.js +31 -29
- package/dist/select/style/select-input.js +50 -44
- package/dist/skeleton/Button.d.ts +2 -2
- package/dist/skeleton/Input.d.ts +2 -2
- package/dist/skeleton/Node.d.ts +3 -3
- package/dist/skeleton/Skeleton.d.ts +3 -3
- package/dist/slider/index.d.ts +3 -3
- package/dist/space/Compact.d.ts +2 -0
- package/dist/space/Compact.js +17 -4
- package/dist/space/index.d.ts +5 -5
- package/dist/space/style/addon.js +20 -19
- package/dist/spin/index.d.ts +3 -3
- package/dist/splitter/SplitBar.js +9 -2
- package/dist/splitter/Splitter.d.ts +3 -3
- package/dist/splitter/Splitter.js +2 -1
- package/dist/splitter/index.d.ts +2 -2
- package/dist/splitter/style/index.js +6 -6
- package/dist/statistic/Statistic.d.ts +3 -3
- package/dist/statistic/Timer.d.ts +5 -5
- package/dist/statistic/index.d.ts +5 -5
- package/dist/steps/ProgressIcon.js +9 -2
- package/dist/steps/index.d.ts +3 -3
- package/dist/steps/index.js +7 -4
- package/dist/steps/style/horizontal.js +13 -10
- package/dist/steps/style/icon.js +11 -8
- package/dist/steps/style/index.js +19 -18
- package/dist/steps/style/inline.js +19 -16
- package/dist/steps/style/label-placement.js +22 -20
- package/dist/steps/style/nav.js +7 -5
- package/dist/steps/style/panel.js +34 -32
- package/dist/steps/style/progress-dot.js +10 -8
- package/dist/steps/style/progress.js +29 -58
- package/dist/steps/style/rtl.js +6 -4
- package/dist/steps/style/small.js +10 -8
- package/dist/steps/style/status.js +124 -121
- package/dist/steps/style/util.js +7 -4
- package/dist/steps/style/vertical.js +17 -14
- package/dist/style/placementArrow.js +7 -5
- package/dist/switch/index.d.ts +3 -3
- package/dist/table/Column.d.ts +3 -3
- package/dist/table/ColumnGroup.d.ts +3 -3
- package/dist/table/InternalTable.js +1 -1
- package/dist/table/Table.d.ts +3 -3
- package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
- package/dist/tabs/TabPane.d.ts +3 -3
- package/dist/tabs/index.d.ts +3 -3
- package/dist/tag/CheckableTag.d.ts +3 -3
- package/dist/tag/CheckableTagGroup.d.ts +3 -3
- package/dist/tag/index.d.ts +3 -3
- package/dist/theme/index.d.ts +4 -4
- package/dist/theme/util/genStyleUtils.js +8 -5
- package/dist/time-picker/index.d.ts +7 -7
- package/dist/timeline/Timeline.d.ts +3 -3
- package/dist/tooltip/PurePanel.d.ts +2 -2
- package/dist/tooltip/PurePanel.js +3 -3
- package/dist/tooltip/UniqueProvider/index.d.ts +2 -2
- package/dist/tooltip/index.d.ts +3 -3
- package/dist/tooltip/index.js +2 -3
- package/dist/tooltip/style/index.js +10 -8
- package/dist/tooltip/util.js +5 -3
- package/dist/tour/index.d.ts +3 -3
- package/dist/tour/style/index.js +5 -4
- package/dist/transfer/Actions.d.ts +2 -2
- package/dist/transfer/Section.d.ts +2 -2
- package/dist/transfer/Transfer.d.ts +3 -3
- package/dist/transfer/Transfer.js +1 -1
- package/dist/transfer/search.d.ts +3 -3
- package/dist/tree/DirectoryTree.d.ts +3 -3
- package/dist/tree/Tree.d.ts +3 -3
- package/dist/tree-select/index.d.ts +4 -4
- package/dist/tree-select/index.js +1 -1
- package/dist/typography/Link.d.ts +3 -3
- package/dist/typography/Paragraph.d.ts +3 -3
- package/dist/typography/Text.d.ts +3 -3
- package/dist/typography/Title.d.ts +3 -3
- package/dist/typography/Typography.d.ts +3 -3
- package/dist/typography/index.d.ts +9 -9
- package/dist/upload/Dragger.d.ts +6 -3
- package/dist/upload/Upload.d.ts +3 -3
- package/dist/upload/index.d.ts +6 -3
- package/dist/watermark/index.d.ts +2 -2
- package/global.d.ts +2 -0
- package/package.json +22 -4
- package/web-tags.json +4524 -0
- package/web-types.json +12779 -0
|
@@ -1,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,
|
|
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
|
|
46
|
-
const
|
|
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: `
|
|
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: `
|
|
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
|
|
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:
|
|
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
|
-
},
|
|
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
|
|
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:
|
|
22
|
+
declare const StatisticTimer: vue264.DefineSetupFnComponent<StatisticTimerProps, StatisticTimeEmits, SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
|
|
23
23
|
value?: valueType;
|
|
24
|
-
valueStyle?:
|
|
25
|
-
valueRender?: (node: any) =>
|
|
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
|
-
},
|
|
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
|
|
6
|
+
import * as vue112 from "vue";
|
|
7
7
|
|
|
8
8
|
//#region src/statistic/index.d.ts
|
|
9
|
-
declare const StatisticTimer$1:
|
|
9
|
+
declare const StatisticTimer$1: vue112.DefineSetupFnComponent<StatisticTimerProps, StatisticTimeEmits, vue112.SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
|
|
10
10
|
value?: valueType;
|
|
11
|
-
valueStyle?:
|
|
12
|
-
valueRender?: (node: any) =>
|
|
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
|
-
},
|
|
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
|
|
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,
|
package/dist/steps/index.d.ts
CHANGED
|
@@ -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
|
|
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:
|
|
83
|
+
declare const Steps: vue136.DefineSetupFnComponent<StepsProps$1, StepsEmits, SlotsType<StepsSlots>, StepsProps$1 & {
|
|
84
84
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
85
|
-
},
|
|
85
|
+
}, vue136.PublicProps>;
|
|
86
86
|
//#endregion
|
|
87
87
|
export { Steps, StepsProps$1 as StepsProps };
|
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,10 +18,10 @@ 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
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
|
-
"
|
|
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,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 =
|
|
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,
|
|
@@ -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]: {
|