@aura-react-comp/ui 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +67 -2
- package/esm/alert/index.d.ts +28 -0
- package/esm/alert/index.js +76 -0
- package/esm/alert/index.less +172 -0
- package/esm/avatar/index.d.ts +41 -0
- package/esm/avatar/index.js +117 -0
- package/esm/avatar/index.less +163 -0
- package/esm/badge/index.d.ts +29 -0
- package/esm/badge/index.js +84 -0
- package/esm/badge/index.less +215 -0
- package/esm/breadcrumb/index.d.ts +31 -0
- package/esm/breadcrumb/index.js +91 -0
- package/esm/breadcrumb/index.less +107 -0
- package/esm/button/index.d.ts +28 -0
- package/esm/button/index.js +59 -0
- package/esm/button/index.less +191 -0
- package/esm/card/index.d.ts +67 -0
- package/esm/card/index.js +156 -0
- package/esm/card/index.less +231 -0
- package/esm/checkbox/index.d.ts +35 -0
- package/esm/checkbox/index.js +118 -0
- package/esm/checkbox/index.less +175 -0
- package/esm/collapse/index.d.ts +45 -0
- package/esm/collapse/index.js +157 -0
- package/esm/collapse/index.less +144 -0
- package/esm/divider/index.d.ts +16 -0
- package/esm/divider/index.js +37 -0
- package/esm/divider/index.less +115 -0
- package/esm/dropdown/index.d.ts +38 -0
- package/esm/dropdown/index.js +108 -0
- package/esm/dropdown/index.less +247 -0
- package/esm/empty/index.d.ts +35 -0
- package/esm/empty/index.js +87 -0
- package/esm/empty/index.less +67 -0
- package/esm/flex/index.d.ts +24 -0
- package/esm/flex/index.js +64 -0
- package/esm/flex/index.less +9 -0
- package/esm/form/index.d.ts +121 -0
- package/esm/form/index.js +443 -0
- package/esm/form/index.less +258 -0
- package/esm/global.d.ts +6 -0
- package/esm/index.d.ts +78 -0
- package/esm/index.js +41 -0
- package/esm/input/index.d.ts +51 -0
- package/esm/input/index.js +217 -0
- package/esm/input/index.less +369 -0
- package/esm/layout/index.d.ts +46 -0
- package/esm/layout/index.js +135 -0
- package/esm/layout/index.less +132 -0
- package/esm/menu/index.d.ts +91 -0
- package/esm/menu/index.js +294 -0
- package/esm/menu/index.less +340 -0
- package/esm/message/index.d.ts +33 -0
- package/esm/message/index.js +199 -0
- package/esm/message/index.less +118 -0
- package/esm/notification/index.d.ts +33 -0
- package/esm/notification/index.js +229 -0
- package/esm/notification/index.less +175 -0
- package/esm/pagination/index.d.ts +38 -0
- package/esm/pagination/index.js +182 -0
- package/esm/pagination/index.less +230 -0
- package/esm/popconfirm/index.d.ts +37 -0
- package/esm/popconfirm/index.js +115 -0
- package/esm/popconfirm/index.less +229 -0
- package/esm/radio/index.d.ts +33 -0
- package/esm/radio/index.js +122 -0
- package/esm/radio/index.less +155 -0
- package/esm/rate/index.d.ts +30 -0
- package/esm/rate/index.js +143 -0
- package/esm/rate/index.less +87 -0
- package/esm/result/index.d.ts +19 -0
- package/esm/result/index.js +69 -0
- package/esm/result/index.less +104 -0
- package/esm/scrollbar/index.d.ts +18 -0
- package/esm/scrollbar/index.js +35 -0
- package/esm/scrollbar/index.less +67 -0
- package/esm/select/index.d.ts +63 -0
- package/esm/select/index.js +358 -0
- package/esm/select/index.less +471 -0
- package/esm/slider/index.d.ts +36 -0
- package/esm/slider/index.js +255 -0
- package/esm/slider/index.less +154 -0
- package/esm/space/index.d.ts +16 -0
- package/esm/space/index.js +34 -0
- package/esm/space/index.less +34 -0
- package/esm/spin/index.d.ts +44 -0
- package/esm/spin/index.js +152 -0
- package/esm/spin/index.less +179 -0
- package/esm/steps/index.d.ts +55 -0
- package/esm/steps/index.js +165 -0
- package/esm/steps/index.less +394 -0
- package/esm/switch/index.d.ts +30 -0
- package/esm/switch/index.js +56 -0
- package/esm/switch/index.less +160 -0
- package/esm/tabs/index.d.ts +45 -0
- package/esm/tabs/index.js +170 -0
- package/esm/tabs/index.less +228 -0
- package/esm/tag/index.d.ts +52 -0
- package/esm/tag/index.js +120 -0
- package/esm/tag/index.less +227 -0
- package/esm/textarea/index.d.ts +27 -0
- package/esm/textarea/index.js +84 -0
- package/esm/textarea/index.less +226 -0
- package/esm/theme/ThemeProvider.d.ts +15 -0
- package/esm/theme/ThemeProvider.js +32 -0
- package/esm/theme/index.d.ts +2 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/tokens.css +183 -0
- package/esm/theme/useTheme.d.ts +1 -0
- package/esm/theme/useTheme.js +1 -0
- package/esm/tooltip/index.d.ts +38 -0
- package/esm/tooltip/index.js +149 -0
- package/esm/tooltip/index.less +244 -0
- package/esm/typography/index.d.ts +26 -0
- package/esm/typography/index.js +92 -0
- package/esm/typography/index.less +107 -0
- package/esm/upload/index.d.ts +68 -0
- package/esm/upload/index.js +447 -0
- package/esm/upload/index.less +376 -0
- package/esm/upload/request.d.ts +26 -0
- package/esm/upload/request.js +38 -0
- package/package.json +56 -3
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/* ===== Spin 加载中 — 样式表 ===== */
|
|
2
|
+
|
|
3
|
+
.aura-spin {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
|
|
8
|
+
/* 隐藏状态:无动画内容时折叠 */
|
|
9
|
+
&-hidden {
|
|
10
|
+
visibility: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* ========== 旋转指示器 ========== */
|
|
14
|
+
&-indicator {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: var(--aura-spacing-2);
|
|
19
|
+
color: var(--aura-primary-700);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* ========== SVG 旋转动画 ========== */
|
|
23
|
+
&-svg {
|
|
24
|
+
will-change: transform;
|
|
25
|
+
animation: aura-spin-rotate 1s linear infinite;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* ========== 提示文字 ========== */
|
|
29
|
+
&-tip {
|
|
30
|
+
color: var(--aura-primary-700);
|
|
31
|
+
font-size: var(--aura-font-size-sm);
|
|
32
|
+
line-height: 1.5;
|
|
33
|
+
user-select: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ========== 容器模式(包裹 children) ========== */
|
|
37
|
+
&-container {
|
|
38
|
+
position: relative;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* 覆盖层 */
|
|
42
|
+
&-overlay {
|
|
43
|
+
position: absolute;
|
|
44
|
+
inset: 0;
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
z-index: 1;
|
|
49
|
+
/* 入场动画:ease-out 响应迅速,适合用户等待场景 */
|
|
50
|
+
animation: aura-spin-overlay-in var(--aura-duration-normal) ease-out both;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* 覆盖层入场 */
|
|
54
|
+
@keyframes aura-spin-overlay-in {
|
|
55
|
+
from {
|
|
56
|
+
opacity: 0;
|
|
57
|
+
}
|
|
58
|
+
to {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* 内容区域 */
|
|
64
|
+
&-content {
|
|
65
|
+
/* 使用 ease-out 退出更快,让内容快速恢复可交互 */
|
|
66
|
+
transition:
|
|
67
|
+
opacity var(--aura-duration-normal) ease-out,
|
|
68
|
+
filter var(--aura-duration-normal) ease-out;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* 加载中:半透明 + 轻微模糊 */
|
|
72
|
+
&-content-blur {
|
|
73
|
+
opacity: 0.4;
|
|
74
|
+
filter: blur(1px);
|
|
75
|
+
pointer-events: none;
|
|
76
|
+
user-select: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* ========== 点状加载动画 ========== */
|
|
80
|
+
&-dot {
|
|
81
|
+
display: inline-flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
gap: 4px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&-dot-item {
|
|
87
|
+
display: block;
|
|
88
|
+
width: 8px;
|
|
89
|
+
height: 8px;
|
|
90
|
+
border-radius: var(--aura-radius-full);
|
|
91
|
+
background: currentColor;
|
|
92
|
+
opacity: 0.3;
|
|
93
|
+
will-change: transform, opacity;
|
|
94
|
+
animation: aura-spin-dot-bounce 1.2s ease-in-out infinite both;
|
|
95
|
+
|
|
96
|
+
&:nth-child(1) {
|
|
97
|
+
animation-delay: 0s;
|
|
98
|
+
}
|
|
99
|
+
&:nth-child(2) {
|
|
100
|
+
animation-delay: 0.2s;
|
|
101
|
+
}
|
|
102
|
+
&:nth-child(3) {
|
|
103
|
+
animation-delay: 0.4s;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@keyframes aura-spin-dot-bounce {
|
|
108
|
+
0%,
|
|
109
|
+
80%,
|
|
110
|
+
100% {
|
|
111
|
+
transform: scale(0.6);
|
|
112
|
+
opacity: 0.3;
|
|
113
|
+
}
|
|
114
|
+
40% {
|
|
115
|
+
transform: scale(1);
|
|
116
|
+
opacity: 1;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* ========== 旋转关键帧 ========== */
|
|
122
|
+
@keyframes aura-spin-rotate {
|
|
123
|
+
from {
|
|
124
|
+
transform: rotate(0deg);
|
|
125
|
+
}
|
|
126
|
+
to {
|
|
127
|
+
transform: rotate(360deg);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ========== 尺寸变体 ========== */
|
|
132
|
+
/* sm */
|
|
133
|
+
.aura-spin-sm {
|
|
134
|
+
/* size handled in JS via pixelSize */
|
|
135
|
+
}
|
|
136
|
+
/* md */
|
|
137
|
+
.aura-spin-md {
|
|
138
|
+
/* size handled in JS via pixelSize */
|
|
139
|
+
}
|
|
140
|
+
/* lg */
|
|
141
|
+
.aura-spin-lg {
|
|
142
|
+
/* size handled in JS via pixelSize */
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* ========== 暗色模式 ========== */
|
|
146
|
+
[data-theme='dark'] {
|
|
147
|
+
.aura-spin {
|
|
148
|
+
&-indicator {
|
|
149
|
+
color: var(--aura-primary-600);
|
|
150
|
+
}
|
|
151
|
+
&-tip {
|
|
152
|
+
color: var(--aura-primary-600);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* ========== 减弱动画(无障碍) ========== */
|
|
158
|
+
@media (prefers-reduced-motion: reduce) {
|
|
159
|
+
.aura-spin {
|
|
160
|
+
&-svg {
|
|
161
|
+
animation: none;
|
|
162
|
+
/* 静态显示一个固定弧线作为替代 */
|
|
163
|
+
opacity: 0.6;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&-dot-item {
|
|
167
|
+
animation: none;
|
|
168
|
+
opacity: 0.5;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&-overlay {
|
|
172
|
+
animation: none;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&-content {
|
|
176
|
+
transition: none;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface StepProps {
|
|
3
|
+
/** 步骤标题 */
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
/** 步骤副标题(显示在标题旁) */
|
|
6
|
+
subTitle?: React.ReactNode;
|
|
7
|
+
/** 覆盖步骤状态;目前支持 `error`(出错态,图标与标题转红) */
|
|
8
|
+
status?: 'error';
|
|
9
|
+
/** 步骤描述 */
|
|
10
|
+
description?: React.ReactNode;
|
|
11
|
+
/** 自定义图标 */
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
/** 是否禁用 */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** 自定义类名 */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** 自定义样式 */
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
declare const Step: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export interface StepsProps {
|
|
22
|
+
/** 当前步骤索引(受控,从 0 开始;传入后点击步骤只触发 onChange,不自更新)
|
|
23
|
+
* @default 0
|
|
24
|
+
*/
|
|
25
|
+
current?: number;
|
|
26
|
+
/** 默认当前步骤索引(非受控)
|
|
27
|
+
* @default 0
|
|
28
|
+
*/
|
|
29
|
+
defaultCurrent?: number;
|
|
30
|
+
/** 变体
|
|
31
|
+
* @default 'default'
|
|
32
|
+
*/
|
|
33
|
+
variant?: 'default' | 'dot' | 'navigation';
|
|
34
|
+
/** 尺寸
|
|
35
|
+
* @default 'md'
|
|
36
|
+
*/
|
|
37
|
+
size?: 'sm' | 'md';
|
|
38
|
+
/** 方向
|
|
39
|
+
* @default 'horizontal'
|
|
40
|
+
*/
|
|
41
|
+
direction?: 'horizontal' | 'vertical';
|
|
42
|
+
/** 步骤切换回调 */
|
|
43
|
+
onChange?: (current: number) => void;
|
|
44
|
+
/** 自定义类名 */
|
|
45
|
+
className?: string;
|
|
46
|
+
/** 自定义样式 */
|
|
47
|
+
style?: React.CSSProperties;
|
|
48
|
+
/** 子元素 */
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
interface StepsComponent extends React.ForwardRefExoticComponent<StepsProps & React.RefAttributes<HTMLDivElement>> {
|
|
52
|
+
Step: typeof Step;
|
|
53
|
+
}
|
|
54
|
+
declare const Steps: StepsComponent;
|
|
55
|
+
export { Steps };
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import React, { forwardRef, createContext, useContext, useCallback, useState } from 'react';
|
|
2
|
+
import { classNames, prefixCls } from '@aura-react-comp/shared';
|
|
3
|
+
import { CheckOutline } from '@aura-react-comp/icons';
|
|
4
|
+
import "./index.less";
|
|
5
|
+
|
|
6
|
+
/* ===== Context ===== */
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const StepsContext = /*#__PURE__*/createContext(null);
|
|
10
|
+
function useStepsContext() {
|
|
11
|
+
const ctx = useContext(StepsContext);
|
|
12
|
+
if (!ctx) throw new Error('Steps.Step 必须在 Steps 内部使用');
|
|
13
|
+
return ctx;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* ===== Steps.Step ===== */
|
|
17
|
+
|
|
18
|
+
const Step = /*#__PURE__*/forwardRef(({
|
|
19
|
+
title,
|
|
20
|
+
subTitle,
|
|
21
|
+
status,
|
|
22
|
+
description,
|
|
23
|
+
icon,
|
|
24
|
+
disabled = false,
|
|
25
|
+
className,
|
|
26
|
+
style
|
|
27
|
+
}, ref) => {
|
|
28
|
+
const {
|
|
29
|
+
current,
|
|
30
|
+
variant,
|
|
31
|
+
onChange
|
|
32
|
+
} = useStepsContext();
|
|
33
|
+
const index = useContext(StepIndexContext);
|
|
34
|
+
const isCompleted = index < current;
|
|
35
|
+
const isCurrent = index === current;
|
|
36
|
+
const isError = status === 'error';
|
|
37
|
+
const handleClick = () => {
|
|
38
|
+
if (disabled) return;
|
|
39
|
+
onChange(index);
|
|
40
|
+
};
|
|
41
|
+
const handleKeyDown = e => {
|
|
42
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
handleClick();
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const stepCls = classNames(prefixCls('steps-step'), isCompleted && prefixCls('steps-step-completed'), isCurrent && prefixCls('steps-step-active'), isError && prefixCls('steps-step-error'), disabled && prefixCls('steps-step-disabled'), className);
|
|
48
|
+
|
|
49
|
+
/* --- 渲染图标区域 --- */
|
|
50
|
+
const renderIcon = () => {
|
|
51
|
+
if (icon) return icon;
|
|
52
|
+
if (variant === 'dot') {
|
|
53
|
+
return /*#__PURE__*/_jsx("span", {
|
|
54
|
+
className: prefixCls('steps-dot-icon')
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// default / navigation variant
|
|
59
|
+
if (isCompleted) {
|
|
60
|
+
return /*#__PURE__*/_jsx("span", {
|
|
61
|
+
className: prefixCls('steps-check'),
|
|
62
|
+
children: /*#__PURE__*/_jsx(CheckOutline, {
|
|
63
|
+
size: 14
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return /*#__PURE__*/_jsx("span", {
|
|
68
|
+
className: prefixCls('steps-number'),
|
|
69
|
+
children: index + 1
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
return /*#__PURE__*/_jsx("div", {
|
|
73
|
+
ref: ref,
|
|
74
|
+
className: stepCls,
|
|
75
|
+
style: style,
|
|
76
|
+
role: "listitem",
|
|
77
|
+
"aria-current": isCurrent ? 'step' : undefined,
|
|
78
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
79
|
+
className: prefixCls('steps-step-header'),
|
|
80
|
+
onClick: handleClick,
|
|
81
|
+
onKeyDown: handleKeyDown,
|
|
82
|
+
tabIndex: disabled ? -1 : 0,
|
|
83
|
+
"aria-disabled": disabled,
|
|
84
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
85
|
+
className: classNames(prefixCls('steps-icon'), isCompleted && prefixCls('steps-icon-completed'), isCurrent && prefixCls('steps-icon-active')),
|
|
86
|
+
children: renderIcon()
|
|
87
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
88
|
+
className: prefixCls('steps-step-content'),
|
|
89
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
90
|
+
className: prefixCls('steps-step-title'),
|
|
91
|
+
children: [title, subTitle && /*#__PURE__*/_jsx("span", {
|
|
92
|
+
className: prefixCls('steps-step-subtitle'),
|
|
93
|
+
children: subTitle
|
|
94
|
+
})]
|
|
95
|
+
}), description && /*#__PURE__*/_jsx("div", {
|
|
96
|
+
className: prefixCls('steps-step-description'),
|
|
97
|
+
children: description
|
|
98
|
+
})]
|
|
99
|
+
})]
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
Step.displayName = 'Steps.Step';
|
|
104
|
+
|
|
105
|
+
/* ===== StepIndexContext — 用于 Step 获取自己的 index ===== */
|
|
106
|
+
const StepIndexContext = /*#__PURE__*/React.createContext(0);
|
|
107
|
+
|
|
108
|
+
/* ===== Steps(主组件) ===== */
|
|
109
|
+
|
|
110
|
+
const StepsBase = /*#__PURE__*/forwardRef(({
|
|
111
|
+
current: controlledCurrent,
|
|
112
|
+
defaultCurrent = 0,
|
|
113
|
+
variant = 'default',
|
|
114
|
+
size = 'md',
|
|
115
|
+
direction = 'horizontal',
|
|
116
|
+
onChange,
|
|
117
|
+
className,
|
|
118
|
+
style,
|
|
119
|
+
children
|
|
120
|
+
}, ref) => {
|
|
121
|
+
const [internalCurrent, setInternalCurrent] = useState(defaultCurrent);
|
|
122
|
+
const isControlled = controlledCurrent !== undefined;
|
|
123
|
+
const current = isControlled ? controlledCurrent : internalCurrent;
|
|
124
|
+
const handleChange = useCallback(next => {
|
|
125
|
+
if (!isControlled) setInternalCurrent(next);
|
|
126
|
+
onChange?.(next);
|
|
127
|
+
}, [isControlled, onChange]);
|
|
128
|
+
const childArray = React.Children.toArray(children);
|
|
129
|
+
const totalSteps = childArray.length;
|
|
130
|
+
const ctxValue = {
|
|
131
|
+
current,
|
|
132
|
+
variant,
|
|
133
|
+
size,
|
|
134
|
+
direction,
|
|
135
|
+
onChange: handleChange,
|
|
136
|
+
totalSteps
|
|
137
|
+
};
|
|
138
|
+
const wrapperCls = classNames(prefixCls('steps'), prefixCls(`steps-${variant}`), prefixCls(`steps-${size}`), prefixCls(`steps-${direction}`), className);
|
|
139
|
+
return /*#__PURE__*/_jsx(StepsContext.Provider, {
|
|
140
|
+
value: ctxValue,
|
|
141
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
142
|
+
ref: ref,
|
|
143
|
+
className: wrapperCls,
|
|
144
|
+
style: style,
|
|
145
|
+
role: "list",
|
|
146
|
+
"aria-label": "\u6B65\u9AA4\u6761",
|
|
147
|
+
children: childArray.map((child, index) => /*#__PURE__*/_jsx(StepIndexContext.Provider, {
|
|
148
|
+
value: index,
|
|
149
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
150
|
+
className: prefixCls('steps-step-container'),
|
|
151
|
+
children: [child, index < totalSteps - 1 && /*#__PURE__*/_jsx("div", {
|
|
152
|
+
className: classNames(prefixCls('steps-tail'), index < current ? prefixCls('steps-tail-completed') : prefixCls('steps-tail-pending'))
|
|
153
|
+
})]
|
|
154
|
+
})
|
|
155
|
+
}, index))
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
StepsBase.displayName = 'Steps';
|
|
160
|
+
|
|
161
|
+
/* ===== 复合组件导出 ===== */
|
|
162
|
+
|
|
163
|
+
const Steps = StepsBase;
|
|
164
|
+
Steps.Step = Step;
|
|
165
|
+
export { Steps };
|