@semcore/bulk-textarea 1.5.0-prerelease.0 → 1.5.0-prerelease.1

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 (48) hide show
  1. package/lib/cjs/BulkTextarea.js +38 -35
  2. package/lib/cjs/BulkTextarea.js.map +1 -1
  3. package/lib/cjs/BulkTextarea.types.js.map +1 -1
  4. package/lib/cjs/components/ClearAll.js +2 -2
  5. package/lib/cjs/components/ClearAll.js.map +1 -1
  6. package/lib/cjs/components/Counter.js +5 -5
  7. package/lib/cjs/components/Counter.js.map +1 -1
  8. package/lib/cjs/components/ErrorsNavigation.js +14 -14
  9. package/lib/cjs/components/ErrorsNavigation.js.map +1 -1
  10. package/lib/cjs/components/InputField/InputField.js +167 -219
  11. package/lib/cjs/components/InputField/InputField.js.map +1 -1
  12. package/lib/cjs/components/InputField/InputField.types.js.map +1 -1
  13. package/lib/cjs/components/InputField/inputField.shadow.css +18 -56
  14. package/lib/cjs/index.js +1 -1
  15. package/lib/cjs/index.js.map +1 -1
  16. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +5 -4
  17. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  18. package/lib/es6/BulkTextarea.js +32 -31
  19. package/lib/es6/BulkTextarea.js.map +1 -1
  20. package/lib/es6/BulkTextarea.types.js.map +1 -1
  21. package/lib/es6/components/ClearAll.js +2 -2
  22. package/lib/es6/components/ClearAll.js.map +1 -1
  23. package/lib/es6/components/Counter.js +2 -2
  24. package/lib/es6/components/Counter.js.map +1 -1
  25. package/lib/es6/components/ErrorsNavigation.js +10 -10
  26. package/lib/es6/components/ErrorsNavigation.js.map +1 -1
  27. package/lib/es6/components/InputField/InputField.js +165 -219
  28. package/lib/es6/components/InputField/InputField.js.map +1 -1
  29. package/lib/es6/components/InputField/InputField.types.js.map +1 -1
  30. package/lib/es6/components/InputField/inputField.shadow.css +18 -56
  31. package/lib/es6/index.js.map +1 -1
  32. package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
  33. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  34. package/lib/esm/BulkTextarea.mjs +35 -33
  35. package/lib/esm/components/ClearAll.mjs +1 -1
  36. package/lib/esm/components/Counter.mjs +2 -2
  37. package/lib/esm/components/ErrorsNavigation.mjs +4 -4
  38. package/lib/esm/components/InputField/InputField.mjs +136 -181
  39. package/lib/esm/components/InputField/inputField.shadow.css +18 -56
  40. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
  41. package/lib/types/BulkTextarea.d.ts +1 -1
  42. package/lib/types/BulkTextarea.types.d.ts +8 -113
  43. package/lib/types/components/ClearAll.d.ts +2 -2
  44. package/lib/types/components/Counter.d.ts +4 -4
  45. package/lib/types/components/ErrorsNavigation.d.ts +2 -2
  46. package/lib/types/components/InputField/InputField.d.ts +7 -12
  47. package/lib/types/components/InputField/InputField.types.d.ts +125 -11
  48. package/package.json +10 -10
@@ -1,99 +1,84 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.InputField = void 0;
8
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
9
  var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
13
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
14
14
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
+ var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
15
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
+ var _index = require("@semcore/utils/lib/core/index");
16
18
  var _core = require("@semcore/core");
17
- var _baseComponents = require("@semcore/base-components");
18
- var _ariaProps = require("@semcore/core/lib/utils/ariaProps");
19
- var _uniqueID = _interopRequireDefault(require("@semcore/core/lib/utils/uniqueID"));
19
+ var _react = _interopRequireDefault(require("react"));
20
+ var _flexBox = require("@semcore/flex-box");
20
21
  var _tooltip = _interopRequireDefault(require("@semcore/tooltip"));
22
+ var _ariaProps = require("@semcore/utils/lib/ariaProps");
23
+ var _uniqueID = _interopRequireDefault(require("@semcore/utils/lib/uniqueID"));
21
24
  var _dompurify = _interopRequireDefault(require("dompurify"));
22
- var _react = _interopRequireDefault(require("react"));
23
25
  /*!__reshadow-styles__:"./inputField.shadow.css"*/
