@synerise/ds-input 1.6.9 → 1.6.10

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/CHANGELOG.md +4 -0
  2. package/dist/AutosizeInput/AutosizeInput.d.ts +2 -2
  3. package/dist/AutosizeInput/AutosizeInput.js +80 -95
  4. package/dist/AutosizeInput/AutosizeInput.types.d.ts +1 -1
  5. package/dist/AutosizeInput/AutosizeInput.types.js +1 -1
  6. package/dist/AutosizeInput/utils/calculateInputWidth.d.ts +1 -1
  7. package/dist/AutosizeInput/utils/calculateInputWidth.js +13 -11
  8. package/dist/AutosizeInput/utils/index.js +4 -1
  9. package/dist/Input.d.ts +5 -7
  10. package/dist/Input.js +117 -174
  11. package/dist/Input.styles.d.ts +22 -22
  12. package/dist/Input.styles.js +98 -122
  13. package/dist/Input.types.d.ts +5 -5
  14. package/dist/Input.types.js +1 -1
  15. package/dist/InputGroup.d.ts +2 -2
  16. package/dist/InputGroup.js +21 -38
  17. package/dist/InputGroup.styles.d.ts +2 -2
  18. package/dist/InputGroup.styles.js +8 -8
  19. package/dist/InputGroup.types.d.ts +2 -2
  20. package/dist/InputGroup.types.js +1 -1
  21. package/dist/InputMultivalue/Elements/Value.d.ts +2 -2
  22. package/dist/InputMultivalue/Elements/Value.js +22 -34
  23. package/dist/InputMultivalue/Elements/Value.types.d.ts +2 -2
  24. package/dist/InputMultivalue/Elements/Value.types.js +1 -1
  25. package/dist/InputMultivalue/InputMultivalue.d.ts +2 -2
  26. package/dist/InputMultivalue/InputMultivalue.js +52 -74
  27. package/dist/InputMultivalue/InputMultivalue.styles.d.ts +10 -10
  28. package/dist/InputMultivalue/InputMultivalue.styles.js +48 -67
  29. package/dist/InputMultivalue/InputMultivalue.types.d.ts +1 -1
  30. package/dist/InputMultivalue/InputMultivalue.types.js +1 -1
  31. package/dist/PasswordInput.d.ts +2 -2
  32. package/dist/PasswordInput.js +31 -45
  33. package/dist/PasswordInput.types.d.ts +2 -2
  34. package/dist/PasswordInput.types.js +1 -1
  35. package/dist/TextArea.d.ts +4 -6
  36. package/dist/TextArea.js +53 -75
  37. package/dist/TextArea.types.d.ts +2 -2
  38. package/dist/TextArea.types.js +1 -1
  39. package/dist/Textarea/Textarea.d.ts +4 -4
  40. package/dist/Textarea/Textarea.js +32 -51
  41. package/dist/Textarea/Textarea.styles.d.ts +2 -2
  42. package/dist/Textarea/Textarea.styles.js +10 -9
  43. package/dist/Textarea/Textarea.types.d.ts +3 -3
  44. package/dist/Textarea/Textarea.types.js +1 -1
  45. package/dist/assets/style/index-tn0RQdqM.css +0 -0
  46. package/dist/components/AutosizeWrapper.d.ts +2 -2
  47. package/dist/components/AutosizeWrapper.js +16 -18
  48. package/dist/components/ElementIcons.d.ts +2 -2
  49. package/dist/components/ElementIcons.js +37 -51
  50. package/dist/components/ExpandableWrapper.d.ts +3 -3
  51. package/dist/components/ExpandableWrapper.js +20 -21
  52. package/dist/components/index.js +8 -3
  53. package/dist/hooks/index.js +6 -2
  54. package/dist/hooks/useCounterLimit.d.ts +2 -2
  55. package/dist/hooks/useCounterLimit.js +19 -14
  56. package/dist/hooks/useElementFocus.d.ts +2 -2
  57. package/dist/hooks/useElementFocus.js +6 -3
  58. package/dist/hooks/useInputAddonHeight.d.ts +2 -2
  59. package/dist/hooks/useInputAddonHeight.js +10 -10
  60. package/dist/index.js +24 -12
  61. package/dist/modules.d.js +1 -1
  62. package/dist/modules.d.ts +0 -0
  63. package/dist/utils/getCharCount.d.ts +2 -2
  64. package/dist/utils/getCharCount.js +5 -2
  65. package/dist/utils/index.js +4 -1
  66. package/package.json +9 -9
