@ray-js/components 1.3.6 → 1.3.8
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/Input/props.d.ts
CHANGED
@@ -26,6 +26,12 @@ export interface InputProps extends BaseProps {
|
|
26
26
|
* @default undefined
|
27
27
|
*/
|
28
28
|
placeholder?: string;
|
29
|
+
/**
|
30
|
+
* @description.en placeholder
|
31
|
+
* @description.zh 占位符的样式
|
32
|
+
* @default undefined
|
33
|
+
*/
|
34
|
+
placeholderStyle?: string;
|
29
35
|
/**
|
30
36
|
* @description.en disabled
|
31
37
|
* @description.zh 是否禁用
|
@@ -38,36 +44,12 @@ export interface InputProps extends BaseProps {
|
|
38
44
|
* @default undefined
|
39
45
|
*/
|
40
46
|
maxLength?: number;
|
41
|
-
/**
|
42
|
-
* @description.en 获Get focus取焦点
|
43
|
-
* @description.zh 获取焦点
|
44
|
-
* @default false
|
45
|
-
*/
|
46
|
-
focus?: boolean;
|
47
47
|
/**
|
48
48
|
* @description.en Set the text of the button in the lower right corner of the keyboard, effective only when type='text'
|
49
49
|
* @description.zh 设置键盘右下角按钮的文字,仅在type='text'时生效
|
50
50
|
* @default done
|
51
51
|
*/
|
52
52
|
confirmType?: 'send' | 'search' | 'next' | 'go' | 'done';
|
53
|
-
/**
|
54
|
-
* @description.en Start position of the cursor. This parameter is valid for automatic clustering and must be used with Selection End
|
55
|
-
* @description.zh 光标起始位置,自动聚集时有效,需与 selectionEnd 搭配使用
|
56
|
-
* @default -1
|
57
|
-
*/
|
58
|
-
selectionStart?: number;
|
59
|
-
/**
|
60
|
-
* @description.en End cursor position. This parameter is valid for automatic clustering and must be used with Selection Start
|
61
|
-
* @description.zh 光标结束位置,自动聚集时有效,需与 selectionStart 搭配使用
|
62
|
-
* @default -1
|
63
|
-
*/
|
64
|
-
selectionEnd?: number;
|
65
|
-
/**
|
66
|
-
* @description.en Specifies the cursor position for focus
|
67
|
-
* @description.zh 指定 focus 时的光标位置
|
68
|
-
* @default false
|
69
|
-
*/
|
70
|
-
cursor?: number;
|
71
53
|
/**
|
72
54
|
* @description.en Input events
|
73
55
|
* @description.zh 输入事件
|
package/lib/Input/props.js
CHANGED
package/lib/Textarea/Textarea.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["className", "onInput", "
|
3
|
+
var _excluded = ["className", "onInput", "onFocus", "onBlur"];
|
4
4
|
import * as React from 'react';
|
5
5
|
import clsx from 'clsx';
|
6
6
|
import { useEventListener } from 'ahooks';
|
@@ -10,7 +10,6 @@ import handleProps from '../utils/handleProps';
|
|
10
10
|
var Textarea = function (props) {
|
11
11
|
var className = props.className,
|
12
12
|
onInput = props.onInput,
|
13
|
-
onConfirm = props.onConfirm,
|
14
13
|
onFocus = props.onFocus,
|
15
14
|
onBlur = props.onBlur,
|
16
15
|
restProps = _objectWithoutProperties(props, _excluded);
|
@@ -25,15 +24,6 @@ var Textarea = function (props) {
|
|
25
24
|
}, {
|
26
25
|
target: currentNode
|
27
26
|
});
|
28
|
-
useEventListener('confirm', function (e) {
|
29
|
-
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm({
|
30
|
-
type: 'confirm',
|
31
|
-
value: e.detail.value,
|
32
|
-
origin: e
|
33
|
-
});
|
34
|
-
}, {
|
35
|
-
target: currentNode
|
36
|
-
});
|
37
27
|
useEventListener('focus', function (e) {
|
38
28
|
onFocus === null || onFocus === void 0 ? void 0 : onFocus({
|
39
29
|
type: 'focus',
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["id", "className", "style", "value", "placeholderStyle", "placeholder", "onInput", "onFocus", "
|
3
|
+
var _excluded = ["id", "className", "style", "value", "placeholderStyle", "placeholder", "onInput", "onFocus", "onLinechange", "onBlur", "maxLength", "disabled", "name", "autoHeight"];
|
4
4
|
import * as React from 'react';
|
5
5
|
import clsx from 'clsx';
|
6
6
|
import { inlineStyle } from '@ray-js/framework-shared';
|
@@ -15,11 +15,10 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
15
15
|
placeholder = props.placeholder,
|
16
16
|
onInput = props.onInput,
|
17
17
|
onFocus = props.onFocus,
|
18
|
-
|
18
|
+
onLinechange = props.onLinechange,
|
19
19
|
onBlur = props.onBlur,
|
20
20
|
_props$maxLength = props.maxLength,
|
21
21
|
maxLength = _props$maxLength === void 0 ? 140 : _props$maxLength,
|
22
|
-
focus = props.focus,
|
23
22
|
disabled = props.disabled,
|
24
23
|
name = props.name,
|
25
24
|
autoHeight = props.autoHeight,
|
@@ -34,16 +33,10 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
34
33
|
className: clsx('ray-textarea', styles.textarea, className),
|
35
34
|
autoHeight: autoHeight,
|
36
35
|
disabled: disabled,
|
37
|
-
focus: focus,
|
38
36
|
maxlength: maxLength // 小程序里是 maxlength 小写
|
39
37
|
,
|
40
38
|
onBlur: onBlur,
|
41
|
-
|
42
|
-
var value = e.detail.value;
|
43
|
-
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm({
|
44
|
-
value: value
|
45
|
-
});
|
46
|
-
},
|
39
|
+
onLinechange: onLinechange,
|
47
40
|
onFocus: onFocus,
|
48
41
|
onInput: function (e) {
|
49
42
|
var value = e.detail.value;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["id", "className", "style", "value", "placeholderStyle", "placeholder", "onInput", "onFocus", "
|
3
|
+
var _excluded = ["id", "className", "style", "value", "placeholderStyle", "placeholder", "onInput", "onFocus", "onBlur", "onLinechange", "maxLength", "disabled", "name", "autoHeight"];
|
4
4
|
import * as React from 'react';
|
5
5
|
import clsx from 'clsx';
|
6
6
|
import { inlineStyle } from '@ray-js/framework-shared';
|
@@ -15,11 +15,10 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
15
15
|
placeholder = props.placeholder,
|
16
16
|
onInput = props.onInput,
|
17
17
|
onFocus = props.onFocus,
|
18
|
-
onConfirm = props.onConfirm,
|
19
18
|
onBlur = props.onBlur,
|
19
|
+
onLinechange = props.onLinechange,
|
20
20
|
_props$maxLength = props.maxLength,
|
21
21
|
maxLength = _props$maxLength === void 0 ? 140 : _props$maxLength,
|
22
|
-
focus = props.focus,
|
23
22
|
disabled = props.disabled,
|
24
23
|
name = props.name,
|
25
24
|
autoHeight = props.autoHeight,
|
@@ -34,16 +33,9 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
34
33
|
className: clsx('ray-textarea', styles.textarea, className),
|
35
34
|
autoHeight: autoHeight,
|
36
35
|
disabled: disabled,
|
37
|
-
focus: focus,
|
38
36
|
maxlength: maxLength // 小程序里是 maxlength 小写
|
39
37
|
,
|
40
38
|
onBlur: onBlur,
|
41
|
-
onConfirm: function (e) {
|
42
|
-
var value = e.detail.value;
|
43
|
-
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm({
|
44
|
-
value: value
|
45
|
-
});
|
46
|
-
},
|
47
39
|
onFocus: onFocus,
|
48
40
|
onInput: function (e) {
|
49
41
|
var value = e.detail.value;
|
@@ -51,6 +43,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
51
43
|
value: value
|
52
44
|
});
|
53
45
|
},
|
46
|
+
onLinechange: onLinechange,
|
54
47
|
placeholder: placeholder,
|
55
48
|
placeholderStyle: inlineStyle(placeholderStyle),
|
56
49
|
value: value
|
package/lib/Textarea/props.d.ts
CHANGED
@@ -40,12 +40,6 @@ export interface TextareaProps extends BaseProps {
|
|
40
40
|
* @default null
|
41
41
|
*/
|
42
42
|
maxLength?: number;
|
43
|
-
/**
|
44
|
-
* @description.en Get focus
|
45
|
-
* @description.zh 获取焦点
|
46
|
-
* @default null
|
47
|
-
*/
|
48
|
-
focus?: boolean;
|
49
43
|
/**
|
50
44
|
* @description.en Automatic increase or not
|
51
45
|
* @description.zh 是否自动增高
|
@@ -71,9 +65,9 @@ export interface TextareaProps extends BaseProps {
|
|
71
65
|
*/
|
72
66
|
onBlur?: (event: any) => void;
|
73
67
|
/**
|
74
|
-
* @description.en
|
75
|
-
* @description.zh
|
68
|
+
* @description.en Called when the number of lines in the input box changes, event.detail = {height: 0, lineCount: 0}
|
69
|
+
* @description.zh 输入框行数变化时调用,event.detail = {height: 0, lineCount: 0}
|
76
70
|
* @default null
|
77
71
|
*/
|
78
|
-
|
72
|
+
onLinechange?: (event: any) => void;
|
79
73
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/components",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.8",
|
4
4
|
"description": "Ray basic components",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -26,8 +26,8 @@
|
|
26
26
|
"dependencies": {
|
27
27
|
"@ray-core/macro": "^0.3.5",
|
28
28
|
"@ray-core/wechat": "^0.3.5",
|
29
|
-
"@ray-js/adapter": "^1.3.
|
30
|
-
"@ray-js/framework-shared": "^1.3.
|
29
|
+
"@ray-js/adapter": "^1.3.8",
|
30
|
+
"@ray-js/framework-shared": "^1.3.8",
|
31
31
|
"ahooks": "^3.7.1",
|
32
32
|
"clsx": "^1.1.1",
|
33
33
|
"core-js": "^3.19.1",
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"style-to-object": "^0.3.0"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
|
-
"@ray-js/cli": "^1.3.
|
40
|
+
"@ray-js/cli": "^1.3.8"
|
41
41
|
},
|
42
42
|
"maintainers": [
|
43
43
|
{
|
@@ -45,6 +45,6 @@
|
|
45
45
|
"email": "tuyafe@tuya.com"
|
46
46
|
}
|
47
47
|
],
|
48
|
-
"gitHead": "
|
48
|
+
"gitHead": "074cc99e10cdad9b69b389a283244d9f4ecb05b3",
|
49
49
|
"repository": {}
|
50
50
|
}
|