@ray-js/components 0.3.31 → 0.4.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.
Files changed (44) hide show
  1. package/lib/Button/props.d.ts +61 -1
  2. package/lib/Checkbox/props.d.ts +20 -0
  3. package/lib/CheckboxGroup/props.d.ts +15 -0
  4. package/lib/DatePicker/index.md +2 -0
  5. package/lib/DatePicker/props.d.ts +70 -2
  6. package/lib/Form/props.d.ts +10 -0
  7. package/lib/Icon/iconfont/iconfont.android.js +1 -1
  8. package/lib/Icon/iconfont/iconfont.css +196 -193
  9. package/lib/Icon/iconfont/iconfont.ios.js +1 -1
  10. package/lib/Icon/iconfont/iconfont.js +9 -9
  11. package/lib/Icon/iconfont/iconfont.json +1 -1
  12. package/lib/Icon/iconfont/iconfont.tuya.js +9 -9
  13. package/lib/Icon/iconfont/iconfont.web.js +9 -9
  14. package/lib/Icon/iconfont/iconfont.wechat.js +9 -9
  15. package/lib/Icon/iconfont-rn/iconfont.json +1 -1
  16. package/lib/Icon/props.d.ts +15 -0
  17. package/lib/Image/props.d.ts +30 -4
  18. package/lib/Input/props.d.ts +105 -2
  19. package/lib/Label/props.d.ts +3 -5
  20. package/lib/LinearGradient/index.md +2 -1
  21. package/lib/LinearGradient/props.d.ts +10 -0
  22. package/lib/Modal/index.md +2 -1
  23. package/lib/Modal/props.d.ts +35 -0
  24. package/lib/Motion/index.md +2 -1
  25. package/lib/Motion/props.d.ts +5 -0
  26. package/lib/Picker/index.md +2 -0
  27. package/lib/Picker/props.d.ts +65 -2
  28. package/lib/PickerView/props.d.ts +30 -3
  29. package/lib/RadialGradient/index.md +2 -1
  30. package/lib/RadialGradient/props.d.ts +10 -0
  31. package/lib/Radio/props.d.ts +20 -0
  32. package/lib/RadioGroup/props.d.ts +31 -3
  33. package/lib/ScrollView/props.d.ts +76 -3
  34. package/lib/Slider/props.d.ts +80 -0
  35. package/lib/Swiper/props.d.ts +45 -9
  36. package/lib/Switch/props.d.ts +40 -0
  37. package/lib/Text/props.d.ts +15 -1
  38. package/lib/Textarea/index.md +1 -1
  39. package/lib/Textarea/props.d.ts +60 -2
  40. package/lib/TimePicker/index.md +2 -0
  41. package/lib/TimePicker/props.d.ts +55 -2
  42. package/lib/View/props.d.ts +20 -0
  43. package/lib/types/index.d.ts +60 -3
  44. package/package.json +5 -5
@@ -1,19 +1,79 @@
1
1
  /// <reference types="react" />
2
2
  import { BaseProps } from '../types';
3
3
  export interface ButtonProps extends BaseProps {
4
- disabled?: boolean;
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;
@@ -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
  }
@@ -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[];
@@ -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
  }
@@ -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;