24
- var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SInputField_w0knh_gg_>div{box-sizing:content-box;outline:0;border-radius:var(--intergalactic-control-rounded, 6px);border-color:var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161));border-style:solid;border-width:1px;overflow:auto;position:relative;background-color:var(--intergalactic-bg-primary-neutral, rgb(255, 255, 255));color:var(--intergalactic-text-primary, rgba(1, 5, 0, 0.899));word-wrap:break-word;word-break:break-word;font-family:inherit}@supports (color:color(display-p3 0 0 0%)){.___SInputField_w0knh_gg_>div{border-color:var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@media (color-gamut:p3){.___SInputField_w0knh_gg_>div{border-color:var(--intergalactic-border-primary, color(display-p3 0.00798 0.04498 0.03219 / 0.161))}}}.___SInputField_w0knh_gg_>div:empty::before{content:\"1. \"attr(placeholder);color:var(--intergalactic-text-placeholder, rgba(0, 5, 2, 0.457));position:absolute}.___SInputField_w0knh_gg_>div:nth-child(even){color:red;counter-increment:row;margin-bottom:var(--intergalactic-spacing-1x, 4px);position:relative;word-break:break-all}.___SInputField_w0knh_gg_>div:nth-child(even)::before{content:counter(row)\".\";display:inline-block;white-space:nowrap;text-align:right;color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583));margin-right:var(--intergalactic-spacing-1x, 4px)}@supports (color:color(display-p3 0 0 0%)){.___SInputField_w0knh_gg_>div:nth-child(even)::before{color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583))}@media (color-gamut:p3){.___SInputField_w0knh_gg_>div:nth-child(even)::before{color:var(--intergalactic-text-secondary, color(display-p3 0.00228 0.01289 0.00252 / 0.583))}}}.___SInputField_w0knh_gg_>div>p{counter-increment:row;margin:0 0 var(--intergalactic-spacing-1x, 4px)0;position:relative;word-break:break-all;white-space:pre-wrap;padding:0 var(--intergalactic-spacing-5x, 20px)0 var(--intergalactic-spacing-4x, 16px)}.___SInputField_w0knh_gg_>div>p:last-of-type{margin-bottom:0}.___SInputField_w0knh_gg_>div>p:not(:empty)::before{content:counter(row)\".\";display:inline-block;white-space:nowrap;text-align:right;color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583));margin-right:var(--intergalactic-spacing-1x, 4px);position:absolute;left:0}@supports (color:color(display-p3 0 0 0%)){.___SInputField_w0knh_gg_>div>p:not(:empty)::before{color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583))}@media (color-gamut:p3){.___SInputField_w0knh_gg_>div>p:not(:empty)::before{color:var(--intergalactic-text-secondary, color(display-p3 0.00228 0.01289 0.00252 / 0.583))}}}.___SInputField_w0knh_gg_>div>p[data-over-max-rows=true]{background-color:var(--intergalactic-bg-secondary-critical, rgb(255, 235, 239))}@supports (color:color(display-p3 0 0 0%)){.___SInputField_w0knh_gg_>div>p[data-over-max-rows=true]{background-color:var(--intergalactic-bg-secondary-critical, rgb(255, 235, 239))}@media (color-gamut:p3){.___SInputField_w0knh_gg_>div>p[data-over-max-rows=true]{background-color:var(--intergalactic-bg-secondary-critical, color(display-p3 1 0.92002 0.9342))}}}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+10))>p{padding-left:var(--intergalactic-spacing-6x, 24px)}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+10))>p:nth-child(-n+9)::before{padding-left:var(--intergalactic-spacing-2x, 8px)}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+100))>p{padding-left:var(--intergalactic-spacing-8x, 32px)}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+100))>p:nth-child(-n+9)::before{padding-left:var(--intergalactic-spacing-4x, 16px)}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+100))>p:nth-child(n+10)::before{padding-left:var(--intergalactic-spacing-2x, 8px)}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+100))>p:nth-child(n+100)::before{padding-left:0}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+1000))>p{padding-left:calc(var(--intergalactic-spacing-10x, 40px) + var(--intergalactic-spacing-1x, 4px))}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+1000))>p:nth-child(-n+9)::before{padding-left:var(--intergalactic-spacing-6x, 24px)}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+1000))>p:nth-child(n+10)::before{padding-left:var(--intergalactic-spacing-4x, 16px)}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+1000))>p:nth-child(n+100)::before{padding-left:var(--intergalactic-spacing-2x, 8px)}.___SInputField_w0knh_gg_>div:has(p:nth-child(n+1000))>p:nth-child(n+1000)::before{padding-left:0}.___SInputField_w0knh_gg_.__showErrors_w0knh_gg_>div[aria-invalid]>p[aria-invalid]:after{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBmaWxsPSIjZDEwMDJmIj48cGF0aCBkPSJNNyA2aDJ2NEg3VjZabTIgN3YtMkg3djJoMloiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYuMTUyIDEuMTcyYy43MTktMS41NjMgMi45NzctMS41NjMgMy42OTYgMGw2LjA0MyAxMy4xNDFjLjM2My43OTEtLjIyNSAxLjY4Ny0xLjEwOSAxLjY4N0gxLjIxOGMtLjg4NCAwLTEuNDcyLS44OTYtMS4xMDktMS42ODdMNi4xNTIgMS4xNzJabTcuMzc0IDEyLjgzN0w4IDEuOTkgMi40NzQgMTQuMDFoMTEuMDUyWiIvPjwvc3ZnPgo=\\ );position:absolute;right:0;top:var(--intergalactic-spacing-05x, 2px)}.___SInputField_w0knh_gg_._size_m_w0knh_gg_>div{padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);min-height:calc(var(--minRows_w0knh)*20px);max-height:calc((var(--maxRows_w0knh) - 1)*(20px + var(--intergalactic-spacing-1x, 4px)) + 18px)}.___SInputField_w0knh_gg_._size_m_w0knh_gg_>div:empty{padding-left:var(--intergalactic-spacing-8x, 32px)}.___SInputField_w0knh_gg_._size_l_w0knh_gg_>div:empty::before,.___SInputField_w0knh_gg_._size_m_w0knh_gg_>div:empty::before{left:var(--intergalactic-spacing-4x, 16px)}.___SInputField_w0knh_gg_._size_l_w0knh_gg_>div{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);min-height:calc(var(--minRows_w0knh)*24px);max-height:calc((var(--maxRows_w0knh) - 1)*(24px + var(--intergalactic-spacing-1x, 4px)) + 20px)}.___SInputField_w0knh_gg_._size_l_w0knh_gg_>div:empty{padding-left:calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-05x, 2px))}.___SInputField_w0knh_gg_._state_normal_w0knh_gg_:not(.__disabled_w0knh_gg_)>div:focus{border-color:var(--intergalactic-border-info-active, rgba(0, 22, 195, 0.386));outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;outline-offset:0;transition-property:outline-color,outline-width}@supports (color:color(display-p3 0 0 0%)){.___SInputField_w0knh_gg_._state_normal_w0knh_gg_:not(.__disabled_w0knh_gg_)>div:focus{border-color:var(--intergalactic-border-info-active, rgba(0, 22, 195, 0.386))}@media (color-gamut:p3){.___SInputField_w0knh_gg_._state_normal_w0knh_gg_:not(.__disabled_w0knh_gg_)>div:focus{border-color:var(--intergalactic-border-info-active, color(display-p3 0.01805 0.08334 0.73488 / 0.386))}}}.___SInputField_w0knh_gg_._state_valid_w0knh_gg_>div{border-color:var(--intergalactic-border-success-active, rgb(0, 204, 154))}@supports (color:color(display-p3 0 0 0%)){.___SInputField_w0knh_gg_._state_valid_w0knh_gg_>div{border-color:var(--intergalactic-border-success-active, rgb(0, 204, 154))}@media (color-gamut:p3){.___SInputField_w0knh_gg_._state_valid_w0knh_gg_>div{border-color:var(--intergalactic-border-success-active, color(display-p3 0.36013 0.78771 0.61714))}}}.___SInputField_w0knh_gg_._state_valid_w0knh_gg_>div:focus{border-color:var(--intergalactic-border-success-active, rgb(0, 204, 154));outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;outline-offset:0;transition-property:outline-color,outline-width}@supports (color:color(display-p3 0 0 0%)){.___SInputField_w0knh_gg_._state_valid_w0knh_gg_>div:focus{border-color:var(--intergalactic-border-success-active, rgb(0, 204, 154))}@media (color-gamut:p3){.___SInputField_w0knh_gg_._state_valid_w0knh_gg_>div:focus{border-color:var(--intergalactic-border-success-active, color(display-p3 0.36013 0.78771 0.61714))}}}@supports (color:oklab(0%0 0%)){.___SInputField_w0knh_gg_._state_valid_w0knh_gg_>div:focus{outline-color:var(--intergalactic-keyboard-focus-valid-outline, rgb(0, 190, 142))}@media (color-gamut:p3){.___SInputField_w0knh_gg_._state_valid_w0knh_gg_>div:focus{outline-color:var(--intergalactic-keyboard-focus-valid-outline, oklch(0.711 0.146 166.9))}}}.___SInputField_w0knh_gg_._state_invalid_w0knh_gg_>div{border-color:var(--intergalactic-border-critical-active, rgba(255, 0, 4, 0.56));background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(255, 0, 4, 0.56) 0, rgba(255, 0, 4, 0.56) 1px, transparent 0, transparent 50%));background-size:6px 6px;background-color:var(--intergalactic-bg-primary-neutral, rgb(255, 255, 255));border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:var(--intergalactic-control-rounded, 6px);background-repeat:repeat-y}@supports (color:color(display-p3 0 0 0%)){.___SInputField_w0knh_gg_._state_invalid_w0knh_gg_>div{border-color:var(--intergalactic-border-critical-active, rgba(255, 0, 4, 0.56));background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(255, 0, 4, 0.56) 0, rgba(255, 0, 4, 0.56) 1px, transparent 0, transparent 50%))}@media (color-gamut:p3){.___SInputField_w0knh_gg_._state_invalid_w0knh_gg_>div{border-color:var(--intergalactic-border-critical-active, color(display-p3 0.918 0.19866 0.14259 / 0.56));background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, color(display-p3 0.918 0.19866 0.14259 / 0.56) 0, color(display-p3 0.918 0.19866 0.14259 / 0.56) 1px, transparent 0, transparent 50%))}}}.___SInputField_w0knh_gg_._state_invalid_w0knh_gg_>div:focus{border-color:var(--intergalactic-border-critical-active, rgba(255, 0, 4, 0.56));outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;outline-offset:0;transition-property:outline-color,outline-width}@supports (color:color(display-p3 0 0 0%)){.___SInputField_w0knh_gg_._state_invalid_w0knh_gg_>div:focus{border-color:var(--intergalactic-border-critical-active, rgba(255, 0, 4, 0.56))}@media (color-gamut:p3){.___SInputField_w0knh_gg_._state_invalid_w0knh_gg_>div:focus{border-color:var(--intergalactic-border-critical-active, color(display-p3 0.918 0.19866 0.14259 / 0.56))}}}@supports (color:oklab(0%0 0%)){.___SInputField_w0knh_gg_._state_invalid_w0knh_gg_>div:focus{outline-color:var(--intergalactic-keyboard-focus-invalid-outline, oklch(0.628 0.257 28.9 / 0.652))}}.___SInputField_w0knh_gg_.__readonly_w0knh_gg_>div{background-color:var(--intergalactic-bg-secondary-neutral, rgb(248, 249, 248))}.___SInputField_w0knh_gg_.__disabled_w0knh_gg_>div{opacity:var(--intergalactic-disabled-opacity, 0.4)}", /*__inner_css_end__*/"w0knh_gg_"),
26
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SInputField_zc5ez_gg_>div{box-sizing:content-box;outline:0;border-radius:var(--intergalactic-control-rounded, 6px);border-color:var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161));border-style:solid;border-width:1px;overflow:auto;position:relative;background-color:var(--intergalactic-bg-primary-neutral, rgb(255, 255, 255));color:var(--intergalactic-text-primary, rgba(1, 5, 0, 0.899));word-wrap:break-word;word-break:break-word;font-family:inherit}@supports (color:color(display-p3 0 0 0)){.___SInputField_zc5ez_gg_>div{border-color:var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@media (color-gamut:p3){.___SInputField_zc5ez_gg_>div{border-color:var(--intergalactic-border-primary, color(display-p3 0.00798 0.04498 0.03219 / 0.161))}}}.___SInputField_zc5ez_gg_>div:empty::before{content:\"1. \"attr(placeholder);color:var(--intergalactic-text-placeholder, rgba(0, 5, 2, 0.457));position:absolute}.___SInputField_zc5ez_gg_>div:nth-child(even){color:red;counter-increment:row;margin-bottom:var(--intergalactic-spacing-1x, 4px);position:relative;word-break:break-all}.___SInputField_zc5ez_gg_>div:nth-child(even)::before{content:counter(row)\".\";display:inline-block;white-space:nowrap;text-align:right;color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583));margin-right:var(--intergalactic-spacing-1x, 4px)}@supports (color:color(display-p3 0 0 0)){.___SInputField_zc5ez_gg_>div:nth-child(even)::before{color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583))}@media (color-gamut:p3){.___SInputField_zc5ez_gg_>div:nth-child(even)::before{color:var(--intergalactic-text-secondary, color(display-p3 0.00228 0.01289 0.00252 / 0.583))}}}.___SInputField_zc5ez_gg_>div>p{counter-increment:row;margin:0 0 var(--intergalactic-spacing-1x, 4px)0;position:relative;word-break:break-all;white-space:pre-wrap;padding:0 var(--intergalactic-spacing-5x, 20px)0 var(--intergalactic-spacing-4x, 16px)}.___SInputField_zc5ez_gg_>div>p:last-of-type{margin-bottom:0}.___SInputField_zc5ez_gg_>div>p:not(:empty)::before{content:counter(row)\".\";display:inline-block;white-space:nowrap;text-align:right;color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583));margin-right:var(--intergalactic-spacing-1x, 4px);position:absolute;left:0}@supports (color:color(display-p3 0 0 0)){.___SInputField_zc5ez_gg_>div>p:not(:empty)::before{color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583))}@media (color-gamut:p3){.___SInputField_zc5ez_gg_>div>p:not(:empty)::before{color:var(--intergalactic-text-secondary, color(display-p3 0.00228 0.01289 0.00252 / 0.583))}}}.___SInputField_zc5ez_gg_>div>p[data-over-max-rows=true]{background-color:var(--intergalactic-bg-secondary-critical, rgb(255, 235, 239))}@supports (color:color(display-p3 0 0 0)){.___SInputField_zc5ez_gg_>div>p[data-over-max-rows=true]{background-color:var(--intergalactic-bg-secondary-critical, rgb(255, 235, 238))}@media (color-gamut:p3){.___SInputField_zc5ez_gg_>div>p[data-over-max-rows=true]{background-color:var(--intergalactic-bg-secondary-critical, color(display-p3 1 0.91978 0.9341))}}}.___SInputField_zc5ez_gg_>div:has(p:nth-child(n+10))>p{padding-left:var(--intergalactic-spacing-6x, 24px)}.___SInputField_zc5ez_gg_>div:has(p:nth-child(n+10))>p:nth-child(-n+9)::before{padding-left:var(--intergalactic-spacing-2x, 8px)}.___SInputField_zc5ez_gg_>div:has(p:nth-child(n+100))>p{padding-left:var(--intergalactic-spacing-8x, 32px)}.___SInputField_zc5ez_gg_>div:has(p:nth-child(n+100))>p:nth-child(-n+9)::before{padding-left:var(--intergalactic-spacing-4x, 16px)}.___SInputField_zc5ez_gg_>div:has(p:nth-child(n+100))>p:nth-child(n+10)::before{padding-left:var(--intergalactic-spacing-2x, 8px)}.___SInputField_zc5ez_gg_>div:has(p:nth-child(n+100))>p:nth-child(n+100)::before{padding-left:0}.___SInputField_zc5ez_gg_.__showErrors_zc5ez_gg_>div[aria-invalid]>p[aria-invalid]:after{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBmaWxsPSIjZDEwMDJmIj48cGF0aCBkPSJNNyA2aDJ2NEg3VjZabTIgN3YtMkg3djJoMloiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYuMTUyIDEuMTcyYy43MTktMS41NjMgMi45NzctMS41NjMgMy42OTYgMGw2LjA0MyAxMy4xNDFjLjM2My43OTEtLjIyNSAxLjY4Ny0xLjEwOSAxLjY4N0gxLjIxOGMtLjg4NCAwLTEuNDcyLS44OTYtMS4xMDktMS42ODdMNi4xNTIgMS4xNzJabTcuMzc0IDEyLjgzN0w4IDEuOTkgMi40NzQgMTQuMDFoMTEuMDUyWiIvPjwvc3ZnPgo=\\ );position:absolute;right:0;top:var(--intergalactic-spacing-05x, 2px)}.___SInputField_zc5ez_gg_._size_m_zc5ez_gg_>div{padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);min-height:calc(var(--minRows_zc5ez)*20px);max-height:calc((var(--maxRows_zc5ez) - 1)*(20px + var(--intergalactic-spacing-1x, 4px)) + 18px)}.___SInputField_zc5ez_gg_._size_m_zc5ez_gg_>div:empty{padding-left:var(--intergalactic-spacing-8x, 32px)}.___SInputField_zc5ez_gg_._size_l_zc5ez_gg_>div:empty::before,.___SInputField_zc5ez_gg_._size_m_zc5ez_gg_>div:empty::before{left:var(--intergalactic-spacing-4x, 16px)}.___SInputField_zc5ez_gg_._size_l_zc5ez_gg_>div{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);min-height:calc(var(--minRows_zc5ez)*24px);max-height:calc((var(--maxRows_zc5ez) - 1)*(24px + var(--intergalactic-spacing-1x, 4px)) + 20px)}.___SInputField_zc5ez_gg_._size_l_zc5ez_gg_>div:empty{padding-left:calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-05x, 2px))}.___SInputField_zc5ez_gg_._state_normal_zc5ez_gg_:not(.__disabled_zc5ez_gg_)>div:focus:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 18, 193, 0.441));border-color:var(--intergalactic-border-info-active, rgba(0, 22, 195, 0.386))}@supports (color:color(display-p3 0 0 0)){.___SInputField_zc5ez_gg_._state_normal_zc5ez_gg_:not(.__disabled_zc5ez_gg_)>div:focus:focus{border-color:var(--intergalactic-border-info-active, rgba(0, 22, 195, 0.386))}@media (color-gamut:p3){.___SInputField_zc5ez_gg_._state_normal_zc5ez_gg_:not(.__disabled_zc5ez_gg_)>div:focus:focus{border-color:var(--intergalactic-border-info-active, color(display-p3 0.01805 0.08333 0.73488 / 0.386))}}}.___SInputField_zc5ez_gg_._state_valid_zc5ez_gg_>div{border-color:var(--intergalactic-border-success-active, rgb(0, 204, 154))}@supports (color:color(display-p3 0 0 0)){.___SInputField_zc5ez_gg_._state_valid_zc5ez_gg_>div{border-color:var(--intergalactic-border-success-active, rgb(0, 204, 154))}@media (color-gamut:p3){.___SInputField_zc5ez_gg_._state_valid_zc5ez_gg_>div{border-color:var(--intergalactic-border-success-active, color(display-p3 0.36013 0.78771 0.61714))}}}.___SInputField_zc5ez_gg_._state_valid_zc5ez_gg_>div:focus{box-shadow:var(--intergalactic-keyboard-focus-valid, 0px 0px 0px 3px rgb(0, 190, 142))}@supports (color:color(display-p3 0 0 0)){.___SInputField_zc5ez_gg_._state_valid_zc5ez_gg_>div:focus{box-shadow:var(--intergalactic-keyboard-focus-valid, 0px 0px 0px 3px rgb(0, 190, 142))}@media (color-gamut:p3){.___SInputField_zc5ez_gg_._state_valid_zc5ez_gg_>div:focus{box-shadow:var(--intergalactic-keyboard-focus-valid, 0px 0px 0px 3px color(display-p3 0.33388 0.7337 0.56959))}}}.___SInputField_zc5ez_gg_._state_invalid_zc5ez_gg_>div{border-color:var(--intergalactic-border-critical-active, rgba(255, 0, 4, 0.56));background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(255, 0, 4, 0.56) 0, rgba(255, 0, 4, 0.56) 1px, transparent 0, transparent 50%));background-size:6px 6px;background-color:var(--intergalactic-bg-primary-neutral, rgb(255, 255, 255));border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:var(--intergalactic-control-rounded, 6px);background-repeat:repeat-y}@supports (color:color(display-p3 0 0 0)){.___SInputField_zc5ez_gg_._state_invalid_zc5ez_gg_>div{border-color:var(--intergalactic-border-critical-active, rgba(255, 0, 4, 0.56));background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(255, 0, 4, 0.56) 0, rgba(255, 0, 4, 0.56) 1px, transparent 0, transparent 50%))}@media (color-gamut:p3){.___SInputField_zc5ez_gg_._state_invalid_zc5ez_gg_>div{border-color:var(--intergalactic-border-critical-active, color(display-p3 0.918 0.19866 0.14259 / 0.56));background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, color(display-p3 0.918 0.19866 0.14259 / 0.56) 0, color(display-p3 0.918 0.19866 0.14259 / 0.56) 1px, transparent 0, transparent 50%))}}}.___SInputField_zc5ez_gg_._state_invalid_zc5ez_gg_>div:focus{box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 2, 7, 0.652))}.___SInputField_zc5ez_gg_.__readonly_zc5ez_gg_>div{background-color:var(--intergalactic-bg-secondary-neutral, rgb(248, 249, 248))}.___SInputField_zc5ez_gg_.__disabled_zc5ez_gg_>div{opacity:var(--intergalactic-disabled-opacity, 0.4)}", /*__inner_css_end__*/"zc5ez_gg_"),
25
27
  /*__reshadow_css_end__*/
26
28
  {
27
- "__SInputField": "___SInputField_w0knh_gg_",
28
- "_showErrors": "__showErrors_w0knh_gg_",
29
- "_readonly": "__readonly_w0knh_gg_",
30
- "_disabled": "__disabled_w0knh_gg_",
31
- "_size_m": "_size_m_w0knh_gg_",
32
- "--minRows": "--minRows_w0knh",
33
- "--maxRows": "--maxRows_w0knh",
34
- "_size_l": "_size_l_w0knh_gg_",
35
- "_state_normal": "_state_normal_w0knh_gg_",
36
- "_state_valid": "_state_valid_w0knh_gg_",
37
- "_state_invalid": "_state_invalid_w0knh_gg_"
29
+ "__SInputField": "___SInputField_zc5ez_gg_",
30
+ "_showErrors": "__showErrors_zc5ez_gg_",
31
+ "_readonly": "__readonly_zc5ez_gg_",
32
+ "_disabled": "__disabled_zc5ez_gg_",
33
+ "_size_m": "_size_m_zc5ez_gg_",
34
+ "--minRows": "--minRows_zc5ez",
35
+ "--maxRows": "--maxRows_zc5ez",
36
+ "_size_l": "_size_l_zc5ez_gg_",
37
+ "_state_normal": "_state_normal_zc5ez_gg_",
38
+ "_state_valid": "_state_valid_zc5ez_gg_",
39
+ "_state_invalid": "_state_invalid_zc5ez_gg_"
38
40
  });
