@nutui/nutui-react 2.0.0-alpha.11 → 2.0.0-alpha.13
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/CHANGELOG.md +28 -0
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/ActionSheet.js +28 -37
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/AnimatingNumbers/style/style.css +1 -1
- package/dist/esm/AnimatingNumbers.js +22 -26
- package/dist/esm/Calendar/style/style.css +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/CountDown/style/style.css +1 -1
- package/dist/esm/CountDown.js +20 -15
- package/dist/esm/DatePicker/style/style.css +1 -1
- package/dist/esm/Ellipsis/style/style.css +1 -1
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/NumberKeyboard/style/style.css +1 -1
- package/dist/esm/Picker/style/style.css +1 -1
- package/dist/esm/Popup/style/style.css +1 -1
- package/dist/esm/SearchBar/style/style.css +1 -1
- package/dist/esm/SearchBar.js +33 -87
- package/dist/esm/ShortPassword/style/style.css +1 -1
- package/dist/esm/ShortPassword.js +65 -133
- package/dist/esm/SideNavBar/style/style.css +1 -1
- package/dist/esm/TimeSelect/style/style.css +1 -1
- package/dist/esm/Toast/style/style.css +1 -1
- package/dist/esm/Toast.js +86 -102
- package/dist/esm/TrendArrow/style/style.css +1 -1
- package/dist/esm/TrendArrow.js +30 -35
- package/dist/esm/Video.js +8 -12
- package/dist/esm/VirtualList/style/style.css +1 -1
- package/dist/esm/VirtualList.js +29 -25
- package/dist/esm/WaterMark.js +8 -11
- package/dist/esm/types/src/packages/actionsheet/actionsheet.d.ts +11 -15
- package/dist/esm/types/src/packages/actionsheet/actionsheet.taro.d.ts +11 -15
- package/dist/esm/types/src/packages/actionsheet/index.d.ts +1 -0
- package/dist/esm/types/src/packages/actionsheet/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/animatingnumbers/countup.d.ts +7 -8
- package/dist/esm/types/src/packages/animatingnumbers/countup.taro.d.ts +7 -8
- package/dist/esm/types/src/packages/animatingnumbers/demo.d.ts +1 -0
- package/dist/esm/types/src/packages/animatingnumbers/demo.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/animatingnumbers/index.d.ts +1 -0
- package/dist/esm/types/src/packages/animatingnumbers/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/avatargroup/avatargroup.taro.d.ts +13 -0
- package/dist/esm/types/src/packages/avatargroup/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +2 -1
- package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/configprovider/index.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -0
- package/dist/esm/types/src/packages/countdown/countdown.d.ts +5 -4
- package/dist/esm/types/src/packages/countdown/countdown.taro.d.ts +5 -4
- package/dist/esm/types/src/packages/countdown/index.d.ts +1 -0
- package/dist/esm/types/src/packages/countdown/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/ellipsis/ellipsis.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/searchbar/index.d.ts +1 -0
- package/dist/esm/types/src/packages/searchbar/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +4 -31
- package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +4 -31
- package/dist/esm/types/src/packages/shortpassword/index.d.ts +1 -0
- package/dist/esm/types/src/packages/shortpassword/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +17 -20
- package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +17 -20
- package/dist/esm/types/src/packages/toast/Notification.d.ts +9 -13
- package/dist/esm/types/src/packages/toast/index.d.ts +1 -0
- package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/toast/toast.d.ts +19 -26
- package/dist/esm/types/src/packages/toast/toast.taro.d.ts +9 -11
- package/dist/esm/types/src/packages/trendarrow/trendarrow.d.ts +8 -10
- package/dist/esm/types/src/packages/trendarrow/trendarrow.taro.d.ts +8 -10
- package/dist/esm/types/src/packages/video/index.d.ts +1 -0
- package/dist/esm/types/src/packages/video/index.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/video/video.d.ts +5 -9
- package/dist/esm/types/src/packages/video/video.taro.d.ts +6 -9
- package/dist/esm/types/src/packages/virtuallist/index.d.ts +1 -0
- package/dist/esm/types/src/packages/virtuallist/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/virtuallist/type.d.ts +0 -18
- package/dist/esm/types/src/packages/virtuallist/utils.d.ts +3 -3
- package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +15 -4
- package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +13 -14
- package/dist/esm/types/src/packages/watermark/demo.d.ts +0 -1
- package/dist/esm/types/src/packages/watermark/demo.taro.d.ts +0 -1
- package/dist/esm/types/src/packages/watermark/index.d.ts +1 -0
- package/dist/esm/types/src/packages/watermark/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/watermark/watermark.d.ts +3 -4
- package/dist/esm/types/src/packages/watermark/watermark.taro.d.ts +3 -4
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +10 -2
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +525 -590
- package/dist/nutui.react.umd.js +525 -590
- package/dist/packages/actionsheet/actionsheet.scss +26 -73
- package/dist/packages/animatingnumbers/countup.scss +0 -21
- package/dist/packages/countdown/countdown.scss +2 -0
- package/dist/packages/ellipsis/ellipsis.scss +4 -0
- package/dist/packages/popup/popup.scss +98 -47
- package/dist/packages/searchbar/searchbar.scss +13 -71
- package/dist/packages/shortpassword/shortpassword.scss +1 -88
- package/dist/packages/toast/toast.scss +20 -7
- package/dist/packages/trendarrow/trendarrow.scss +4 -3
- package/dist/packages/virtuallist/virtuallist.scss +0 -12
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +58 -68
- package/dist/styles/variables.scss +32 -61
- package/dist/types/packages/actionsheet/actionsheet.d.ts +44 -16
- package/dist/types/packages/actionsheet/index.d.ts +1 -0
- package/dist/types/packages/animate/animate.d.ts +20 -4
- package/dist/types/packages/animatingnumbers/countup.d.ts +7 -8
- package/dist/types/packages/animatingnumbers/index.d.ts +1 -0
- package/dist/types/packages/audio/audio.d.ts +60 -12
- package/dist/types/packages/avatar/avatar.d.ts +50 -10
- package/dist/types/packages/avatargroup/avatargroup.d.ts +40 -8
- package/dist/types/packages/backtop/backtop.d.ts +25 -5
- package/dist/types/packages/badge/badge.d.ts +30 -6
- package/dist/types/packages/button/button.d.ts +50 -10
- package/dist/types/packages/cascader/cascader.d.ts +85 -17
- package/dist/types/packages/cell/cell.d.ts +30 -6
- package/dist/types/packages/cellgroup/cellgroup.d.ts +15 -3
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +40 -8
- package/dist/types/packages/circleprogress/circleprogress.d.ts +35 -7
- package/dist/types/packages/col/col.d.ts +15 -3
- package/dist/types/packages/collapse/collapse.d.ts +25 -5
- package/dist/types/packages/collapseitem/collapseitem.d.ts +20 -4
- package/dist/types/packages/configprovider/configprovider.d.ts +11 -2
- package/dist/types/packages/configprovider/index.d.ts +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -0
- package/dist/types/packages/countdown/countdown.d.ts +68 -15
- package/dist/types/packages/countdown/index.d.ts +1 -0
- package/dist/types/packages/divider/divider.d.ts +10 -2
- package/dist/types/packages/drag/drag.d.ts +15 -3
- package/dist/types/packages/elevator/elevator.d.ts +45 -9
- package/dist/types/packages/ellipsis/ellipsis.d.ts +45 -9
- package/dist/types/packages/empty/empty.d.ts +20 -4
- package/dist/types/packages/fixednav/fixednav.d.ts +50 -10
- package/dist/types/packages/grid/grid.d.ts +35 -7
- package/dist/types/packages/griditem/griditem.d.ts +5 -1
- package/dist/types/packages/image/image.d.ts +65 -13
- package/dist/types/packages/imagepreview/imagepreview.d.ts +50 -10
- package/dist/types/packages/indicator/indicator.d.ts +15 -3
- package/dist/types/packages/input/input.d.ts +100 -20
- package/dist/types/packages/inputnumber/inputnumber.d.ts +85 -17
- package/dist/types/packages/menu/menu.d.ts +25 -5
- package/dist/types/packages/menuitem/menuitem.d.ts +35 -7
- package/dist/types/packages/noticebar/noticebar.d.ts +60 -12
- package/dist/types/packages/notify/notify.d.ts +25 -5
- package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +50 -10
- package/dist/types/packages/overlay/overlay.d.ts +40 -8
- package/dist/types/packages/pagination/pagination.d.ts +55 -11
- package/dist/types/packages/picker/picker.d.ts +55 -11
- package/dist/types/packages/popup/popup.d.ts +75 -15
- package/dist/types/packages/price/price.d.ts +35 -7
- package/dist/types/packages/progress/progress.d.ts +40 -8
- package/dist/types/packages/pulltorefresh/pulltorefresh.d.ts +50 -10
- package/dist/types/packages/radio/radio.d.ts +45 -9
- package/dist/types/packages/radiogroup/radiogroup.d.ts +30 -6
- package/dist/types/packages/range/range.d.ts +80 -16
- package/dist/types/packages/rate/rate.d.ts +50 -10
- package/dist/types/packages/searchbar/index.d.ts +1 -0
- package/dist/types/packages/searchbar/searchbar.d.ts +76 -45
- package/dist/types/packages/shortpassword/index.d.ts +1 -0
- package/dist/types/packages/shortpassword/shortpassword.d.ts +89 -24
- package/dist/types/packages/skeleton/skeleton.d.ts +35 -7
- package/dist/types/packages/step/step.d.ts +20 -4
- package/dist/types/packages/steps/steps.d.ts +15 -3
- package/dist/types/packages/sticky/sticky.d.ts +25 -5
- package/dist/types/packages/swipe/swipe.d.ts +47 -11
- package/dist/types/packages/swiper/swiper.d.ts +65 -13
- package/dist/types/packages/switch/switch.d.ts +30 -6
- package/dist/types/packages/tabbar/tabbar.d.ts +35 -7
- package/dist/types/packages/tabbaritem/tabbaritem.d.ts +10 -2
- package/dist/types/packages/tabpane/tabpane.d.ts +15 -3
- package/dist/types/packages/tabs/tabs.d.ts +60 -12
- package/dist/types/packages/textarea/textarea.d.ts +60 -12
- package/dist/types/packages/toast/Notification.d.ts +9 -13
- package/dist/types/packages/toast/index.d.ts +1 -0
- package/dist/types/packages/toast/toast.d.ts +19 -26
- package/dist/types/packages/trendarrow/trendarrow.d.ts +57 -15
- package/dist/types/packages/uploader/uploader.d.ts +180 -36
- package/dist/types/packages/video/index.d.ts +1 -0
- package/dist/types/packages/video/video.d.ts +27 -11
- package/dist/types/packages/virtuallist/index.d.ts +1 -0
- package/dist/types/packages/virtuallist/type.d.ts +0 -18
- package/dist/types/packages/virtuallist/utils.d.ts +3 -3
- package/dist/types/packages/virtuallist/virtuallist.d.ts +51 -4
- package/dist/types/packages/watermark/index.d.ts +1 -0
- package/dist/types/packages/watermark/watermark.d.ts +72 -17
- package/package.json +1 -1
|
@@ -1,64 +1,95 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export interface SearchBarProps extends BasicComponent {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* 当前输入的值
|
|
6
|
+
* @default -
|
|
7
|
+
*/
|
|
5
8
|
value?: number | string;
|
|
6
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* 输入框默认暗纹
|
|
11
|
+
* @default 请输入
|
|
12
|
+
*/
|
|
7
13
|
placeholder?: string;
|
|
8
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* 搜索框形状,可选值为 round
|
|
16
|
+
* @default square
|
|
17
|
+
*/
|
|
9
18
|
shape?: 'square' | 'round';
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
19
|
+
/**
|
|
20
|
+
* 是否禁用输入框
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
13
23
|
disabled?: boolean;
|
|
14
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* 最大输入长度
|
|
26
|
+
* @default 9999
|
|
27
|
+
*/
|
|
15
28
|
maxLength?: number;
|
|
16
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* 是否展示清除按钮
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
17
33
|
clearable?: boolean;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
inputBackground?: string;
|
|
23
|
-
/** 输入框内容对齐方式 */
|
|
24
|
-
align?: string;
|
|
25
|
-
/** 是否将输入框设为只读状态,只读状态下无法输入内容 */
|
|
34
|
+
/**
|
|
35
|
+
* 输入框只读
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
26
38
|
readOnly?: boolean;
|
|
27
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* 是否自动聚焦
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
28
43
|
autoFocus?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
/**
|
|
45
|
+
* 搜索框左侧区域
|
|
46
|
+
* @default -
|
|
47
|
+
*/
|
|
48
|
+
left: React.ReactNode
|
|
49
|
+
/**
|
|
50
|
+
* 搜搜框右侧区域
|
|
51
|
+
* @default -
|
|
52
|
+
*/
|
|
53
|
+
right: React.ReactNode
|
|
54
|
+
/**
|
|
55
|
+
* 输入框内左侧区域
|
|
56
|
+
* @default <Search size="12" />
|
|
57
|
+
*/
|
|
58
|
+
leftIn: React.ReactNode
|
|
59
|
+
/**
|
|
60
|
+
* 输入框内右侧区域
|
|
61
|
+
* @default -
|
|
62
|
+
*/
|
|
63
|
+
rightIn: React.ReactNode
|
|
64
|
+
/**
|
|
65
|
+
* 确定搜索时触发
|
|
66
|
+
* @default
|
|
67
|
+
*/
|
|
42
68
|
onSearch?: (val: string) => void;
|
|
43
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* 输入内容时触发
|
|
71
|
+
* @default
|
|
72
|
+
*/
|
|
44
73
|
onChange?: (value: string, event: Event) => void;
|
|
45
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* 聚焦时触发
|
|
76
|
+
* @default
|
|
77
|
+
*/
|
|
46
78
|
onFocus?: (value: string, event: Event) => void;
|
|
47
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* 失焦时触发
|
|
81
|
+
* @default
|
|
82
|
+
*/
|
|
48
83
|
onBlur?: (value: string, event: Event) => void;
|
|
49
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* 点击清空时触发
|
|
86
|
+
* @default
|
|
87
|
+
*/
|
|
50
88
|
onClear?: (event: Event) => void;
|
|
51
|
-
/**
|
|
52
|
-
|
|
53
|
-
|
|
89
|
+
/**
|
|
90
|
+
* 点击输入区域时触发
|
|
91
|
+
* @default
|
|
92
|
+
*/
|
|
54
93
|
onClickInput?: (event: Event) => void;
|
|
55
|
-
/** 点击输入框内左侧图标时触发 */
|
|
56
|
-
onClickLeftinIcon?: (value: string, event: Event) => void;
|
|
57
|
-
/** 点击输入框外左侧图标时触发 */
|
|
58
|
-
onClickLeftoutIcon?: (value: string, event: Event) => void;
|
|
59
|
-
/** 点击输入框内右侧图标时触发 */
|
|
60
|
-
onClickRightinIcon?: (value: string, event: Event) => void;
|
|
61
|
-
/** 点击输入框外右侧图标时触发 */
|
|
62
|
-
onClickRightoutIcon?: (value: string, event: Event) => void;
|
|
63
94
|
}
|
|
64
95
|
export declare const SearchBar: FunctionComponent<Partial<SearchBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'>>;
|
|
@@ -1,25 +1,90 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export interface ShortPasswordProps extends
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { PopupProps } from '../popup/popup';
|
|
3
|
+
export interface ShortPasswordProps extends PopupProps {
|
|
4
|
+
/**
|
|
5
|
+
* 密码字符串
|
|
6
|
+
* @default -
|
|
7
|
+
*/
|
|
8
|
+
value: string
|
|
9
|
+
/**
|
|
10
|
+
* 是否展示短密码框
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
visible: boolean
|
|
14
|
+
/**
|
|
15
|
+
* 是否展示明文
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
plain: boolean
|
|
19
|
+
/**
|
|
20
|
+
* 标题
|
|
21
|
+
* @default 请输入密码
|
|
22
|
+
*/
|
|
23
|
+
title: ReactNode
|
|
24
|
+
/**
|
|
25
|
+
* 密码框描述
|
|
26
|
+
* @default 您使用了虚拟资产,请进行验证
|
|
27
|
+
*/
|
|
28
|
+
description: ReactNode
|
|
29
|
+
/**
|
|
30
|
+
* 提示语
|
|
31
|
+
* @default 忘记密码
|
|
32
|
+
*/
|
|
33
|
+
tips: ReactNode
|
|
34
|
+
/**
|
|
35
|
+
* 是否隐藏底部按钮
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
hideFooter: boolean
|
|
39
|
+
/**
|
|
40
|
+
* 密码长度,取值为4~6
|
|
41
|
+
* @default 6
|
|
42
|
+
*/
|
|
43
|
+
length: number
|
|
44
|
+
/**
|
|
45
|
+
* 错误信息提示
|
|
46
|
+
* @default -
|
|
47
|
+
*/
|
|
48
|
+
error: ReactNode
|
|
49
|
+
/**
|
|
50
|
+
* 自动聚焦
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
autoFocus: boolean
|
|
54
|
+
/**
|
|
55
|
+
* 输入框聚焦
|
|
56
|
+
* @default -
|
|
57
|
+
*/
|
|
58
|
+
onFocus: () => void
|
|
59
|
+
/**
|
|
60
|
+
* 输入密码时触发事件
|
|
61
|
+
* @default -
|
|
62
|
+
*/
|
|
63
|
+
onChange: (value: string) => void
|
|
64
|
+
/**
|
|
65
|
+
* 点击确认时触发事件
|
|
66
|
+
* @default -
|
|
67
|
+
*/
|
|
68
|
+
onConfirm: (value: string) => void
|
|
69
|
+
/**
|
|
70
|
+
* 点击取消时触发事件
|
|
71
|
+
* @default -
|
|
72
|
+
*/
|
|
73
|
+
onCancel: () => void
|
|
74
|
+
/**
|
|
75
|
+
* 点击关闭图标和遮罩时触发事件
|
|
76
|
+
* @default -
|
|
77
|
+
*/
|
|
78
|
+
onClose: () => void
|
|
79
|
+
/**
|
|
80
|
+
* 点击忘记密码时触发事件
|
|
81
|
+
* @default -
|
|
82
|
+
*/
|
|
83
|
+
onTips: () => void
|
|
84
|
+
/**
|
|
85
|
+
* 输入完成的回调
|
|
86
|
+
* @default -
|
|
87
|
+
*/
|
|
88
|
+
onComplete: (value: string) => void
|
|
24
89
|
}
|
|
25
|
-
export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps
|
|
90
|
+
export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps>>;
|
|
@@ -2,13 +2,41 @@ import { FunctionComponent } from 'react';
|
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
type avatarShape = 'round' | 'square';
|
|
4
4
|
export interface SkeletonProps extends BasicComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 是否开启骨架屏动画
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
animated: boolean
|
|
10
|
+
/**
|
|
11
|
+
* 设置段落行数
|
|
12
|
+
* @default 1
|
|
13
|
+
*/
|
|
14
|
+
rows: number
|
|
15
|
+
/**
|
|
16
|
+
* 是否显示段落标题
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
title: boolean
|
|
20
|
+
/**
|
|
21
|
+
* 是否显示头像
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
avatar: boolean
|
|
25
|
+
/**
|
|
26
|
+
* 头像大小
|
|
27
|
+
* @default 50px
|
|
28
|
+
*/
|
|
29
|
+
avatarSize: string
|
|
30
|
+
/**
|
|
31
|
+
* 是否显示骨架屏(true不显示骨架屏,false显示骨架屏)
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
visible: boolean
|
|
35
|
+
/**
|
|
36
|
+
* 头像形状:正方形/圆形
|
|
37
|
+
* @default round
|
|
38
|
+
*/
|
|
39
|
+
avatarShape: avatarShape
|
|
12
40
|
}
|
|
13
41
|
export declare const Skeleton: FunctionComponent<Partial<SkeletonProps>>;
|
|
14
42
|
export {};
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export interface StepProps extends BasicComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 流程步骤的标题
|
|
6
|
+
* @default ''
|
|
7
|
+
*/
|
|
8
|
+
title: ReactNode
|
|
9
|
+
/**
|
|
10
|
+
* 流程步骤的描述性文字
|
|
11
|
+
* @default ''
|
|
12
|
+
*/
|
|
13
|
+
description: ReactNode
|
|
14
|
+
/**
|
|
15
|
+
* 流程步骤的索引
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
value: number
|
|
19
|
+
/**
|
|
20
|
+
* 图标(来自Icon组件的name属性)
|
|
21
|
+
* @default ''
|
|
22
|
+
*/
|
|
23
|
+
icon: ReactNode
|
|
8
24
|
}
|
|
9
25
|
export declare const Step: FunctionComponent<Partial<StepProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>>;
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export interface StepsProps extends BasicComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 当前所在的步骤
|
|
6
|
+
* @default 0
|
|
7
|
+
*/
|
|
8
|
+
value: number
|
|
9
|
+
/**
|
|
10
|
+
* 显示方向,horizontal,vertical
|
|
11
|
+
* @default horizontal
|
|
12
|
+
*/
|
|
13
|
+
direction: string
|
|
14
|
+
/**
|
|
15
|
+
* 点状步骤条
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
dot: boolean
|
|
7
19
|
onStepClick: (index: number) => void;
|
|
8
20
|
}
|
|
9
21
|
export declare const Steps: FunctionComponent<Partial<StepsProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export interface StickyProps extends BasicComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 容器的 ref
|
|
6
|
+
* @default -
|
|
7
|
+
*/
|
|
8
|
+
container: React.RefObject<HTMLElement>
|
|
9
|
+
/**
|
|
10
|
+
* 吸附位置(top、bottom)
|
|
11
|
+
* @default top
|
|
12
|
+
*/
|
|
13
|
+
position: 'top' | 'bottom'
|
|
14
|
+
/**
|
|
15
|
+
* 距离,当 position 为 top 时,设置的是 top
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
threshold: number
|
|
19
|
+
/**
|
|
20
|
+
* 吸附时的层级
|
|
21
|
+
* @default 2000
|
|
22
|
+
*/
|
|
23
|
+
zIndex: number
|
|
8
24
|
children: React.ReactNode;
|
|
9
|
-
|
|
25
|
+
/**
|
|
26
|
+
* 吸附状态改变时触发
|
|
27
|
+
* @default -
|
|
28
|
+
*/
|
|
29
|
+
onChange: (val: boolean) => void
|
|
10
30
|
}
|
|
11
31
|
export declare const Sticky: FunctionComponent<Partial<StickyProps>>;
|
|
@@ -9,31 +9,67 @@ export interface SwipeProps {
|
|
|
9
9
|
className: string;
|
|
10
10
|
/** 自定义样式 */
|
|
11
11
|
style: React.CSSProperties;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* 标识符,可以在事件参数中获取到
|
|
14
|
+
* @default -
|
|
15
|
+
*/
|
|
13
16
|
name?: string | number;
|
|
14
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* 左侧滑动区域的内容
|
|
19
|
+
* @default -
|
|
20
|
+
*/
|
|
15
21
|
leftAction?: React.ReactNode;
|
|
16
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* 右侧滑动区域的内容
|
|
24
|
+
* @default -
|
|
25
|
+
*/
|
|
17
26
|
rightAction?: React.ReactNode;
|
|
18
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* 关闭前的回调函数,返回滑动区域所在方向 position
|
|
29
|
+
* @default -
|
|
30
|
+
*/
|
|
19
31
|
beforeClose?: (position: string) => void;
|
|
20
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* 是否禁用滑动
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
21
36
|
disabled?: boolean;
|
|
22
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* 打开单元格侧边栏
|
|
39
|
+
* @default -
|
|
40
|
+
*/
|
|
23
41
|
onOpen?: ({ name, position, }: {
|
|
24
42
|
name: string | number;
|
|
25
43
|
position: SwipeSide;
|
|
26
44
|
}) => void;
|
|
27
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* 收起单元格侧边栏
|
|
47
|
+
* @default -
|
|
48
|
+
*/
|
|
28
49
|
onClose?: ({ name, position, }: {
|
|
29
50
|
name: string | number;
|
|
30
51
|
position: SwipeSide;
|
|
31
52
|
}) => void;
|
|
32
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* 点击左侧或者右侧时触发
|
|
55
|
+
* @default -
|
|
56
|
+
*/
|
|
33
57
|
onActionClick?: (event: Event, position: SwipeSide) => void;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
58
|
+
/**
|
|
59
|
+
* onTouchStart
|
|
60
|
+
* @default -
|
|
61
|
+
*/
|
|
62
|
+
onTouchStart?: (event: Event) => void
|
|
63
|
+
/**
|
|
64
|
+
* onTouchEnd
|
|
65
|
+
* @default -
|
|
66
|
+
*/
|
|
67
|
+
onTouchEnd?: (event: Event) => void
|
|
68
|
+
/**
|
|
69
|
+
* onTouchMove
|
|
70
|
+
* @default -
|
|
71
|
+
*/
|
|
72
|
+
onTouchMove?: (event: Event) => void
|
|
37
73
|
children?: React.ReactNode;
|
|
38
74
|
}
|
|
39
75
|
export declare const Swipe: React.ForwardRefExoticComponent<Partial<SwipeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onTouchEnd" | "onTouchMove" | "onTouchStart"> & React.RefAttributes<SwipeInstance>>;
|
|
@@ -6,18 +6,70 @@ export type SwiperRef = {
|
|
|
6
6
|
prev: () => void;
|
|
7
7
|
};
|
|
8
8
|
export interface SwiperProps extends BasicComponent {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
/**
|
|
10
|
+
* 轮播卡片的宽度
|
|
11
|
+
* @default window.innerWidth
|
|
12
|
+
*/
|
|
13
|
+
width: number | string
|
|
14
|
+
/**
|
|
15
|
+
* 轮播卡片的高度
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
height: number | string
|
|
19
|
+
/**
|
|
20
|
+
* 动画时长(单位是ms)
|
|
21
|
+
* @default 500
|
|
22
|
+
*/
|
|
23
|
+
duration: number | string
|
|
24
|
+
/**
|
|
25
|
+
* 初始化索引值
|
|
26
|
+
* @default 0
|
|
27
|
+
*/
|
|
28
|
+
defaultValue: number | string
|
|
29
|
+
/**
|
|
30
|
+
* 自动轮播时长,0表示不会自动轮播
|
|
31
|
+
* @default 0
|
|
32
|
+
*/
|
|
33
|
+
autoPlay: number | string
|
|
34
|
+
/**
|
|
35
|
+
* 轮播方向,可选值horizontal,vertical
|
|
36
|
+
* @default horizontal
|
|
37
|
+
*/
|
|
38
|
+
direction: 'horizontal' | 'vertical'
|
|
39
|
+
/**
|
|
40
|
+
* 分页指示器是否展示,可传入自定义的 HTML 结构
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
indicator: ReactNode
|
|
44
|
+
/**
|
|
45
|
+
* 是否循环轮播
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
loop: boolean
|
|
49
|
+
/**
|
|
50
|
+
* 是否可触摸滑动
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
touchable: boolean
|
|
54
|
+
/**
|
|
55
|
+
* 滑动过程中是否禁用默认事件
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
preventDefault: boolean
|
|
59
|
+
/**
|
|
60
|
+
* 滑动过程中是否禁止冒泡
|
|
61
|
+
* @default true
|
|
62
|
+
*/
|
|
63
|
+
stopPropagation: boolean
|
|
64
|
+
/**
|
|
65
|
+
* 是否居中展示,必须传对应的width 和 height
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
center: boolean
|
|
69
|
+
/**
|
|
70
|
+
* 卡片切换后的回调
|
|
71
|
+
* @default -
|
|
72
|
+
*/
|
|
73
|
+
onChange?: (current: number) => void
|
|
22
74
|
}
|
|
23
75
|
export declare const Swiper: React.ForwardRefExoticComponent<Partial<SwiperProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<SwiperRef>>;
|
|
@@ -1,11 +1,35 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export interface SwitchProps extends BasicComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 开关状态,受控
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
checked: boolean
|
|
9
|
+
/**
|
|
10
|
+
* 开关状态,非受控
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
defaultChecked: boolean
|
|
14
|
+
/**
|
|
15
|
+
* 禁用状态
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
disabled: boolean
|
|
19
|
+
/**
|
|
20
|
+
* 打开时文字描述
|
|
21
|
+
* @default -
|
|
22
|
+
*/
|
|
23
|
+
activeText: string
|
|
24
|
+
/**
|
|
25
|
+
* 关闭时文字描述
|
|
26
|
+
* @default -
|
|
27
|
+
*/
|
|
28
|
+
inactiveText: string
|
|
29
|
+
/**
|
|
30
|
+
* 切换开关时触发
|
|
31
|
+
* @default -
|
|
32
|
+
*/
|
|
33
|
+
onChange: (val: boolean, event: React.MouseEvent) => void
|
|
10
34
|
}
|
|
11
35
|
export declare const Switch: FunctionComponent<Partial<SwitchProps>>;
|
|
@@ -2,13 +2,41 @@ import { FunctionComponent } from 'react';
|
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
import TabbarItem from '../tabbaritem';
|
|
4
4
|
export interface TabbarProps extends BasicComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 默认选中的标签的索引值
|
|
7
|
+
* @default 0
|
|
8
|
+
*/
|
|
9
|
+
defaultValue: number
|
|
10
|
+
/**
|
|
11
|
+
* 选中的标签的索引值
|
|
12
|
+
* @default -
|
|
13
|
+
*/
|
|
14
|
+
value?: number
|
|
15
|
+
/**
|
|
16
|
+
* 是否固定在页面底部,为 true 时默认开启 safeArea
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
fixed: boolean
|
|
20
|
+
/**
|
|
21
|
+
* icon未激活的颜色
|
|
22
|
+
* @default #7d7e80
|
|
23
|
+
*/
|
|
24
|
+
inactiveColor: string
|
|
25
|
+
/**
|
|
26
|
+
* icon激活的颜色
|
|
27
|
+
* @default #1989fa
|
|
28
|
+
*/
|
|
29
|
+
activeColor: string
|
|
30
|
+
/**
|
|
31
|
+
* 是否开启iphone系列全面屏底部安全区适配
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
safeArea: boolean
|
|
35
|
+
/**
|
|
36
|
+
* 切换页签时触发事件
|
|
37
|
+
* @default -
|
|
38
|
+
*/
|
|
39
|
+
onSwitch: (value: number) => void
|
|
12
40
|
}
|
|
13
41
|
export declare const Tabbar: FunctionComponent<Partial<TabbarProps>> & {
|
|
14
42
|
Item: typeof TabbarItem;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { BadgeProps } from '../badge/badge';
|
|
3
3
|
export interface TabbarItemProps extends BadgeProps {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 标签页的标题
|
|
6
|
+
* @default -
|
|
7
|
+
*/
|
|
8
|
+
title: ReactNode
|
|
9
|
+
/**
|
|
10
|
+
* 自定义图标
|
|
11
|
+
* @default -
|
|
12
|
+
*/
|
|
13
|
+
icon: ReactNode
|
|
6
14
|
active: boolean;
|
|
7
15
|
activeColor: string;
|
|
8
16
|
inactiveColor: string;
|