@ray-js/components 0.4.0 → 0.4.4-beta-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/lib/Button/props.d.ts +61 -1
- package/lib/Checkbox/index.md +1 -1
- package/lib/Checkbox/props.d.ts +20 -0
- package/lib/CheckboxGroup/CheckboxGroup.tuya.js +5 -2
- package/lib/CheckboxGroup/CheckboxGroup.wechat.js +5 -2
- package/lib/CheckboxGroup/props.d.ts +15 -0
- package/lib/DatePicker/index.md +2 -0
- package/lib/DatePicker/props.d.ts +70 -2
- package/lib/Form/props.d.ts +10 -0
- package/lib/Icon/iconfont/iconfont.android.js +1 -1
- package/lib/Icon/iconfont/iconfont.css +196 -193
- package/lib/Icon/iconfont/iconfont.ios.js +1 -1
- package/lib/Icon/iconfont/iconfont.js +9 -9
- package/lib/Icon/iconfont/iconfont.json +1 -1
- package/lib/Icon/iconfont/iconfont.tuya.js +9 -9
- package/lib/Icon/iconfont/iconfont.web.js +9 -9
- package/lib/Icon/iconfont/iconfont.wechat.js +9 -9
- package/lib/Icon/iconfont-rn/iconfont.json +1 -1
- package/lib/Icon/props.d.ts +15 -0
- package/lib/Image/props.d.ts +30 -4
- package/lib/Input/props.d.ts +105 -2
- package/lib/Label/props.d.ts +3 -5
- package/lib/LinearGradient/index.md +2 -1
- package/lib/LinearGradient/props.d.ts +10 -0
- package/lib/Modal/index.md +2 -1
- package/lib/Modal/props.d.ts +35 -0
- package/lib/Motion/index.md +2 -1
- package/lib/Motion/props.d.ts +5 -0
- package/lib/Picker/index.md +2 -0
- package/lib/Picker/props.d.ts +65 -2
- package/lib/PickerView/PickerView.tuya.js +5 -2
- package/lib/PickerView/PickerView.wechat.js +5 -2
- package/lib/PickerView/index.md +1 -1
- package/lib/PickerView/props.d.ts +30 -3
- package/lib/PickerViewColumn/PickerViewColumn.tuya.d.ts +3 -3
- package/lib/PickerViewColumn/PickerViewColumn.tuya.js +8 -57
- package/lib/PickerViewColumn/PickerViewColumn.wechat.d.ts +3 -3
- package/lib/PickerViewColumn/PickerViewColumn.wechat.js +8 -58
- package/lib/PickerViewColumn/index.md +5 -3
- package/lib/PickerViewColumn/props.d.ts +1 -12
- package/lib/RadialGradient/index.md +2 -1
- package/lib/RadialGradient/props.d.ts +10 -0
- package/lib/Radio/props.d.ts +20 -0
- package/lib/RadioGroup/RadioGroup.tuya.js +5 -2
- package/lib/RadioGroup/RadioGroup.wechat.js +5 -2
- package/lib/RadioGroup/index.md +1 -1
- package/lib/RadioGroup/props.d.ts +31 -3
- package/lib/ScrollView/props.d.ts +76 -3
- package/lib/Slider/props.d.ts +80 -0
- package/lib/Swiper/Swiper.js +12 -7
- package/lib/Swiper/Swiper.tuya.js +11 -6
- package/lib/Swiper/Swiper.web.js +12 -7
- package/lib/Swiper/Swiper.wechat.js +11 -6
- package/lib/Swiper/props.d.ts +45 -9
- package/lib/SwiperItem/SwiperItem.android.js +1 -0
- package/lib/SwiperItem/SwiperItem.d.ts +4 -0
- package/lib/SwiperItem/SwiperItem.ios.js +1 -0
- package/lib/SwiperItem/SwiperItem.js +1 -0
- package/lib/SwiperItem/SwiperItem.tuya.d.ts +4 -0
- package/lib/SwiperItem/SwiperItem.tuya.js +22 -0
- package/lib/SwiperItem/SwiperItem.web.js +14 -0
- package/lib/SwiperItem/SwiperItem.wechat.d.ts +4 -0
- package/lib/SwiperItem/SwiperItem.wechat.js +22 -0
- package/lib/SwiperItem/index.android.js +1 -0
- package/lib/SwiperItem/index.d.ts +3 -0
- package/lib/SwiperItem/index.ios.js +1 -0
- package/lib/SwiperItem/index.js +3 -0
- package/lib/SwiperItem/index.md +23 -0
- package/lib/SwiperItem/index.tuya.js +3 -0
- package/lib/SwiperItem/index.web.js +3 -0
- package/lib/SwiperItem/index.wechat.js +3 -0
- package/lib/SwiperItem/props.android.js +1 -0
- package/lib/SwiperItem/props.d.ts +5 -0
- package/lib/SwiperItem/props.ios.js +1 -0
- package/lib/SwiperItem/props.js +1 -0
- package/lib/SwiperItem/props.tuya.js +1 -0
- package/lib/SwiperItem/props.web.js +1 -0
- package/lib/SwiperItem/props.wechat.js +1 -0
- package/lib/Switch/props.d.ts +40 -0
- package/lib/Text/props.d.ts +15 -1
- package/lib/Textarea/index.md +1 -1
- package/lib/Textarea/props.d.ts +60 -2
- package/lib/TimePicker/index.md +2 -0
- package/lib/TimePicker/props.d.ts +55 -2
- package/lib/View/props.d.ts +20 -0
- package/lib/index.android.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.ios.js +1 -1
- package/lib/index.js +1 -0
- package/lib/index.tuya.js +1 -0
- package/lib/index.web.js +1 -0
- package/lib/index.wechat.js +1 -0
- package/lib/types/index.d.ts +66 -3
- package/package.json +5 -5
package/lib/Button/props.d.ts
CHANGED
@@ -1,19 +1,79 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { BaseProps } from '../types';
|
3
3
|
export interface ButtonProps extends BaseProps {
|
4
|
-
|
4
|
+
/**
|
5
|
+
* @description.en disabled
|
6
|
+
* @description.zh 是否禁用
|
7
|
+
* @default undefined
|
8
|
+
*/
|
9
|
+
disabled?: false;
|
10
|
+
/**
|
11
|
+
* @description.en loading
|
12
|
+
* @description.zh 是否加载中
|
13
|
+
* @default undefined
|
14
|
+
*/
|
5
15
|
loading?: boolean;
|
16
|
+
/**
|
17
|
+
* @description.en Button size
|
18
|
+
* @description.zh 按钮的大小
|
19
|
+
* @default default
|
20
|
+
*/
|
6
21
|
size?: 'default' | 'mini';
|
22
|
+
/**
|
23
|
+
* @description.en The style type of the button
|
24
|
+
* @description.zh 按钮的样式类型
|
25
|
+
* @default default
|
26
|
+
*/
|
7
27
|
type?: 'default' | 'primary' | 'warn';
|
28
|
+
/**
|
29
|
+
* @description.en Whether the button hollow, transparent background color
|
30
|
+
* @description.zh 按钮是否镂空,背景色透明
|
31
|
+
* @default undefined
|
32
|
+
*/
|
8
33
|
plain?: boolean;
|
34
|
+
/**
|
35
|
+
* @description.en Press down on the style
|
36
|
+
* @description.zh 按下去的样式
|
37
|
+
* @default undefined
|
38
|
+
*/
|
9
39
|
hoverStyle?: any;
|
40
|
+
/**
|
41
|
+
* @description.en Press down class on the style
|
42
|
+
* @description.zh 按下去的样式class
|
43
|
+
* @default undefined
|
44
|
+
*/
|
10
45
|
hoverClassName?: string;
|
46
|
+
/**
|
47
|
+
* @description.en How long does it take for the click state to appear after holding, in milliseconds
|
48
|
+
* @description.zh 按住后多久出现点击态,单位毫秒
|
49
|
+
* @default undefined
|
50
|
+
*/
|
11
51
|
hoverStartTime?: number;
|
52
|
+
/**
|
53
|
+
* @description.en Click retention time after finger release, in milliseconds
|
54
|
+
* @description.zh 手指松开后点击态保留时间,单位毫秒
|
55
|
+
* @default undefined
|
56
|
+
*/
|
12
57
|
hoverStayTime?: number;
|
58
|
+
/**
|
59
|
+
* @description.en onClick
|
60
|
+
* @description.zh 点击回调
|
61
|
+
* @default undefined
|
62
|
+
*/
|
13
63
|
onClick?: (params: {
|
64
|
+
/**
|
65
|
+
* @description.en type
|
66
|
+
* @description.zh 类型
|
67
|
+
* @default undefined
|
68
|
+
*/
|
14
69
|
type: 'click';
|
15
70
|
}) => void;
|
16
71
|
children?: React.ReactNode;
|
72
|
+
/**
|
73
|
+
* @description.en For the Form component, clicking on each of the Form component's Submit /reset events triggers it
|
74
|
+
* @description.zh 用于 form 组件,点击分别会触发 form 组件的 submit/reset 事件
|
75
|
+
* @default undefined
|
76
|
+
*/
|
17
77
|
formType?: 'submit' | 'reset';
|
18
78
|
}
|
19
79
|
export declare const defaultButtonProps: ButtonProps;
|
package/lib/Checkbox/index.md
CHANGED
@@ -20,7 +20,7 @@ import { Checkbox } from '@ray-js/components'
|
|
20
20
|
|
21
21
|
<code src="./demos/basic.tsx" title="基本使用" background="#f2f4f6"/>
|
22
22
|
<code src="./demos/checkboxGroup.tsx" title="多项选择器组 - 选项" background="#f2f4f6"/>
|
23
|
-
<code src="./demos/checkboxGroupChildren.tsx" title="多项选择器组 - 子节点
|
23
|
+
<code src="./demos/checkboxGroupChildren.tsx" title="多项选择器组 - 子节点" background="#f2f4f6"/>
|
24
24
|
<code src="./demos/checked.tsx" title="默认选中" background="#f2f4f6"/>
|
25
25
|
<code src="./demos/disabled.tsx" title="disabled" background="#f2f4f6"/>
|
26
26
|
|
package/lib/Checkbox/props.d.ts
CHANGED
@@ -1,7 +1,27 @@
|
|
1
1
|
import { BaseProps, TouchEventHandler } from '../types';
|
2
2
|
export interface CheckboxProps extends BaseProps, TouchEventHandler {
|
3
|
+
/**
|
4
|
+
* @description.en If this parameter is selected, the change event of the checkbox-group is triggered and the value of the checkbox is carried
|
5
|
+
* @description.zh checkbox标识,选中时触发checkbox-group的 change 事件,并携带 checkbox 的 value
|
6
|
+
* @default undefined
|
7
|
+
*/
|
3
8
|
value?: string;
|
9
|
+
/**
|
10
|
+
* @description.en Whether it is currently selected can be set to default
|
11
|
+
* @description.zh 当前是否选中,可用来设置默认选中
|
12
|
+
* @default undefined
|
13
|
+
*/
|
4
14
|
checked?: boolean;
|
15
|
+
/**
|
16
|
+
* @description.en is disabled
|
17
|
+
* @description.zh 是否禁用
|
18
|
+
* @default undefined
|
19
|
+
*/
|
5
20
|
disabled?: boolean;
|
21
|
+
/**
|
22
|
+
* @description.en color
|
23
|
+
* @description.zh 颜色
|
24
|
+
* @default undefined
|
25
|
+
*/
|
6
26
|
color?: string;
|
7
27
|
}
|
@@ -10,13 +10,16 @@ var CheckboxGroup = function (props) {
|
|
10
10
|
name = props.name,
|
11
11
|
disabled = props.disabled,
|
12
12
|
_props$onChange = props.onChange,
|
13
|
-
onChange = _props$onChange === void 0 ? function () {} : _props$onChange
|
13
|
+
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
14
|
+
children = props.children;
|
14
15
|
return /*#__PURE__*/React.createElement(RemaxCheckboxGroup, {
|
15
16
|
name: name,
|
16
17
|
onChange: function handleOnChange(e) {
|
17
18
|
!disabled && onChange(e);
|
18
19
|
}
|
19
|
-
}, function
|
20
|
+
}, function renderChildren() {
|
21
|
+
return children;
|
22
|
+
}() || function renderOptions() {
|
20
23
|
return options.map(function (item, index) {
|
21
24
|
var _item$checked;
|
22
25
|
|
@@ -10,13 +10,16 @@ var CheckboxGroup = function (props) {
|
|
10
10
|
name = props.name,
|
11
11
|
disabled = props.disabled,
|
12
12
|
_props$onChange = props.onChange,
|
13
|
-
onChange = _props$onChange === void 0 ? function () {} : _props$onChange
|
13
|
+
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
14
|
+
children = props.children;
|
14
15
|
return /*#__PURE__*/React.createElement(_CheckboxGroup, {
|
15
16
|
name: name,
|
16
17
|
onChange: function handleOnChange(e) {
|
17
18
|
!disabled && onChange(e);
|
18
19
|
}
|
19
|
-
}, function
|
20
|
+
}, function renderChildren() {
|
21
|
+
return children;
|
22
|
+
}() || function renderOptions() {
|
20
23
|
return options.map(function (item, index) {
|
21
24
|
var _item$checked;
|
22
25
|
|
@@ -4,8 +4,23 @@ export declare type CheckboxGroupOption = CheckboxProps & {
|
|
4
4
|
label: string;
|
5
5
|
};
|
6
6
|
export interface CheckboxGroupProps extends BaseProps, TouchEventHandler {
|
7
|
+
/**
|
8
|
+
* @description.en options
|
9
|
+
* @description.zh 群组项 (Web 端非必填)
|
10
|
+
* @default null
|
11
|
+
*/
|
7
12
|
options?: CheckboxGroupOption[];
|
13
|
+
/**
|
14
|
+
* @description.en disabled
|
15
|
+
* @description.zh 是否禁用
|
16
|
+
* @default null
|
17
|
+
*/
|
8
18
|
disabled?: boolean;
|
19
|
+
/**
|
20
|
+
* @description.en Triggered when the selected item is changed
|
21
|
+
* @description.zh 选中项发生改变时触发 change 事件
|
22
|
+
* @default null
|
23
|
+
*/
|
9
24
|
onChange?: (event: {
|
10
25
|
type: string;
|
11
26
|
value: string[];
|
package/lib/DatePicker/index.md
CHANGED
@@ -18,6 +18,8 @@ import { DatePicker } from '@ray-js/components'
|
|
18
18
|
|
19
19
|
## 示例代码
|
20
20
|
|
21
|
+
> picker 相关组件效果请使用手机模式下查看
|
22
|
+
|
21
23
|
<code src="./demos/basic.tsx" title="基本使用" background="#f2f4f6"/>
|
22
24
|
<code src="./demos/disabled.tsx" title="禁用" background="#f2f4f6"/>
|
23
25
|
<code src="./demos/month.tsx" title="选择月份" background="#f2f4f6"/>
|
@@ -1,32 +1,100 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { BaseProps } from '../types';
|
3
2
|
import { TouchEventHandler } from '@ray-js/framework-shared';
|
4
3
|
declare type changeValue = (e: {
|
4
|
+
/**
|
5
|
+
* @description.en type
|
6
|
+
* @description.zh 类型
|
7
|
+
* @default undefined
|
8
|
+
*/
|
5
9
|
type: string;
|
10
|
+
/**
|
11
|
+
* @description.en value
|
12
|
+
* @description.zh value
|
13
|
+
* @default undefined
|
14
|
+
*/
|
6
15
|
value: string;
|
7
16
|
origin?: any;
|
8
17
|
}) => void;
|
9
18
|
declare type CancelEvent = (e: {
|
19
|
+
/**
|
20
|
+
* @description.en type
|
21
|
+
* @description.zh 类型
|
22
|
+
* @default undefined
|
23
|
+
*/
|
10
24
|
type: string;
|
11
25
|
origin: any;
|
12
26
|
}) => void;
|
13
27
|
export interface DatePickerProps extends BaseProps, TouchEventHandler {
|
28
|
+
/**
|
29
|
+
* @description.en disabled
|
30
|
+
* @description.zh 是否禁用
|
31
|
+
* @default false
|
32
|
+
*/
|
14
33
|
disabled?: boolean;
|
34
|
+
/**
|
35
|
+
* @description.en The currently selected date
|
36
|
+
* @description.zh 当前选择的日期
|
37
|
+
* @default undefined
|
38
|
+
*/
|
15
39
|
value?: string;
|
40
|
+
/**
|
41
|
+
* @description.en Indicates the beginning of the valid date range in the format of "YYYY-MM-DD"
|
42
|
+
* @description.zh 表示有效日期范围的开始,字符串格式为"YYYY-MM-DD"
|
43
|
+
* @default undefined
|
44
|
+
*/
|
16
45
|
start?: string;
|
46
|
+
/**
|
47
|
+
* @description.en Indicates the end of the valid date range in the format of "YYYY-MM-DD"
|
48
|
+
* @description.zh 表示有效日期范围的结束,字符串格式为"YYYY-MM-DD"
|
49
|
+
* @default undefined
|
50
|
+
*/
|
17
51
|
end?: string;
|
52
|
+
/**
|
53
|
+
* @description.en Valid values year,month,day indicate the granularity of the selector
|
54
|
+
* @description.zh 有效值 year,month,day,表示选择器的粒度
|
55
|
+
* @default undefined
|
56
|
+
*/
|
18
57
|
fields?: 'year' | 'month' | 'day';
|
58
|
+
/**
|
59
|
+
* @description.en onChange
|
60
|
+
* @description.zh 选择时触发
|
61
|
+
* @default undefined
|
62
|
+
*/
|
19
63
|
onChange?: changeValue;
|
64
|
+
/**
|
65
|
+
* @description.en onCancel
|
66
|
+
* @description.zh 取消选择时触发
|
67
|
+
* @default undefined
|
68
|
+
*/
|
20
69
|
onCancel?: CancelEvent;
|
70
|
+
/**
|
71
|
+
* @description.en confirmText
|
72
|
+
* @description.zh 确认文本
|
73
|
+
* @default undefined
|
74
|
+
*/
|
21
75
|
confirmText?: string;
|
76
|
+
/**
|
77
|
+
* @description.en cancelText
|
78
|
+
* @description.zh 取消文本
|
79
|
+
* @default undefined
|
80
|
+
*/
|
22
81
|
cancelText?: string;
|
23
|
-
children?: React.ReactNode | string;
|
24
82
|
}
|
25
83
|
export declare const defaultProps: DatePickerProps;
|
26
84
|
export interface IState {
|
27
85
|
visible: boolean;
|
86
|
+
/**
|
87
|
+
* @description.en value
|
88
|
+
* @description.zh value
|
89
|
+
* @default undefined
|
90
|
+
*/
|
28
91
|
value: number | number[];
|
29
92
|
changeValue: number | number[];
|
93
|
+
/**
|
94
|
+
* @description.en range
|
95
|
+
* @description.zh 范围
|
96
|
+
* @default undefined
|
97
|
+
*/
|
30
98
|
range: any[];
|
31
99
|
dateListArr: any[];
|
32
100
|
}
|
package/lib/Form/props.d.ts
CHANGED
@@ -1,10 +1,20 @@
|
|
1
1
|
import { BaseProps } from '../types';
|
2
2
|
export declare type FormProps = BaseProps & {
|
3
|
+
/**
|
4
|
+
* @description.en Trigger the Submit event with the data in the form
|
5
|
+
* @description.zh 携带 form 中的数据触发 submit 事件
|
6
|
+
* @default null
|
7
|
+
*/
|
3
8
|
onSubmit?(event: {
|
4
9
|
type: 'form';
|
5
10
|
origin: any;
|
6
11
|
value: any;
|
7
12
|
}): void;
|
13
|
+
/**
|
14
|
+
* @description.en Triggered when the form is reset
|
15
|
+
* @description.zh 表单重置时会触发
|
16
|
+
* @default null
|
17
|
+
*/
|
8
18
|
onReset?(event: {
|
9
19
|
type: 'form';
|
10
20
|
origin: any;
|