@pisell/materials 6.8.9 → 6.8.10

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 (73) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.js +16 -16
  8. package/build/lowcode/view.js +16 -16
  9. package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
  10. package/es/components/PisellProcedure/PisellProcedure.stories.js +1611 -0
  11. package/es/components/PisellScrollView/PisellScrollView.stories.d.ts +87 -0
  12. package/es/components/PisellScrollView/PisellScrollView.stories.js +772 -0
  13. package/es/components/PisellScrollView/hooks/useScrollEvents.js +18 -3
  14. package/es/components/PisellScrollView/index.d.ts +2 -1
  15. package/es/components/PisellScrollView/index.js +2 -1
  16. package/es/components/PisellSteps/PisellSteps.stories.d.ts +155 -0
  17. package/es/components/PisellSteps/PisellSteps.stories.js +851 -0
  18. package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +6 -10
  19. package/es/components/PisellSuperTabs/PisellSuperTabs.js +28 -8
  20. package/es/components/PisellSuperTabs/types.d.ts +1 -0
  21. package/es/components/PisellTabbar/PisellTabbar.d.ts +2 -19
  22. package/es/components/PisellTabbar/PisellTabbar.js +2 -1
  23. package/es/components/PisellTabbar/constants.d.ts +4 -4
  24. package/es/components/PisellTabbar/constants.js +5 -5
  25. package/es/components/PisellTabbar/index.d.ts +2 -0
  26. package/es/components/PisellTabbar/index.js +2 -0
  27. package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +20 -0
  28. package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +426 -0
  29. package/es/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
  30. package/es/components/PisellTabbar/template/Template1/constants.js +33 -0
  31. package/es/components/PisellTabbar/template/Template1/index.d.ts +6 -0
  32. package/es/components/PisellTabbar/template/Template1/index.js +7 -0
  33. package/es/components/PisellTabbar/template/Template1/utils/index.d.ts +35 -0
  34. package/es/components/PisellTabbar/template/Template1/utils/index.js +96 -0
  35. package/es/components/PisellTabbar/utils/index.d.ts +33 -0
  36. package/es/components/PisellTabbar/utils/index.js +3 -2
  37. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  38. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  39. package/es/index.d.ts +2 -1
  40. package/es/index.js +2 -1
  41. package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
  42. package/lib/components/PisellProcedure/PisellProcedure.stories.js +925 -0
  43. package/lib/components/PisellScrollView/PisellScrollView.stories.d.ts +87 -0
  44. package/lib/components/PisellScrollView/PisellScrollView.stories.js +535 -0
  45. package/lib/components/PisellScrollView/hooks/useScrollEvents.js +13 -3
  46. package/lib/components/PisellScrollView/index.d.ts +2 -1
  47. package/lib/components/PisellScrollView/index.js +2 -5
  48. package/lib/components/PisellSteps/PisellSteps.stories.d.ts +155 -0
  49. package/lib/components/PisellSteps/PisellSteps.stories.js +570 -0
  50. package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +6 -10
  51. package/lib/components/PisellSuperTabs/PisellSuperTabs.js +25 -6
  52. package/lib/components/PisellSuperTabs/types.d.ts +1 -0
  53. package/lib/components/PisellTabbar/PisellTabbar.d.ts +2 -19
  54. package/lib/components/PisellTabbar/PisellTabbar.js +2 -1
  55. package/lib/components/PisellTabbar/constants.d.ts +4 -4
  56. package/lib/components/PisellTabbar/constants.js +5 -5
  57. package/lib/components/PisellTabbar/index.d.ts +2 -0
  58. package/lib/components/PisellTabbar/index.js +6 -0
  59. package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +20 -0
  60. package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +437 -0
  61. package/lib/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
  62. package/lib/components/PisellTabbar/template/Template1/constants.js +60 -0
  63. package/lib/components/PisellTabbar/template/Template1/index.d.ts +6 -0
  64. package/lib/components/PisellTabbar/template/Template1/index.js +36 -0
  65. package/lib/components/PisellTabbar/template/Template1/utils/index.d.ts +35 -0
  66. package/lib/components/PisellTabbar/template/Template1/utils/index.js +68 -0
  67. package/lib/components/PisellTabbar/utils/index.d.ts +33 -0
  68. package/lib/components/PisellTabbar/utils/index.js +4 -1
  69. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  70. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  71. package/lib/index.d.ts +2 -1
  72. package/lib/index.js +5 -2
  73. package/package.json +21 -2
