@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
@@ -41,10 +41,19 @@ export var useScrollEvents = function useScrollEvents(_ref) {
41
41
  // 简单的方向计算需要依赖上一次状态,这里暂简化
42
42
  // 实际使用中 scrollState 的更新会有延迟,所以 callback 中的 data 最好实时计算
43
43
 
44
- var maxScrollTop = scrollHeight - clientHeight;
45
- var maxScrollLeft = scrollWidth - clientWidth;
44
+ var maxScrollTop = Math.max(0, scrollHeight - clientHeight);
45
+ var maxScrollLeft = Math.max(0, scrollWidth - clientWidth);
46
46
  var percentY = maxScrollTop > 0 ? scrollTop / maxScrollTop * 100 : 0;
47
47
  var percentX = maxScrollLeft > 0 ? scrollLeft / maxScrollLeft * 100 : 0;
48
+
49
+ // 计算边界状态
50
+ var isScrollToTop = scrollTop <= reachThreshold;
51
+ var isScrollToBottom = scrollTop + clientHeight >= scrollHeight - reachThreshold;
52
+ var isScrollToLeft = scrollLeft <= reachThreshold;
53
+ var isScrollToRight = scrollLeft + clientWidth >= scrollWidth - reachThreshold;
54
+
55
+ // 计算是否溢出
56
+ var isOverflows = scrollHeight > clientHeight || scrollWidth > clientWidth;
48
57
  var currentData = {
49
58
  scrollTop: scrollTop,
50
59
  scrollLeft: scrollLeft,
@@ -54,7 +63,13 @@ export var useScrollEvents = function useScrollEvents(_ref) {
54
63
  clientWidth: clientWidth,
55
64
  percentY: percentY,
56
65
  percentX: percentX,
57
- direction: null // 在这里计算方向比较麻烦,可以使用 scrollState 中的(虽然有一点延迟)
66
+ direction: null,
67
+ // 在这里计算方向比较麻烦,可以使用 scrollState 中的(虽然有一点延迟)
68
+ isScrollToTop: isScrollToTop,
69
+ isScrollToBottom: isScrollToBottom,
70
+ isScrollToLeft: isScrollToLeft,
71
+ isScrollToRight: isScrollToRight,
72
+ isOverflows: isOverflows
58
73
  };
59
74
 
60
75
  // 触发 ScrollStart
@@ -1,2 +1,3 @@
1
- export { default as PisellScrollView } from './PisellScrollView';
1
+ import PisellScrollView from './PisellScrollView';
2
2
  export type { PisellScrollViewProps, PisellScrollViewRef } from './types';
3
+ export default PisellScrollView;
@@ -1 +1,2 @@
1
- export { default as PisellScrollView } from "./PisellScrollView";
1
+ import PisellScrollView from "./PisellScrollView";
2
+ export default PisellScrollView;
@@ -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;