package/dist/Input.js CHANGED
@@ -1,130 +1,127 @@
1
- var _excluded = ["className", "errorText", "label", "description", "counterLimit", "tooltip", "tooltipConfig", "icon1", "icon1Tooltip", "autoResize", "icon2", "icon2Tooltip", "resetMargin", "handleInputRef", "prefixel", "suffixel", "error", "expandable", "expandableTooltip", "renderCustomCounter", "autoResizeProps"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
- import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
5
- import { v4 as uuid } from 'uuid';
6
- import { useMergeRefs } from '@floating-ui/react';
7
- import '@synerise/ds-core/dist/js/style';
8
- import FormField from '@synerise/ds-form-field';
9
- import { useResizeObserver } from '@synerise/ds-utils';
10
- import * as S from './Input.styles';
11
- import { AutosizeWrapper, ElementIcons, ExpandableWrapper } from './components';
12
- import { useElementFocus, useInputAddonHeight } from './hooks';
13
- import { useCounterLimit } from './hooks/useCounterLimit';
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useMemo, useRef, useState, useEffect, useCallback } from "react";
3
+ import { v4 } from "uuid";
4
+ import { useMergeRefs } from "@floating-ui/react";
5
+ import FormField from "@synerise/ds-form-field";
6
+ import { useResizeObserver } from "@synerise/ds-utils";
7
+ import { AntdInput, AddonWrapper, OuterWrapper, InputWrapper } from "./Input.styles.js";
8
+ import { ElementIcons } from "./components/ElementIcons.js";
9
+ import { ExpandableWrapper } from "./components/ExpandableWrapper.js";
10
+ import { AutosizeWrapper } from "./components/AutosizeWrapper.js";
11
+ import { useElementFocus } from "./hooks/useElementFocus.js";
12
+ import { useInputAddonHeight } from "./hooks/useInputAddonHeight.js";
13
+ import { useCounterLimit } from "./hooks/useCounterLimit.js";
14
+ import { getCharCount } from "./utils/getCharCount.js";
15
+ import { default as default2 } from "./InputGroup.js";
16
+ import { default as default3 } from "./InputMultivalue/InputMultivalue.js";
14
17
  import "./style/index.css";