@@ -0,0 +1,155 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import PisellSteps from './PisellSteps';
3
+ /**
4
+ * PisellSteps 步骤条组件
5
+ *
6
+ * 基于 Ant Design Steps 组件进行二次封装和增强
7
+ * 支持多种展示样式、布局方式和丰富的交互功能
8
+ */
9
+ declare const meta: Meta<typeof PisellSteps>;
10
+ export default meta;
11
+ declare type Story = StoryObj<typeof PisellSteps>;
12
+ /**
13
+ * 基础用法 - 默认步骤条
14
+ */
15
+ export declare const Default: Story;
16
+ /**
17
+ * 非受控模式
18
+ * @description 使用 defaultCurrent 设置初始步骤
19
+ */
20
+ export declare const Uncontrolled: Story;
21
+ /**
22
+ * 垂直方向
23
+ */
24
+ export declare const Vertical: Story;
25
+ /**
26
+ * 点状步骤条
27
+ * @description 通过 progressDot 属性启用点状样式
28
+ */
29
+ export declare const Dot: Story;
30
+ /**
31
+ * 自定义点状渲染
32
+ * @description 使用函数自定义点状图标的渲染
33
+ */
34
+ export declare const CustomProgressDot: Story;
35
+ /**
36
+ * 导航步骤条
37
+ */
38
+ export declare const Navigation: Story;
39
+ /**
40
+ * 小尺寸
41
+ */
42
+ export declare const Small: Story;
43
+ /**
44
+ * 大尺寸
45
+ */
46
+ export declare const Large: Story;
47
+ /**
48
+ * 标签垂直布局
49
+ * @description 标签在图标下方显示
50
+ */
51
+ export declare const LabelVertical: Story;
52
+ /**
53
+ * 错误状态
54
+ */
55
+ export declare const ErrorStatus: Story;
56
+ /**
57
+ * 自定义步骤状态
58
+ * @description 每个步骤可以单独设置状态
59
+ */
60
+ export declare const CustomStatus: Story;
61
+ /**
62
+ * 可点击步骤
63
+ */
64
+ export declare const Clickable: Story;
65
+ /**
66
+ * 禁止点击已完成步骤
67
+ * @description 设置 allowClickFinished 为 false
68
+ */
69
+ export declare const DisallowClickFinished: Story;
70
+ /**
71
+ * 禁用特定步骤
72
+ * @description 通过 disabled 属性禁用某个步骤
73
+ */
74
+ export declare const DisabledStep: Story;
75
+ /**
76
+ * 自定义图标
77
+ */
78
+ export declare const CustomIcon: Story;
79
+ /**
80
+ * 完成图标
81
+ */
82
+ export declare const FinishIcon: Story;
83
+ /**
84
+ * 栅格布局
85
+ * @description 启用栅格布局,自定义列数
86
+ */
87
+ export declare const GridLayout: Story;
88
+ /**
89
+ * 自定义图标与文本间距
90
+ * @description 通过 itemGap 属性自定义间距
91
+ */
92
+ export declare const CustomItemGap: Story;
93
+ /**
94
+ * 移动端 - 完整模式
95
+ * @description 移动端显示完整步骤条
96
+ */
97
+ export declare const MobileModeFull: Story;
98
+ /**
99
+ * 移动端 - 当前步骤模式
100
+ * @description 只显示当前步骤信息
101
+ */
102
+ export declare const MobileModeCurrent: Story;
103
+ /**
104
+ * 移动端 - 自动模式
105
+ * @description 根据屏幕宽度自动切换显示模式
106
+ */
107
+ export declare const MobileModeAuto: Story;
108
+ /**
109
+ * 自定义移动端断点
110
+ * @description 通过 mobileBreakpoint 自定义断点宽度
111
+ */
112
+ export declare const CustomMobileBreakpoint: Story;
113
+ /**
114
+ * 自定义起始索引
115
+ * @description 通过 initial 设置起始步骤索引
116
+ */
117
+ export declare const InitialIndex: Story;
118
+ /**
119
+ * 隐藏特定步骤
120
+ * @description 通过 hidden 属性动态隐藏步骤
121
+ */
122
+ export declare const HiddenStep: Story;
123
+ /**
124
+ * 带子标题
125
+ * @description 步骤可以包含子标题
126
+ */
127
+ export declare const WithSubTitle: Story;
128
+ /**
129
+ * 响应式步骤条
130
+ * @description 开启响应式后会自动调整布局
131
+ */
132
+ export declare const Responsive: Story;
133
+ /**
134
+ * 完整功能演示
135
+ * @description 展示多种功能的组合使用
136
+ */
137
+ export declare const FullFeature: Story;
138
+ /**
139
+ * 多步骤流程
140
+ * @description 更多步骤的场景
141
+ */
142
+ export declare const ManySteps: Story;
143
+ /**
144
+ * 购物流程示例
145
+ * @description 模拟真实的购物流程
146
+ */
147
+ export declare const ShoppingFlow: Story;
148
+ /**
149
+ * 交互测试 - 点击步骤
150
+ */
151
+ export declare const InteractionTest: Story;
152
+ /**
153
+ * 交互测试 - 验证组件渲染
154
+ */
155
+ export declare const RenderTest: Story;
@@ -0,0 +1,570 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/PisellSteps/PisellSteps.stories.tsx
30
+ var PisellSteps_stories_exports = {};
31
+ __export(PisellSteps_stories_exports, {
32
+ Clickable: () => Clickable,
33
+ CustomIcon: () => CustomIcon,
34
+ CustomItemGap: () => CustomItemGap,
35
+ CustomMobileBreakpoint: () => CustomMobileBreakpoint,
36
+ CustomProgressDot: () => CustomProgressDot,
37
+ CustomStatus: () => CustomStatus,
38
+ Default: () => Default,
39
+ DisabledStep: () => DisabledStep,
40
+ DisallowClickFinished: () => DisallowClickFinished,
41
+ Dot: () => Dot,
42
+ ErrorStatus: () => ErrorStatus,
43
+ FinishIcon: () => FinishIcon,
44
+ FullFeature: () => FullFeature,
45
+ GridLayout: () => GridLayout,
46
+ HiddenStep: () => HiddenStep,
47
+ InitialIndex: () => InitialIndex,
48
+ InteractionTest: () => InteractionTest,
49
+ LabelVertical: () => LabelVertical,
50
+ Large: () => Large,
51
+ ManySteps: () => ManySteps,
52
+ MobileModeAuto: () => MobileModeAuto,
53
+ MobileModeCurrent: () => MobileModeCurrent,
54
+ MobileModeFull: () => MobileModeFull,
55
+ Navigation: () => Navigation,
56
+ RenderTest: () => RenderTest,
57
+ Responsive: () => Responsive,
58
+ ShoppingFlow: () => ShoppingFlow,
59
+ Small: () => Small,
60
+ Uncontrolled: () => Uncontrolled,
61
+ Vertical: () => Vertical,
62
+ WithSubTitle: () => WithSubTitle,
63
+ default: () => PisellSteps_stories_default
64
+ });
65
+ module.exports = __toCommonJS(PisellSteps_stories_exports);
66
+ var import_test = require("@storybook/test");
67
+ var import_react = __toESM(require("react"));
68
+ var import_icons = require("@ant-design/icons");
69
+ var import_PisellSteps = __toESM(require("./PisellSteps"));
70
+ var meta = {
71
+ title: "Components/PisellSteps",
72
+ component: import_PisellSteps.default,
73
+ parameters: {
74
+ layout: "padded",
75
+ docs: {
76
+ description: {
77
+ component: "步骤条组件,用于展示流程进度和引导用户完成操作步骤。"
78
+ }
79
+ }
80
+ },
81
+ tags: ["autodocs"],
82
+ argTypes: {
83
+ type: {
84
+ control: "select",
85
+ options: ["default", "navigation"],
86
+ description: "步骤条类型"
87
+ },
88
+ direction: {
89
+ control: "select",
90
+ options: ["horizontal", "vertical"],
91
+ description: "步骤条方向"
92
+ },
93
+ size: {
94
+ control: "select",
95
+ options: ["small", "default", "large"],
96
+ description: "步骤条尺寸"
97
+ },
98
+ status: {
99
+ control: "select",
100
+ options: ["wait", "process", "finish", "error"],
101
+ description: "当前步骤状态"
102
+ },
103
+ labelPlacement: {
104
+ control: "select",
105
+ options: ["horizontal", "vertical"],
106
+ description: "标签放置位置"
107
+ },
108
+ mobileMode: {
109
+ control: "select",
110
+ options: ["full", "current", "auto"],
111
+ description: "移动端显示模式"
112
+ },
113
+ clickable: {
114
+ control: "boolean",
115
+ description: "是否可点击"
116
+ },
117
+ responsive: {
118
+ control: "boolean",
119
+ description: "是否响应式"
120
+ },
121
+ progressDot: {
122
+ control: "boolean",
123
+ description: "是否使用点状步骤条"
124
+ },
125
+ gridLayout: {
126
+ control: "boolean",
127
+ description: "是否启用栅格布局"
128
+ },
129
+ enableAnchor: {
130
+ control: "boolean",
131
+ description: "是否启用锚链接"
132
+ }
133
+ }
134
+ };
135
+ var PisellSteps_stories_default = meta;
136
+ var Default = {
137
+ args: {
138
+ items: [
139
+ { title: "步骤一", description: "这是第一步的描述" },
140
+ { title: "步骤二", description: "这是第二步的描述" },
141
+ { title: "步骤三", description: "这是第三步的描述" }
142
+ ],
143
+ current: 1
144
+ }
145
+ };
146
+ var Uncontrolled = {
147
+ args: {
148
+ items: [
149
+ { title: "步骤一" },
150
+ { title: "步骤二" },
151
+ { title: "步骤三" }
152
+ ],
153
+ defaultCurrent: 1,
154
+ clickable: true
155
+ }
156
+ };
157
+ var Vertical = {
158
+ args: {
159
+ direction: "vertical",
160
+ items: [
161
+ { title: "步骤一", description: "这是第一步的描述" },
162
+ { title: "步骤二", description: "这是第二步的描述" },
163
+ { title: "步骤三", description: "这是第三步的描述" }
164
+ ],
165
+ current: 1
166
+ }
167
+ };
168
+ var Dot = {
169
+ args: {
170
+ progressDot: true,
171
+ items: [
172
+ { title: "已完成", description: "这是第一步" },
173
+ { title: "进行中", description: "这是第二步" },
174
+ { title: "等待中", description: "这是第三步" }
175
+ ],
176
+ current: 1
177
+ }
178
+ };
179
+ var CustomProgressDot = {
180
+ args: {
181
+ progressDot: (dot, { index, status }) => /* @__PURE__ */ import_react.default.createElement(
182
+ "span",
183
+ {
184
+ style: {
185
+ display: "inline-flex",
186
+ alignItems: "center",
187
+ justifyContent: "center",
188
+ width: 24,
189
+ height: 24,
190
+ borderRadius: "50%",
191
+ background: status === "finish" ? "#52c41a" : status === "process" ? "#1890ff" : "#d9d9d9",
192
+ color: "#fff",
193
+ fontSize: 12
194
+ }
195
+ },
196
+ status === "finish" ? "✓" : index + 1
197
+ ),
198
+ items: [
199
+ { title: "步骤一" },
200
+ { title: "步骤二" },
201
+ { title: "步骤三" }
202
+ ],
203
+ current: 1
204
+ }
205
+ };
206
+ var Navigation = {
207
+ args: {
208
+ type: "navigation",
209
+ items: [
210
+ { title: "步骤一" },
211
+ { title: "步骤二" },
212
+ { title: "步骤三" }
213
+ ],
214
+ current: 1
215
+ }
216
+ };
217
+ var Small = {
218
+ args: {
219
+ size: "small",
220
+ items: [
221
+ { title: "步骤一" },
222
+ { title: "步骤二" },
223
+ { title: "步骤三" }
224
+ ],
225
+ current: 1
226
+ }
227
+ };
228
+ var Large = {
229
+ args: {
230
+ size: "large",
231
+ items: [
232
+ { title: "步骤一", description: "这是第一步的描述" },
233
+ { title: "步骤二", description: "这是第二步的描述" },
234
+ { title: "步骤三", description: "这是第三步的描述" }
235
+ ],
236
+ current: 1
237
+ }
238
+ };
239
+ var LabelVertical = {
240
+ args: {
241
+ labelPlacement: "vertical",
242
+ items: [
243
+ { title: "步骤一", description: "这是第一步的描述" },
244
+ { title: "步骤二", description: "这是第二步的描述" },
245
+ { title: "步骤三", description: "这是第三步的描述" }
246
+ ],
247
+ current: 1
248
+ }
249
+ };
250
+ var ErrorStatus = {
251
+ args: {
252
+ items: [
253
+ { title: "步骤一", status: "finish" },
254
+ { title: "步骤二", status: "error" },
255
+ { title: "步骤三" }
256
+ ],
257
+ current: 1,
258
+ status: "error"
259
+ }
260
+ };
261
+ var CustomStatus = {
262
+ args: {
263
+ items: [
264
+ { title: "步骤一", status: "finish", description: "已完成" },
265
+ { title: "步骤二", status: "process", description: "进行中" },
266
+ { title: "步骤三", status: "wait", description: "等待中" },
267
+ { title: "步骤四", status: "error", description: "出错了" }
268
+ ],
269
+ current: 1
270
+ }
271
+ };
272
+ var Clickable = {
273
+ args: {
274
+ clickable: true,
275
+ items: [
276
+ { title: "步骤一" },
277
+ { title: "步骤二" },
278
+ { title: "步骤三" }
279
+ ],
280
+ current: 1,
281
+ onChange: (current) => console.log("点击了步骤:", current)
282
+ }
283
+ };
284
+ var DisallowClickFinished = {
285
+ args: {
286
+ clickable: true,
287
+ allowClickFinished: false,
288
+ items: [
289
+ { title: "步骤一", description: "不可点击回去" },
290
+ { title: "步骤二", description: "当前步骤" },
291
+ { title: "步骤三", description: "点击前进" }
292
+ ],
293
+ current: 1,
294
+ onChange: (current) => console.log("点击了步骤:", current)
295
+ }
296
+ };
297
+ var DisabledStep = {
298
+ args: {
299
+ clickable: true,
300
+ items: [
301
+ { title: "步骤一" },
302
+ { title: "步骤二", disabled: true },
303
+ { title: "步骤三" }
304
+ ],
305
+ current: 0,
306
+ onChange: (current) => console.log("点击了步骤:", current)
307
+ }
308
+ };
309
+ var CustomIcon = {
310
+ args: {
311
+ items: [
312
+ { title: "登录", icon: import_react.default.createElement(import_icons.UserOutlined) },
313
+ { title: "验证", icon: import_react.default.createElement(import_icons.SolutionOutlined) },
314
+ { title: "付款", icon: import_react.default.createElement(import_icons.LoadingOutlined) },
315
+ { title: "完成", icon: import_react.default.createElement(import_icons.SmileOutlined) }
316
+ ],
317
+ current: 2
318
+ }
319
+ };
320
+ var FinishIcon = {
321
+ args: {
322
+ items: [
323
+ { title: "步骤一", icon: import_react.default.createElement(import_icons.CheckCircleOutlined, { style: { color: "#52c41a" } }) },
324
+ { title: "步骤二", icon: "2" },
325
+ { title: "步骤三", icon: "3" }
326
+ ],
327
+ current: 1
328
+ }
329
+ };
330
+ var GridLayout = {
331
+ args: {
332
+ gridLayout: true,
333
+ gridColumns: 4,
334
+ items: [
335
+ { title: "步骤一", description: "描述" },
336
+ { title: "步骤二", description: "描述" },
337
+ { title: "步骤三", description: "描述" },
338
+ { title: "步骤四", description: "描述" }
339
+ ],
340
+ current: 1
341
+ }
342
+ };
343
+ var CustomItemGap = {
344
+ args: {
345
+ itemGap: 16,
346
+ items: [
347
+ { title: "步骤一", description: "描述文本" },
348
+ { title: "步骤二", description: "描述文本" },
349
+ { title: "步骤三", description: "描述文本" }
350
+ ],
351
+ current: 1
352
+ }
353
+ };
354
+ var MobileModeFull = {
355
+ args: {
356
+ mobileMode: "full",
357
+ items: [
358
+ { title: "步骤一", description: "第一步描述" },
359
+ { title: "步骤二", description: "第二步描述" },
360
+ { title: "步骤三", description: "第三步描述" }
361
+ ],
362
+ current: 1
363
+ },
364
+ parameters: {
365
+ viewport: {
366
+ defaultViewport: "mobile1"
367
+ }
368
+ }
369
+ };
370
+ var MobileModeCurrent = {
371
+ args: {
372
+ mobileMode: "current",
373
+ items: [
374
+ { title: "步骤一", description: "第一步描述" },
375
+ { title: "步骤二", description: "第二步描述" },
376
+ { title: "步骤三", description: "第三步描述" }
377
+ ],
378
+ current: 1
379
+ }
380
+ };
381
+ var MobileModeAuto = {
382
+ args: {
383
+ mobileMode: "auto",
384
+ mobileBreakpoint: 744,
385
+ items: [
386
+ { title: "步骤一", description: "第一步描述" },
387
+ { title: "步骤二", description: "第二步描述" },
388
+ { title: "步骤三", description: "第三步描述" }
389
+ ],
390
+ current: 1
391
+ }
392
+ };
393
+ var CustomMobileBreakpoint = {
394
+ args: {
395
+ mobileMode: "auto",
396
+ mobileBreakpoint: 500,
397
+ items: [
398
+ { title: "步骤一", description: "第一步描述" },
399
+ { title: "步骤二", description: "第二步描述" },
400
+ { title: "步骤三", description: "第三步描述" }
401
+ ],
402
+ current: 1
403
+ }
404
+ };
405
+ var InitialIndex = {
406
+ args: {
407
+ initial: 1,
408
+ current: 2,
409
+ items: [
410
+ { title: "步骤 1" },
411
+ { title: "步骤 2" },
412
+ { title: "步骤 3" }
413
+ ]
414
+ }
415
+ };
416
+ var HiddenStep = {
417
+ args: {
418
+ items: [
419
+ { title: "步骤一" },
420
+ { title: "步骤二(隐藏)", hidden: true },
421
+ { title: "步骤三" }
422
+ ],
423
+ current: 1
424
+ }
425
+ };
426
+ var WithSubTitle = {
427
+ args: {
428
+ items: [
429
+ { title: "已完成", subTitle: "00:00:05", description: "这是第一步" },
430
+ { title: "进行中", subTitle: "剩余 00:00:08", description: "这是第二步" },
431
+ { title: "等待中", subTitle: "", description: "这是第三步" }
432
+ ],
433
+ current: 1
434
+ }
435
+ };
436
+ var Responsive = {
437
+ args: {
438
+ responsive: true,
439
+ items: [
440
+ { title: "步骤一", description: "这是第一步的描述" },
441
+ { title: "步骤二", description: "这是第二步的描述" },
442
+ { title: "步骤三", description: "这是第三步的描述" }
443
+ ],
444
+ current: 1
445
+ }
446
+ };
447
+ var FullFeature = {
448
+ args: {
449
+ clickable: true,
450
+ responsive: true,
451
+ labelPlacement: "vertical",
452
+ items: [
453
+ {
454
+ title: "创建账户",
455
+ description: "填写基本信息",
456
+ icon: import_react.default.createElement(import_icons.UserOutlined)
457
+ },
458
+ {
459
+ title: "身份验证",
460
+ description: "验证您的身份",
461
+ icon: import_react.default.createElement(import_icons.SolutionOutlined)
462
+ },
463
+ {
464
+ title: "完成注册",
465
+ description: "设置完成",
466
+ icon: import_react.default.createElement(import_icons.SmileOutlined)
467
+ }
468
+ ],
469
+ current: 1,
470
+ onChange: (current) => console.log("当前步骤:", current)
471
+ }
472
+ };
473
+ var ManySteps = {
474
+ args: {
475
+ size: "small",
476
+ items: [
477
+ { title: "步骤 1" },
478
+ { title: "步骤 2" },
479
+ { title: "步骤 3" },
480
+ { title: "步骤 4" },
481
+ { title: "步骤 5" },
482
+ { title: "步骤 6" }
483
+ ],
484
+ current: 3
485
+ }
486
+ };
487
+ var ShoppingFlow = {
488
+ args: {
489
+ type: "navigation",
490
+ items: [
491
+ { title: "购物车", description: "已选 3 件商品" },
492
+ { title: "填写订单", description: "收货信息" },
493
+ { title: "支付", description: "选择支付方式" },
494
+ { title: "完成", description: "订单完成" }
495
+ ],
496
+ current: 1,
497
+ clickable: true,
498
+ allowClickFinished: true
499
+ }
500
+ };
501
+ var InteractionTest = {
502
+ args: {
503
+ clickable: true,
504
+ items: [
505
+ { title: "步骤一" },
506
+ { title: "步骤二" },
507
+ { title: "步骤三" }
508
+ ],
509
+ current: 1
510
+ },
511
+ play: async ({ canvasElement }) => {
512
+ const canvas = (0, import_test.within)(canvasElement);
513
+ const step1 = canvas.getByText("步骤一");
514
+ await (0, import_test.expect)(step1).toBeInTheDocument();
515
+ await import_test.userEvent.click(step1);
516
+ }
517
+ };
518
+ var RenderTest = {
519
+ args: {
520
+ items: [
521
+ { title: "步骤一", description: "描述一" },
522
+ { title: "步骤二", description: "描述二" },
523
+ { title: "步骤三", description: "描述三" }
524
+ ],
525
+ current: 0
526
+ },
527
+ play: async ({ canvasElement }) => {
528
+ const canvas = (0, import_test.within)(canvasElement);
529
+ await (0, import_test.expect)(canvas.getByText("步骤一")).toBeInTheDocument();
530
+ await (0, import_test.expect)(canvas.getByText("步骤二")).toBeInTheDocument();
531
+ await (0, import_test.expect)(canvas.getByText("步骤三")).toBeInTheDocument();
532
+ await (0, import_test.expect)(canvas.getByText("描述一")).toBeInTheDocument();
533
+ await (0, import_test.expect)(canvas.getByText("描述二")).toBeInTheDocument();
534
+ await (0, import_test.expect)(canvas.getByText("描述三")).toBeInTheDocument();
535
+ }
536
+ };
537
+ // Annotate the CommonJS export names for ESM import in node:
538
+ 0 && (module.exports = {
539
+ Clickable,
540
+ CustomIcon,
541
+ CustomItemGap,
542
+ CustomMobileBreakpoint,
543
+ CustomProgressDot,
544
+ CustomStatus,
545
+ Default,
546
+ DisabledStep,
547
+ DisallowClickFinished,
548
+ Dot,
549
+ ErrorStatus,
550
+ FinishIcon,
551
+ FullFeature,
552
+ GridLayout,
553
+ HiddenStep,
554
+ InitialIndex,
555
+ InteractionTest,
556
+ LabelVertical,
557
+ Large,
558
+ ManySteps,
559
+ MobileModeAuto,
560
+ MobileModeCurrent,
561
+ MobileModeFull,
562
+ Navigation,
563
+ RenderTest,
564
+ Responsive,
565
+ ShoppingFlow,
566
+ Small,
567
+ Uncontrolled,
568
+ Vertical,
569
+ WithSubTitle
570
+ });