@nutui/nutui-react 0.1.0-beta.1 → 0.1.0-beta.2
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/README.md +50 -135
- package/dist/esm/ActionSheet/style/index.js +1 -0
- package/dist/esm/Address/style/index.js +1 -0
- package/dist/esm/AnimatingNumbers/style/index.js +1 -0
- package/dist/esm/Avatar/style/index.js +1 -0
- package/dist/esm/BackTop/style/index.js +1 -0
- package/dist/esm/BackTop.js +1 -3
- package/dist/esm/Badge/style/index.js +1 -0
- package/dist/esm/Barrage/style/index.js +1 -0
- package/dist/esm/Button/style/index.js +1 -0
- package/dist/esm/Calendar/style/index.js +1 -0
- package/dist/esm/Calendar.js +86 -0
- package/dist/esm/CalendarItem/style/index.js +1 -0
- package/dist/esm/CalendarItem.js +554 -0
- package/dist/esm/Cell/style/index.js +1 -0
- package/dist/esm/CellGroup/style/index.js +1 -0
- package/dist/esm/CellGroup.js +33 -0
- package/dist/esm/Checkbox/style/index.js +1 -0
- package/dist/esm/CheckboxGroup/style/index.js +1 -0
- package/dist/esm/CircleProgress/style/index.js +1 -0
- package/dist/esm/Col/style/index.js +1 -0
- package/dist/esm/Col.js +60 -0
- package/dist/esm/Collapse/style/index.js +1 -0
- package/dist/esm/CollapseItem/style/index.js +1 -0
- package/dist/esm/CollapseItem.js +142 -0
- package/dist/esm/Dialog/style/index.js +1 -0
- package/dist/esm/Dialog.js +327 -0
- package/dist/esm/Divider/style/index.js +1 -0
- package/dist/esm/Drag/style/index.js +1 -0
- package/dist/esm/Drag.js +101 -139
- package/dist/esm/Elevator/style/index.js +1 -0
- package/dist/esm/Elevator.js +3 -6
- package/dist/esm/FixedNav/style/index.js +1 -0
- package/dist/esm/Icon/style/index.js +1 -0
- package/dist/esm/Infiniteloading/style/index.js +1 -0
- package/dist/esm/Input/style/index.js +1 -0
- package/dist/esm/Input.js +1 -1
- package/dist/esm/InputNumber/style/index.js +1 -0
- package/dist/esm/Layout/style/index.js +1 -0
- package/dist/esm/NavBar/style/index.js +1 -0
- package/dist/esm/NoticeBar/style/index.js +1 -0
- package/dist/esm/Notify/style/index.js +1 -0
- package/dist/esm/Overlay/style/index.js +1 -0
- package/dist/esm/Pagination/style/index.js +1 -0
- package/dist/esm/Picker/style/index.js +1 -0
- package/dist/esm/Picker.js +397 -0
- package/dist/esm/Popover/style/index.js +1 -0
- package/dist/esm/Popover.js +299 -0
- package/dist/esm/Popup/style/index.js +1 -0
- package/dist/esm/Popup.js +0 -3
- package/dist/esm/Price/style/index.js +1 -0
- package/dist/esm/Radio/style/index.js +1 -0
- package/dist/esm/RadioGroup/style/index.js +1 -0
- package/dist/esm/Range/style/index.js +1 -0
- package/dist/esm/Rate/style/index.js +1 -0
- package/dist/esm/Row/style/index.js +1 -0
- package/dist/esm/Row.js +48 -0
- package/dist/esm/ShortPassword/style/index.js +1 -0
- package/dist/esm/ShortPassword.js +203 -0
- package/dist/esm/Signature/style/index.js +1 -0
- package/dist/esm/Step/style/index.js +1 -0
- package/dist/esm/Steps/style/index.js +1 -0
- package/dist/esm/Swiper/style/index.js +1 -0
- package/dist/esm/Swiper.js +517 -0
- package/dist/esm/SwiperItem/style/index.js +1 -0
- package/dist/esm/SwiperItem.js +64 -0
- package/dist/esm/Switch/style/index.js +1 -0
- package/dist/esm/Switch.js +85 -0
- package/dist/esm/Tabbar/style/index.js +1 -0
- package/dist/esm/TabbarItem/style/index.js +1 -0
- package/dist/esm/Tag/style/index.js +1 -0
- package/dist/esm/TextArea/style/index.js +1 -0
- package/dist/esm/Toast/style/index.js +1 -0
- package/dist/esm/Uploader/style/index.js +1 -0
- package/dist/esm/UserContext-b4181162.js +3 -0
- package/dist/esm/UserContext-be8097d2.js +3 -0
- package/dist/esm/date-649fe493.js +112 -0
- package/dist/esm/nutui-react.es.js +13 -0
- package/dist/esm/types/src/packages/calendar/calendar.d.ts +14 -0
- package/dist/esm/types/src/packages/calendar/index.d.ts +2 -0
- package/dist/esm/types/src/packages/calendaritem/calendaritem.d.ts +17 -0
- package/dist/esm/types/src/packages/calendaritem/index.d.ts +2 -0
- package/dist/esm/types/src/packages/dialog/Confirm.d.ts +7 -0
- package/dist/esm/types/src/packages/dialog/Content.d.ts +10 -0
- package/dist/esm/types/src/packages/dialog/DialogWrap.d.ts +11 -0
- package/dist/esm/types/src/packages/dialog/DialogWrapper.d.ts +8 -0
- package/dist/esm/types/src/packages/dialog/Mask.d.ts +3 -0
- package/dist/esm/types/src/packages/dialog/config.d.ts +46 -0
- package/dist/esm/types/src/packages/dialog/dialog.d.ts +2 -0
- package/dist/esm/types/src/packages/dialog/index.d.ts +2 -0
- package/dist/esm/types/src/packages/drag/drag.d.ts +1 -1
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +14 -1
- package/dist/esm/types/src/packages/nutui.react.d.ts +14 -1
- package/dist/esm/types/src/packages/picker/index.d.ts +2 -0
- package/dist/esm/types/src/packages/picker/picker.d.ts +19 -0
- package/dist/esm/types/src/packages/picker/pickerSlot.d.ts +10 -0
- package/dist/esm/types/src/packages/popover/Trigger.d.ts +21 -0
- package/dist/esm/types/src/packages/popover/index.d.ts +2 -0
- package/dist/esm/types/src/packages/popover/popover.d.ts +13 -0
- package/dist/esm/types/src/packages/row/UserContext.d.ts +1 -0
- package/dist/esm/types/src/packages/shortpassword/index.d.ts +2 -0
- package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +21 -0
- package/dist/esm/types/src/packages/steps/UserContext.d.ts +1 -0
- package/dist/esm/types/src/packages/swiper/UserContext.d.ts +2 -0
- package/dist/esm/types/src/packages/swiper/index.d.ts +2 -0
- package/dist/esm/types/src/packages/swiper/swiper.d.ts +26 -0
- package/dist/esm/types/src/packages/swiperitem/index.d.ts +2 -0
- package/dist/esm/types/src/packages/swiperitem/swiperitem.d.ts +7 -0
- package/dist/nutui.react.es.js +7931 -1574
- package/dist/nutui.react.umd.js +26 -17
- package/dist/packages/actionsheet/actionsheet.scss +1 -0
- package/dist/packages/address/address.scss +3 -0
- package/dist/packages/backtop/backtop.scss +1 -0
- package/dist/packages/button/button.scss +1 -1
- package/dist/packages/calendar/calendar.scss +199 -0
- package/dist/packages/calendaritem/calendaritem.scss +191 -0
- package/dist/packages/dialog/dialog.scss +128 -0
- package/dist/packages/drag/drag.scss +2 -1
- package/dist/packages/fixednav/fixednav.scss +3 -0
- package/dist/packages/icon/icon.scss +1 -1
- package/dist/packages/picker/picker.scss +104 -0
- package/dist/packages/popover/popover.scss +142 -0
- package/dist/packages/popup/popup.scss +2 -0
- package/dist/packages/shortpassword/shortpassword.scss +115 -0
- package/dist/packages/swiper/swiper.scss +45 -0
- package/dist/packages/swiperitem/swiperitem.scss +3 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +10 -0
- package/dist/styles/variables.scss +25 -0
- package/package.json +8 -3
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var Utils = {
|
|
2
|
+
/**
|
|
3
|
+
* 是否为闫年
|
|
4
|
+
* @return {Boolse} true|false
|
|
5
|
+
*/
|
|
6
|
+
isLeapYear: function isLeapYear(y) {
|
|
7
|
+
return y % 4 == 0 && y % 100 != 0 || y % 400 == 0;
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 返回星期数
|
|
12
|
+
* @return {String}
|
|
13
|
+
*/
|
|
14
|
+
getWhatDay: function getWhatDay(year, month, day) {
|
|
15
|
+
var date = new Date(year + '/' + month + '/' + day);
|
|
16
|
+
var index = date.getDay();
|
|
17
|
+
var dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
|
|
18
|
+
return dayNames[index];
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 返回星期数
|
|
23
|
+
* @return {Number}
|
|
24
|
+
*/
|
|
25
|
+
getMonthPreDay: function getMonthPreDay(year, month) {
|
|
26
|
+
var date = new Date(year + '/' + month + '/01');
|
|
27
|
+
var day = date.getDay();
|
|
28
|
+
|
|
29
|
+
if (day == 0) {
|
|
30
|
+
day = 7;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return day;
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 返回月份天数
|
|
38
|
+
* @return {Number}
|
|
39
|
+
*/
|
|
40
|
+
getMonthDays: function getMonthDays(year, month) {
|
|
41
|
+
if (/^0/.test(month)) {
|
|
42
|
+
month = month.split('')[1];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return [0, 31, this.isLeapYear(Number(year)) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 补齐数字位数
|
|
50
|
+
* @return {string}
|
|
51
|
+
*/
|
|
52
|
+
getNumTwoBit: function getNumTwoBit(n) {
|
|
53
|
+
n = Number(n);
|
|
54
|
+
return (n > 9 ? '' : '0') + n;
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 日期对象转成字符串
|
|
59
|
+
* @return {string}
|
|
60
|
+
*/
|
|
61
|
+
date2Str: function date2Str(date, split) {
|
|
62
|
+
split = split || '-';
|
|
63
|
+
var y = date.getFullYear();
|
|
64
|
+
var m = this.getNumTwoBit(date.getMonth() + 1);
|
|
65
|
+
var d = this.getNumTwoBit(date.getDate());
|
|
66
|
+
return [y, m, d].join(split);
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 返回日期格式字符串
|
|
71
|
+
* @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
|
|
72
|
+
* @return {string} '2014-12-31'
|
|
73
|
+
*/
|
|
74
|
+
getDay: function getDay(i) {
|
|
75
|
+
i = i || 0;
|
|
76
|
+
var date = new Date();
|
|
77
|
+
var diff = i * (1000 * 60 * 60 * 24);
|
|
78
|
+
date = new Date(date.getTime() + diff);
|
|
79
|
+
return this.date2Str(date);
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 时间比较
|
|
84
|
+
* @return {Boolean}
|
|
85
|
+
*/
|
|
86
|
+
compareDate: function compareDate(date1, date2) {
|
|
87
|
+
var startTime = new Date(date1.replace('-', '/').replace('-', '/'));
|
|
88
|
+
var endTime = new Date(date2.replace('-', '/').replace('-', '/'));
|
|
89
|
+
|
|
90
|
+
if (startTime >= endTime) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return true;
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 时间是否相等
|
|
99
|
+
* @return {Boolean}
|
|
100
|
+
*/
|
|
101
|
+
isEqual: function isEqual(date1, date2) {
|
|
102
|
+
var startTime = new Date(date1).getTime();
|
|
103
|
+
var endTime = new Date(date2).getTime();
|
|
104
|
+
|
|
105
|
+
if (startTime == endTime) {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
export { Utils as U };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export { default as Avatar } from './Avatar.js';
|
|
2
2
|
export { default as Button } from './Button.js';
|
|
3
3
|
export { default as Cell } from './Cell.js';
|
|
4
|
+
export { default as CellGroup } from './CellGroup.js';
|
|
4
5
|
export { default as Icon } from './Icon.js';
|
|
5
6
|
export { default as Price } from './Price.js';
|
|
6
7
|
export { default as Overlay } from './Overlay.js';
|
|
7
8
|
export { default as Divider } from './Divider.js';
|
|
8
9
|
export { default as Layout } from './Layout.js';
|
|
10
|
+
export { default as Row } from './Row.js';
|
|
11
|
+
export { default as Col } from './Col.js';
|
|
9
12
|
export { default as Drag } from './Drag.js';
|
|
10
13
|
export { default as Collapse } from './Collapse.js';
|
|
11
14
|
export { default as Toast } from './Toast.js';
|
|
@@ -19,6 +22,11 @@ export { default as Popup } from './Popup.js';
|
|
|
19
22
|
export { default as ActionSheet } from './ActionSheet.js';
|
|
20
23
|
export { default as NoticeBar } from './NoticeBar.js';
|
|
21
24
|
export { default as Notify } from './Notify.js';
|
|
25
|
+
export { default as Dialog } from './Dialog.js';
|
|
26
|
+
export { default as Switch } from './Switch.js';
|
|
27
|
+
export { default as CollapseItem } from './CollapseItem.js';
|
|
28
|
+
export { default as Swiper } from './Swiper.js';
|
|
29
|
+
export { default as SwiperItem } from './SwiperItem.js';
|
|
22
30
|
export { default as NavBar } from './NavBar.js';
|
|
23
31
|
export { default as Tabbar } from './Tabbar.js';
|
|
24
32
|
export { default as TabbarItem } from './TabbarItem.js';
|
|
@@ -33,10 +41,15 @@ export { default as TextArea } from './TextArea.js';
|
|
|
33
41
|
export { default as Checkbox } from './Checkbox.js';
|
|
34
42
|
export { default as CheckboxGroup } from './CheckboxGroup.js';
|
|
35
43
|
export { default as Tag } from './Tag.js';
|
|
44
|
+
export { default as Popover } from './Popover.js';
|
|
36
45
|
export { default as Badge } from './Badge.js';
|
|
37
46
|
export { default as AnimatingNumbers } from './AnimatingNumbers.js';
|
|
38
47
|
export { default as Radio } from './Radio.js';
|
|
39
48
|
export { default as RadioGroup } from './RadioGroup.js';
|
|
49
|
+
export { default as ShortPassword } from './ShortPassword.js';
|
|
50
|
+
export { default as Calendar } from './Calendar.js';
|
|
51
|
+
export { default as CalendarItem } from './CalendarItem.js';
|
|
52
|
+
export { default as Picker } from './Picker.js';
|
|
40
53
|
export { default as Signature } from './Signature.js';
|
|
41
54
|
export { default as Barrage } from './Barrage.js';
|
|
42
55
|
export { default as Address } from './Address.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
export interface CalendarProps {
|
|
3
|
+
type?: string;
|
|
4
|
+
isAutoBackFill?: boolean;
|
|
5
|
+
poppable?: boolean;
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
defaultValue?: string | string[];
|
|
9
|
+
startDate?: string;
|
|
10
|
+
endDate?: string;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
onChoose?: (param: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const Calendar: FunctionComponent<Partial<CalendarProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
declare type InputDate = string | string[];
|
|
3
|
+
export interface CalendarItemProps {
|
|
4
|
+
type?: string;
|
|
5
|
+
isAutoBackFill?: boolean;
|
|
6
|
+
poppable?: boolean;
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
defaultValue: InputDate;
|
|
10
|
+
startDate?: InputDate;
|
|
11
|
+
endDate?: InputDate;
|
|
12
|
+
onChoose?: (data: any) => void;
|
|
13
|
+
onUpdate?: () => void;
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const CalendarItem: FunctionComponent<Partial<CalendarItemProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfirmProps } from './config';
|
|
2
|
+
export declare const normalizeConfig: (_config: ConfirmProps) => ConfirmProps;
|
|
3
|
+
declare function confirm(config: ConfirmProps, renderFunc?: (props: ConfirmProps) => void): {
|
|
4
|
+
close: () => void;
|
|
5
|
+
update: (newConfig: ConfirmProps) => void;
|
|
6
|
+
};
|
|
7
|
+
export default confirm;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
interface ContentProps {
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
title?: ReactNode;
|
|
5
|
+
footer?: ReactNode;
|
|
6
|
+
textAlign?: any;
|
|
7
|
+
footerDirection?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Content: FunctionComponent<Partial<ContentProps> & HTMLAttributes<HTMLDivElement>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FunctionComponent, HTMLAttributes } from 'react';
|
|
2
|
+
interface DialogWrapProps {
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
mask?: boolean;
|
|
5
|
+
lockScroll?: boolean;
|
|
6
|
+
closeOnClickOverlay?: boolean;
|
|
7
|
+
onCancel?: Function;
|
|
8
|
+
onClosed?: Function;
|
|
9
|
+
}
|
|
10
|
+
export declare const DialogWrap: FunctionComponent<Partial<DialogWrapProps> & HTMLAttributes<HTMLDivElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
interface DialogWrapperProps {
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
title?: ReactNode;
|
|
5
|
+
footer?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const DialogWrapper: FunctionComponent<Partial<DialogWrapperProps> & HTMLAttributes<HTMLDivElement>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode, ForwardRefExoticComponent, PropsWithChildren } from 'react';
|
|
2
|
+
export declare type DialogConfigType = {
|
|
3
|
+
prefixCls?: string;
|
|
4
|
+
simple?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export interface DialogProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
title?: ReactNode;
|
|
11
|
+
content?: ReactNode;
|
|
12
|
+
footer?: ReactNode;
|
|
13
|
+
okText?: ReactNode;
|
|
14
|
+
cancelText?: ReactNode;
|
|
15
|
+
mask?: boolean;
|
|
16
|
+
noOkBtn?: boolean;
|
|
17
|
+
noCancelBtn?: boolean;
|
|
18
|
+
okBtnDisabled?: boolean;
|
|
19
|
+
noFooter?: boolean;
|
|
20
|
+
closeOnClickOverlay?: boolean;
|
|
21
|
+
cancelAutoClose?: boolean;
|
|
22
|
+
textAlign?: any;
|
|
23
|
+
footerDirection?: string;
|
|
24
|
+
lockScroll?: boolean;
|
|
25
|
+
onClosed?: Function;
|
|
26
|
+
onOk?: (e?: MouseEvent) => Promise<any> | void;
|
|
27
|
+
onCancel?: () => void;
|
|
28
|
+
onConfirm?: (e?: MouseEvent) => Promise<any> | void;
|
|
29
|
+
}
|
|
30
|
+
export declare type DialogReturnProps = {
|
|
31
|
+
update: Function;
|
|
32
|
+
close: Function;
|
|
33
|
+
};
|
|
34
|
+
export interface ConfirmProps extends DialogProps {
|
|
35
|
+
content?: ReactNode;
|
|
36
|
+
icon?: ReactNode | null;
|
|
37
|
+
isNotice?: boolean;
|
|
38
|
+
noticeType?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface DialogComponent extends ForwardRefExoticComponent<PropsWithChildren<DialogProps>> {
|
|
41
|
+
confirm: (props: ConfirmProps) => DialogReturnProps;
|
|
42
|
+
alert: (props: ConfirmProps) => DialogReturnProps;
|
|
43
|
+
config: (config: DialogConfigType) => void;
|
|
44
|
+
destroyAll: () => void;
|
|
45
|
+
}
|
|
46
|
+
export declare const destroyList: Array<Function>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import Avatar from '@/packages/avatar';
|
|
2
2
|
import Button from '@/packages/button';
|
|
3
3
|
import Cell from '@/packages/cell';
|
|
4
|
+
import CellGroup from '@/packages/cellgroup';
|
|
4
5
|
import Icon from '@/packages/icon';
|
|
5
6
|
import Price from '@/packages/price';
|
|
6
7
|
import Overlay from '@/packages/overlay';
|
|
7
8
|
import Divider from '@/packages/divider';
|
|
8
9
|
import Layout from '@/packages/layout';
|
|
10
|
+
import Row from '@/packages/row';
|
|
11
|
+
import Col from '@/packages/col';
|
|
9
12
|
import Drag from '@/packages/drag';
|
|
10
13
|
import Collapse from '@/packages/collapse';
|
|
11
14
|
import Toast from '@/packages/toast';
|
|
@@ -19,6 +22,11 @@ import Popup from '@/packages/popup';
|
|
|
19
22
|
import ActionSheet from '@/packages/actionsheet';
|
|
20
23
|
import NoticeBar from '@/packages/noticebar';
|
|
21
24
|
import Notify from '@/packages/notify';
|
|
25
|
+
import Dialog from '@/packages/dialog';
|
|
26
|
+
import Switch from '@/packages/switch';
|
|
27
|
+
import CollapseItem from '@/packages/collapseitem';
|
|
28
|
+
import Swiper from '@/packages/swiper';
|
|
29
|
+
import SwiperItem from '@/packages/swiperitem';
|
|
22
30
|
import NavBar from '@/packages/navbar';
|
|
23
31
|
import Tabbar from '@/packages/tabbar';
|
|
24
32
|
import TabbarItem from '@/packages/tabbaritem';
|
|
@@ -33,11 +41,16 @@ import TextArea from '@/packages/textarea';
|
|
|
33
41
|
import Checkbox from '@/packages/checkbox';
|
|
34
42
|
import CheckboxGroup from '@/packages/checkboxgroup';
|
|
35
43
|
import Tag from '@/packages/tag';
|
|
44
|
+
import Popover from '@/packages/popover';
|
|
36
45
|
import Badge from '@/packages/badge';
|
|
37
46
|
import AnimatingNumbers from '@/packages/animatingnumbers';
|
|
38
47
|
import Radio from '@/packages/radio';
|
|
39
48
|
import RadioGroup from '@/packages/radiogroup';
|
|
49
|
+
import ShortPassword from '@/packages/shortpassword';
|
|
50
|
+
import Calendar from '@/packages/calendar';
|
|
51
|
+
import CalendarItem from '@/packages/calendaritem';
|
|
52
|
+
import Picker from '@/packages/picker';
|
|
40
53
|
import Signature from '@/packages/signature';
|
|
41
54
|
import Barrage from '@/packages/barrage';
|
|
42
55
|
import Address from '@/packages/address';
|
|
43
|
-
export { Avatar, Button, Cell, Icon, Price, Overlay, Divider, Layout, Drag, Collapse, Toast, BackTop, Range, Infiniteloading, Steps, Step, CircleProgress, Popup, ActionSheet, NoticeBar, Notify, NavBar, Tabbar, TabbarItem, InputNumber, Elevator, FixedNav, Pagination, Rate, Uploader, Input, TextArea, Checkbox, CheckboxGroup, Tag, Badge, AnimatingNumbers, Radio, RadioGroup, Signature, Barrage, Address };
|
|
56
|
+
export { Avatar, Button, Cell, CellGroup, Icon, Price, Overlay, Divider, Layout, Row, Col, Drag, Collapse, Toast, BackTop, Range, Infiniteloading, Steps, Step, CircleProgress, Popup, ActionSheet, NoticeBar, Notify, Dialog, Switch, CollapseItem, Swiper, SwiperItem, NavBar, Tabbar, TabbarItem, InputNumber, Elevator, FixedNav, Pagination, Rate, Uploader, Input, TextArea, Checkbox, CheckboxGroup, Tag, Popover, Badge, AnimatingNumbers, Radio, RadioGroup, ShortPassword, Calendar, CalendarItem, Picker, Signature, Barrage, Address };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import Avatar from './avatar';
|
|
2
2
|
import Button from './button';
|
|
3
3
|
import Cell from './cell';
|
|
4
|
+
import CellGroup from './cellgroup';
|
|
4
5
|
import Icon from './icon';
|
|
5
6
|
import Price from './price';
|
|
6
7
|
import Overlay from './overlay';
|
|
7
8
|
import Divider from './divider';
|
|
8
9
|
import Layout from './layout';
|
|
10
|
+
import Row from './row';
|
|
11
|
+
import Col from './col';
|
|
9
12
|
import Drag from './drag';
|
|
10
13
|
import Collapse from './collapse';
|
|
11
14
|
import Toast from './toast';
|
|
@@ -19,6 +22,11 @@ import Popup from './popup';
|
|
|
19
22
|
import ActionSheet from './actionsheet';
|
|
20
23
|
import NoticeBar from './noticebar';
|
|
21
24
|
import Notify from './notify';
|
|
25
|
+
import Dialog from './dialog';
|
|
26
|
+
import Switch from './switch';
|
|
27
|
+
import CollapseItem from './collapseitem';
|
|
28
|
+
import Swiper from './swiper';
|
|
29
|
+
import SwiperItem from './swiperitem';
|
|
22
30
|
import NavBar from './navbar';
|
|
23
31
|
import Tabbar from './tabbar';
|
|
24
32
|
import TabbarItem from './tabbaritem';
|
|
@@ -33,11 +41,16 @@ import TextArea from './textarea';
|
|
|
33
41
|
import Checkbox from './checkbox';
|
|
34
42
|
import CheckboxGroup from './checkboxgroup';
|
|
35
43
|
import Tag from './tag';
|
|
44
|
+
import Popover from './popover';
|
|
36
45
|
import Badge from './badge';
|
|
37
46
|
import AnimatingNumbers from './animatingnumbers';
|
|
38
47
|
import Radio from './radio';
|
|
39
48
|
import RadioGroup from './radiogroup';
|
|
49
|
+
import ShortPassword from './shortpassword';
|
|
50
|
+
import Calendar from './calendar';
|
|
51
|
+
import CalendarItem from './calendaritem';
|
|
52
|
+
import Picker from './picker';
|
|
40
53
|
import Signature from './signature';
|
|
41
54
|
import Barrage from './barrage';
|
|
42
55
|
import Address from './address';
|
|
43
|
-
export { Avatar, Button, Cell, Icon, Price, Overlay, Divider, Layout, Drag, Collapse, Toast, BackTop, Range, Infiniteloading, Steps, Step, CircleProgress, Popup, ActionSheet, NoticeBar, Notify, NavBar, Tabbar, TabbarItem, InputNumber, Elevator, FixedNav, Pagination, Rate, Uploader, Input, TextArea, Checkbox, CheckboxGroup, Tag, Badge, AnimatingNumbers, Radio, RadioGroup, Signature, Barrage, Address };
|
|
56
|
+
export { Avatar, Button, Cell, CellGroup, Icon, Price, Overlay, Divider, Layout, Row, Col, Drag, Collapse, Toast, BackTop, Range, Infiniteloading, Steps, Step, CircleProgress, Popup, ActionSheet, NoticeBar, Notify, Dialog, Switch, CollapseItem, Swiper, SwiperItem, NavBar, Tabbar, TabbarItem, InputNumber, Elevator, FixedNav, Pagination, Rate, Uploader, Input, TextArea, Checkbox, CheckboxGroup, Tag, Popover, Badge, AnimatingNumbers, Radio, RadioGroup, ShortPassword, Calendar, CalendarItem, Picker, Signature, Barrage, Address };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { RefObject } from 'react';
|
|
2
|
+
interface IPickerProps {
|
|
3
|
+
isVisible: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
listData: any[];
|
|
6
|
+
defaultValueData?: any[];
|
|
7
|
+
className: '';
|
|
8
|
+
style: {};
|
|
9
|
+
onConfirm?: (list: any[]) => void;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
onCloseUpdate?: (list: any[], pickerRef: RefObject<HTMLDivElement>) => void;
|
|
12
|
+
onChoose?: (index: number, value: IResValue, list: any[], pickerRef: RefObject<HTMLDivElement>) => void;
|
|
13
|
+
}
|
|
14
|
+
interface IResValue {
|
|
15
|
+
label: number;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
declare const Picker: React.ForwardRefExoticComponent<Partial<IPickerProps> & React.RefAttributes<unknown>>;
|
|
19
|
+
export default Picker;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IPickerSlotProps {
|
|
3
|
+
isUpdate?: boolean;
|
|
4
|
+
keyIndex?: number;
|
|
5
|
+
defaultValue?: string | number;
|
|
6
|
+
listData?: any[];
|
|
7
|
+
chooseItem?: (val: string, idx: number) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const PickerSlot: React.ForwardRefExoticComponent<Partial<IPickerSlotProps> & React.RefAttributes<unknown>>;
|
|
10
|
+
export default PickerSlot;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TriggerProps {
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
forwardedRef: React.RefObject<HTMLElement>;
|
|
5
|
+
}
|
|
6
|
+
interface TriggerState {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 过滤ref
|
|
10
|
+
*/
|
|
11
|
+
export declare function fillRef<T>(ref: React.Ref<T>, node: T): void;
|
|
12
|
+
/**
|
|
13
|
+
* 将ref合并到一个ref函数中以支持ref传递
|
|
14
|
+
*/
|
|
15
|
+
export declare function composeRef<T>(...refs: React.Ref<T>[]): React.Ref<T>;
|
|
16
|
+
export default class Trigger extends React.Component<TriggerProps, TriggerState> {
|
|
17
|
+
constructor(props: any);
|
|
18
|
+
fireEvents(type: string, e: Event): void;
|
|
19
|
+
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { CSSProperties, FunctionComponent } from 'react';
|
|
2
|
+
export interface PopoverProps {
|
|
3
|
+
list: Array<any>;
|
|
4
|
+
theme: string;
|
|
5
|
+
location: string;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
className: string;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
onClick: (e: MouseEvent) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function findDOMNode<T = HTMLElement>(node: React.ReactInstance | HTMLElement): T;
|
|
12
|
+
export declare type PopoverType = 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
13
|
+
export declare const Popover: FunctionComponent<Partial<PopoverProps>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { CSSProperties, FunctionComponent } from 'react';
|
|
2
|
+
export interface ShortPasswordProps {
|
|
3
|
+
title: string;
|
|
4
|
+
desc: string;
|
|
5
|
+
tips: string;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
modelValue: string | number;
|
|
8
|
+
errorMsg: string;
|
|
9
|
+
noButton: boolean;
|
|
10
|
+
closeOnClickOverlay: boolean;
|
|
11
|
+
length: string | number;
|
|
12
|
+
className: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
change: (value: string | number) => void;
|
|
15
|
+
onOk: (value: string | number) => void;
|
|
16
|
+
onCancel: () => void;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
onTips: () => void;
|
|
19
|
+
complete: (value: string | number) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type SwiperRef = {
|
|
3
|
+
to: (index: number) => void;
|
|
4
|
+
next: () => void;
|
|
5
|
+
prev: () => void;
|
|
6
|
+
};
|
|
7
|
+
interface SwiperProps {
|
|
8
|
+
width: number | string;
|
|
9
|
+
height: number | string;
|
|
10
|
+
duration: number | string;
|
|
11
|
+
initPage: number | string;
|
|
12
|
+
autoPlay: number | string;
|
|
13
|
+
direction: 'horizontal' | 'vertical';
|
|
14
|
+
paginationColor: string;
|
|
15
|
+
paginationVisible: boolean;
|
|
16
|
+
loop: boolean;
|
|
17
|
+
touchable: boolean;
|
|
18
|
+
isPreventDefault: boolean;
|
|
19
|
+
isStopPropagation: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
pageContent?: React.ReactNode;
|
|
23
|
+
onChange?: (currPage: number) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare const Swiper: React.ForwardRefExoticComponent<Partial<SwiperProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<SwiperRef>>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SwiperItemProps {
|
|
3
|
+
direction?: string;
|
|
4
|
+
size?: 0;
|
|
5
|
+
}
|
|
6
|
+
export declare const SwiperItem: React.ForwardRefExoticComponent<Partial<SwiperItemProps> & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export {};
|