@qsxy/element-plus-react 1.0.1 → 1.0.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 (66) hide show
  1. package/dist/Calendar/Calendar.js +12 -3
  2. package/dist/Calendar/Footer.js +4 -2
  3. package/dist/Calendar/QuarterPanel.d.ts +4 -0
  4. package/dist/Calendar/QuarterPanel.js +109 -0
  5. package/dist/Calendar/WeekPanel.js +1 -1
  6. package/dist/Calendar/typings.d.ts +1 -1
  7. package/dist/Card/Card.js +9 -4
  8. package/dist/Card/typings.d.ts +1 -1
  9. package/dist/Cascader/Cascader.js +1 -1
  10. package/dist/DatePicker/DatePicker.js +38 -12
  11. package/dist/DatePicker/DateRangePicker.js +27 -9
  12. package/dist/DatePicker/main.js +1 -1
  13. package/dist/DatePicker/typings.d.ts +1 -1
  14. package/dist/DateTimePicker/DateTimePicker.js +2 -2
  15. package/dist/Input/Input.1.d.ts +16 -0
  16. package/dist/Input/Input.1.js +376 -0
  17. package/dist/Input/Input.js +137 -121
  18. package/dist/Input/InputRange.js +1 -1
  19. package/dist/Input/TextArea.js +87 -12
  20. package/dist/Input/typings.d.ts +15 -5
  21. package/dist/Input/useComposition.d.ts +23 -0
  22. package/dist/Input/useComposition.js +63 -0
  23. package/dist/Input/utils.d.ts +6 -0
  24. package/dist/Input/utils.js +91 -0
  25. package/dist/InputNumber/InputNumber.js +1 -1
  26. package/dist/InputNumber/typings.d.ts +1 -1
  27. package/dist/Select/Option.js +30 -14
  28. package/dist/Select/SelectContext.d.ts +3 -4
  29. package/dist/Select/SelectCore.d.ts +2 -2
  30. package/dist/Select/SelectCore.js +164 -447
  31. package/dist/Select/SelectDropdown.js +67 -145
  32. package/dist/Select/typings.d.ts +47 -21
  33. package/dist/Select/useSelect.d.ts +125 -0
  34. package/dist/Select/useSelect.js +516 -0
  35. package/dist/Table/util.js +6 -5
  36. package/dist/Tag/Tag.js +22 -17
  37. package/dist/TimePicker/TimePicker.js +2 -2
  38. package/dist/TreeSelect/TreeSelect.js +2 -2
  39. package/dist/Util/aria.d.ts +25 -0
  40. package/dist/Util/aria.js +118 -0
  41. package/dist/hooks/useCalcInputWidth.d.ts +8 -0
  42. package/dist/hooks/useCalcInputWidth.js +30 -0
  43. package/dist/hooks/useComposition.d.ts +16 -0
  44. package/dist/hooks/useComposition.js +39 -0
  45. package/dist/hooks/useCursor.d.ts +2 -0
  46. package/dist/hooks/useCursor.js +52 -0
  47. package/dist/hooks/useFocusController.d.ts +27 -0
  48. package/dist/hooks/useFocusController.js +72 -0
  49. package/dist/index.css +1 -1
  50. package/dist/locale/en.d.ts +15 -0
  51. package/dist/locale/en.js +15 -0
  52. package/dist/locale/zhCn.d.ts +15 -0
  53. package/dist/locale/zhCn.js +15 -0
  54. package/package.json +1 -1
  55. package/theme-chalk/calendar/index.scss +1 -0
  56. package/theme-chalk/calendar/quarter-table.scss +78 -0
  57. package/theme-chalk/common/var.scss +1 -1
  58. package/theme-chalk/input/input.scss +424 -578
  59. package/theme-chalk/input/input.scss--bak +578 -0
  60. package/theme-chalk/select/index.scss +272 -247
  61. package/theme-chalk/select/index.scss--bak +247 -0
  62. package/theme-chalk/select/option-group.scss +2 -2
  63. package/theme-chalk/select/option.scss +2 -2
  64. package/theme-chalk/select/select-dropdown.scss +2 -2
  65. package/theme-chalk/tag.scss +181 -203
  66. package/theme-chalk/tag.scss--bak +203 -0
