@autobest-ui/components 2.5.2 → 2.6.0

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/esm/index.d.ts CHANGED
@@ -28,6 +28,8 @@ export type { GuideProps } from './guide';
28
28
  export { default as Guide } from './guide';
29
29
  export type { DrawerProps } from './drawer';
30
30
  export { default as Drawer } from './drawer';
31
+ export type { InputValue, InputProps, TextAreaProps } from './input';
32
+ export { Input, TextArea } from './input';
31
33
  export type { InputNumberProps } from './input-number';
32
34
  export { default as InputNumber } from './input-number';
33
35
  export type { LazyImageProps } from './lazy-image';
package/esm/index.js CHANGED
@@ -13,6 +13,7 @@ export { default as Collapse } from './collapse';
13
13
  export { default as Carousel } from './carousel';
14
14
  export { default as Guide } from './guide';
15
15
  export { default as Drawer } from './drawer';
16
+ export { Input, TextArea } from './input';
16
17
  export { default as InputNumber } from './input-number';
17
18
  export { default as LazyImage } from './lazy-image';
18
19
  export { default as LinkList } from './link-list';
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ export interface AdornProps {
3
+ /**
4
+ * 包裹的input组件
5
+ */
6
+ children: React.ReactElement;
7
+ /**
8
+ * 样式前缀,这个需要使用者提供前缀
9
+ */
10
+ prefixCls: string;
11
+ /**
12
+ * 样式
13
+ */
14
+ className?: string;
15
+ /**
16
+ * 在输入框内部添加前缀
17
+ */
18
+ prefix?: React.ReactChild;
19
+ /**
20
+ * 在输入框内部添加后缀
21
+ */
22
+ suffix?: React.ReactChild;
23
+ /**
24
+ * 输入框是否可以操作
25
+ */
26
+ disabled?: boolean;
27
+ /**
28
+ * onFocus
29
+ */
30
+ onFocus?: (ev: React.FocusEvent<HTMLInputElement & HTMLTextAreaElement>) => void;
31
+ /**
32
+ * onBlur
33
+ */
34
+ onBlur?: (ev: React.FocusEvent<HTMLInputElement & HTMLTextAreaElement>) => void;
35
+ }
36
+ declare const Adorn: React.FC<AdornProps>;
37
+ export default Adorn;
@@ -0,0 +1,67 @@
1
+ import React, { useCallback, useState } from 'react';
2
+ import classNames from 'classnames';
3
+ import { isBlank } from '@autobest-ui/utils';
4
+ var Adorn = function Adorn(props) {
5
+ var _a, _b, _c;
6
+ var _d = useState(false),
7
+ isEnter = _d[0],
8
+ changeEnterStatus = _d[1];
9
+ var _e = useState(false),
10
+ isFocus = _e[0],
11
+ changeFocusStatus = _e[1];
12
+ var className = props.className,
13
+ disabled = props.disabled,
14
+ prefix = props.prefix,
15
+ suffix = props.suffix,
16
+ prefixCls = props.prefixCls,
17
+ children = props.children,
18
+ onFocus = props.onFocus,
19
+ onBlur = props.onBlur;
20
+ var onMouseEnterCallback = useCallback(function () {
21
+ if (isEnter || disabled) {
22
+ return;
23
+ }
24
+ changeEnterStatus(true);
25
+ }, [isEnter, disabled]);
26
+ var onMouseLeaveCallback = useCallback(function () {
27
+ if (!isEnter || disabled) {
28
+ return;
29
+ }
30
+ changeEnterStatus(false);
31
+ }, [isEnter, disabled]);
32
+ var onFocusCallback = useCallback(function (ev) {
33
+ if (disabled) {
34
+ return;
35
+ }
36
+ if (!isFocus) {
37
+ changeFocusStatus(true);
38
+ }
39
+ if (onFocus) {
40
+ onFocus(ev);
41
+ }
42
+ }, [onFocus, isFocus, disabled]);
43
+ var onBlurCallback = useCallback(function (ev) {
44
+ if (isFocus) {
45
+ changeFocusStatus(false);
46
+ }
47
+ if (disabled) {
48
+ return;
49
+ }
50
+ if (onBlur) {
51
+ onBlur(ev);
52
+ }
53
+ }, [onBlur, isFocus, disabled]);
54
+ return /*#__PURE__*/React.createElement("div", {
55
+ className: classNames(prefixCls, className, (_a = {}, _a["".concat(prefixCls, "-enter")] = isEnter || isFocus, _a), (_b = {}, _b["".concat(prefixCls, "-focus")] = isFocus, _b), (_c = {}, _c["".concat(prefixCls, "-disabled")] = disabled, _c)),
56
+ onMouseEnter: onMouseEnterCallback,
57
+ onMouseLeave: onMouseLeaveCallback
58
+ }, !isBlank(prefix) ? /*#__PURE__*/React.createElement("div", {
59
+ className: "".concat(prefixCls, "-prefix")
60
+ }, prefix) : null, /*#__PURE__*/React.cloneElement(children, {
61
+ onFocus: onFocusCallback,
62
+ onBlur: onBlurCallback
63
+ }), !isBlank(suffix) ? /*#__PURE__*/React.createElement("div", {
64
+ className: "".concat(prefixCls, "-suffix")
65
+ }, suffix) : null);
66
+ };
67
+ export default Adorn;
@@ -0,0 +1,65 @@
1
+ import React from 'react';
2
+ import { AdornProps } from './Adorn';
3
+ export declare type InputValue = string | File | undefined;
4
+ export interface InputProps extends Omit<AdornProps, 'prefixCls' | 'children' | 'onBlur' | 'onFocus'>, Omit<React.InputHTMLAttributes<any>, 'onChange' | 'onBlur' | 'onFocus' | 'prefix' | 'multiple'> {
5
+ /**
6
+ * 输入框默认值,用于非受控组件,配合ref使用
7
+ */
8
+ defaultValue?: string;
9
+ /**
10
+ * 输入框中的值
11
+ */
12
+ value?: string;
13
+ /**
14
+ * 输入框的别名
15
+ */
16
+ name?: string;
17
+ /**
18
+ * 初始化后自动获取焦点
19
+ */
20
+ autoFocus?: boolean;
21
+ /**
22
+ * 值修改后的回调函数,用于修改value属性
23
+ */
24
+ onChange?: (value: InputValue, name?: string) => void;
25
+ /**
26
+ * 获得焦点的回调函数
27
+ */
28
+ onFocus?: (value: InputValue, name?: string) => void;
29
+ /**
30
+ * 失去焦点的回调函数
31
+ */
32
+ onBlur?: (value: InputValue, name?: string) => void;
33
+ }
34
+ interface InputStates {
35
+ value: string | undefined;
36
+ }
37
+ interface InputPropsWithRef extends InputProps {
38
+ /**
39
+ * 此属性可以忽略, storybook问题
40
+ */
41
+ upperRef: React.Ref<HTMLInputElement>;
42
+ }
43
+ export declare class InputNotRef extends React.Component<InputPropsWithRef, InputStates> {
44
+ prefixCls: string;
45
+ inputRef: React.RefObject<HTMLInputElement>;
46
+ static defaultProps: {
47
+ defaultValue: string;
48
+ type: string;
49
+ };
50
+ constructor(props: InputPropsWithRef);
51
+ static getDerivedStateFromProps(nextProps: InputPropsWithRef, prevStates: InputStates): InputStates;
52
+ componentDidMount(): void;
53
+ isFileUpload: () => boolean;
54
+ getFileInfo: (element: HTMLInputElement) => File;
55
+ /**
56
+ * 修改value值的回调
57
+ * @param ev
58
+ */
59
+ onChange: (ev: React.ChangeEvent<HTMLInputElement>) => void;
60
+ onFocus: (ev: React.FocusEvent<HTMLInputElement>) => void;
61
+ onBlur: (ev: React.FocusEvent<HTMLInputElement>) => void;
62
+ render(): JSX.Element;
63
+ }
64
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
65
+ export default Input;
@@ -0,0 +1,180 @@
1
+ var __extends = this && this.__extends || function () {
2
+ var _extendStatics = function extendStatics(d, b) {
3
+ _extendStatics = Object.setPrototypeOf || {
4
+ __proto__: []
5
+ } instanceof Array && function (d, b) {
6
+ d.__proto__ = b;
7
+ } || function (d, b) {
8
+ for (var p in b) {
9
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
10
+ }
11
+ };
12
+ return _extendStatics(d, b);
13
+ };
14
+ return function (d, b) {
15
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
16
+ _extendStatics(d, b);
17
+ function __() {
18
+ this.constructor = d;
19
+ }
20
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21
+ };
22
+ }();
23
+ var __assign = this && this.__assign || function () {
24
+ __assign = Object.assign || function (t) {
25
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
26
+ s = arguments[i];
27
+ for (var p in s) {
28
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
29
+ }
30
+ }
31
+ return t;
32
+ };
33
+ return __assign.apply(this, arguments);
34
+ };
35
+ import React from 'react';
36
+ import { composeRef, isEmptyObject } from '@autobest-ui/utils';
37
+ import Adorn from './Adorn';
38
+ var InputNotRef = /** @class */function (_super) {
39
+ __extends(InputNotRef, _super);
40
+ function InputNotRef(props) {
41
+ var _this = _super.call(this, props) || this;
42
+ _this.prefixCls = 'ab-input';
43
+ _this.inputRef = /*#__PURE__*/React.createRef();
44
+ _this.isFileUpload = function () {
45
+ return _this.props.type === 'file';
46
+ };
47
+ _this.getFileInfo = function (element) {
48
+ return element && element.files && element.files.length ? element.files[0] : undefined;
49
+ };
50
+ /**
51
+ * 修改value值的回调
52
+ * @param ev
53
+ */
54
+ _this.onChange = function (ev) {
55
+ if (_this.props.disabled) {
56
+ return;
57
+ }
58
+ var _a = _this.props,
59
+ onChange = _a.onChange,
60
+ name = _a.name;
61
+ if (_this.isFileUpload()) {
62
+ if (onChange) {
63
+ onChange(_this.getFileInfo(ev.target), name);
64
+ }
65
+ return;
66
+ }
67
+ var value = ev.target.value;
68
+ if (onChange) {
69
+ onChange(value, name);
70
+ return;
71
+ }
72
+ _this.setState({
73
+ value: value
74
+ });
75
+ };
76
+ _this.onFocus = function (ev) {
77
+ var _a = _this.props,
78
+ name = _a.name,
79
+ onFocus = _a.onFocus;
80
+ if (_this.isFileUpload()) {
81
+ if (onFocus) {
82
+ onFocus(_this.getFileInfo(ev.target), name);
83
+ }
84
+ return;
85
+ }
86
+ var value = ev.target.value;
87
+ if (onFocus) {
88
+ onFocus(value, name);
89
+ }
90
+ };
91
+ _this.onBlur = function (ev) {
92
+ var _a = _this.props,
93
+ name = _a.name,
94
+ onBlur = _a.onBlur;
95
+ if (_this.isFileUpload()) {
96
+ if (onBlur) {
97
+ onBlur(_this.getFileInfo(ev.target), name);
98
+ }
99
+ return;
100
+ }
101
+ var value = ev.target.value;
102
+ if (onBlur) {
103
+ onBlur(value, name);
104
+ }
105
+ };
106
+ _this.state = {
107
+ value: props.defaultValue || ''
108
+ };
109
+ return _this;
110
+ }
111
+ InputNotRef.getDerivedStateFromProps = function (nextProps, prevStates) {
112
+ var nextState = {};
113
+ // 判断是否为受控方式
114
+ if ('value' in nextProps && nextProps.type !== 'file') {
115
+ if (nextProps.value !== prevStates.value) {
116
+ nextState.value = nextProps.value;
117
+ }
118
+ }
119
+ if (isEmptyObject(nextState)) {
120
+ return null;
121
+ }
122
+ return nextState;
123
+ };
124
+ InputNotRef.prototype.componentDidMount = function () {
125
+ // 设置input焦点
126
+ if (this.props.autoFocus) {
127
+ var element = this.inputRef.current;
128
+ if (!element) {
129
+ return;
130
+ }
131
+ element.focus();
132
+ }
133
+ };
134
+ InputNotRef.prototype.render = function () {
135
+ var cls = this.prefixCls;
136
+ var _a = this.props,
137
+ upperRef = _a.upperRef,
138
+ placeholder = _a.placeholder,
139
+ disabled = _a.disabled,
140
+ style = _a.style,
141
+ type = _a.type,
142
+ accept = _a.accept,
143
+ className = _a.className,
144
+ prefix = _a.prefix,
145
+ suffix = _a.suffix;
146
+ var value = this.state.value;
147
+ var isFileUpload = this.isFileUpload();
148
+ return /*#__PURE__*/React.createElement(Adorn, {
149
+ prefixCls: cls,
150
+ onFocus: this.onFocus,
151
+ onBlur: this.onBlur,
152
+ className: className,
153
+ disabled: disabled,
154
+ prefix: prefix,
155
+ suffix: suffix
156
+ }, /*#__PURE__*/React.createElement("input", {
157
+ className: "".concat(cls, "-control"),
158
+ ref: composeRef(this.inputRef, upperRef),
159
+ type: type,
160
+ placeholder: placeholder,
161
+ disabled: disabled,
162
+ accept: accept,
163
+ style: style,
164
+ value: isFileUpload ? undefined : value || '',
165
+ onChange: this.onChange
166
+ }));
167
+ };
168
+ InputNotRef.defaultProps = {
169
+ defaultValue: '',
170
+ type: 'text'
171
+ };
172
+ return InputNotRef;
173
+ }(React.Component);
174
+ export { InputNotRef };
175
+ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
176
+ return /*#__PURE__*/React.createElement(InputNotRef, __assign({}, props, {
177
+ upperRef: ref
178
+ }));
179
+ });
180
+ export default Input;
@@ -0,0 +1,68 @@
1
+ import React from 'react';
2
+ import { AdornProps } from './Adorn';
3
+ export interface TextAreaProps extends Omit<AdornProps, 'prefixCls' | 'children' | 'onBlur' | 'onFocus' | 'suffix'>, Omit<React.TextareaHTMLAttributes<any>, 'onChange' | 'onBlur' | 'onFocus' | 'prefix'> {
4
+ /**
5
+ * 输入框默认值,用于非受控组件,配合ref使用
6
+ */
7
+ defaultValue?: string;
8
+ /**
9
+ * 输入框中的值
10
+ */
11
+ value?: string;
12
+ /**
13
+ * 输入框的别名
14
+ */
15
+ name?: string;
16
+ /**
17
+ * 初始化后自动获取焦点
18
+ */
19
+ autoFocus?: boolean;
20
+ /**
21
+ * 字符串最大值
22
+ */
23
+ maxlength?: number;
24
+ /**
25
+ * 值修改后的回调函数,用于修改value属性
26
+ */
27
+ onChange?: (value: string | undefined, name?: string) => void;
28
+ /**
29
+ * 获得焦点的回调函数
30
+ */
31
+ onFocus?: (value: string | undefined, name?: string) => void;
32
+ /**
33
+ * 失去焦点的回调函数
34
+ */
35
+ onBlur?: (value: string | undefined, name?: string) => void;
36
+ }
37
+ interface TextareaStates {
38
+ value: string | undefined;
39
+ currentLength: number;
40
+ }
41
+ interface TextAreaPropsWithRef extends TextAreaProps {
42
+ /**
43
+ * 此属性可以忽略, storybook问题
44
+ */
45
+ upperRef: React.Ref<HTMLTextAreaElement>;
46
+ }
47
+ export declare class TextAreaNotRef extends React.Component<TextAreaPropsWithRef, TextareaStates> {
48
+ prefixCls: string;
49
+ textareaRef: React.RefObject<HTMLTextAreaElement>;
50
+ static defaultProps: {
51
+ defaultValue: string;
52
+ maxlength: number;
53
+ };
54
+ constructor(props: TextAreaPropsWithRef);
55
+ static getDerivedStateFromProps(nextProps: TextAreaPropsWithRef, prevStates: TextareaStates): TextareaStates;
56
+ componentDidMount(): void;
57
+ /**
58
+ * 修改value值的回调
59
+ * @param ev
60
+ */
61
+ onChange: (ev: React.ChangeEvent<HTMLTextAreaElement>) => void;
62
+ onFocus: (ev: React.FocusEvent<HTMLTextAreaElement>) => void;
63
+ onBlur: (ev: React.FocusEvent<HTMLTextAreaElement>) => void;
64
+ renderSuffix(): React.ReactElement;
65
+ render(): JSX.Element;
66
+ }
67
+ declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
68
+ export default TextArea;
@@ -0,0 +1,172 @@
1
+ var __extends = this && this.__extends || function () {
2
+ var _extendStatics = function extendStatics(d, b) {
3
+ _extendStatics = Object.setPrototypeOf || {
4
+ __proto__: []
5
+ } instanceof Array && function (d, b) {
6
+ d.__proto__ = b;
7
+ } || function (d, b) {
8
+ for (var p in b) {
9
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
10
+ }
11
+ };
12
+ return _extendStatics(d, b);
13
+ };
14
+ return function (d, b) {
15
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
16
+ _extendStatics(d, b);
17
+ function __() {
18
+ this.constructor = d;
19
+ }
20
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21
+ };
22
+ }();
23
+ var __assign = this && this.__assign || function () {
24
+ __assign = Object.assign || function (t) {
25
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
26
+ s = arguments[i];
27
+ for (var p in s) {
28
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
29
+ }
30
+ }
31
+ return t;
32
+ };
33
+ return __assign.apply(this, arguments);
34
+ };
35
+ import React from 'react';
36
+ import { composeRef, isBlank, isEmptyObject } from '@autobest-ui/utils';
37
+ import Adorn from './Adorn';
38
+ function getValueLength(value) {
39
+ return isBlank(value) ? 0 : value.length;
40
+ }
41
+ var TextAreaNotRef = /** @class */function (_super) {
42
+ __extends(TextAreaNotRef, _super);
43
+ function TextAreaNotRef(props) {
44
+ var _this = _super.call(this, props) || this;
45
+ _this.prefixCls = 'ab-textarea';
46
+ _this.textareaRef = /*#__PURE__*/React.createRef();
47
+ /**
48
+ * 修改value值的回调
49
+ * @param ev
50
+ */
51
+ _this.onChange = function (ev) {
52
+ if (_this.props.disabled) {
53
+ return;
54
+ }
55
+ var value = ev.target.value;
56
+ if (_this.props.maxlength > 0) {
57
+ var currentLength = getValueLength(value);
58
+ if (_this.props.maxlength && currentLength > _this.props.maxlength) {
59
+ return;
60
+ }
61
+ _this.setState({
62
+ currentLength: currentLength
63
+ });
64
+ }
65
+ var _a = _this.props,
66
+ onChange = _a.onChange,
67
+ name = _a.name;
68
+ if (onChange) {
69
+ onChange(value, name);
70
+ return;
71
+ }
72
+ _this.setState({
73
+ value: value
74
+ });
75
+ };
76
+ _this.onFocus = function (ev) {
77
+ var _a = _this.props,
78
+ name = _a.name,
79
+ onFocus = _a.onFocus;
80
+ var value = ev.target.value;
81
+ if (onFocus) {
82
+ onFocus(value, name);
83
+ }
84
+ };
85
+ _this.onBlur = function (ev) {
86
+ var value = ev.target.value;
87
+ var _a = _this.props,
88
+ name = _a.name,
89
+ onBlur = _a.onBlur;
90
+ if (onBlur) {
91
+ onBlur(value, name);
92
+ }
93
+ };
94
+ var value = props.defaultValue || '';
95
+ _this.state = {
96
+ value: value,
97
+ currentLength: getValueLength(value)
98
+ };
99
+ return _this;
100
+ }
101
+ TextAreaNotRef.getDerivedStateFromProps = function (nextProps, prevStates) {
102
+ var nextState = {};
103
+ // 判断是否为受控方式
104
+ if ('value' in nextProps) {
105
+ if (nextProps.value !== prevStates.value) {
106
+ nextState.value = nextProps.value;
107
+ nextState.currentLength = getValueLength(nextProps.value);
108
+ }
109
+ }
110
+ if (isEmptyObject(nextState)) {
111
+ return null;
112
+ }
113
+ return nextState;
114
+ };
115
+ TextAreaNotRef.prototype.componentDidMount = function () {
116
+ // 设置Textarea焦点
117
+ if (this.props.autoFocus) {
118
+ var element = this.textareaRef.current;
119
+ if (!element) {
120
+ return;
121
+ }
122
+ element.focus();
123
+ }
124
+ };
125
+ TextAreaNotRef.prototype.renderSuffix = function () {
126
+ var maxlength = this.props.maxlength;
127
+ if (!maxlength || maxlength < 0) {
128
+ return null;
129
+ }
130
+ return /*#__PURE__*/React.createElement(React.Fragment, null, this.state.currentLength, "/", maxlength);
131
+ };
132
+ TextAreaNotRef.prototype.render = function () {
133
+ var cls = this.prefixCls;
134
+ var _a = this.props,
135
+ upperRef = _a.upperRef,
136
+ placeholder = _a.placeholder,
137
+ disabled = _a.disabled,
138
+ style = _a.style,
139
+ className = _a.className,
140
+ prefix = _a.prefix;
141
+ var value = this.state.value;
142
+ return /*#__PURE__*/React.createElement(Adorn, {
143
+ prefixCls: cls,
144
+ onFocus: this.onFocus,
145
+ onBlur: this.onBlur,
146
+ className: className,
147
+ disabled: disabled,
148
+ prefix: prefix,
149
+ suffix: this.renderSuffix()
150
+ }, /*#__PURE__*/React.createElement("textarea", {
151
+ className: "".concat(cls, "-control"),
152
+ ref: composeRef(this.textareaRef, upperRef),
153
+ placeholder: placeholder,
154
+ disabled: disabled,
155
+ style: style,
156
+ value: value || '',
157
+ onChange: this.onChange
158
+ }));
159
+ };
160
+ TextAreaNotRef.defaultProps = {
161
+ defaultValue: '',
162
+ maxlength: 0
163
+ };
164
+ return TextAreaNotRef;
165
+ }(React.Component);
166
+ export { TextAreaNotRef };
167
+ var TextArea = /*#__PURE__*/React.forwardRef(function (props, ref) {
168
+ return /*#__PURE__*/React.createElement(TextAreaNotRef, __assign({}, props, {
169
+ upperRef: ref
170
+ }));
171
+ });
172
+ export default TextArea;
@@ -0,0 +1,4 @@
1
+ export { InputProps, InputValue } from './Input';
2
+ export { default as Input } from './Input';
3
+ export { TextAreaProps } from './TextArea';
4
+ export { default as TextArea } from './TextArea';
@@ -0,0 +1,2 @@
1
+ export { default as Input } from './Input';
2
+ export { default as TextArea } from './TextArea';
File without changes
@@ -0,0 +1 @@
1
+ .ab-input{display:flex;align-items:center;border:1px solid #ccc;overflow:hidden;position:relative;border-radius:.04rem}.ab-input-prefix{padding-left:.06rem}.ab-input-suffix{padding-right:.06rem}.ab-input.ab-input-enter,.ab-input.ab-input-focus{border-color:#348fee}.ab-input.ab-input-focus{box-shadow:0 0 4px #348fee}.ab-input.ab-input-disabled .ab-input-control{cursor:not-allowed}.ab-input-control{appearance:none;display:block;outline:0;border:none;width:100%;height:100%;padding:.06rem;background-color:transparent;font-size:inherit}
@@ -0,0 +1 @@
1
+ .ab-textarea{display:flex;align-items:center;border:1px solid #ccc;overflow:hidden;position:relative;border-radius:.04rem}.ab-textarea-prefix{padding-left:.06rem}.ab-textarea.ab-textarea-enter,.ab-textarea.ab-textarea-focus{border-color:#348fee}.ab-textarea.ab-textarea-focus{box-shadow:0 0 4px #348fee}.ab-textarea.ab-textarea-disabled .ab-textarea-control{cursor:not-allowed}.ab-textarea-control{resize:none;appearance:none;display:block;outline:0;border:none;width:100%;min-height:1.2rem;height:100%;padding:.06rem;background-color:transparent;font-size:inherit;line-height:1.4}.ab-textarea-suffix{position:absolute;right:.08rem;bottom:.06rem;color:#aaa;font-size:.13rem;padding-right:0}
@@ -16,9 +16,7 @@ function ArrowIcon(props) {
16
16
  }));
17
17
  }
18
18
  export default function ControlArrow(props) {
19
- return /*#__PURE__*/React.createElement("div", {
20
- className: "".concat(props.cls, "-arrow")
21
- }, /*#__PURE__*/React.createElement("span", {
19
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
22
20
  className: "".concat(props.cls, "-up"),
23
21
  onMouseDown: props.onKeyup
24
22
  }, /*#__PURE__*/React.createElement(ArrowIcon, {