@svton/taro-ui 1.0.0 → 1.0.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/dist/index.d.mts +246 -0
- package/dist/index.d.ts +246 -0
- package/dist/index.js +253 -182
- package/dist/index.mjs +239 -169
- package/package.json +7 -8
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface TabBarItem<T = string> {
|
|
5
|
+
/** Tab 的唯一标识 */
|
|
6
|
+
key: T;
|
|
7
|
+
/** 显示文本 */
|
|
8
|
+
label: string;
|
|
9
|
+
/** 自定义渲染内容 */
|
|
10
|
+
render?: () => ReactNode;
|
|
11
|
+
/** 是否禁用 */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface TabBarProps<T = string> {
|
|
15
|
+
/** Tab 项列表 */
|
|
16
|
+
items: TabBarItem<T>[];
|
|
17
|
+
/** 当前激活的Tab(受控) */
|
|
18
|
+
activeKey?: T;
|
|
19
|
+
/** 默认激活的Tab(非受控) */
|
|
20
|
+
defaultActiveKey?: T;
|
|
21
|
+
/** Tab 切换回调 */
|
|
22
|
+
onChange?: (key: T) => void;
|
|
23
|
+
/** 自定义类名 */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** 自定义样式 */
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
/** 下划线宽度 */
|
|
28
|
+
indicatorWidth?: number;
|
|
29
|
+
/** 是否显示下划线 */
|
|
30
|
+
showIndicator?: boolean;
|
|
31
|
+
/** 是否粘性定位 */
|
|
32
|
+
sticky?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare function TabBar<T extends string = string>(props: TabBarProps<T>): react_jsx_runtime.JSX.Element;
|
|
35
|
+
|
|
36
|
+
type ButtonType = 'primary' | 'default' | 'danger' | 'text';
|
|
37
|
+
type ButtonSize = 'large' | 'medium' | 'small';
|
|
38
|
+
interface ButtonProps {
|
|
39
|
+
/** 按钮类型 */
|
|
40
|
+
type?: ButtonType;
|
|
41
|
+
/** 按钮尺寸 */
|
|
42
|
+
size?: ButtonSize;
|
|
43
|
+
/** 是否加载中 */
|
|
44
|
+
loading?: boolean;
|
|
45
|
+
/** 是否禁用 */
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
/** 是否为块级按钮(宽度100%) */
|
|
48
|
+
block?: boolean;
|
|
49
|
+
/** 按钮文本 */
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
/** 自定义类名 */
|
|
52
|
+
className?: string;
|
|
53
|
+
/** 自定义样式 */
|
|
54
|
+
style?: CSSProperties;
|
|
55
|
+
/** 点击事件 */
|
|
56
|
+
onClick?: () => void;
|
|
57
|
+
}
|
|
58
|
+
declare function Button(props: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
interface ListProps<T = any> {
|
|
61
|
+
/** 列表数据 */
|
|
62
|
+
data: T[];
|
|
63
|
+
/** 自定义渲染列表项 */
|
|
64
|
+
renderItem: (item: T, index: number) => ReactNode;
|
|
65
|
+
/** 唯一键提取函数 */
|
|
66
|
+
keyExtractor?: (item: T, index: number) => string | number;
|
|
67
|
+
/** 是否正在加载 */
|
|
68
|
+
loading?: boolean;
|
|
69
|
+
/** 是否还有更多数据 */
|
|
70
|
+
hasMore?: boolean;
|
|
71
|
+
/** 下拉刷新回调 */
|
|
72
|
+
onRefresh?: () => Promise<void> | void;
|
|
73
|
+
/** 上拉加载更多回调 */
|
|
74
|
+
onLoadMore?: () => Promise<void> | void;
|
|
75
|
+
/** 空状态渲染 */
|
|
76
|
+
renderEmpty?: () => ReactNode;
|
|
77
|
+
/** 空状态提示文本 */
|
|
78
|
+
emptyText?: string;
|
|
79
|
+
/** 加载更多提示文本 */
|
|
80
|
+
loadingText?: string;
|
|
81
|
+
/** 没有更多数据提示文本 */
|
|
82
|
+
noMoreText?: string;
|
|
83
|
+
/** 自定义类名 */
|
|
84
|
+
className?: string;
|
|
85
|
+
/** 自定义样式 */
|
|
86
|
+
style?: CSSProperties;
|
|
87
|
+
/** 是否启用下拉刷新 */
|
|
88
|
+
enableRefresh?: boolean;
|
|
89
|
+
/** 是否启用上拉加载 */
|
|
90
|
+
enableLoadMore?: boolean;
|
|
91
|
+
/** 头部内容 */
|
|
92
|
+
header?: ReactNode;
|
|
93
|
+
/** 底部内容 */
|
|
94
|
+
footer?: ReactNode;
|
|
95
|
+
}
|
|
96
|
+
declare function List<T = any>(props: ListProps<T>): react_jsx_runtime.JSX.Element;
|
|
97
|
+
|
|
98
|
+
interface CustomNavBarProps {
|
|
99
|
+
title?: string;
|
|
100
|
+
showBack?: boolean;
|
|
101
|
+
showClose?: boolean;
|
|
102
|
+
backgroundColor?: string;
|
|
103
|
+
textColor?: string;
|
|
104
|
+
onBack?: () => void;
|
|
105
|
+
onClose?: () => void;
|
|
106
|
+
rightContent?: React.ReactNode;
|
|
107
|
+
fixed?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* 滚动透明度 (0-1)
|
|
110
|
+
* 0: 完全透明, 1: 完全不透明
|
|
111
|
+
* 用于实现滚动时导航栏逐渐显示的效果
|
|
112
|
+
*/
|
|
113
|
+
scrollOpacity?: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* 自定义导航栏组件
|
|
117
|
+
* 自动适配刘海屏和胶囊按钮
|
|
118
|
+
*/
|
|
119
|
+
declare function CustomNavBar({ title, showBack, showClose, backgroundColor, textColor, onBack, onClose, rightContent, fixed, scrollOpacity, }: CustomNavBarProps): react_jsx_runtime.JSX.Element;
|
|
120
|
+
|
|
121
|
+
interface StatusBarProps {
|
|
122
|
+
backgroundColor?: string;
|
|
123
|
+
className?: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* 状态栏占位组件
|
|
127
|
+
* 用于在自定义导航栏或沉浸式设计中占位状态栏高度
|
|
128
|
+
*/
|
|
129
|
+
declare function StatusBar({ backgroundColor, className }: StatusBarProps): react_jsx_runtime.JSX.Element;
|
|
130
|
+
|
|
131
|
+
interface ImageUploaderProps {
|
|
132
|
+
value?: string[];
|
|
133
|
+
onChange?: (images: string[]) => void;
|
|
134
|
+
maxCount?: number;
|
|
135
|
+
uploadUrl?: string;
|
|
136
|
+
}
|
|
137
|
+
declare function ImageUploader({ value, onChange, maxCount, uploadUrl, }: ImageUploaderProps): react_jsx_runtime.JSX.Element;
|
|
138
|
+
|
|
139
|
+
interface ImageGridProps {
|
|
140
|
+
images: string[];
|
|
141
|
+
maxCount?: number;
|
|
142
|
+
onImageClick?: (index: number) => void;
|
|
143
|
+
}
|
|
144
|
+
declare function ImageGrid({ images, maxCount, onImageClick }: ImageGridProps): react_jsx_runtime.JSX.Element;
|
|
145
|
+
|
|
146
|
+
interface TabItem {
|
|
147
|
+
key: string;
|
|
148
|
+
label: string;
|
|
149
|
+
count?: number;
|
|
150
|
+
}
|
|
151
|
+
interface TabsProps {
|
|
152
|
+
/**
|
|
153
|
+
* 当前激活的 tab key
|
|
154
|
+
*/
|
|
155
|
+
activeKey: string;
|
|
156
|
+
/**
|
|
157
|
+
* tab 列表
|
|
158
|
+
*/
|
|
159
|
+
items: TabItem[];
|
|
160
|
+
/**
|
|
161
|
+
* tab 切换回调
|
|
162
|
+
* @param key - 被点击的 tab key
|
|
163
|
+
*/
|
|
164
|
+
onChange: (key: string) => void;
|
|
165
|
+
/**
|
|
166
|
+
* 自定义类名
|
|
167
|
+
*/
|
|
168
|
+
className?: string;
|
|
169
|
+
}
|
|
170
|
+
declare function Tabs({ activeKey, items, onChange, className }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
171
|
+
|
|
172
|
+
interface ContentActionBarProps {
|
|
173
|
+
/** 评论回调 */
|
|
174
|
+
onComment?: (content: string) => void | Promise<void>;
|
|
175
|
+
/** 点赞回调 */
|
|
176
|
+
onLike?: () => void;
|
|
177
|
+
/** 收藏回调 */
|
|
178
|
+
onFavorite?: () => void;
|
|
179
|
+
/** 分享回调 */
|
|
180
|
+
onShare?: () => void;
|
|
181
|
+
/** 是否已点赞 */
|
|
182
|
+
liked?: boolean;
|
|
183
|
+
/** 是否已收藏 */
|
|
184
|
+
favorited?: boolean;
|
|
185
|
+
/** 输入框占位文字 */
|
|
186
|
+
placeholder?: string;
|
|
187
|
+
/** 最大字符数 */
|
|
188
|
+
maxLength?: number;
|
|
189
|
+
/** 是否禁用 */
|
|
190
|
+
disabled?: boolean;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* 内容操作栏组件
|
|
194
|
+
* 整合评论输入框和操作按钮(点赞/收藏/分享)
|
|
195
|
+
*
|
|
196
|
+
* 特点:
|
|
197
|
+
* - 收起状态:[说点什么...] [❤️] [⭐] [📤]
|
|
198
|
+
* - 展开状态:[多行输入框] [发送按钮]
|
|
199
|
+
* - 参考小红书交互设计
|
|
200
|
+
*/
|
|
201
|
+
declare function ContentActionBar({ onComment, onLike, onFavorite, onShare, liked, favorited, placeholder, maxLength, disabled, }: ContentActionBarProps): react_jsx_runtime.JSX.Element;
|
|
202
|
+
|
|
203
|
+
interface SystemInfo {
|
|
204
|
+
statusBarHeight: number;
|
|
205
|
+
safeAreaInsets: {
|
|
206
|
+
top: number;
|
|
207
|
+
right: number;
|
|
208
|
+
bottom: number;
|
|
209
|
+
left: number;
|
|
210
|
+
};
|
|
211
|
+
menuButton?: {
|
|
212
|
+
width: number;
|
|
213
|
+
height: number;
|
|
214
|
+
top: number;
|
|
215
|
+
right: number;
|
|
216
|
+
bottom: number;
|
|
217
|
+
left: number;
|
|
218
|
+
};
|
|
219
|
+
navBarHeight: number;
|
|
220
|
+
windowWidth: number;
|
|
221
|
+
windowHeight: number;
|
|
222
|
+
}
|
|
223
|
+
declare class SystemInfoManager {
|
|
224
|
+
private info;
|
|
225
|
+
init(): Promise<SystemInfo>;
|
|
226
|
+
private setCSSVariables;
|
|
227
|
+
getInfo(): SystemInfo | null;
|
|
228
|
+
getStatusBarHeight(): number;
|
|
229
|
+
getNavBarHeight(): number;
|
|
230
|
+
getSafeAreaInsets(): {
|
|
231
|
+
top: number;
|
|
232
|
+
right: number;
|
|
233
|
+
bottom: number;
|
|
234
|
+
left: number;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
declare const systemInfoManager: SystemInfoManager;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* 计算滚动透明度的 Hook
|
|
241
|
+
* @param threshold 达到完全透明的滚动距离(像素),默认 200
|
|
242
|
+
* @returns [scrollOpacity, handleScroll]
|
|
243
|
+
*/
|
|
244
|
+
declare function useScrollOpacity(threshold?: number): readonly [number, (scrollTop: number) => void];
|
|
245
|
+
|
|
246
|
+
export { Button, type ButtonProps, type ButtonSize, type ButtonType, ContentActionBar, type ContentActionBarProps, ImageGrid, ImageUploader, List, type ListProps, CustomNavBar as NavBar, StatusBar, TabBar, type TabBarItem, type TabBarProps, type TabItem, Tabs, Tabs as TabsDefault, type TabsProps, systemInfoManager, useScrollOpacity };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface TabBarItem<T = string> {
|
|
5
|
+
/** Tab 的唯一标识 */
|
|
6
|
+
key: T;
|
|
7
|
+
/** 显示文本 */
|
|
8
|
+
label: string;
|
|
9
|
+
/** 自定义渲染内容 */
|
|
10
|
+
render?: () => ReactNode;
|
|
11
|
+
/** 是否禁用 */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface TabBarProps<T = string> {
|
|
15
|
+
/** Tab 项列表 */
|
|
16
|
+
items: TabBarItem<T>[];
|
|
17
|
+
/** 当前激活的Tab(受控) */
|
|
18
|
+
activeKey?: T;
|
|
19
|
+
/** 默认激活的Tab(非受控) */
|
|
20
|
+
defaultActiveKey?: T;
|
|
21
|
+
/** Tab 切换回调 */
|
|
22
|
+
onChange?: (key: T) => void;
|
|
23
|
+
/** 自定义类名 */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** 自定义样式 */
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
/** 下划线宽度 */
|
|
28
|
+
indicatorWidth?: number;
|
|
29
|
+
/** 是否显示下划线 */
|
|
30
|
+
showIndicator?: boolean;
|
|
31
|
+
/** 是否粘性定位 */
|
|
32
|
+
sticky?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare function TabBar<T extends string = string>(props: TabBarProps<T>): react_jsx_runtime.JSX.Element;
|
|
35
|
+
|
|
36
|
+
type ButtonType = 'primary' | 'default' | 'danger' | 'text';
|
|
37
|
+
type ButtonSize = 'large' | 'medium' | 'small';
|
|
38
|
+
interface ButtonProps {
|
|
39
|
+
/** 按钮类型 */
|
|
40
|
+
type?: ButtonType;
|
|
41
|
+
/** 按钮尺寸 */
|
|
42
|
+
size?: ButtonSize;
|
|
43
|
+
/** 是否加载中 */
|
|
44
|
+
loading?: boolean;
|
|
45
|
+
/** 是否禁用 */
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
/** 是否为块级按钮(宽度100%) */
|
|
48
|
+
block?: boolean;
|
|
49
|
+
/** 按钮文本 */
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
/** 自定义类名 */
|
|
52
|
+
className?: string;
|
|
53
|
+
/** 自定义样式 */
|
|
54
|
+
style?: CSSProperties;
|
|
55
|
+
/** 点击事件 */
|
|
56
|
+
onClick?: () => void;
|
|
57
|
+
}
|
|
58
|
+
declare function Button(props: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
interface ListProps<T = any> {
|
|
61
|
+
/** 列表数据 */
|
|
62
|
+
data: T[];
|
|
63
|
+
/** 自定义渲染列表项 */
|
|
64
|
+
renderItem: (item: T, index: number) => ReactNode;
|
|
65
|
+
/** 唯一键提取函数 */
|
|
66
|
+
keyExtractor?: (item: T, index: number) => string | number;
|
|
67
|
+
/** 是否正在加载 */
|
|
68
|
+
loading?: boolean;
|
|
69
|
+
/** 是否还有更多数据 */
|
|
70
|
+
hasMore?: boolean;
|
|
71
|
+
/** 下拉刷新回调 */
|
|
72
|
+
onRefresh?: () => Promise<void> | void;
|
|
73
|
+
/** 上拉加载更多回调 */
|
|
74
|
+
onLoadMore?: () => Promise<void> | void;
|
|
75
|
+
/** 空状态渲染 */
|
|
76
|
+
renderEmpty?: () => ReactNode;
|
|
77
|
+
/** 空状态提示文本 */
|
|
78
|
+
emptyText?: string;
|
|
79
|
+
/** 加载更多提示文本 */
|
|
80
|
+
loadingText?: string;
|
|
81
|
+
/** 没有更多数据提示文本 */
|
|
82
|
+
noMoreText?: string;
|
|
83
|
+
/** 自定义类名 */
|
|
84
|
+
className?: string;
|
|
85
|
+
/** 自定义样式 */
|
|
86
|
+
style?: CSSProperties;
|
|
87
|
+
/** 是否启用下拉刷新 */
|
|
88
|
+
enableRefresh?: boolean;
|
|
89
|
+
/** 是否启用上拉加载 */
|
|
90
|
+
enableLoadMore?: boolean;
|
|
91
|
+
/** 头部内容 */
|
|
92
|
+
header?: ReactNode;
|
|
93
|
+
/** 底部内容 */
|
|
94
|
+
footer?: ReactNode;
|
|
95
|
+
}
|
|
96
|
+
declare function List<T = any>(props: ListProps<T>): react_jsx_runtime.JSX.Element;
|
|
97
|
+
|
|
98
|
+
interface CustomNavBarProps {
|
|
99
|
+
title?: string;
|
|
100
|
+
showBack?: boolean;
|
|
101
|
+
showClose?: boolean;
|
|
102
|
+
backgroundColor?: string;
|
|
103
|
+
textColor?: string;
|
|
104
|
+
onBack?: () => void;
|
|
105
|
+
onClose?: () => void;
|
|
106
|
+
rightContent?: React.ReactNode;
|
|
107
|
+
fixed?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* 滚动透明度 (0-1)
|
|
110
|
+
* 0: 完全透明, 1: 完全不透明
|
|
111
|
+
* 用于实现滚动时导航栏逐渐显示的效果
|
|
112
|
+
*/
|
|
113
|
+
scrollOpacity?: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* 自定义导航栏组件
|
|
117
|
+
* 自动适配刘海屏和胶囊按钮
|
|
118
|
+
*/
|
|
119
|
+
declare function CustomNavBar({ title, showBack, showClose, backgroundColor, textColor, onBack, onClose, rightContent, fixed, scrollOpacity, }: CustomNavBarProps): react_jsx_runtime.JSX.Element;
|
|
120
|
+
|
|
121
|
+
interface StatusBarProps {
|
|
122
|
+
backgroundColor?: string;
|
|
123
|
+
className?: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* 状态栏占位组件
|
|
127
|
+
* 用于在自定义导航栏或沉浸式设计中占位状态栏高度
|
|
128
|
+
*/
|
|
129
|
+
declare function StatusBar({ backgroundColor, className }: StatusBarProps): react_jsx_runtime.JSX.Element;
|
|
130
|
+
|
|
131
|
+
interface ImageUploaderProps {
|
|
132
|
+
value?: string[];
|
|
133
|
+
onChange?: (images: string[]) => void;
|
|
134
|
+
maxCount?: number;
|
|
135
|
+
uploadUrl?: string;
|
|
136
|
+
}
|
|
137
|
+
declare function ImageUploader({ value, onChange, maxCount, uploadUrl, }: ImageUploaderProps): react_jsx_runtime.JSX.Element;
|
|
138
|
+
|
|
139
|
+
interface ImageGridProps {
|
|
140
|
+
images: string[];
|
|
141
|
+
maxCount?: number;
|
|
142
|
+
onImageClick?: (index: number) => void;
|
|
143
|
+
}
|
|
144
|
+
declare function ImageGrid({ images, maxCount, onImageClick }: ImageGridProps): react_jsx_runtime.JSX.Element;
|
|
145
|
+
|
|
146
|
+
interface TabItem {
|
|
147
|
+
key: string;
|
|
148
|
+
label: string;
|
|
149
|
+
count?: number;
|
|
150
|
+
}
|
|
151
|
+
interface TabsProps {
|
|
152
|
+
/**
|
|
153
|
+
* 当前激活的 tab key
|
|
154
|
+
*/
|
|
155
|
+
activeKey: string;
|
|
156
|
+
/**
|
|
157
|
+
* tab 列表
|
|
158
|
+
*/
|
|
159
|
+
items: TabItem[];
|
|
160
|
+
/**
|
|
161
|
+
* tab 切换回调
|
|
162
|
+
* @param key - 被点击的 tab key
|
|
163
|
+
*/
|
|
164
|
+
onChange: (key: string) => void;
|
|
165
|
+
/**
|
|
166
|
+
* 自定义类名
|
|
167
|
+
*/
|
|
168
|
+
className?: string;
|
|
169
|
+
}
|
|
170
|
+
declare function Tabs({ activeKey, items, onChange, className }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
171
|
+
|
|
172
|
+
interface ContentActionBarProps {
|
|
173
|
+
/** 评论回调 */
|
|
174
|
+
onComment?: (content: string) => void | Promise<void>;
|
|
175
|
+
/** 点赞回调 */
|
|
176
|
+
onLike?: () => void;
|
|
177
|
+
/** 收藏回调 */
|
|
178
|
+
onFavorite?: () => void;
|
|
179
|
+
/** 分享回调 */
|
|
180
|
+
onShare?: () => void;
|
|
181
|
+
/** 是否已点赞 */
|
|
182
|
+
liked?: boolean;
|
|
183
|
+
/** 是否已收藏 */
|
|
184
|
+
favorited?: boolean;
|
|
185
|
+
/** 输入框占位文字 */
|
|
186
|
+
placeholder?: string;
|
|
187
|
+
/** 最大字符数 */
|
|
188
|
+
maxLength?: number;
|
|
189
|
+
/** 是否禁用 */
|
|
190
|
+
disabled?: boolean;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* 内容操作栏组件
|
|
194
|
+
* 整合评论输入框和操作按钮(点赞/收藏/分享)
|
|
195
|
+
*
|
|
196
|
+
* 特点:
|
|
197
|
+
* - 收起状态:[说点什么...] [❤️] [⭐] [📤]
|
|
198
|
+
* - 展开状态:[多行输入框] [发送按钮]
|
|
199
|
+
* - 参考小红书交互设计
|
|
200
|
+
*/
|
|
201
|
+
declare function ContentActionBar({ onComment, onLike, onFavorite, onShare, liked, favorited, placeholder, maxLength, disabled, }: ContentActionBarProps): react_jsx_runtime.JSX.Element;
|
|
202
|
+
|
|
203
|
+
interface SystemInfo {
|
|
204
|
+
statusBarHeight: number;
|
|
205
|
+
safeAreaInsets: {
|
|
206
|
+
top: number;
|
|
207
|
+
right: number;
|
|
208
|
+
bottom: number;
|
|
209
|
+
left: number;
|
|
210
|
+
};
|
|
211
|
+
menuButton?: {
|
|
212
|
+
width: number;
|
|
213
|
+
height: number;
|
|
214
|
+
top: number;
|
|
215
|
+
right: number;
|
|
216
|
+
bottom: number;
|
|
217
|
+
left: number;
|
|
218
|
+
};
|
|
219
|
+
navBarHeight: number;
|
|
220
|
+
windowWidth: number;
|
|
221
|
+
windowHeight: number;
|
|
222
|
+
}
|
|
223
|
+
declare class SystemInfoManager {
|
|
224
|
+
private info;
|
|
225
|
+
init(): Promise<SystemInfo>;
|
|
226
|
+
private setCSSVariables;
|
|
227
|
+
getInfo(): SystemInfo | null;
|
|
228
|
+
getStatusBarHeight(): number;
|
|
229
|
+
getNavBarHeight(): number;
|
|
230
|
+
getSafeAreaInsets(): {
|
|
231
|
+
top: number;
|
|
232
|
+
right: number;
|
|
233
|
+
bottom: number;
|
|
234
|
+
left: number;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
declare const systemInfoManager: SystemInfoManager;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* 计算滚动透明度的 Hook
|
|
241
|
+
* @param threshold 达到完全透明的滚动距离(像素),默认 200
|
|
242
|
+
* @returns [scrollOpacity, handleScroll]
|
|
243
|
+
*/
|
|
244
|
+
declare function useScrollOpacity(threshold?: number): readonly [number, (scrollTop: number) => void];
|
|
245
|
+
|
|
246
|
+
export { Button, type ButtonProps, type ButtonSize, type ButtonType, ContentActionBar, type ContentActionBarProps, ImageGrid, ImageUploader, List, type ListProps, CustomNavBar as NavBar, StatusBar, TabBar, type TabBarItem, type TabBarProps, type TabItem, Tabs, Tabs as TabsDefault, type TabsProps, systemInfoManager, useScrollOpacity };
|