15
- import { getCharCount } from './utils';
16
- var VERTICAL_BORDER_OFFSET = 2;
17
- export var Input = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
18
- var className = _ref.className,
19
- errorText = _ref.errorText,
20
- label = _ref.label,
21
- description = _ref.description,
22
- counterLimit = _ref.counterLimit,
23
- tooltip = _ref.tooltip,
24
- tooltipConfig = _ref.tooltipConfig,
25
- icon1 = _ref.icon1,
26
- icon1Tooltip = _ref.icon1Tooltip,
27
- autoResize = _ref.autoResize,
28
- icon2 = _ref.icon2,
29
- icon2Tooltip = _ref.icon2Tooltip,
30
- resetMargin = _ref.resetMargin,
31
- handleInputRef = _ref.handleInputRef,
32
- prefixel = _ref.prefixel,
33
- suffixel = _ref.suffixel,
34
- error = _ref.error,
35
- expandable = _ref.expandable,
36
- expandableTooltip = _ref.expandableTooltip,
37
- renderCustomCounter = _ref.renderCustomCounter,
38
- autoResizeProps = _ref.autoResizeProps,
39
- antdInputProps = _objectWithoutPropertiesLoose(_ref, _excluded);
40
- var id = useMemo(function () {
41
- return uuid();
42
- }, []);
43
- var charCount = getCharCount(antdInputProps.value, counterLimit);
44
- var expandableTextAreaRef = useRef(null);
45
- var _useState = useState(false),
46
- expanded = _useState[0],
47
- setExpanded = _useState[1];
48
- var _useState2 = useState(false),
49
- overflown = _useState2[0],
50
- setOverflown = _useState2[1];
51
- var scrollLeftRef = useRef(0);
52
- var hasErrorMessage = Boolean(errorText);
53
- var paddingDiff = useRef();
54
- var inputRef = useRef(null);
55
- var autosizeRef = useRef(null);
56
- var externalRef = useRef(null);
57
- var elementRef = useRef(null);
58
- var mergedRef = useMergeRefs([elementRef, forwardedRef]);
59
- var iconCount = useMemo(function () {
18
+ const VERTICAL_BORDER_OFFSET = 2;
19
+ const Input = forwardRef(({
20
+ className,
21
+ errorText,
22
+ label,
23
+ description,
24
+ counterLimit,
25
+ tooltip,
26
+ tooltipConfig,
27
+ icon1,
28
+ icon1Tooltip,
29
+ autoResize,
30
+ icon2,
31
+ icon2Tooltip,
32
+ resetMargin,
33
+ handleInputRef,
34
+ prefixel,
35
+ suffixel,
36
+ error,
37
+ expandable,
38
+ expandableTooltip,
39
+ renderCustomCounter,
40
+ autoResizeProps,
41
+ ...antdInputProps
42
+ }, forwardedRef) => {
43
+ const id = useMemo(() => v4(), []);
44
+ const charCount = getCharCount(antdInputProps.value, counterLimit);
45
+ const expandableTextAreaRef = useRef(null);
46
+ const [expanded, setExpanded] = useState(false);
47
+ const [overflown, setOverflown] = useState(false);
48
+ const scrollLeftRef = useRef(0);
49
+ const hasErrorMessage = Boolean(errorText);
50
+ const paddingDiff = useRef();
51
+ const inputRef = useRef(null);
52
+ const autosizeRef = useRef(null);
53
+ const externalRef = useRef(null);
54
+ const elementRef = useRef(null);
55
+ const mergedRef = useMergeRefs([elementRef, forwardedRef]);
56
+ const iconCount = useMemo(() => {
60
57
  return Number(!!icon1) + Number(!!icon2) + Number(!!expandable);
61
58
  }, [icon1, icon2, expandable]);
62
- var handleIconsClick = useElementFocus(inputRef);
63
- var _useInputAddonHeight = useInputAddonHeight(inputRef),
64
- inputAddonHeight = _useInputAddonHeight.inputAddonHeight;
65
- useEffect(function () {
59
+ const handleIconsClick = useElementFocus(inputRef);
60
+ const {
61
+ inputAddonHeight
62
+ } = useInputAddonHeight(inputRef);
63
+ useEffect(() => {
66
64
  if (inputRef.current) {
67
65
  externalRef.current = inputRef.current.input;
68
66
  }
69
67
  handleInputRef && handleInputRef(externalRef);
70
68
  }, [handleInputRef]);
71
- useEffect(function () {
69
+ useEffect(() => {
72
70
  if (autosizeRef.current) {
73
71
  externalRef.current = autosizeRef.current.inputRef.current;
74
72
  handleInputRef && handleInputRef(externalRef);
75
73
  }
76
74
  }, [handleInputRef]);
77
- useEffect(function () {
78
- var _inputRef$current;
79
- if ((_inputRef$current = inputRef.current) != null && _inputRef$current.input) {
80
- var _getComputedStyle = getComputedStyle(inputRef.current.input),
81
- paddingLeft = _getComputedStyle.paddingLeft,
82
- paddingRight = _getComputedStyle.paddingRight;
75
+ useEffect(() => {
76
+ if (inputRef.current?.input) {
77
+ const {
78
+ paddingLeft,
79
+ paddingRight
80
+ } = getComputedStyle(inputRef.current.input);
83
81
  paddingDiff.current = parseFloat(paddingLeft) + parseFloat(paddingRight);
84
82
  }
85
83
  });
86
- useEffect(function () {
87
- var _inputRef$current2;
88
- if (!autoResize && expandable && (_inputRef$current2 = inputRef.current) != null && _inputRef$current2.input) {
84
+ useEffect(() => {
85
+ if (!autoResize && expandable && inputRef.current?.input) {
89
86
  setOverflown(inputRef.current.input.scrollWidth > inputRef.current.input.clientWidth);
90
87
  }
91
88
  }, [autoResize, expandable, expanded]);
92
- var handleTextareaChange = function handleTextareaChange(event) {
93
- var newValue = event.currentTarget.value;
89
+ const handleTextareaChange = (event) => {
90
+ const {
91
+ value: newValue
92
+ } = event.currentTarget;
94
93
  if (counterLimit && newValue.length > counterLimit) {
95
94
  return;
96
95
  }
97
96
  antdInputProps.onChange && antdInputProps.onChange(event);
98
97
  };
99
- var handleExpandableTextareaBlur = function handleExpandableTextareaBlur(event) {
100
- var _inputRef$current3;
98
+ const handleExpandableTextareaBlur = (event) => {
101
99
  setExpanded(false);
102
- if ((_inputRef$current3 = inputRef.current) != null && _inputRef$current3.input) {
100
+ if (inputRef.current?.input) {
103
101
  inputRef.current.input.value = event.target.value;
104
102
  inputRef.current.input.focus();
105
103
  }
106
104
  };
107
- var handleExpandIconClick = function handleExpandIconClick(event) {
105
+ const handleExpandIconClick = (event) => {
108
106
  event.stopPropagation();
109
107
  if (inputRef.current && expandableTextAreaRef.current) {
110
- var _inputRef$current$inp;
111
- // @ts-expect-error Property 'value' does not exist on type 'TextAreaRef'.
112
- expandableTextAreaRef.current.value = (_inputRef$current$inp = inputRef.current.input) == null ? void 0 : _inputRef$current$inp.value;
108
+ expandableTextAreaRef.current.value = inputRef.current.input?.value;
113
109
  expandableTextAreaRef.current.focus();
114
110
  }
115
111
  setExpanded(true);
116
112
  };
117
- useEffect(function () {
113
+ useEffect(() => {
118
114
  if (expanded) {
119
115
  expandableTextAreaRef.current && expandableTextAreaRef.current.focus();
120
116
  }
121
117
  }, [expandableTextAreaRef, expanded]);
122
- var handleChange = useCallback(function (event) {
123
- var _event$currentTarget = event.currentTarget,
124
- newValue = _event$currentTarget.value,
125
- scrollWidth = _event$currentTarget.scrollWidth,
126
- clientWidth = _event$currentTarget.clientWidth;
127
- var isNowOverflown = scrollWidth > clientWidth;
118
+ const handleChange = useCallback((event) => {
119
+ const {
120
+ value: newValue,
121
+ scrollWidth,
122
+ clientWidth
123
+ } = event.currentTarget;
124
+ const isNowOverflown = scrollWidth > clientWidth;
128
125
  if (!autoResize && expandable && isNowOverflown !== overflown) {
129
126
  setOverflown(isNowOverflown);
130
127
  }
@@ -133,102 +130,48 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
133
130
  }
134
131
  antdInputProps.onChange && antdInputProps.onChange(event);
135
132
  }, [antdInputProps, autoResize, counterLimit, expandable, overflown]);
136
- var stretchToFit = autoResize && autoResize !== true && Boolean(autoResize.stretchToFit);
137
- var preAutosize = useCallback(function () {
138
- var _inputRef$current4, _inputRef$current5;
139
- scrollLeftRef.current = ((_inputRef$current4 = inputRef.current) == null || (_inputRef$current4 = _inputRef$current4.input) == null ? void 0 : _inputRef$current4.scrollLeft) || 0;
140
- ((_inputRef$current5 = inputRef.current) == null ? void 0 : _inputRef$current5.input) && inputRef.current.input.style.removeProperty('max-width');
133
+ const stretchToFit = autoResize && autoResize !== true && Boolean(autoResize.stretchToFit);
134
+ const preAutosize = useCallback(() => {
135
+ scrollLeftRef.current = inputRef.current?.input?.scrollLeft || 0;
136
+ inputRef.current?.input && inputRef.current.input.style.removeProperty("max-width");
141
137
  }, []);
142
- var onAutosize = useCallback(function (newWidth) {
143
- var _inputRef$current6, _inputRef$current7;
144
- var parentRect = elementRef.current && elementRef.current.getBoundingClientRect();
145
- if (stretchToFit && (_inputRef$current6 = inputRef.current) != null && _inputRef$current6.input && parentRect != null && parentRect.width && paddingDiff.current) {
146
- inputRef.current.input.style.maxWidth = (parentRect == null ? void 0 : parentRect.width) - paddingDiff.current + "px";
138
+ const onAutosize = useCallback((newWidth) => {
139
+ const parentRect = elementRef.current && elementRef.current.getBoundingClientRect();
140
+ if (stretchToFit && inputRef.current?.input && parentRect?.width && paddingDiff.current) {
141
+ inputRef.current.input.style.maxWidth = `${parentRect?.width - paddingDiff.current}px`;
147
142
  inputRef.current.input.scrollLeft = scrollLeftRef.current;
148
143
  }
149
- if (newWidth !== undefined && autoResize && (_inputRef$current7 = inputRef.current) != null && _inputRef$current7.input && expandable) {
150
- var style = window.getComputedStyle(inputRef.current.input);
151
- var minWidth = parseInt(style.minWidth, 10);
144
+ if (newWidth !== void 0 && autoResize && inputRef.current?.input && expandable) {
145
+ const style = window.getComputedStyle(inputRef.current.input);
146
+ const minWidth = parseInt(style.minWidth, 10);
152
147
  setOverflown(newWidth > minWidth);
153
148
  }
154
149
  }, [autoResize, expandable, stretchToFit]);
155
- var handleWrapperResize = useCallback(function () {
150
+ const handleWrapperResize = useCallback(() => {
156
151
  preAutosize();
157
152
  onAutosize();
158
153
  }, [onAutosize, preAutosize]);
159
154
  useResizeObserver(elementRef, handleWrapperResize);
160
- var rightSide = useCounterLimit({
161
- renderCustomCounter: renderCustomCounter,
162
- counterLimit: counterLimit,
163
- charCount: charCount
155
+ const rightSide = useCounterLimit({
156
+ renderCustomCounter,
157
+ counterLimit,
158
+ charCount
164
159
  });
165
- var autoSizedComponent = /*#__PURE__*/React.createElement(AutosizeWrapper, _extends({}, autoResizeProps, {
166
- preAutosize: preAutosize,
167
- onAutosize: onAutosize,
168
- value: antdInputProps.value,
169
- autoResize: !!autoResize
170
- }), /*#__PURE__*/React.createElement(S.AntdInput, _extends({
171
- autoResize: autoResize,
172
- "data-testid": "input-autosize-input"
173
- }, antdInputProps, {
174
- className: hasErrorMessage || error ? 'error' : undefined,
175
- addonBefore: !!prefixel && /*#__PURE__*/React.createElement(S.AddonWrapper, {
176
- className: "ds-input-prefix",
177
- height: inputAddonHeight - VERTICAL_BORDER_OFFSET
178
- }, prefixel),
179
- addonAfter: !!suffixel && /*#__PURE__*/React.createElement(S.AddonWrapper, {
180
- className: "ds-input-suffix",
181
- height: inputAddonHeight - VERTICAL_BORDER_OFFSET
182
- }, suffixel),
183
- error: hasErrorMessage || error,
184
- onChange: handleChange,
185
- value: antdInputProps.value,
186
- autoComplete: "off",
187
- id: id,
188
- ref: inputRef
189
- })));
190
- return /*#__PURE__*/React.createElement(S.OuterWrapper, {
191
- ref: mergedRef,
192
- autoResize: autoResize,
193
- className: className,
194
- resetMargin: resetMargin,
195
- iconCount: iconCount
196
- }, /*#__PURE__*/React.createElement(FormField, {
197
- label: label,
198
- rightSide: rightSide,
199
- id: id,
200
- tooltip: tooltip,
201
- tooltipConfig: tooltipConfig,
202
- description: description,
203
- errorText: errorText
204
- }, /*#__PURE__*/React.createElement(S.InputWrapper, {
205
- iconCount: iconCount
206
- }, /*#__PURE__*/React.createElement(ElementIcons, {
207
- handleIconsClick: handleIconsClick,
208
- disabled: antdInputProps.disabled,
209
- icon1: icon1,
210
- icon2: icon2,
211
- icon1Tooltip: icon1Tooltip,
212
- icon2Tooltip: icon2Tooltip,
213
- className: className,
214
- type: "input",
215
- expandable: expandable,
216
- overflown: overflown,
217
- handleExpandIconClick: handleExpandIconClick,
218
- expandableTooltip: expandableTooltip
219
- }), expandable ? /*#__PURE__*/React.createElement(ExpandableWrapper, {
220
- onChange: handleTextareaChange,
221
- onBlur: handleExpandableTextareaBlur,
222
- ref: expandableTextAreaRef,
223
- value: antdInputProps.value,
224
- expanded: expanded
225
- }, autoSizedComponent) : autoSizedComponent)));
160
+ const autoSizedComponent = /* @__PURE__ */ jsx(AutosizeWrapper, { ...autoResizeProps, preAutosize, onAutosize, value: antdInputProps.value, autoResize: !!autoResize, children: /* @__PURE__ */ jsx(AntdInput, { autoResize, "data-testid": "input-autosize-input", ...antdInputProps, className: hasErrorMessage || error ? "error" : void 0, addonBefore: !!prefixel && /* @__PURE__ */ jsx(AddonWrapper, { className: "ds-input-prefix", height: inputAddonHeight - VERTICAL_BORDER_OFFSET, children: prefixel }), addonAfter: !!suffixel && /* @__PURE__ */ jsx(AddonWrapper, { className: "ds-input-suffix", height: inputAddonHeight - VERTICAL_BORDER_OFFSET, children: suffixel }), error: hasErrorMessage || error, onChange: handleChange, value: antdInputProps.value, autoComplete: "off", id, ref: inputRef }) });
161
+ return /* @__PURE__ */ jsx(OuterWrapper, { ref: mergedRef, autoResize, className, resetMargin, iconCount, children: /* @__PURE__ */ jsx(FormField, { label, rightSide, id, tooltip, tooltipConfig, description, errorText, children: /* @__PURE__ */ jsxs(InputWrapper, { iconCount, children: [
162
+ /* @__PURE__ */ jsx(ElementIcons, { handleIconsClick, disabled: antdInputProps.disabled, icon1, icon2, icon1Tooltip, icon2Tooltip, className, type: "input", expandable, overflown, handleExpandIconClick, expandableTooltip }),
163
+ expandable ? /* @__PURE__ */ jsx(ExpandableWrapper, { onChange: handleTextareaChange, onBlur: handleExpandableTextareaBlur, ref: expandableTextAreaRef, value: antdInputProps.value, expanded, children: autoSizedComponent }) : autoSizedComponent
164
+ ] }) }) });
226
165
  });
227
- export var RawInput = function RawInput(props) {
228
- var error = props.error;
229
- return /*#__PURE__*/React.createElement(S.AntdInput, _extends({
230
- className: error ? 'error' : ''
231
- }, props));
166
+ const RawInput = (props) => {
167
+ const {
168
+ error
169
+ } = props;
170
+ return /* @__PURE__ */ jsx(AntdInput, { className: error ? "error" : "", ...props });
171
+ };
172
+ export {
173
+ Input,
174
+ default2 as InputGroup,
175
+ default3 as InputMultivalue,
176
+ RawInput
232
177
  };
233
- export { default as InputGroup } from './InputGroup';
234
- export { default as InputMultivalue } from './InputMultivalue/InputMultivalue';
@@ -1,30 +1,30 @@
1
- import { type SizeType } from 'antd/es/config-provider/SizeContext';
2
- import { type InputProps, type InputRef } from 'antd/lib/input';
3
- import { type TextAreaProps, type TextAreaRef } from 'antd/lib/input/TextArea';
4
- import React from 'react';
5
- import { type FlattenSimpleInterpolation } from 'styled-components';
6
- import type { AutoResizeProp } from './Input.types';
1
+ import { SizeType } from 'antd/es/config-provider/SizeContext';
2
+ import { InputProps, InputRef } from 'antd/lib/input';
3
+ import { TextAreaProps, TextAreaRef } from 'antd/lib/input/TextArea';
4
+ import { default as React } from 'react';
5
+ import { FlattenSimpleInterpolation } from 'styled-components';
6
+ import { AutoResizeProp } from './Input.types';
7
7
  type AutoSizeConfProps = {
8
8
  autoResize?: AutoResizeProp;
9
9
  boxSizing?: 'content-box' | 'border-box';
10
10
  iconCount?: number;
11
11
  };
12
12
  export declare function autoresizeConfObjToCss({ autoResize, iconCount, boxSizing, }: AutoSizeConfProps): FlattenSimpleInterpolation | "";
13
- export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
14
- export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, {
13
+ export declare const Wrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
14
+ export declare const InputWrapper: import('styled-components').StyledComponent<"div", any, {
15
15
  iconCount?: number;
16
16
  }, never>;
17
- export declare const OuterWrapper: import("styled-components").StyledComponent<"div", any, {
17
+ export declare const OuterWrapper: import('styled-components').StyledComponent<"div", any, {
18
18
  resetMargin?: boolean;
19
19
  } & AutoSizeConfProps, never>;
20
- export declare const IconsWrapper: import("styled-components").StyledComponent<"div", any, {
20
+ export declare const IconsWrapper: import('styled-components').StyledComponent<"div", any, {
21
21
  disabled?: boolean;
22
22
  }, never>;
23
- export declare const IconsFlexContainer: import("styled-components").StyledComponent<"div", any, {
23
+ export declare const IconsFlexContainer: import('styled-components').StyledComponent<"div", any, {
24
24
  type: string;
25
25
  }, never>;
26
- export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
27
- export declare const AntdInput: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<InputProps & {
26
+ export declare const IconWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
27
+ export declare const AntdInput: import('styled-components').StyledComponent<React.ForwardRefExoticComponent<InputProps & {
28
28
  error?: boolean;
29
29
  size?: SizeType;
30
30
  } & React.RefAttributes<InputRef>>, any, {
@@ -33,21 +33,21 @@ export declare const AntdInput: import("styled-components").StyledComponent<Reac
33
33
  autoResize?: AutoResizeProp;
34
34
  disabled?: boolean;
35
35
  }, never>;
36
- export declare const AntdTextArea: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<TextAreaProps & {
36
+ export declare const AntdTextArea: import('styled-components').StyledComponent<React.ForwardRefExoticComponent<TextAreaProps & {
37
37
  error?: boolean;
38
38
  } & React.RefAttributes<TextAreaRef>>, any, {
39
39
  error?: boolean;
40
40
  }, never>;
41
- export declare const ExpandableWrapper: import("styled-components").StyledComponent<"div", any, {
41
+ export declare const ExpandableWrapper: import('styled-components').StyledComponent<"div", any, {
42
42
  expanded: boolean;
43
43
  }, never>;
44
- export declare const ContentBelow: import("styled-components").StyledComponent<"div", any, {}, never>;
45
- export declare const ErrorText: import("styled-components").StyledComponent<"div", any, {}, never>;
46
- export declare const Label: import("styled-components").StyledComponent<"label", any, {}, never>;
47
- export declare const Counter: import("styled-components").StyledComponent<"div", any, {}, never>;
48
- export declare const Description: import("styled-components").StyledComponent<"div", any, {}, never>;
49
- export declare const ContentAbove: import("styled-components").StyledComponent<"div", any, {}, never>;
50
- export declare const AddonWrapper: import("styled-components").StyledComponent<"div", any, {
44
+ export declare const ContentBelow: import('styled-components').StyledComponent<"div", any, {}, never>;
45
+ export declare const ErrorText: import('styled-components').StyledComponent<"div", any, {}, never>;
46
+ export declare const Label: import('styled-components').StyledComponent<"label", any, {}, never>;
47
+ export declare const Counter: import('styled-components').StyledComponent<"div", any, {}, never>;
48
+ export declare const Description: import('styled-components').StyledComponent<"div", any, {}, never>;
49
+ export declare const ContentAbove: import('styled-components').StyledComponent<"div", any, {}, never>;
50
+ export declare const AddonWrapper: import('styled-components').StyledComponent<"div", any, {
51
51
  height: number;
52
52
  }, never>;
53
53
  export {};