@@ -0,0 +1,376 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
3
+ var _excluded = ["name", "title", "prefix", "suffix", "prepend", "append", "error", "warning", "debounceInput", "debounceTime", "placeholder", "readOnly", "plain", "classPrefix", "onChange", "onClear", "showPassword", "onFocus", "onBlur", "maxLength", "showWordLimit", "hiddenValue", "defaultValue"];
4
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
11
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
13
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
15
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
16
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
18
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
19
+ import { useDebounceFn } from 'ahooks';
20
+ import classNames from 'classnames';
21
+ import { addClass, addStyle, hasClass, removeClass } from 'dom-lib';
22
+ import isObject from 'lodash/isObject';
23
+ import React, { cloneElement, forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
24
+ import Icon from "../Icon/Icon";
25
+ import { isNotEmpty, mergeDefaultProps } from "../Util";
26
+ import { partitionHTMLProps, useClassNames, useControlled, useDisabled, useSize } from "../hooks";
27
+ import InputGroup from "./InputGroup";
28
+ import InputRange from "./InputRange";
29
+ import TextArea from "./TextArea";
30
+ function InternalInput(props, ref) {
31
+ var _this = this;
32
+ props = mergeDefaultProps({
33
+ type: 'text',
34
+ placeholder: '请输入',
35
+ clearable: true,
36
+ debounceTime: 200,
37
+ defaultValue: ''
38
+ }, props);
39
+ var _props = props,
40
+ name = _props.name,
41
+ title = _props.title,
42
+ prefix = _props.prefix,
43
+ suffix = _props.suffix,
44
+ prepend = _props.prepend,
45
+ append = _props.append,
46
+ error = _props.error,
47
+ warning = _props.warning,
48
+ debounceInput = _props.debounceInput,
49
+ debounceTime = _props.debounceTime,
50
+ placeholder = _props.placeholder,
51
+ readOnly = _props.readOnly,
52
+ plain = _props.plain,
53
+ _props$classPrefix = _props.classPrefix,
54
+ classPrefix = _props$classPrefix === void 0 ? 'input' : _props$classPrefix,
55
+ onChange = _props.onChange,
56
+ onClear = _props.onClear,
57
+ showPassword = _props.showPassword,
58
+ _onFocus = _props.onFocus,
59
+ _onBlur = _props.onBlur,
60
+ maxLength = _props.maxLength,
61
+ showWordLimit = _props.showWordLimit,
62
+ hiddenValue = _props.hiddenValue,
63
+ defaultValue = _props.defaultValue,
64
+ rest = _objectWithoutProperties(_props, _excluded);
65
+ var _useClassNames = useClassNames(classPrefix),
66
+ b = _useClassNames.b,
67
+ e = _useClassNames.e,
68
+ m = _useClassNames.m,
69
+ is = _useClassNames.is;
70
+ var _partitionHTMLProps = partitionHTMLProps(rest),
71
+ _partitionHTMLProps2 = _slicedToArray(_partitionHTMLProps, 1),
72
+ htmlInputProps = _partitionHTMLProps2[0];
73
+ var _useControlled = useControlled(props.value, defaultValue),
74
+ _useControlled2 = _slicedToArray(_useControlled, 2),
75
+ value = _useControlled2[0],
76
+ setValue = _useControlled2[1];
77
+ var _useState = useState(props.type || 'text'),
78
+ _useState2 = _slicedToArray(_useState, 2),
79
+ type = _useState2[0],
80
+ setType = _useState2[1];
81
+ var disabled = useDisabled(props.disabled);
82
+ var size = useSize(props.size);
83
+ var containerRef = useRef(null);
84
+ var inputRef = useRef(null);
85
+ var contentRef = useRef(null);
86
+ var clearRef = useRef(null);
87
+ var suffixRef = useRef(null);
88
+ // 搜索框是否输入完毕
89
+ var inputOver = useRef(true);
90
+
91
+ // const containerRef = useMemo(() => props.containerRef ?? rootRef, [props.containerRef]);
92
+
93
+ /** 是否可清空 */
94
+ var clearable = useMemo(function () {
95
+ // 只读不显示清除按钮只有input组件适用,加上了那些引用input组件就无法显示清空按钮了,这里添加说明,下次别再添加了
96
+ return Boolean(showPassword ? false : props.clearable /* && !readOnly */);
97
+ }, [props.clearable, showPassword]);
98
+
99
+ /** 输入框尾部内容 */
100
+ var suffixSlot = useMemo(function () {
101
+ if (type === 'text' && maxLength && showWordLimit) {
102
+ return /*#__PURE__*/React.createElement("span", {
103
+ className: e(_templateObject || (_templateObject = _taggedTemplateLiteral(["count"])))
104
+ }, /*#__PURE__*/React.createElement("span", {
105
+ className: e(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["count-inner"])))
106
+ }, typeof value === 'string' ? value.length : 0, " / ", maxLength));
107
+ } else if (['text', 'password'].includes(type) && suffix) {
108
+ if (isObject(suffix)) {
109
+ var _nodeType;
110
+ var nodeType = suffix === null || suffix === void 0 ? void 0 : suffix.type;
111
+ nodeType = ((_nodeType = nodeType) === null || _nodeType === void 0 ? void 0 : _nodeType.displayName) || nodeType;
112
+ if (nodeType.toString().startsWith('Icon')) {
113
+ var _suffix$props;
114
+ return /*#__PURE__*/cloneElement(suffix, _objectSpread(_objectSpread({}, suffix.props), {}, {
115
+ className: classNames((_suffix$props = suffix.props) === null || _suffix$props === void 0 ? void 0 : _suffix$props.className, e(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["icon"]))))
116
+ }));
117
+ }
118
+ }
119
+ return suffix;
120
+ } else if (showPassword && isNotEmpty(value)) {
121
+ return /*#__PURE__*/React.createElement(Icon, {
122
+ name: type === 'text' ? 'eye' : 'eye-slash',
123
+ className: classNames(e(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["icon"]))), e(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["clear"]))))
124
+ });
125
+ }
126
+ return null;
127
+ }, [type, maxLength, showWordLimit, suffix, showPassword, value, e]);
128
+
129
+ /** 后缀是否可点击 */
130
+ var suffixCanClick = useMemo(function () {
131
+ if (showPassword) {
132
+ return true;
133
+ }
134
+ }, [showPassword]);
135
+ var showClear = useCallback(function (_value) {
136
+ if (clearable && isNotEmpty(_value) && !disabled && clearRef.current) {
137
+ addStyle(clearRef.current, 'display', '');
138
+ if (suffixRef.current) {
139
+ if (type === 'text' && maxLength && showWordLimit) {
140
+ return;
141
+ }
142
+ addStyle(suffixRef.current, 'display', 'none');
143
+ }
144
+ } else {
145
+ if (suffixRef.current) {
146
+ addStyle(suffixRef.current, 'display', '');
147
+ }
148
+ }
149
+ // addClass((ref ?? contentRef).current, m`suffix`);
150
+ }, [clearable, disabled, maxLength, showWordLimit, type]);
151
+ var hideClear = useCallback(function () {
152
+ if (clearRef.current) {
153
+ addStyle(clearRef.current, 'display', 'none');
154
+ }
155
+ if (suffixRef.current) {
156
+ addStyle(suffixRef.current, 'display', '');
157
+ }
158
+ // if (!suffixSlot) {
159
+ // removeClass((ref ?? contentRef).current, m`suffix`);
160
+ // }
161
+ }, []);
162
+
163
+ /** 在点击由 clearable 属性生成的清空按钮时触发 */
164
+ var handelClear = useCallback(function (event) {
165
+ event.stopPropagation();
166
+ setValue('');
167
+ if (clearRef.current) {
168
+ addStyle(clearRef.current, 'display', 'none');
169
+ }
170
+ hideClear();
171
+ if (!readOnly && !disabled) {
172
+ var _inputRef$current;
173
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
174
+ }
175
+ onClear === null || onClear === void 0 || onClear(event);
176
+ onChange === null || onChange === void 0 || onChange('', event);
177
+ }, [disabled, hideClear, onChange, onClear, readOnly, setValue]);
178
+
179
+ /** 后缀点击事件 */
180
+ var onClickSuffix = useCallback(function () {
181
+ if (showPassword) {
182
+ setType(type === 'text' ? 'password' : 'text');
183
+ }
184
+ }, [type, showPassword]);
185
+
186
+ /** 输入事件 */
187
+ var handleInput = useCallback(function (event) {
188
+ if (inputOver.current) {
189
+ // 让搜索变成异步的
190
+ setValue(event.target.value);
191
+ if (clearRef.current && clearable && isNotEmpty(event.target.value)) {
192
+ showClear(event.target.value);
193
+ } else {
194
+ hideClear();
195
+ }
196
+ onChange === null || onChange === void 0 || onChange(event.target.value, event);
197
+ }
198
+ }, [setValue, clearable, onChange, showClear, hideClear]);
199
+ var _useDebounceFn = useDebounceFn(handleInput, {
200
+ wait: debounceTime
201
+ }),
202
+ handleDebounceInput = _useDebounceFn.run;
203
+ var handleComposition = useCallback(function (event) {
204
+ var _type = event.type;
205
+ if (_type === 'compositionstart') {
206
+ inputOver.current = false;
207
+ } else if (_type === 'compositionend') {
208
+ inputOver.current = true;
209
+ handleInput(event);
210
+ }
211
+ }, [handleInput]);
212
+ useEffect(function () {
213
+ var input = inputRef.current;
214
+ if (input && debounceInput) {
215
+ input.addEventListener('compositionstart', handleComposition);
216
+ input.addEventListener('compositionupdate', handleComposition);
217
+ input.addEventListener('compositionend', handleComposition);
218
+ }
219
+ }, [debounceInput, handleComposition]);
220
+ useImperativeHandle(ref, function () {
221
+ return {
222
+ ref: containerRef,
223
+ input: inputRef,
224
+ getValue: function getValue() {
225
+ return value;
226
+ },
227
+ setValue: setValue,
228
+ onClear: handelClear,
229
+ clear: handelClear,
230
+ focus: function focus() {
231
+ var _inputRef$current2;
232
+ return (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
233
+ },
234
+ blur: function blur() {
235
+ var _inputRef$current3;
236
+ return (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.blur();
237
+ },
238
+ showClear: showClear,
239
+ hideClear: hideClear
240
+ };
241
+ });
242
+
243
+ /** 输入框头部内容 */
244
+ var preffixSlot = useMemo(function () {
245
+ if (['text', 'password'].includes(type) && prefix) {
246
+ if (isObject(prefix)) {
247
+ var _nodeType2;
248
+ var nodeType = prefix === null || prefix === void 0 ? void 0 : prefix.type;
249
+ nodeType = ((_nodeType2 = nodeType) === null || _nodeType2 === void 0 ? void 0 : _nodeType2.displayName) || nodeType;
250
+ if (nodeType.toString().startsWith('Icon')) {
251
+ var _prefix$props;
252
+ return /*#__PURE__*/cloneElement(prefix, _objectSpread(_objectSpread({}, prefix.props), {}, {
253
+ className: classNames((_prefix$props = prefix.props) === null || _prefix$props === void 0 ? void 0 : _prefix$props.className, e(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["icon"]))))
254
+ }));
255
+ }
256
+ }
257
+ return prefix;
258
+ }
259
+ return null;
260
+ }, [type, prefix, e]);
261
+ var content = useMemo(function () {
262
+ return type === 'hidden' ? /*#__PURE__*/React.createElement("input", _extends({
263
+ ref: inputRef,
264
+ type: "hidden",
265
+ name: name,
266
+ value: value,
267
+ disabled: disabled,
268
+ onChange: debounceInput ? handleDebounceInput : handleInput,
269
+ onClick: props.onClick,
270
+ className: props.className,
271
+ style: props.innerStyle
272
+ }, htmlInputProps)) : /*#__PURE__*/React.createElement("div", {
273
+ className: classNames(e(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["wrapper"]))), is({
274
+ error: error,
275
+ warning: warning
276
+ })),
277
+ ref: contentRef,
278
+ onMouseEnter: function onMouseEnter() {
279
+ return showClear(value);
280
+ },
281
+ onMouseLeave: function onMouseLeave() {
282
+ if (!hasClass(contentRef.current, is('focus'))) {
283
+ hideClear();
284
+ }
285
+ }
286
+ }, ['text', 'password'].includes(type) && preffixSlot && /*#__PURE__*/React.createElement("span", {
287
+ className: e(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["prefix"])))
288
+ }, /*#__PURE__*/React.createElement("span", {
289
+ className: e(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["prefix-inner"])))
290
+ }, preffixSlot, " ")), /*#__PURE__*/React.createElement("input", _extends({
291
+ ref: inputRef,
292
+ type: type,
293
+ name: name,
294
+ title: title,
295
+ value: hiddenValue ? '' : value,
296
+ className: e(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["inner"]))),
297
+ style: props.innerStyle,
298
+ placeholder: placeholder,
299
+ autoComplete: "off",
300
+ readOnly: readOnly,
301
+ disabled: disabled,
302
+ maxLength: maxLength,
303
+ onInput: handleInput,
304
+ onClick: props.onClick,
305
+ onFocus: function onFocus(event) {
306
+ if (contentRef.current) {
307
+ addClass(contentRef.current, is('focus'));
308
+ }
309
+ showClear(value);
310
+ _onFocus === null || _onFocus === void 0 || _onFocus.call(_this, event);
311
+ },
312
+ onBlur: function onBlur(event) {
313
+ if (contentRef.current) {
314
+ removeClass(contentRef.current, is('focus'));
315
+ }
316
+ hideClear();
317
+ _onBlur === null || _onBlur === void 0 || _onBlur.call(_this, event);
318
+ }
319
+ }, htmlInputProps)), /*#__PURE__*/React.createElement("span", {
320
+ ref: clearRef,
321
+ key: "clearIcon",
322
+ className: e(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["suffix"]))),
323
+ style: {
324
+ display: 'none'
325
+ },
326
+ onClick: handelClear
327
+ }, /*#__PURE__*/React.createElement("span", {
328
+ className: e(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["suffix-inner"])))
329
+ }, /*#__PURE__*/React.createElement(Icon, {
330
+ prefix: "fal",
331
+ name: "circle-xmark",
332
+ className: classNames(e(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["icon"]))), e(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["clear"])))),
333
+ onMouseDown: function onMouseDown(event) {
334
+ event.preventDefault();
335
+ event.stopPropagation();
336
+ }
337
+ }))), suffixSlot && /*#__PURE__*/React.createElement("span", {
338
+ ref: suffixRef,
339
+ key: "suffixSlot",
340
+ className: classNames(e(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["suffix"]))), _defineProperty({}, b('click', false), suffixCanClick)),
341
+ onClick: onClickSuffix
342
+ }, /*#__PURE__*/React.createElement("span", {
343
+ className: e(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["suffix-inner"])))
344
+ }, suffixSlot)));
345
+ }, [type, name, value, disabled, debounceInput, handleDebounceInput, handleInput, props.onClick, props.className, props.innerStyle, htmlInputProps, e, is, error, warning, preffixSlot, title, hiddenValue, placeholder, readOnly, maxLength, handelClear, suffixSlot, b, suffixCanClick, onClickSuffix, showClear, hideClear, _onFocus, _onBlur]);
346
+ if (append || prepend) {
347
+ return /*#__PURE__*/React.createElement(InputGroup, {
348
+ prepend: prepend,
349
+ append: append,
350
+ ref: containerRef,
351
+ className: classNames(_defineProperty({}, m(size), size), is({
352
+ disabled: disabled,
353
+ plain: plain
354
+ }), b(), props.className),
355
+ style: props.style
356
+ }, content);
357
+ } else {
358
+ return /*#__PURE__*/React.createElement("div", {
359
+ ref: containerRef,
360
+ className: classNames(b(), _defineProperty(_defineProperty(_defineProperty({}, m(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["prefix"]))), preffixSlot), m(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["suffix"]))), suffixSlot || clearable), m(size), size), is({
361
+ disabled: disabled,
362
+ plain: plain
363
+ }), props.className),
364
+ style: append || prepend ? {} : props.style,
365
+ onClick: function onClick(event) {
366
+ return event.stopPropagation();
367
+ }
368
+ }, content);
369
+ }
370
+ }
371
+ var ForwardInput = /*#__PURE__*/forwardRef(InternalInput);
372
+ var Input = ForwardInput;
373
+ Input.TextArea = TextArea;
374
+ Input.Range = InputRange;
375
+ Input.displayName = 'ElInput';
376
+ export default Input;