@nutui/nutui-react 2.0.0-alpha.15 → 2.0.0-alpha.16
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 +14 -0
- package/dist/esm/DatePicker.js +54 -58
- package/dist/esm/Dialog/style/index.js +1 -0
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Menu/style/style.css +1 -1
- package/dist/esm/Menu.js +5 -3
- package/dist/esm/MenuItem/style/style.css +1 -1
- package/dist/esm/MenuItem.js +31 -44
- package/dist/esm/NoticeBar.js +2 -2
- package/dist/esm/Picker.js +1 -1
- package/dist/esm/Popover.js +3 -40
- package/dist/esm/Popup.js +1 -1
- package/dist/esm/Toast.js +16 -7
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/src/packages/datepicker/datepicker.d.ts +11 -17
- package/dist/esm/types/src/packages/datepicker/datepicker.taro.d.ts +11 -17
- package/dist/esm/types/src/packages/datepicker/index.d.ts +1 -0
- package/dist/esm/types/src/packages/datepicker/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +2 -2
- package/dist/esm/types/src/packages/toast/Notification.d.ts +4 -1
- package/dist/esm/use-click-away.js +43 -0
- 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 +1 -1
- 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 +210 -224
- package/dist/nutui.react.umd.js +210 -224
- package/dist/packages/menuitem/menuitem.scss +1 -1
- package/dist/packages/noticebar/noticebar.scss +0 -3
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/types/packages/datepicker/datepicker.d.ts +79 -25
- package/dist/types/packages/datepicker/index.d.ts +1 -0
- package/dist/types/packages/toast/Notification.d.ts +4 -1
- package/package.json +1 -1
package/dist/style.mjs
CHANGED
|
@@ -1,27 +1,81 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { PickerOption } from '../../packages/picker/index';
|
|
3
|
+
import { BasicComponent } from '../../utils/typings';
|
|
4
|
+
export interface DatePickerProps extends BasicComponent {
|
|
5
|
+
/**
|
|
6
|
+
* 受控
|
|
7
|
+
* @default null
|
|
8
|
+
*/
|
|
9
|
+
value?: Date | null
|
|
10
|
+
/**
|
|
11
|
+
* 初始值
|
|
12
|
+
* @default null
|
|
13
|
+
*/
|
|
14
|
+
defaultValue?: Date | null
|
|
15
|
+
/**
|
|
16
|
+
* 是否可见
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
visible: boolean
|
|
20
|
+
/**
|
|
21
|
+
* 设置标题
|
|
22
|
+
* @default null
|
|
23
|
+
*/
|
|
24
|
+
title: string
|
|
25
|
+
/**
|
|
26
|
+
* 类时间类型,可选值 date time year-month month-day datehour datetime hour-minutes
|
|
27
|
+
* @default date
|
|
28
|
+
*/
|
|
29
|
+
type: 'date' | 'time' | 'year-month' | 'month-day' | 'datehour' | 'datetime' | 'hour-minutes'
|
|
30
|
+
/**
|
|
31
|
+
* 每列是否展示中文
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
showChinese: boolean
|
|
35
|
+
/**
|
|
36
|
+
* 分钟步进值
|
|
37
|
+
* @default 1
|
|
38
|
+
*/
|
|
39
|
+
minuteStep: number
|
|
40
|
+
/**
|
|
41
|
+
* 开始日期
|
|
42
|
+
* @default 十年前
|
|
43
|
+
*/
|
|
44
|
+
startDate: Date
|
|
45
|
+
/**
|
|
46
|
+
* 结束日期
|
|
47
|
+
* @default 十年后
|
|
48
|
+
*/
|
|
49
|
+
endDate: Date
|
|
50
|
+
/**
|
|
51
|
+
* 是否开启3D效果
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
threeDimensional: boolean
|
|
55
|
+
/**
|
|
56
|
+
* 选项格式化函数
|
|
57
|
+
* @default -
|
|
58
|
+
*/
|
|
59
|
+
formatter: (type: string, option: PickerOption) => PickerOption
|
|
60
|
+
/**
|
|
61
|
+
* 选项过滤函数
|
|
62
|
+
* @default -
|
|
63
|
+
*/
|
|
64
|
+
filter: (type: string, option: PickerOption[]) => PickerOption[]
|
|
65
|
+
/**
|
|
66
|
+
* 关闭时触发
|
|
67
|
+
* @default -
|
|
68
|
+
*/
|
|
69
|
+
onClose: () => void
|
|
70
|
+
/**
|
|
71
|
+
* 点击确定按钮时触发
|
|
72
|
+
* @default -
|
|
73
|
+
*/
|
|
74
|
+
onConfirm: (selectedOptions: PickerOption[], selectedValue: (string | number)[]) => void
|
|
75
|
+
/**
|
|
76
|
+
* 选项改变时触发
|
|
77
|
+
* @default -
|
|
78
|
+
*/
|
|
79
|
+
onChange?: (selectedOptions: PickerOption[], selectedValue: (string | number)[], columnIndex: number) => void
|
|
8
80
|
}
|
|
9
|
-
export
|
|
10
|
-
modelValue: Date | null;
|
|
11
|
-
visible: boolean;
|
|
12
|
-
title: string;
|
|
13
|
-
type: 'date' | 'time' | 'year-month' | 'month-day' | 'datehour' | 'datetime' | 'hour-minutes';
|
|
14
|
-
isShowChinese: boolean;
|
|
15
|
-
minuteStep: number;
|
|
16
|
-
minDate: Date;
|
|
17
|
-
maxDate: Date;
|
|
18
|
-
threeDimensional: boolean;
|
|
19
|
-
className?: string;
|
|
20
|
-
style?: React.CSSProperties;
|
|
21
|
-
formatter: (type: string, option: PickerOption) => PickerOption;
|
|
22
|
-
filter: (type: string, option: PickerOption[]) => PickerOption[];
|
|
23
|
-
onCloseDatePicker: () => void;
|
|
24
|
-
onConfirmDatePicker: (selectedOptions: PickerOption[], selectedValue: (string | number)[]) => void;
|
|
25
|
-
onChange?: (selectedOptions: PickerOption[], selectedValue: (string | number)[], columnIndex: number) => void;
|
|
26
|
-
}
|
|
27
|
-
export declare const DatePicker: FunctionComponent<Partial<DatePickerProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
81
|
+
export declare const DatePicker: FunctionComponent<Partial<DatePickerProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'>>;
|
|
@@ -13,7 +13,10 @@ export interface NotificationProps extends BasicComponent {
|
|
|
13
13
|
contentStyle?: React.CSSProperties;
|
|
14
14
|
onClose: () => void;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export interface NotificationState {
|
|
17
|
+
show: boolean;
|
|
18
|
+
}
|
|
19
|
+
export default class Notification extends React.PureComponent<NotificationProps, NotificationState> {
|
|
17
20
|
static newInstance: (properties: NotificationProps, callback: any) => void;
|
|
18
21
|
private closeTimer;
|
|
19
22
|
constructor(props: NotificationProps);
|