39
- var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
41
+ var InputField = /*#__PURE__*/function (_Component) {
42
+ (0, _inherits2["default"])(InputField, _Component);
43
+ var _super = (0, _createSuper2["default"])(InputField);
40
44
  function InputField(props) {
41
45
  var _this;
42
46
  (0, _classCallCheck2["default"])(this, InputField);
43
- _this = (0, _callSuper2["default"])(this, InputField, [props]);
44
- (0, _defineProperty2["default"])(_this, "delimiter", '\n');
45
- (0, _defineProperty2["default"])(_this, "skipEmptyLines", true);
46
- (0, _defineProperty2["default"])(_this, "emptyLineValue", '');
47
- (0, _defineProperty2["default"])(_this, "spaceLineValue", ' ');
48
- (0, _defineProperty2["default"])(_this, "containerRef", /*#__PURE__*/_react["default"].createRef());
49
- (0, _defineProperty2["default"])(_this, "textarea", void 0);
50
- (0, _defineProperty2["default"])(_this, "popper", null);
51
- (0, _defineProperty2["default"])(_this, "setPopperTrigger", null);
52
- (0, _defineProperty2["default"])(_this, "errorByInteraction", null);
53
- (0, _defineProperty2["default"])(_this, "changeTriggerTimeout", 0);
54
- (0, _defineProperty2["default"])(_this, "isScrolling", false);
55
- (0, _defineProperty2["default"])(_this, "scrollingTimeout", 0);
56
- (0, _defineProperty2["default"])(_this, "toggleErrorsPopperTimeout", 0);
57
- (0, _defineProperty2["default"])(_this, "isFocusing", false);
58
- (0, _defineProperty2["default"])(_this, "linesCountTimeout", 0);
59
- (0, _defineProperty2["default"])(_this, "observer", void 0);
60
- (0, _defineProperty2["default"])(_this, "state", {
47
+ _this = _super.call(this, props);
48
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "delimiter", '\n');
49
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "skipEmptyLines", true);
50
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "emptyLineValue", '');
51
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "spaceLineValue", ' ');
52
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "containerRef", /*#__PURE__*/_react["default"].createRef());
53
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "textarea", void 0);
54
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "popper", null);
55
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setPopperTrigger", null);
56
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "errorByInteraction", null);
57
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "changeTriggerTimeout", 0);
58
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "isScrolling", false);
59
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "scrollingTimeout", 0);
60
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toggleErrorsPopperTimeout", 0);
61
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "isFocusing", false);
62
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "linesCountTimeout", 0);
63
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
61
64
  visibleErrorPopper: false,
