indicator-ui 0.0.222 → 0.0.223

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/dist/index.js CHANGED
@@ -22097,34 +22097,19 @@ __webpack_require__.r(__webpack_exports__);
22097
22097
  /* harmony export */ "default": () => (/* binding */ TextareaField)
22098
22098
  /* harmony export */ });
22099
22099
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
22100
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
22101
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
22102
- /* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
22103
- /* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/TextareaField/styles/index.ts");
22104
-
22100
+ /* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
22101
+ /* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/TextareaField/styles/index.ts");
22105
22102
 
22106
22103
 
22107
22104
 
22108
- function TextareaField({ value, name, placeholder, onChange, required = false, disabled = false, isError = false, offFocus = false, autoResize = false, additionStyles, }) {
22109
- const textareaRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
22110
- const resizeTextarea = () => {
22111
- if (autoResize) {
22112
- const textarea = textareaRef.current;
22113
- if (textarea) {
22114
- textarea.style.height = 'auto';
22115
- textarea.style.height = textarea.scrollHeight + 'px';
22116
- }
22117
- }
22118
- };
22119
- (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
22120
- resizeTextarea();
22121
- }, []);
22105
+ function TextareaField({ value, name, placeholder, onChange, required = false, disabled = false, isError = false, offFocus = false, additionStyles, }) {
22122
22106
  const handleOnChange = (e) => {
22123
22107
  e.preventDefault();
22124
22108
  onChange && onChange(e.target.value);
22125
- resizeTextarea();
22126
22109
  };
22127
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { name: name, placeholder: placeholder, value: value, onChange: handleOnChange, required: required, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(_styles__WEBPACK_IMPORTED_MODULE_3__.TextareaFieldStyle.textareaField, { [_styles__WEBPACK_IMPORTED_MODULE_3__.TextareaFieldStyle.isError]: isError }, additionStyles), ref: textareaRef }));
22110
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { name: name, placeholder: placeholder, value: value ?? undefined, onChange: handleOnChange, required: required, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.textareaField, {
22111
+ [_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.isError]: isError,
22112
+ }, additionStyles) }));
22128
22113
  }
22129
22114
 
22130
22115