@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
|
@@ -2,17 +2,61 @@ import React, { RefObject } from 'react';
|
|
|
2
2
|
import { PickerOption } from './types';
|
|
3
3
|
import { BasicComponent } from '../../utils/typings';
|
|
4
4
|
export interface PickerProps extends BasicComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 是否可见
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
visible: boolean
|
|
10
|
+
/**
|
|
11
|
+
* 设置标题
|
|
12
|
+
* @default -
|
|
13
|
+
*/
|
|
14
|
+
title?: string
|
|
15
|
+
/**
|
|
16
|
+
* 列表数据
|
|
17
|
+
* @default []
|
|
18
|
+
*/
|
|
19
|
+
options: (PickerOption | PickerOption[])[]
|
|
20
|
+
/**
|
|
21
|
+
* 选中值,受控
|
|
22
|
+
* @default []
|
|
23
|
+
*/
|
|
24
|
+
value?: (number | string)[]
|
|
25
|
+
/**
|
|
26
|
+
* 默认选中
|
|
27
|
+
* @default []
|
|
28
|
+
*/
|
|
29
|
+
defaultValue?: (number | string)[]
|
|
30
|
+
/**
|
|
31
|
+
* 是否开启3D效果
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
threeDimensional?: boolean
|
|
35
|
+
/**
|
|
36
|
+
* 快速滑动时惯性滚动的时长,单位 ms
|
|
37
|
+
* @default 1000
|
|
38
|
+
*/
|
|
39
|
+
duration: number | string
|
|
40
|
+
/**
|
|
41
|
+
* 点击确认按钮时候回调
|
|
42
|
+
* @default -
|
|
43
|
+
*/
|
|
44
|
+
onConfirm?: (selectedOptions: PickerOption[], selectedValue: (string | number)[]) => void
|
|
45
|
+
/**
|
|
46
|
+
* 关闭时触发
|
|
47
|
+
* @default -
|
|
48
|
+
*/
|
|
49
|
+
onClose?: (selectedOptions: PickerOption[], selectedValue: (string | number)[]) => void
|
|
50
|
+
/**
|
|
51
|
+
* 联动时,关闭时回调
|
|
52
|
+
* @default -
|
|
53
|
+
*/
|
|
54
|
+
afterClose?: (selectedOptions: PickerOption[], selectedValue: (string | number)[], pickerRef: RefObject<HTMLDivElement>) => void
|
|
55
|
+
/**
|
|
56
|
+
* 每一列值变更时调用
|
|
57
|
+
* @default -
|
|
58
|
+
*/
|
|
59
|
+
onChange?: (selectedOptions: PickerOption[], selectedValue: (string | number)[], columnIndex: number) => void
|
|
16
60
|
}
|
|
17
61
|
declare const Picker: React.ForwardRefExoticComponent<Partial<PickerProps> & React.RefAttributes<unknown>>;
|
|
18
62
|
export default Picker;
|
|
@@ -2,21 +2,81 @@ import React, { FunctionComponent, MouseEvent } from 'react';
|
|
|
2
2
|
import { OverlayProps } from '../../packages/overlay/overlay';
|
|
3
3
|
type Teleport = HTMLElement | (() => HTMLElement) | null;
|
|
4
4
|
export interface PopupProps extends OverlayProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 弹出位置(top,bottom,left,right,center)
|
|
7
|
+
* @default center
|
|
8
|
+
*/
|
|
9
|
+
position: string
|
|
10
|
+
/**
|
|
11
|
+
* 动画名
|
|
12
|
+
* @default -
|
|
13
|
+
*/
|
|
14
|
+
transition: string
|
|
15
|
+
/**
|
|
16
|
+
* 自定义遮罩样式
|
|
17
|
+
* @default -
|
|
18
|
+
*/
|
|
19
|
+
overlayStyle: React.CSSProperties
|
|
20
|
+
/**
|
|
21
|
+
* 自定义遮罩类名
|
|
22
|
+
* @default -
|
|
23
|
+
*/
|
|
24
|
+
overlayClassName: string
|
|
25
|
+
/**
|
|
26
|
+
* 是否显示关闭按钮
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
closeable: boolean
|
|
30
|
+
/**
|
|
31
|
+
* 关闭按钮位置(top-left,top-right,bottom-left,bottom-right)
|
|
32
|
+
* @default top-right
|
|
33
|
+
*/
|
|
34
|
+
closeIconPosition: string
|
|
35
|
+
/**
|
|
36
|
+
* 自定义 Icon
|
|
37
|
+
* @default close
|
|
38
|
+
*/
|
|
39
|
+
closeIcon: React.ReactNode
|
|
40
|
+
/**
|
|
41
|
+
* 组件不可见时,卸载内容
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
destroyOnClose: boolean
|
|
45
|
+
/**
|
|
46
|
+
* 指定节点挂载
|
|
47
|
+
* @default null
|
|
48
|
+
*/
|
|
49
|
+
portal: Teleport
|
|
50
|
+
/**
|
|
51
|
+
* 是否显示遮罩
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
overlay: boolean
|
|
55
|
+
/**
|
|
56
|
+
* 是否显示圆角
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
round: boolean
|
|
60
|
+
/**
|
|
61
|
+
* 打开弹框时触发
|
|
62
|
+
* @default -
|
|
63
|
+
*/
|
|
64
|
+
onOpen: () => void
|
|
65
|
+
/**
|
|
66
|
+
* 关闭弹框时触发
|
|
67
|
+
* @default -
|
|
68
|
+
*/
|
|
69
|
+
onClose: () => void
|
|
70
|
+
/**
|
|
71
|
+
* 点击遮罩触发
|
|
72
|
+
* @default -
|
|
73
|
+
*/
|
|
74
|
+
onClickOverlay: (e: MouseEvent) => boolean | void
|
|
75
|
+
/**
|
|
76
|
+
* 点击关闭图标时触发
|
|
77
|
+
* @default -
|
|
78
|
+
*/
|
|
79
|
+
onClickCloseIcon: (e: MouseEvent) => boolean | void
|
|
20
80
|
}
|
|
21
81
|
export declare const Popup: FunctionComponent<Partial<PopupProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
22
82
|
export {};
|
|
@@ -1,12 +1,40 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export interface PriceProps extends BasicComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 价格数量
|
|
6
|
+
* @default 0
|
|
7
|
+
*/
|
|
8
|
+
price: number | string
|
|
9
|
+
/**
|
|
10
|
+
* 符号类型
|
|
11
|
+
* @default ¥
|
|
12
|
+
*/
|
|
13
|
+
symbol: string
|
|
14
|
+
/**
|
|
15
|
+
* 小数位位数
|
|
16
|
+
* @default 2
|
|
17
|
+
*/
|
|
18
|
+
digits: number
|
|
19
|
+
/**
|
|
20
|
+
* 是否按照千分号形式显示
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
thousands: boolean
|
|
24
|
+
/**
|
|
25
|
+
* 符号显示在价格前或者后,before、after
|
|
26
|
+
* @default before
|
|
27
|
+
*/
|
|
28
|
+
position: string
|
|
29
|
+
/**
|
|
30
|
+
* 价格尺寸,large、normal、small
|
|
31
|
+
* @default large
|
|
32
|
+
*/
|
|
33
|
+
size: string
|
|
34
|
+
/**
|
|
35
|
+
* 是否划线价
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
line: boolean
|
|
11
39
|
}
|
|
12
40
|
export declare const Price: FunctionComponent<Partial<PriceProps>>;
|
|
@@ -1,13 +1,45 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export interface ProgressProps extends BasicComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 百分比
|
|
6
|
+
* @default 0
|
|
7
|
+
*/
|
|
8
|
+
percent: number
|
|
9
|
+
/**
|
|
10
|
+
* 进度条背景颜色
|
|
11
|
+
* @default #f3f3f3
|
|
12
|
+
*/
|
|
13
|
+
background: string
|
|
14
|
+
/**
|
|
15
|
+
* 进度条线条颜色
|
|
16
|
+
* @default linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)
|
|
17
|
+
*/
|
|
18
|
+
color: string
|
|
19
|
+
/**
|
|
20
|
+
* 进度条宽度
|
|
21
|
+
* @default -
|
|
22
|
+
*/
|
|
23
|
+
strokeWidth: string
|
|
24
|
+
/**
|
|
25
|
+
* 是否显示文字内容
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
showText: boolean
|
|
29
|
+
/**
|
|
30
|
+
* 是否展示动画效果
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
animated: boolean
|
|
34
|
+
/**
|
|
35
|
+
* 每次进入可视区展示进度条动画
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
lazy: boolean
|
|
39
|
+
/**
|
|
40
|
+
* 延迟数据加载时长,单位 ms
|
|
41
|
+
* @default 0
|
|
42
|
+
*/
|
|
43
|
+
delay: number
|
|
12
44
|
}
|
|
13
45
|
export declare const Progress: FunctionComponent<Partial<ProgressProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -2,15 +2,55 @@ import { FunctionComponent, ReactNode } from 'react';
|
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export type PullStatus = 'pulling' | 'canRelease' | 'refreshing' | 'complete';
|
|
4
4
|
export interface PullToRefreshProps extends BasicComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 触发刷新时的处理函数
|
|
7
|
+
* @default -
|
|
8
|
+
*/
|
|
9
|
+
onRefresh: () => Promise<any>
|
|
10
|
+
/**
|
|
11
|
+
* 下拉的提示文案
|
|
12
|
+
* @default 下拉刷新
|
|
13
|
+
*/
|
|
14
|
+
pullingText: ReactNode
|
|
15
|
+
/**
|
|
16
|
+
* 释放的提示文案
|
|
17
|
+
* @default 释放立即刷新
|
|
18
|
+
*/
|
|
19
|
+
canReleaseText: ReactNode
|
|
20
|
+
/**
|
|
21
|
+
* 刷新时的提示文案
|
|
22
|
+
* @default 加载中……
|
|
23
|
+
*/
|
|
24
|
+
refreshingText: ReactNode
|
|
25
|
+
/**
|
|
26
|
+
* 完成时的提示文案
|
|
27
|
+
* @default 刷新成功
|
|
28
|
+
*/
|
|
29
|
+
completeText: ReactNode
|
|
30
|
+
/**
|
|
31
|
+
* 完成后延迟消失的时间,单位为 ms
|
|
32
|
+
* @default 500
|
|
33
|
+
*/
|
|
34
|
+
completeDelay: number
|
|
35
|
+
/**
|
|
36
|
+
* 头部提示内容区的高度,单位为 px
|
|
37
|
+
* @default 40
|
|
38
|
+
*/
|
|
39
|
+
headHeight: number
|
|
40
|
+
/**
|
|
41
|
+
* 触发刷新需要下拉多少距离,单位为 px
|
|
42
|
+
* @default 60
|
|
43
|
+
*/
|
|
44
|
+
threshold: number
|
|
45
|
+
/**
|
|
46
|
+
* 是否禁用下拉刷新
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
disabled: boolean
|
|
50
|
+
/**
|
|
51
|
+
* 根据下拉状态,自定义下拉提示文案
|
|
52
|
+
* @default -
|
|
53
|
+
*/
|
|
54
|
+
renderText: (status: PullStatus) => ReactNode
|
|
15
55
|
}
|
|
16
56
|
export declare const PullToRefresh: FunctionComponent<Partial<PullToRefreshProps>>;
|
|
@@ -4,15 +4,51 @@ import { BasicComponent } from '../../utils/typings';
|
|
|
4
4
|
export type RadioShape = 'button' | 'round';
|
|
5
5
|
export type RadioPosition = 'right' | 'left';
|
|
6
6
|
export interface RadioProps extends BasicComponent {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
/**
|
|
8
|
+
* 是否禁用选择
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
disabled: boolean
|
|
12
|
+
/**
|
|
13
|
+
* 指定当前是否选中
|
|
14
|
+
* @default -
|
|
15
|
+
*/
|
|
16
|
+
checked: boolean
|
|
17
|
+
/**
|
|
18
|
+
* 初始是否选中
|
|
19
|
+
* @default -
|
|
20
|
+
*/
|
|
21
|
+
defaultChecked: boolean
|
|
22
|
+
/**
|
|
23
|
+
* 形状
|
|
24
|
+
* @default round
|
|
25
|
+
*/
|
|
26
|
+
shape: RadioShape
|
|
27
|
+
/**
|
|
28
|
+
* 文本所在的位置
|
|
29
|
+
* @default right
|
|
30
|
+
*/
|
|
31
|
+
labelPosition: RadioPosition
|
|
32
|
+
/**
|
|
33
|
+
* [图标名称](#/icon),选中前(建议和activeIcon一起修改)
|
|
34
|
+
* @default 'CheckNormal'
|
|
35
|
+
*/
|
|
36
|
+
icon: React.ReactNode
|
|
37
|
+
/**
|
|
38
|
+
* [图标名称](#/icon),选中后(建议和icon一起修改)
|
|
39
|
+
* @default 'CheckChecked'
|
|
40
|
+
*/
|
|
41
|
+
activeIcon: React.ReactNode
|
|
42
|
+
/**
|
|
43
|
+
* 携带的标识值,用于 Group 模式
|
|
44
|
+
* @default -
|
|
45
|
+
*/
|
|
46
|
+
value: string | number
|
|
47
|
+
/**
|
|
48
|
+
* 选中态变化时触发
|
|
49
|
+
* @default -
|
|
50
|
+
*/
|
|
51
|
+
onChange: (checked: boolean) => void
|
|
16
52
|
}
|
|
17
53
|
export declare const Radio: FunctionComponent<Partial<RadioProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>> & {
|
|
18
54
|
Group: typeof RadioGroup;
|
|
@@ -3,13 +3,37 @@ import { RadioGroupOptionType } from './type';
|
|
|
3
3
|
type Position = 'left' | 'right';
|
|
4
4
|
type Direction = 'horizontal' | 'vertical';
|
|
5
5
|
export interface RadioGroupProps {
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* 当前选中项的标识符
|
|
8
|
+
* @default -
|
|
9
|
+
*/
|
|
10
|
+
value?: string | number
|
|
7
11
|
defaultValue?: string | number;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* 文本所在的位置
|
|
14
|
+
* @default right
|
|
15
|
+
*/
|
|
16
|
+
labelPosition: Position
|
|
17
|
+
/**
|
|
18
|
+
* 使用横纵方向
|
|
19
|
+
* @default vertical
|
|
20
|
+
*/
|
|
21
|
+
direction: Direction
|
|
22
|
+
/**
|
|
23
|
+
* 是否禁用
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean
|
|
27
|
+
/**
|
|
28
|
+
* 配置 options 渲染单选按钮
|
|
29
|
+
* @default -
|
|
30
|
+
*/
|
|
31
|
+
options: RadioGroupOptionType[]
|
|
32
|
+
/**
|
|
33
|
+
* 值变化时触发
|
|
34
|
+
* @default -
|
|
35
|
+
*/
|
|
36
|
+
onChange: (value: string | number) => void
|
|
13
37
|
}
|
|
14
38
|
export declare const RadioGroup: React.ForwardRefExoticComponent<Partial<RadioGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
|
|
15
39
|
export {};
|
|
@@ -2,21 +2,85 @@ import React, { FunctionComponent, ReactNode } from 'react';
|
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export type RangeValue = number | number[];
|
|
4
4
|
export interface RangeProps extends BasicComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 当前进度百分比,受控
|
|
7
|
+
* @default 0
|
|
8
|
+
*/
|
|
9
|
+
value: RangeValue
|
|
10
|
+
/**
|
|
11
|
+
* 默认进度百分比,非受控
|
|
12
|
+
* @default 0
|
|
13
|
+
*/
|
|
14
|
+
defaultValue: RangeValue
|
|
15
|
+
/**
|
|
16
|
+
* 是否开启双滑块模式
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
range: boolean
|
|
20
|
+
/**
|
|
21
|
+
* 是否禁用滑块
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
disabled: boolean
|
|
25
|
+
/**
|
|
26
|
+
* 最小值
|
|
27
|
+
* @default 0
|
|
28
|
+
*/
|
|
29
|
+
min: number
|
|
30
|
+
/**
|
|
31
|
+
* 最大值
|
|
32
|
+
* @default 100
|
|
33
|
+
*/
|
|
34
|
+
max: number
|
|
35
|
+
/**
|
|
36
|
+
* 步长
|
|
37
|
+
* @default 1
|
|
38
|
+
*/
|
|
39
|
+
step: number
|
|
40
|
+
/**
|
|
41
|
+
* 最小值描述,传 null 表示隐藏
|
|
42
|
+
* @default -
|
|
43
|
+
*/
|
|
44
|
+
minDescription: ReactNode
|
|
45
|
+
/**
|
|
46
|
+
* 最大值描述,传 null 表示隐藏
|
|
47
|
+
* @default -
|
|
48
|
+
*/
|
|
49
|
+
maxDescription: ReactNode
|
|
50
|
+
/**
|
|
51
|
+
* 自定义滑动按钮
|
|
52
|
+
* @default -
|
|
53
|
+
*/
|
|
54
|
+
button: ReactNode
|
|
55
|
+
/**
|
|
56
|
+
* 是否竖向展示
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
vertical: boolean
|
|
60
|
+
/**
|
|
61
|
+
* 刻度标示
|
|
62
|
+
* @default {}
|
|
63
|
+
*/
|
|
64
|
+
marks: Record<string, unknown>
|
|
65
|
+
/**
|
|
66
|
+
* 当前值描述,传 null 表示隐藏
|
|
67
|
+
* @default -
|
|
68
|
+
*/
|
|
69
|
+
currentDescription: ((value: RangeValue) => ReactNode) | null
|
|
70
|
+
/**
|
|
71
|
+
* 进度实时变化,通常在受控方式中与 value 一起使用
|
|
72
|
+
* @default -
|
|
73
|
+
*/
|
|
74
|
+
onChange: (value: RangeValue) => void
|
|
75
|
+
/**
|
|
76
|
+
* 开始拖动时触发
|
|
77
|
+
* @default -
|
|
78
|
+
*/
|
|
79
|
+
onStart: () => void
|
|
80
|
+
/**
|
|
81
|
+
* 结束拖动时触发
|
|
82
|
+
* @default -
|
|
83
|
+
*/
|
|
84
|
+
onEnd: (value: RangeValue) => void
|
|
21
85
|
}
|
|
22
86
|
export declare const Range: FunctionComponent<Partial<RangeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onChange' | 'defaultValue'>>;
|
|
@@ -1,15 +1,55 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export interface RateProps extends BasicComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
/**
|
|
5
|
+
* star 总数
|
|
6
|
+
* @default 5
|
|
7
|
+
*/
|
|
8
|
+
count: number
|
|
9
|
+
/**
|
|
10
|
+
* 受控的 star 数值
|
|
11
|
+
* @default 0
|
|
12
|
+
*/
|
|
13
|
+
value: number
|
|
14
|
+
/**
|
|
15
|
+
* 非受控的 star 默认值
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
defaultValue: number
|
|
19
|
+
/**
|
|
20
|
+
* 最少选中star数量
|
|
21
|
+
* @default 0
|
|
22
|
+
*/
|
|
23
|
+
min: number
|
|
24
|
+
/**
|
|
25
|
+
* 使用图标(选中)
|
|
26
|
+
* @default star-n
|
|
27
|
+
*/
|
|
28
|
+
checkedIcon: React.ReactNode
|
|
29
|
+
/**
|
|
30
|
+
* 使用图标(未选中)
|
|
31
|
+
* @default star-n
|
|
32
|
+
*/
|
|
33
|
+
uncheckedIcon: React.ReactNode
|
|
34
|
+
/**
|
|
35
|
+
* 是否禁用
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
disabled: boolean
|
|
39
|
+
/**
|
|
40
|
+
* 是否只读
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
readOnly: boolean
|
|
44
|
+
/**
|
|
45
|
+
* 是否半星
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
allowHalf: boolean
|
|
49
|
+
/**
|
|
50
|
+
* 当前 star 数修改时触发
|
|
51
|
+
* @default -
|
|
52
|
+
*/
|
|
53
|
+
onChange: (value: number) => void
|
|
14
54
|
}
|
|
15
55
|
export declare const Rate: FunctionComponent<Partial<RateProps>>;
|