62
65
  keyboardLineIndex: -1,
63
66
  mouseLineIndex: -1
64
67
  });
65
- _this.handlePaste = _this.handlePaste.bind(_this);
66
- _this.handleChange = _this.handleChange.bind(_this);
67
- _this.handleFocus = _this.handleFocus.bind(_this);
68
- _this.handleBlur = _this.handleBlur.bind(_this);
69
- _this.handleKeyDown = _this.handleKeyDown.bind(_this);
70
- _this.handleMouseDown = _this.handleMouseDown.bind(_this);
71
- _this.handleMouseMove = _this.handleMouseMove.bind(_this);
72
- _this.handleMouseLeave = _this.handleMouseLeave.bind(_this);
73
- _this.handleScroll = _this.handleScroll.bind(_this);
74
- _this.handleSelectAll = _this.handleSelectAll.bind(_this);
68
+ _this.handlePaste = _this.handlePaste.bind((0, _assertThisInitialized2["default"])(_this));
69
+ _this.handleChange = _this.handleChange.bind((0, _assertThisInitialized2["default"])(_this));
70
+ _this.handleFocus = _this.handleFocus.bind((0, _assertThisInitialized2["default"])(_this));
71
+ _this.handleBlur = _this.handleBlur.bind((0, _assertThisInitialized2["default"])(_this));
72
+ _this.handleKeyDown = _this.handleKeyDown.bind((0, _assertThisInitialized2["default"])(_this));
73
+ _this.handleMouseDown = _this.handleMouseDown.bind((0, _assertThisInitialized2["default"])(_this));
74
+ _this.handleMouseMove = _this.handleMouseMove.bind((0, _assertThisInitialized2["default"])(_this));
75
+ _this.handleMouseLeave = _this.handleMouseLeave.bind((0, _assertThisInitialized2["default"])(_this));
76
+ _this.handleScroll = _this.handleScroll.bind((0, _assertThisInitialized2["default"])(_this));
77
+ _this.handleSelectAll = _this.handleSelectAll.bind((0, _assertThisInitialized2["default"])(_this));
75
78
  _this.textarea = _this.createContentEditableElement(props);
76
- _this.observer = new MutationObserver(function (mutationsList, observer) {
77
- var _iterator = (0, _createForOfIteratorHelper2["default"])(mutationsList),
78
- _step;
79
- try {
80
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
81
- var mutation = _step.value;
82
- if (mutation.type === 'characterData' || mutation.type === 'childList') {
83
- var _this$props$onImmedia, _this$props, _this$textarea$textCo;
84
- (_this$props$onImmedia = (_this$props = _this.props).onImmediatelyChange) === null || _this$props$onImmedia === void 0 || _this$props$onImmedia.call(_this$props, _this.getValues(), (_this$textarea$textCo = _this.textarea.textContent) !== null && _this$textarea$textCo !== void 0 ? _this$textarea$textCo : '');
85
- }
86
- }
87
- } catch (err) {
88
- _iterator.e(err);
89
- } finally {
90
- _iterator.f();
91
- }
92
- });
93
79
  return _this;
94
80
  }
95
- (0, _inherits2["default"])(InputField, _Component);
96
- return (0, _createClass2["default"])(InputField, [{
81
+ (0, _createClass2["default"])(InputField, [{
97
82
  key: "uncontrolledProps",
98
83
  value: function uncontrolledProps() {
99
84
  return {
@@ -105,71 +90,32 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
105
90
  }, {
106
91
  key: "componentDidMount",
107
92
  value: function componentDidMount() {
108
- var _this$containerRef$cu,
109
- _this2 = this;
110
- var _this$asProps = this.asProps,
111
- autoFocus = _this$asProps.autoFocus,
112
- disabled = _this$asProps.disabled,
113
- readonly = _this$asProps.readonly;
114
- (_this$containerRef$cu = this.containerRef.current) === null || _this$containerRef$cu === void 0 || _this$containerRef$cu.append(this.textarea);
93
+ var _this$containerRef$cu;
94
+ (_this$containerRef$cu = this.containerRef.current) === null || _this$containerRef$cu === void 0 ? void 0 : _this$containerRef$cu.append(this.textarea);
115
95
  this.handleValueOutChange();
116
- var config = {
117
- childList: true,
118
- characterData: true,
119
- subtree: true
120
- };
121
- if (this.props.onImmediatelyChange) {
122
- this.observer.observe(this.textarea, config);
123
- }
124
- if (autoFocus && !disabled) {
125
- /* Safari & Firefox may silently ignore programmatic focus calls with very short
126
- delays (<10ms). Using 10ms as a safe threshold based on observed behavior.
127
- */
128
- setTimeout(function () {
129
- return _this2.textarea.focus();
130
- }, 10);
131
- }
132
96
  }
133
97
  }, {
134
98
  key: "componentDidUpdate",
135
99
  value: function componentDidUpdate(prevProps, prevState) {
136
- var _this3 = this;
137
- var _this$props2 = this.props,
138
- value = _this$props2.value,
139
- errors = _this$props2.errors,
140
- errorIndex = _this$props2.errorIndex,
141
- showErrors = _this$props2.showErrors,
142
- disabled = _this$props2.disabled,
143
- readonly = _this$props2.readonly,
144
- highlightErrorIndex = _this$props2.highlightErrorIndex,
145
- lineProcessing = _this$props2.lineProcessing,
146
- _this$props2$ariaDes = _this$props2['aria-describedby'],
147
- ariaDescribedby = _this$props2$ariaDes === void 0 ? '' : _this$props2$ariaDes;
100
+ var _this2 = this;
101
+ var _this$props = this.props,
102
+ value = _this$props.value,
103
+ errors = _this$props.errors,
104
+ errorIndex = _this$props.errorIndex,
105
+ showErrors = _this$props.showErrors,
106
+ disabled = _this$props.disabled,
107
+ readonly = _this$props.readonly,
108
+ highlightErrorIndex = _this$props.highlightErrorIndex,
109
+ lineProcessing = _this$props.lineProcessing,
110
+ _this$props$ariaDesc = _this$props['aria-describedby'],
111
+ ariaDescribedby = _this$props$ariaDesc === void 0 ? '' : _this$props$ariaDesc;
148
112
  if (prevProps.value !== value) {
149
113
  var currentValue = this.getValues().join(this.delimiter);
150
114
  if (typeof value === 'string' ? value !== currentValue : value.join(this.delimiter) !== currentValue) {
151
115
  this.handleValueOutChange();
152
116
  }
153
117
  }
154
- if (prevProps.showErrors !== showErrors || prevProps.errors !== errors) {
155
- if (showErrors) {
156
- var errorsMap = new Map();
157
- errors.forEach(function (error) {
158
- errorsMap.set(error.lineIndex, error);
159
- });
160
- this.textarea.childNodes.forEach(function (node, index) {
161
- if (node instanceof HTMLParagraphElement) {
162
- var errorItem = errorsMap.get(index);
163
- if (errorItem) {
164
- node.setAttribute('aria-invalid', 'true');
165
- node.dataset.errormessage = errorItem.errorMessage;
166
- } else {
167
- node.removeAttribute('aria-invalid');
168
- node.dataset.errormessage = undefined;
169
- }
170
- }
171
- });
172
- }
118
+ if (prevProps.showErrors !== showErrors || prevProps.errors.length !== errors.length) {
173
119
  this.toggleAriaInvalid(showErrors, errors.length);
174
120
  if (showErrors === false) {
175
121
  this.textarea.setAttribute('aria-describedby', ariaDescribedby);
@@ -209,12 +155,13 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
209
155
  }
210
156
  this.validateLine(paragraph);
211
157
  setTimeout(function () {
212
- var newNode = _this3.textarea.childNodes.item(keyboardLineIndex);
158
+ var newNode = _this2.textarea.childNodes.item(keyboardLineIndex);
213
159
  if (newNode) {
214
- _this3.setErrorIndex(newNode);
160
+ _this2.setErrorIndex(newNode);
215
161
  }
216
162
  }, 0); // need this timeout to update errorIndex to the new (usually empty) line
217
163
  }
164
+
218
165
  if (!showErrors) {
219
166
  this.recalculateErrors();
220
167
  }
@@ -226,14 +173,13 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
226
173
  key: "componentWillUnmount",
227
174
  value: function componentWillUnmount() {
228
175
  this.removeEventListeners(this.textarea);
229
- this.observer.disconnect();
230
176
  }
231
177
  }, {
232
178
  key: "isDisabled",
233
179
  get: function get() {
234
- var _this$asProps2 = this.asProps,
235
- disabled = _this$asProps2.disabled,
236
- readonly = _this$asProps2.readonly;
180
+ var _this$asProps = this.asProps,
181
+ disabled = _this$asProps.disabled,
182
+ readonly = _this$asProps.readonly;
237
183
  return Boolean(disabled || readonly);
238
184
  }
239
185
  }, {
@@ -246,11 +192,11 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
246
192
  key: "errorMessage",
247
193
  get: function get() {
248
194
  var _errorItem$errorMessa, _errorItem, _errorItem2;
249
- var _this$asProps3 = this.asProps,
250
- errors = _this$asProps3.errors,
251
- errorIndex = _this$asProps3.errorIndex,
252
- commonErrorMessage = _this$asProps3.commonErrorMessage,
253
- prevError = _this$asProps3.prevError;
195
+ var _this$asProps2 = this.asProps,
196
+ errors = _this$asProps2.errors,
197
+ errorIndex = _this$asProps2.errorIndex,
198
+ commonErrorMessage = _this$asProps2.commonErrorMessage,
199
+ prevError = _this$asProps2.prevError;
254
200
  var _this$state = this.state,
255
201
  mouseLineIndex = _this$state.mouseLineIndex,
256
202
  keyboardLineIndex = _this$state.keyboardLineIndex;
@@ -305,9 +251,9 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
305
251
  }, {
306
252
  key: "handleValueOutChange",
307
253
  value: function handleValueOutChange() {
308
- var _this$props3 = this.props,
309
- value = _this$props3.value,
310
- onChangeLinesCount = _this$props3.onChangeLinesCount;
254
+ var _this$props2 = this.props,
255
+ value = _this$props2.value,
256
+ onChangeLinesCount = _this$props2.onChangeLinesCount;
311
257
  if (value === '') {
312
258
  this.textarea.textContent = '';
313
259
  onChangeLinesCount(0);
@@ -322,13 +268,13 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
322
268
  }, {
323
269
  key: "handleScroll",
324
270
  value: function handleScroll() {
325
- var _this4 = this;
271
+ var _this3 = this;
326
272
  if (this.scrollingTimeout) {
327
273
  clearTimeout(this.scrollingTimeout);
328
274
  }
329
275
  this.isScrolling = true;
330
276
  this.scrollingTimeout = window.setTimeout(function () {
331
- _this4.isScrolling = false;
277
+ _this3.isScrolling = false;
332
278
  }, 50);
333
279
  }
334
280
  }, {
@@ -358,7 +304,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
358
304
  }
359
305
  }, {
360
306
  key: "handleMouseLeave",
361
- value: function handleMouseLeave() {
307
+ value: function handleMouseLeave(event) {
362
308
  if (this.changeTriggerTimeout) {
363
309
  clearTimeout(this.changeTriggerTimeout);
364
310
  }
@@ -405,9 +351,9 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
405
351
  textNode = lastNodeToInsert.childNodes.item(0);
406
352
  position = ((_lastNodeToInsert$tex = lastNodeToInsert.textContent) !== null && _lastNodeToInsert$tex !== void 0 ? _lastNodeToInsert$tex : '').length;
407
353
  } else if (focusNode instanceof HTMLParagraphElement && anchorNode instanceof HTMLParagraphElement) {
408
- var _anchorNode$textConte, _anchorNode$textConte2, _focusNode$textConten, _focusNode$textConten2, _firstNodeToInsert$te;
409
- var before = (_anchorNode$textConte = anchorNode === null || anchorNode === void 0 || (_anchorNode$textConte2 = anchorNode.textContent) === null || _anchorNode$textConte2 === void 0 ? void 0 : _anchorNode$textConte2.substring(0, fromOffset)) !== null && _anchorNode$textConte !== void 0 ? _anchorNode$textConte : '';
410
- var after = (_focusNode$textConten = focusNode === null || focusNode === void 0 || (_focusNode$textConten2 = focusNode.textContent) === null || _focusNode$textConten2 === void 0 ? void 0 : _focusNode$textConten2.substring(toOffset)) !== null && _focusNode$textConten !== void 0 ? _focusNode$textConten : '';
354
+ var _anchorNode$textConte, _anchorNode$textConte2, _focusNode$textConten, _focusNode$textConten2, _ref3;
355
+ var before = (_anchorNode$textConte = anchorNode === null || anchorNode === void 0 ? void 0 : (_anchorNode$textConte2 = anchorNode.textContent) === null || _anchorNode$textConte2 === void 0 ? void 0 : _anchorNode$textConte2.substring(0, fromOffset)) !== null && _anchorNode$textConte !== void 0 ? _anchorNode$textConte : '';
356
+ var after = (_focusNode$textConten = focusNode === null || focusNode === void 0 ? void 0 : (_focusNode$textConten2 = focusNode.textContent) === null || _focusNode$textConten2 === void 0 ? void 0 : _focusNode$textConten2.substring(toOffset)) !== null && _focusNode$textConten !== void 0 ? _focusNode$textConten : '';
411
357
  var noEmptyLineBefore = before.trim() === '' ? '' : before;
412
358
  var noEmptyLineAfter = after.trim() === '' ? '' : after;
413
359
  selection.deleteFromDocument();
@@ -416,7 +362,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
416
362
  }
417
363
  var firstNodeToInsert = listOfNodes.splice(0, 1)[0];
418
364
  var _lastNodeToInsert = listOfNodes[listOfNodes.length - 1];
419
- anchorNode.textContent = noEmptyLineBefore + ((_firstNodeToInsert$te = firstNodeToInsert === null || firstNodeToInsert === void 0 ? void 0 : firstNodeToInsert.textContent) !== null && _firstNodeToInsert$te !== void 0 ? _firstNodeToInsert$te : '');
365
+ anchorNode.textContent = (_ref3 = noEmptyLineBefore + (firstNodeToInsert === null || firstNodeToInsert === void 0 ? void 0 : firstNodeToInsert.textContent)) !== null && _ref3 !== void 0 ? _ref3 : '';
420
366
  anchorNode.after.apply(anchorNode, (0, _toConsumableArray2["default"])(listOfNodes));
421
367
  if (_lastNodeToInsert) {
422
368
  var _lastNodeToInsert$tex2, _lastNodeToInsert$tex3;
@@ -435,11 +381,11 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
435
381
  }
436
382
  }
437
383
  if (textNode instanceof Text) {
438
- this.setSelection(textNode, position !== null && position !== void 0 ? position : 1, position !== null && position !== void 0 ? position : 1);
384
+ var _position, _position2;
385
+ this.setSelection(textNode, (_position = position) !== null && _position !== void 0 ? _position : 1, (_position2 = position) !== null && _position2 !== void 0 ? _position2 : 1);
439
386
  this.toggleErrorsPopper('keyboardLineIndex', textNode.parentNode);
440
387
  } else {
441
388
  var _textNode;
442
- // eslint-disable-next-line no-console
443
389
  console.warn('incorrect child type', textNode, (_textNode = textNode) === null || _textNode === void 0 ? void 0 : _textNode.parentNode);
444
390
  }
445
391
  }
@@ -465,7 +411,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
465
411
  var text = document.createTextNode(nodeText);
466
412
  firstRow.append(text);
467
413
  firstNode.replaceWith(firstRow);
468
- selection === null || selection === void 0 || selection.setPosition(firstRow, nodeText.length);
414
+ selection === null || selection === void 0 ? void 0 : selection.setPosition(firstRow, nodeText.length);
469
415
  } else if (!firstNode || firstNode instanceof HTMLBRElement && nodes.length === 1) {
470
416
  this.textarea.textContent = '';
471
417
  this.setState({
@@ -517,9 +463,9 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
517
463
  } else if (childNodes.length === 1 && childNodes[0] instanceof HTMLBRElement) {
518
464
  rowNode.innerHTML = this.emptyLineValue;
519
465
  }
520
- var _this$asProps4 = this.asProps,
521
- errors = _this$asProps4.errors,
522
- showErrors = _this$asProps4.showErrors;
466
+ var _this$asProps3 = this.asProps,
467
+ errors = _this$asProps3.errors,
468
+ showErrors = _this$asProps3.showErrors;
523
469
  var isValid = this.validateLine(rowNode);
524
470
  this.recalculateErrors();
525
471
  this.setErrorIndex(rowNode);
@@ -527,10 +473,10 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
527
473
  this.toggleErrorsPopper('keyboardLineIndex', rowNode, 0);
528
474
  }
529
475
  var trigger = !isValid || isValid && errors.length === 1 && errors[0].lineNode === rowNode ? rowNode : this.textarea;
530
- if (showErrors && ((_this$popper = this.popper) === null || _this$popper === void 0 || (_this$popper = _this$popper.current) === null || _this$popper === void 0 ? void 0 : _this$popper.state.elements.reference) !== trigger) {
476
+ if (showErrors && ((_this$popper = this.popper) === null || _this$popper === void 0 ? void 0 : _this$popper.current.state.elements.reference) !== trigger) {
531
477
  if (this.shouldChangePopperTrigger(trigger)) {
532
478
  var _this$setPopperTrigge;
533
- (_this$setPopperTrigge = this.setPopperTrigger) === null || _this$setPopperTrigge === void 0 || _this$setPopperTrigge.call(this, trigger);
479
+ (_this$setPopperTrigge = this.setPopperTrigger) === null || _this$setPopperTrigge === void 0 ? void 0 : _this$setPopperTrigge.call(this, trigger);
534
480
  } else {
535
481
  this.setState({
536
482
  visibleErrorPopper: false
@@ -539,7 +485,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
539
485
  }
540
486
  } else if (rowNode === null) {
541
487
  var _this$setPopperTrigge2;
542
- (_this$setPopperTrigge2 = this.setPopperTrigger) === null || _this$setPopperTrigge2 === void 0 || _this$setPopperTrigge2.call(this, this.textarea);
488
+ (_this$setPopperTrigge2 = this.setPopperTrigger) === null || _this$setPopperTrigge2 === void 0 ? void 0 : _this$setPopperTrigge2.call(this, this.textarea);
543
489
  if ((selection === null || selection === void 0 ? void 0 : selection.focusNode) === this.textarea && this.textarea.childNodes.length > 1) {
544
490
  var nodeIndex = selection.focusOffset;
545
491
  var emptyParagraph = this.textarea.childNodes.item(nodeIndex - 1);
@@ -560,7 +506,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
560
506
  }
561
507
  }, {
562
508
  key: "handleFocus",
563
- value: function handleFocus() {
509
+ value: function handleFocus(event) {
564
510
  this.isFocusing = true;
565
511
  this.errorByInteraction = 'keyboard';
566
512
  if (this.asProps.showErrors) {
@@ -572,22 +518,22 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
572
518
  }, {
573
519
  key: "handleBlur",
574
520
  value: function handleBlur(event) {
575
- var _this5 = this;
521
+ var _this4 = this;
576
522
  this.isFocusing = false;
577
523
  this.setState({
578
524
  visibleErrorPopper: false
579
525
  });
580
- var _this$asProps5 = this.asProps,
581
- validateOn = _this$asProps5.validateOn,
582
- onBlur = _this$asProps5.onBlur,
583
- value = _this$asProps5.value;
526
+ var _this$asProps4 = this.asProps,
527
+ validateOn = _this$asProps4.validateOn,
528
+ onBlur = _this$asProps4.onBlur,
529
+ value = _this$asProps4.value;
584
530
  if (validateOn.includes('blur')) {
585
531
  this.recalculateErrors();
586
532
  }
587
533
  var valueToChange = typeof value === 'string' ? this.getValues().join(this.delimiter) : this.getValues();
588
534
  onBlur(valueToChange, event);
589
535
  setTimeout(function () {
590
- _this5.setState({
536
+ _this4.setState({
591
537
  keyboardLineIndex: -1
592
538
  });
593
539
  }, 200);
@@ -595,7 +541,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
595
541
  }, {
596
542
  key: "handleKeyDown",
597
543
  value: function handleKeyDown(event) {
598
- var _this6 = this;
544
+ var _this5 = this;
599
545
  this.errorByInteraction = 'keyboard';
600
546
  var linesDelimiters = this.asProps.linesDelimiters;
601
547
  var currentNode = this.getNodeFromSelection();
@@ -612,7 +558,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
612
558
  var _selection$focusNode, _selectionNode$textCo, _currentNode$textCont2, _row$textContent;
613
559
  event.preventDefault();
614
560
  var selection = document.getSelection();
615
- var selectionNode = (selection === null || selection === void 0 ? void 0 : selection.focusNode) instanceof Text ? selection.focusNode : selection === null || selection === void 0 || (_selection$focusNode = selection.focusNode) === null || _selection$focusNode === void 0 ? void 0 : _selection$focusNode.childNodes.item(0);
561
+ var selectionNode = (selection === null || selection === void 0 ? void 0 : selection.focusNode) instanceof Text ? selection.focusNode : selection === null || selection === void 0 ? void 0 : (_selection$focusNode = selection.focusNode) === null || _selection$focusNode === void 0 ? void 0 : _selection$focusNode.childNodes.item(0);
616
562
  var selectionOffset = selection === null || selection === void 0 ? void 0 : selection.focusOffset;
617
563
  var newRowValue = '';
618
564
  if (selectionNode instanceof Text && selectionOffset !== undefined && selectionOffset !== ((_selectionNode$textCo = selectionNode.textContent) === null || _selectionNode$textCo === void 0 ? void 0 : _selectionNode$textCo.length)) {
@@ -643,7 +589,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
643
589
  this.recalculateLinesCount();
644
590
  }
645
591
  setTimeout(function () {
646
- _this6.recalculateErrors();
592
+ _this5.recalculateErrors();
647
593
  }, 0);
648
594
  this.toggleErrorsPopperByKeyboard(0);
649
595
  }
@@ -673,17 +619,16 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
673
619
  var offset = (_text$textContent$len = (_text$textContent = text.textContent) === null || _text$textContent === void 0 ? void 0 : _text$textContent.length) !== null && _text$textContent$len !== void 0 ? _text$textContent$len : 0;
674
620
  this.setSelection(text, offset, offset);
675
621
  } else {
676
- // eslint-disable-next-line no-console
677
622
  console.warn('incorrect prevNode type', prevNode);
678
623
  }
679
624
  }
680
625
  setTimeout(function () {
681
- _this6.recalculateErrors();
626
+ _this5.recalculateErrors();
682
627
  }, 0);
683
628
  this.toggleErrorsPopperByKeyboard(0);
684
629
  }
685
630
  } else if (this.isRangeSelection()) {
686
- var _currentNode$textCont4, _focusElement$parentN, _anchorElement$parent, _focusElement$parentN2;
631
+ var _currentNode$textCont4, _focusElement$parentN, _anchorElement$parent, _focusElement$parentN2, _focusElement$parentN3;
687
632
  var _selection = document.getSelection();
688
633
  var direction = this.getSelectionDirection();
689
634
  var anchorElement = direction === 'backward' ? _selection === null || _selection === void 0 ? void 0 : _selection.focusNode : _selection === null || _selection === void 0 ? void 0 : _selection.anchorNode;
@@ -707,11 +652,12 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
707
652
  this.setErrorIndex(currentNode);
708
653
  this.recalculateLinesCount();
709
654
  setTimeout(function () {
710
- _this6.recalculateErrors();
655
+ _this5.recalculateErrors();
711
656
  }, 0);
712
657
  this.toggleErrorsPopperByKeyboard(0);
713
- } else if (focusElement !== anchorElement && focusElement instanceof Text && anchorElement instanceof Text && (focusElement === null || focusElement === void 0 ? void 0 : focusElement.textContent) === (focusElement === null || focusElement === void 0 || (_focusElement$parentN = focusElement.parentNode) === null || _focusElement$parentN === void 0 ? void 0 : _focusElement$parentN.textContent) && (anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.textContent) === (anchorElement === null || anchorElement === void 0 || (_anchorElement$parent = anchorElement.parentNode) === null || _anchorElement$parent === void 0 ? void 0 : _anchorElement$parent.textContent) && anchorOffset === 0 && focusOffset === (focusElement === null || focusElement === void 0 || (_focusElement$parentN2 = focusElement.parentNode) === null || _focusElement$parentN2 === void 0 || (_focusElement$parentN2 = _focusElement$parentN2.textContent) === null || _focusElement$parentN2 === void 0 ? void 0 : _focusElement$parentN2.length)) {
714
- // Backspace on selected few full rows
658
+ }
659
+ // Backspace on selected few full rows
660
+ else if (focusElement !== anchorElement && focusElement instanceof Text && anchorElement instanceof Text && (focusElement === null || focusElement === void 0 ? void 0 : focusElement.textContent) === (focusElement === null || focusElement === void 0 ? void 0 : (_focusElement$parentN = focusElement.parentNode) === null || _focusElement$parentN === void 0 ? void 0 : _focusElement$parentN.textContent) && (anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.textContent) === (anchorElement === null || anchorElement === void 0 ? void 0 : (_anchorElement$parent = anchorElement.parentNode) === null || _anchorElement$parent === void 0 ? void 0 : _anchorElement$parent.textContent) && anchorOffset === 0 && focusOffset === (focusElement === null || focusElement === void 0 ? void 0 : (_focusElement$parentN2 = focusElement.parentNode) === null || _focusElement$parentN2 === void 0 ? void 0 : (_focusElement$parentN3 = _focusElement$parentN2.textContent) === null || _focusElement$parentN3 === void 0 ? void 0 : _focusElement$parentN3.length)) {
715
661
  event.preventDefault();
716
662
  var paragraphs = Array.from(this.textarea.children);
717
663
  var _anchorParagraph = anchorElement.parentElement;
@@ -722,11 +668,11 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
722
668
  this.setSelection(this.textarea, 0, 0);
723
669
  } else {
724
670
  var isCleaning = false;
725
- var _iterator2 = (0, _createForOfIteratorHelper2["default"])(paragraphs),
726
- _step2;
671
+ var _iterator = (0, _createForOfIteratorHelper2["default"])(paragraphs),
672
+ _step;
727
673
  try {
728
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
729
- var paragraph = _step2.value;
674
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
675
+ var paragraph = _step.value;
730
676
  if (paragraph === _anchorParagraph || isCleaning) {
731
677
  isCleaning = true;
732
678
  if (paragraph === _focusParagraph) {
@@ -739,16 +685,16 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
739
685
  }
740
686
  }
741
687
  } catch (err) {
742
- _iterator2.e(err);
688
+ _iterator.e(err);
743
689
  } finally {
744
- _iterator2.f();
690
+ _iterator.f();
745
691
  }
746
692
  this.validateLine(currentNode);
747
693
  }
748
694
  this.setErrorIndex(currentNode);
749
695
  this.recalculateLinesCount();
750
696
  setTimeout(function () {
751
- _this6.recalculateErrors();
697
+ _this5.recalculateErrors();
752
698
  }, 0);
753
699
  this.toggleErrorsPopperByKeyboard(0);
754
700
  }
@@ -763,11 +709,11 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
763
709
  var _ref = this.asProps,
764
710
  _ref2,
765
711
  _this$containerRef$cu2,
766
- _this7 = this;
767
- var SInputField = _baseComponents.Box;
768
- var _this$asProps6 = this.asProps,
769
- styles = _this$asProps6.styles,
770
- showErrors = _this$asProps6.showErrors;
712
+ _this6 = this;
713
+ var SInputField = _flexBox.Box;
714
+ var _this$asProps5 = this.asProps,
715
+ styles = _this$asProps5.styles,
716
+ showErrors = _this$asProps5.showErrors;
771
717
  var visibleErrorPopper = this.state.visibleErrorPopper;
772
718
  var _this$errorMessage = this.errorMessage,
773
719
  errorMessage = _this$errorMessage.errorMessage,
@@ -785,16 +731,16 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
785
731
  boundary: (_this$containerRef$cu2 = this.containerRef.current) !== null && _this$containerRef$cu2 !== void 0 ? _this$containerRef$cu2 : undefined,
786
732
  tether: false
787
733
  }
788
- }), function (_ref3) {
789
- var popper = _ref3.popper,
790
- setTrigger = _ref3.setTrigger;
791
- if (!_this7.popper) {
792
- _this7.setPopperTrigger = setTrigger;
734
+ }), function (_ref4) {
735
+ var popper = _ref4.popper,
736
+ setTrigger = _ref4.setTrigger;
737
+ if (!_this6.popper) {
738
+ _this6.setPopperTrigger = setTrigger;
793
739
  // @ts-ignore
794
- _this7.popper = popper;
740
+ _this6.popper = popper;
795
741
  }
796
742
  return /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Popper, {
797
- id: _this7.popperDescribedId
743
+ id: _this6.popperDescribedId
798
744
  }, errorMessage);
799
745
  }), /*#__PURE__*/_react["default"].createElement(SInputField, _ref2.cn("SInputField", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
800
746
  "ref": this.containerRef,
@@ -807,7 +753,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
807
753
  var _pasteProps$lineProce,
808
754
  _pasteProps$skipEmpty,
809
755
  _pasteProps$delimiter,
810
- _this8 = this;
756
+ _this7 = this;
811
757
  var listOfNodes = [];
812
758
  var pasteProps = this.asProps.pasteProps;
813
759
  var lineProcessing = (_pasteProps$lineProce = pasteProps === null || pasteProps === void 0 ? void 0 : pasteProps.lineProcessing) !== null && _pasteProps$lineProce !== void 0 ? _pasteProps$lineProce : function (line) {
@@ -822,15 +768,15 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
822
768
  if (preparedLine === '' && skipEmptyLines === false || preparedLine !== '') {
823
769
  var node = document.createElement('p');
824
770
  if (preparedLine === '') {
825
- node.innerHTML = _this8.emptyLineValue;
771
+ node.innerHTML = _this7.emptyLineValue;
826
772
  } else if (preparedLine.trim() === '') {
827
773
  var allSpacesRegExp = new RegExp('\\s', 'g');
828
- node.innerHTML = _dompurify["default"].sanitize(preparedLine.replace(allSpacesRegExp, _this8.spaceLineValue));
774
+ node.innerHTML = _dompurify["default"].sanitize(preparedLine.replace(allSpacesRegExp, _this7.spaceLineValue));
829
775
  } else {
830
776
  node.append(document.createTextNode(preparedLine));
831
777
  }
832
778
  listOfNodes.push(node);
833
- _this8.validateLine(node);
779
+ _this7.validateLine(node);
834
780
  }
835
781
  });
836
782
  return listOfNodes;
@@ -855,19 +801,19 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
855
801
  }, {
856
802
  key: "recalculateLinesCount",
857
803
  value: function recalculateLinesCount() {
858
- var _this9 = this;
804
+ var _this8 = this;
859
805
  if (this.linesCountTimeout) {
860
806
  clearTimeout(this.linesCountTimeout);
861
807
  }
862
808
  this.linesCountTimeout = window.setTimeout(function () {
863
809
  var lines = 0;
864
- var _this9$asProps = _this9.asProps,
865
- maxLines = _this9$asProps.maxLines,
866
- linesCount = _this9$asProps.linesCount;
867
- _this9.textarea.childNodes.forEach(function (node) {
810
+ var _this8$asProps = _this8.asProps,
811
+ maxLines = _this8$asProps.maxLines,
812
+ linesCount = _this8$asProps.linesCount;
813
+ _this8.textarea.childNodes.forEach(function (node, index) {
868
814
  if (node instanceof HTMLParagraphElement) {
869
815
  node.dataset.overMaxRows = 'false';
870
- if (node.textContent !== _this9.getEmptyParagraph().textContent && node.textContent !== '') {
816
+ if (node.textContent !== _this8.getEmptyParagraph().textContent && node.textContent !== '') {
871
817
  lines++;
872
818
  if (lines > maxLines) {
873
819
  node.dataset.overMaxRows = 'true';
@@ -876,7 +822,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
876
822
  }
877
823
  });
878
824
  if (linesCount !== lines) {
879
- _this9.asProps.onChangeLinesCount(lines);
825
+ _this8.asProps.onChangeLinesCount(lines);
880
826
  }
881
827
  }, 100);
882
828
  }
@@ -903,57 +849,57 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
903
849
  }, {
904
850
  key: "toggleErrorsPopperByKeyboard",
905
851
  value: function toggleErrorsPopperByKeyboard(timer) {
906
- var _this0 = this;
852
+ var _this9 = this;
907
853
  if (this.toggleErrorsPopperTimeout) {
908
854
  clearTimeout(this.toggleErrorsPopperTimeout);
909
855
  }
910
856
  if (!this.isScrolling) {
911
857
  setTimeout(function () {
912
- var rowNode = _this0.getNodeFromSelection();
913
- _this0.toggleErrorsPopper('keyboardLineIndex', rowNode, timer);
858
+ var rowNode = _this9.getNodeFromSelection();
859
+ _this9.toggleErrorsPopper('keyboardLineIndex', rowNode, timer);
914
860
  }, 0);
915
861
  } else {
916
862
  this.toggleErrorsPopperTimeout = window.setTimeout(function () {
917
- _this0.toggleErrorsPopperByKeyboard(timer);
863
+ _this9.toggleErrorsPopperByKeyboard(timer);
918
864
  }, 50);
919
865
  }
920
866
  }
921
867
  }, {
922
868
  key: "toggleErrorsPopper",
923
869
  value: function toggleErrorsPopper(key, target, timer) {
924
- var _this1 = this;
870
+ var _this10 = this;
925
871
  if (target instanceof HTMLDivElement || target instanceof HTMLParagraphElement) {
926
872
  if (this.changeTriggerTimeout) {
927
873
  clearTimeout(this.changeTriggerTimeout);
928
874
  }
929
875
  this.changeTriggerTimeout = window.setTimeout(function () {
930
- var targetElement = target === _this1.textarea ? _this1.getNodeFromSelection() : target;
876
+ var targetElement = target === _this10.textarea ? _this10.getNodeFromSelection() : target;
931
877
  var lineIndex = -1;
932
878
  var isInvalidRow = false;
933
879
  if (targetElement instanceof HTMLParagraphElement) {
934
880
  isInvalidRow = targetElement.getAttribute('aria-invalid') === 'true';
935
- lineIndex = Array.from(_this1.textarea.childNodes).indexOf(targetElement);
936
- } else if (targetElement === _this1.textarea) {
881
+ lineIndex = Array.from(_this10.textarea.childNodes).indexOf(targetElement);
882
+ } else if (targetElement === _this10.textarea) {
937
883
  lineIndex = 0;
938
884
  }
939
885
  if (targetElement instanceof HTMLElement) {
940
- _this1.setState(function (prevState) {
886
+ _this10.setState(function (prevState) {
941
887
  var newState = {
942
- visibleErrorPopper: _this1.isFocusing && Boolean(_this1.asProps.commonErrorMessage) ? true : isInvalidRow,
888
+ visibleErrorPopper: _this10.isFocusing && Boolean(_this10.asProps.commonErrorMessage) ? true : isInvalidRow,
943
889
  mouseLineIndex: prevState.mouseLineIndex,
944
890
  keyboardLineIndex: prevState.keyboardLineIndex
945
891
  };
946
- if (_this1.isFocusing || key === 'mouseLineIndex' && isInvalidRow) {
892
+ if (_this10.isFocusing || key === 'mouseLineIndex' && isInvalidRow) {
947
893
  newState[key] = lineIndex;
948
894
  }
949
895
  return newState;
950
896
  }, function () {
951
- _this1.errorByInteraction = key === 'mouseLineIndex' ? 'mouse' : 'keyboard';
952
- var trigger = isInvalidRow ? targetElement : _this1.textarea;
953
- if (_this1.shouldChangePopperTrigger(trigger)) {
954
- var _this1$setPopperTrigg;
955
- (_this1$setPopperTrigg = _this1.setPopperTrigger) === null || _this1$setPopperTrigg === void 0 || _this1$setPopperTrigg.call(_this1, trigger);
956
- _this1.forceUpdate();
897
+ _this10.errorByInteraction = key === 'mouseLineIndex' ? 'mouse' : 'keyboard';
898
+ var trigger = isInvalidRow ? targetElement : _this10.textarea;
899
+ if (_this10.shouldChangePopperTrigger(trigger)) {
900
+ var _this10$setPopperTrig;
901
+ (_this10$setPopperTrig = _this10.setPopperTrigger) === null || _this10$setPopperTrig === void 0 ? void 0 : _this10$setPopperTrig.call(_this10, trigger);
902
+ _this10.forceUpdate();
957
903
  }
958
904
  });
959
905
  }
@@ -979,7 +925,7 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
979
925
  key: "handleChangeErrorIndex",
980
926
  value: function handleChangeErrorIndex(errorIndex) {
981
927
  var _error$lineNode,
982
- _this10 = this;
928
+ _this11 = this;
983
929
  var error = this.asProps.errors[errorIndex];
984
930
  var childNodes = this.textarea.childNodes;
985
931
  var node = error ? (_error$lineNode = error.lineNode) !== null && _error$lineNode !== void 0 ? _error$lineNode : childNodes.item(error.lineIndex) : null;
@@ -991,9 +937,9 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
991
937
  setTimeout(function () {
992
938
  var text = node.childNodes.item(0);
993
939
  if (text instanceof Text) {
994
- _this10.setSelection(text, 0, text.length);
940
+ _this11.setSelection(text, 0, text.length);
995
941
  } else {
996
- _this10.setSelection(node, 0, 1);
942
+ _this11.setSelection(node, 0, 1);
997
943
  }
998
944
  }, 150);
999
945
  }
@@ -1026,8 +972,8 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
1026
972
  var range = document.createRange();
1027
973
  range.setStart(node, start);
1028
974
  range.setEnd(node, end);
1029
- selection === null || selection === void 0 || selection.removeAllRanges();
1030
- selection === null || selection === void 0 || selection.addRange(range);
975
+ selection === null || selection === void 0 ? void 0 : selection.removeAllRanges();
976
+ selection === null || selection === void 0 ? void 0 : selection.addRange(range);
1031
977
  var nodeToScroll = node instanceof Text ? node.parentNode : node;
1032
978
  if (nodeToScroll instanceof HTMLElement) {
1033
979
  nodeToScroll.scrollIntoView({
@@ -1174,7 +1120,9 @@ var InputField = exports.InputField = /*#__PURE__*/function (_Component) {
1174
1120
  return null;
1175
1121
  }
1176
1122
  }]);
1123
+ return InputField;
1177
1124
  }(_core.Component);
1125
+ exports.InputField = InputField;
1178
1126
  (0, _defineProperty2["default"])(InputField, "displayName", 'Textarea');
1179
1127
  (0, _defineProperty2["default"])(InputField, "style", style);
1180
1128
  (0, _defineProperty2["default"])(InputField, "enhance", [(0, _uniqueID["default"])()]);