intergalactic 15.127.0 → 15.128.0-prerelease.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/add-filter/package.json +1 -1
  3. package/bulk-textarea/BulkTextarea.d.ts +1 -1
  4. package/bulk-textarea/BulkTextarea.types.d.ts +23 -21
  5. package/bulk-textarea/components/InputField/InputField.d.ts +4 -4
  6. package/bulk-textarea/components/InputField/InputField.types.d.ts +4 -4
  7. package/bulk-textarea/lib/cjs/BulkTextarea.js +10 -8
  8. package/bulk-textarea/lib/cjs/BulkTextarea.js.map +1 -1
  9. package/bulk-textarea/lib/cjs/BulkTextarea.types.js.map +1 -1
  10. package/bulk-textarea/lib/cjs/components/InputField/InputField.js +39 -26
  11. package/bulk-textarea/lib/cjs/components/InputField/InputField.js.map +1 -1
  12. package/bulk-textarea/lib/cjs/components/InputField/InputField.types.js.map +1 -1
  13. package/bulk-textarea/lib/cjs/components/InputField/inputField.shadow.css +17 -7
  14. package/bulk-textarea/lib/es6/BulkTextarea.js +10 -8
  15. package/bulk-textarea/lib/es6/BulkTextarea.js.map +1 -1
  16. package/bulk-textarea/lib/es6/BulkTextarea.types.js.map +1 -1
  17. package/bulk-textarea/lib/es6/components/InputField/InputField.js +39 -26
  18. package/bulk-textarea/lib/es6/components/InputField/InputField.js.map +1 -1
  19. package/bulk-textarea/lib/es6/components/InputField/InputField.types.js.map +1 -1
  20. package/bulk-textarea/lib/es6/components/InputField/inputField.shadow.css +17 -7
  21. package/bulk-textarea/lib/esm/BulkTextarea.mjs +53 -50
  22. package/bulk-textarea/lib/esm/components/InputField/InputField.mjs +273 -259
  23. package/bulk-textarea/lib/types/BulkTextarea.d.ts +1 -1
  24. package/bulk-textarea/lib/types/BulkTextarea.types.d.ts +23 -21
  25. package/bulk-textarea/lib/types/components/InputField/InputField.d.ts +4 -4
  26. package/bulk-textarea/lib/types/components/InputField/InputField.types.d.ts +4 -4
  27. package/bulk-textarea/package.json +1 -1
  28. package/components.json +14 -14
  29. package/errors/lib/cjs/Error.js +9 -9
  30. package/errors/lib/es6/Error.js +9 -9
  31. package/errors/lib/esm/Error.mjs +40 -40
  32. package/errors/package.json +1 -1
  33. package/feedback-form/lib/cjs/FeedbackForm.js +7 -7
  34. package/feedback-form/lib/cjs/component/checkbox-button/CheckboxButton.js +3 -3
  35. package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js +10 -4
  36. package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js.map +1 -1
  37. package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js +18 -14
  38. package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js.map +1 -1
  39. package/feedback-form/lib/cjs/style/slider-rating.shadow.css +1 -3
  40. package/feedback-form/lib/es6/FeedbackForm.js +7 -7
  41. package/feedback-form/lib/es6/component/checkbox-button/CheckboxButton.js +3 -3
  42. package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js +10 -4
  43. package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js.map +1 -1
  44. package/feedback-form/lib/es6/component/slider-rating/SliderRating.js +18 -14
  45. package/feedback-form/lib/es6/component/slider-rating/SliderRating.js.map +1 -1
  46. package/feedback-form/lib/es6/style/slider-rating.shadow.css +1 -3
  47. package/feedback-form/lib/esm/FeedbackForm.mjs +39 -39
  48. package/feedback-form/lib/esm/component/checkbox-button/CheckboxButton.mjs +13 -13
  49. package/feedback-form/lib/esm/component/feedback-rating/FeedbackRating.mjs +85 -81
  50. package/feedback-form/lib/esm/component/slider-rating/SliderRating.mjs +83 -79
  51. package/feedback-form/package.json +1 -1
  52. package/illustration/lib/cjs/index.js +1 -1
  53. package/illustration/lib/es6/index.js +1 -1
  54. package/illustration/package.json +1 -1
  55. package/modal/lib/cjs/Modal.js +8 -8
  56. package/modal/lib/es6/Modal.js +8 -8
  57. package/modal/lib/esm/Modal.mjs +73 -73
  58. package/modal/package.json +1 -1
  59. package/outside-click/lib/cjs/OutsideClick.js +14 -7
  60. package/outside-click/lib/cjs/OutsideClick.js.map +1 -1
  61. package/outside-click/lib/es6/OutsideClick.js +14 -7
  62. package/outside-click/lib/es6/OutsideClick.js.map +1 -1
  63. package/outside-click/lib/esm/OutsideClick.mjs +39 -35
  64. package/outside-click/package.json +1 -1
  65. package/package.json +1 -1
  66. package/popper/lib/cjs/Popper.js +6 -6
  67. package/popper/lib/es6/Popper.js +6 -6
  68. package/popper/lib/esm/Popper.mjs +25 -25
  69. package/popper/package.json +1 -1
  70. package/select/lib/cjs/InputSearch.js +15 -19
  71. package/select/lib/cjs/InputSearch.js.map +1 -1
  72. package/select/lib/cjs/Select.js +8 -8
  73. package/select/lib/es6/InputSearch.js +15 -19
  74. package/select/lib/es6/InputSearch.js.map +1 -1
  75. package/select/lib/es6/Select.js +8 -8
  76. package/select/lib/esm/InputSearch.mjs +63 -65
  77. package/select/lib/esm/Select.mjs +122 -122
  78. package/select/package.json +1 -1
  79. package/side-panel/lib/cjs/SidePanel.js +16 -16
  80. package/side-panel/lib/es6/SidePanel.js +16 -16
  81. package/side-panel/lib/esm/SidePanel.mjs +77 -77
  82. package/side-panel/package.json +1 -1
  83. package/time-picker/lib/cjs/TimePicker.js +12 -12
  84. package/time-picker/lib/es6/TimePicker.js +12 -12
  85. package/time-picker/lib/esm/TimePicker.mjs +38 -38
  86. package/time-picker/package.json +1 -1
  87. package/tooltip/lib/cjs/Tooltip.js +9 -9
  88. package/tooltip/lib/es6/Tooltip.js +9 -9
  89. package/tooltip/lib/esm/Tooltip.mjs +103 -103
  90. package/tooltip/package.json +1 -1
  91. package/widget-empty/lib/cjs/WidgetEmpty.js +5 -5
  92. package/widget-empty/lib/es6/WidgetEmpty.js +5 -5
  93. package/widget-empty/lib/esm/WidgetEmpty.mjs +32 -32
  94. package/widget-empty/package.json +1 -1
  95. package/wizard/lib/cjs/Wizard.js +12 -12
  96. package/wizard/lib/es6/Wizard.js +12 -12
  97. package/wizard/lib/esm/Wizard.mjs +103 -103
  98. package/wizard/package.json +1 -1
@@ -1,52 +1,52 @@
1
1
  import ae from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import ne from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
3
- import U from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import W from "@babel/runtime/helpers/esm/toConsumableArray";
4
4
  import le from "@babel/runtime/helpers/esm/classCallCheck";
5
- import se from "@babel/runtime/helpers/esm/createClass";
6
- import f from "@babel/runtime/helpers/esm/assertThisInitialized";
7
- import oe from "@babel/runtime/helpers/esm/inherits";
5
+ import oe from "@babel/runtime/helpers/esm/createClass";
6
+ import x from "@babel/runtime/helpers/esm/assertThisInitialized";
7
+ import se from "@babel/runtime/helpers/esm/inherits";
8
8
  import de from "@babel/runtime/helpers/esm/createSuper";
9
- import k from "@babel/runtime/helpers/esm/defineProperty";
9
+ import E from "@babel/runtime/helpers/esm/defineProperty";
10
10
  import { sstyled as ve } from 'intergalactic/utils/lib/core/index';
11
11
  import { sstyled as ue, assignProps as he, Component as ce } from 'intergalactic/core';
12
- import z from "react";
12
+ import O from "react";
13
13
  import { Box as ge } from 'intergalactic/flex-box';
14
- import N from 'intergalactic/tooltip';
15
- import { extractAriaProps as $ } from 'intergalactic/utils/lib/ariaProps';
14
+ import $ from 'intergalactic/tooltip';
15
+ import { extractAriaProps as ee } from 'intergalactic/utils/lib/ariaProps';
16
16
  import pe from 'intergalactic/utils/lib/uniqueID';
17
17
  import fe from "dompurify";
18
18
  var me = (
19
19
  /*__reshadow_css_start__*/
20
20
  (ve.insert(
21
21
  /*__inner_css_start__*/
22
- '.___SInputField_yxs6k_gg_>div{box-sizing:content-box;outline:0;border-radius:var(--intergalactic-control-rounded, 6px);border-color:var(--intergalactic-border-primary, #c4c7cf);border-style:solid;border-width:1px;overflow:auto;position:relative;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);word-wrap:break-word;word-break:break-word;font-family:inherit}.___SInputField_yxs6k_gg_>div:empty::before{content:"1. "attr(placeholder);color:var(--intergalactic-text-placeholder, #8a8e9b);position:absolute}.___SInputField_yxs6k_gg_>div:nth-child(even){color:red;counter-increment:row;margin-bottom:var(--intergalactic-spacing-1x, 4px);position:relative;word-break:break-all}.___SInputField_yxs6k_gg_>div:nth-child(even)::before{content:counter(row)".";display:inline-block;white-space:nowrap;text-align:right;color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SInputField_yxs6k_gg_>div>p{counter-increment:row;display:flex;margin:0 0 var(--intergalactic-spacing-1x, 4px)0;position:relative;word-break:break-all;white-space:pre-wrap;padding-right:20px}.___SInputField_yxs6k_gg_>div>p:last-of-type{margin-bottom:0}.___SInputField_yxs6k_gg_>div>p:not(:empty)::before{content:counter(row)".";display:inline-block;white-space:nowrap;text-align:right;color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SInputField_yxs6k_gg_>div>p[data-over-max-rows=true]{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7)}.___SInputField_yxs6k_gg_>div:has(p:nth-child(n+10))>p:nth-child(-n+9)::before{padding-left:8px}.___SInputField_yxs6k_gg_>div:has(p:nth-child(n+100))>p:nth-child(-n+9)::before{padding-left:16px}.___SInputField_yxs6k_gg_>div:has(p:nth-child(n+100))>p:nth-child(n+10)::before{padding-left:8px}.___SInputField_yxs6k_gg_>div:has(p:nth-child(n+100))>p:nth-child(n+100)::before{padding-left:0}.___SInputField_yxs6k_gg_.__showErrors_yxs6k_gg_>div[aria-invalid]>p[aria-invalid]:after{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBmaWxsPSIjZDEwMDJmIj48cGF0aCBkPSJNNyA2aDJ2NEg3VjZabTIgN3YtMkg3djJoMloiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYuMTUyIDEuMTcyYy43MTktMS41NjMgMi45NzctMS41NjMgMy42OTYgMGw2LjA0MyAxMy4xNDFjLjM2My43OTEtLjIyNSAxLjY4Ny0xLjEwOSAxLjY4N0gxLjIxOGMtLjg4NCAwLTEuNDcyLS44OTYtMS4xMDktMS42ODdMNi4xNTIgMS4xNzJabTcuMzc0IDEyLjgzN0w4IDEuOTkgMi40NzQgMTQuMDFoMTEuMDUyWiIvPjwvc3ZnPgo=\\ );position:absolute;right:0}.___SInputField_yxs6k_gg_._size_m_yxs6k_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_yxs6k)*20px);max-height:calc((var(--maxRows_yxs6k) - 1)*(20px + var(--intergalactic-spacing-1x, 4px)) + 18px)}.___SInputField_yxs6k_gg_._size_l_yxs6k_gg_>div:empty,.___SInputField_yxs6k_gg_._size_m_yxs6k_gg_>div:empty{padding-left:var(--intergalactic-spacing-8x, 32px)}.___SInputField_yxs6k_gg_._size_m_yxs6k_gg_>div:empty::before{left:var(--intergalactic-spacing-4x, 16px)}.___SInputField_yxs6k_gg_._size_l_yxs6k_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_yxs6k)*24px);max-height:calc((var(--maxRows_yxs6k) - 1)*(24px + var(--intergalactic-spacing-1x, 4px)) + 20px)}.___SInputField_yxs6k_gg_._size_l_yxs6k_gg_>div:empty::before{left:calc(var(--intergalactic-spacing-4x, 16px) - var(--intergalactic-spacing-05x, 2px))}.___SInputField_yxs6k_gg_._state_normal_yxs6k_gg_:not(.__disabled_yxs6k_gg_)>div:focus:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));border-color:var(--intergalactic-border-info-active, #006dca)}.___SInputField_yxs6k_gg_._state_valid_yxs6k_gg_>div{border-color:var(--intergalactic-border-success-active, #007c65)}.___SInputField_yxs6k_gg_._state_valid_yxs6k_gg_>div:focus{box-shadow:var(--intergalactic-keyboard-focus-valid, 0px 0px 0px 3px rgba(0, 159, 129, 0.5))}.___SInputField_yxs6k_gg_._state_invalid_yxs6k_gg_>div{border-color:var(--intergalactic-border-critical-active, #d1002f);background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(209, 0, 47, 1) 0, rgba(209, 0, 47, 1) 2px, transparent 0, transparent 50%));background-size:6px 6px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:var(--intergalactic-control-rounded, 6px);background-repeat:repeat-y}.___SInputField_yxs6k_gg_._state_invalid_yxs6k_gg_>div:focus{box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SInputField_yxs6k_gg_.__readonly_yxs6k_gg_>div{background-color:var(--intergalactic-bg-secondary-neutral, #f4f5f9)}.___SInputField_yxs6k_gg_.__disabled_yxs6k_gg_>div{opacity:var(--intergalactic-disabled-opacity, 0.3)}',
23
- "yxs6k_gg_"
22
+ '.___SInputField_pt9l8_gg_>div{box-sizing:content-box;outline:0;border-radius:var(--intergalactic-control-rounded, 6px);border-color:var(--intergalactic-border-primary, #c4c7cf);border-style:solid;border-width:1px;overflow:auto;position:relative;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);word-wrap:break-word;word-break:break-word;font-family:inherit}.___SInputField_pt9l8_gg_>div:empty::before{content:"1. "attr(placeholder);color:var(--intergalactic-text-placeholder, #8a8e9b);position:absolute}.___SInputField_pt9l8_gg_>div:nth-child(even){color:red;counter-increment:row;margin-bottom:var(--intergalactic-spacing-1x, 4px);position:relative;word-break:break-all}.___SInputField_pt9l8_gg_>div:nth-child(even)::before{content:counter(row)".";display:inline-block;white-space:nowrap;text-align:right;color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SInputField_pt9l8_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_pt9l8_gg_>div>p:last-of-type{margin-bottom:0}.___SInputField_pt9l8_gg_>div>p:not(:empty)::before{content:counter(row)".";display:inline-block;white-space:nowrap;text-align:right;color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-1x, 4px);position:absolute;left:0}.___SInputField_pt9l8_gg_>div>p[data-over-max-rows=true]{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7)}.___SInputField_pt9l8_gg_>div:has(p:nth-child(n+10))>p{padding-left:var(--intergalactic-spacing-6x, 24px)}.___SInputField_pt9l8_gg_>div:has(p:nth-child(n+10))>p:nth-child(-n+9)::before{padding-left:var(--intergalactic-spacing-2x, 8px)}.___SInputField_pt9l8_gg_>div:has(p:nth-child(n+100))>p{padding-left:var(--intergalactic-spacing-8x, 32px)}.___SInputField_pt9l8_gg_>div:has(p:nth-child(n+100))>p:nth-child(-n+9)::before{padding-left:var(--intergalactic-spacing-4x, 16px)}.___SInputField_pt9l8_gg_>div:has(p:nth-child(n+100))>p:nth-child(n+10)::before{padding-left:var(--intergalactic-spacing-2x, 8px)}.___SInputField_pt9l8_gg_>div:has(p:nth-child(n+100))>p:nth-child(n+100)::before{padding-left:0}.___SInputField_pt9l8_gg_.__showErrors_pt9l8_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_pt9l8_gg_._size_m_pt9l8_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_pt9l8)*20px);max-height:calc((var(--maxRows_pt9l8) - 1)*(20px + var(--intergalactic-spacing-1x, 4px)) + 18px)}.___SInputField_pt9l8_gg_._size_m_pt9l8_gg_>div:empty{padding-left:var(--intergalactic-spacing-8x, 32px)}.___SInputField_pt9l8_gg_._size_l_pt9l8_gg_>div:empty::before,.___SInputField_pt9l8_gg_._size_m_pt9l8_gg_>div:empty::before{left:var(--intergalactic-spacing-4x, 16px)}.___SInputField_pt9l8_gg_._size_l_pt9l8_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_pt9l8)*24px);max-height:calc((var(--maxRows_pt9l8) - 1)*(24px + var(--intergalactic-spacing-1x, 4px)) + 20px)}.___SInputField_pt9l8_gg_._size_l_pt9l8_gg_>div:empty{padding-left:calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-05x, 2px))}.___SInputField_pt9l8_gg_._state_normal_pt9l8_gg_:not(.__disabled_pt9l8_gg_)>div:focus:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));border-color:var(--intergalactic-border-info-active, #006dca)}.___SInputField_pt9l8_gg_._state_valid_pt9l8_gg_>div{border-color:var(--intergalactic-border-success-active, #007c65)}.___SInputField_pt9l8_gg_._state_valid_pt9l8_gg_>div:focus{box-shadow:var(--intergalactic-keyboard-focus-valid, 0px 0px 0px 3px rgba(0, 159, 129, 0.5))}.___SInputField_pt9l8_gg_._state_invalid_pt9l8_gg_>div{border-color:var(--intergalactic-border-critical-active, #d1002f);background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(209, 0, 47, 1) 0, rgba(209, 0, 47, 1) 2px, transparent 0, transparent 50%));background-size:6px 6px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:var(--intergalactic-control-rounded, 6px);background-repeat:repeat-y}.___SInputField_pt9l8_gg_._state_invalid_pt9l8_gg_>div:focus{box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SInputField_pt9l8_gg_.__readonly_pt9l8_gg_>div{background-color:var(--intergalactic-bg-secondary-neutral, #f4f5f9)}.___SInputField_pt9l8_gg_.__disabled_pt9l8_gg_>div{opacity:var(--intergalactic-disabled-opacity, 0.3)}',
23
+ "pt9l8_gg_"
24
24
  ), {
25
- __SInputField: "___SInputField_yxs6k_gg_",
26
- _showErrors: "__showErrors_yxs6k_gg_",
27
- _readonly: "__readonly_yxs6k_gg_",
28
- _disabled: "__disabled_yxs6k_gg_",
29
- _size_m: "_size_m_yxs6k_gg_",
30
- "--minRows": "--minRows_yxs6k",
31
- "--maxRows": "--maxRows_yxs6k",
32
- _size_l: "_size_l_yxs6k_gg_",
33
- _state_normal: "_state_normal_yxs6k_gg_",
34
- _state_valid: "_state_valid_yxs6k_gg_",
35
- _state_invalid: "_state_invalid_yxs6k_gg_"
25
+ __SInputField: "___SInputField_pt9l8_gg_",
26
+ _showErrors: "__showErrors_pt9l8_gg_",
27
+ _readonly: "__readonly_pt9l8_gg_",
28
+ _disabled: "__disabled_pt9l8_gg_",
29
+ _size_m: "_size_m_pt9l8_gg_",
30
+ "--minRows": "--minRows_pt9l8",
31
+ "--maxRows": "--maxRows_pt9l8",
32
+ _size_l: "_size_l_pt9l8_gg_",
33
+ _state_normal: "_state_normal_pt9l8_gg_",
34
+ _state_valid: "_state_valid_pt9l8_gg_",
35
+ _state_invalid: "_state_invalid_pt9l8_gg_"
36
36
  })
37
- ), G = /* @__PURE__ */ function(ee) {
38
- oe(O, ee);
39
- var ie = de(O);
40
- function O(s) {
37
+ ), Y = /* @__PURE__ */ function(te) {
38
+ se(K, te);
39
+ var ie = de(K);
40
+ function K(o) {
41
41
  var e;
42
- return le(this, O), e = ie.call(this, s), k(f(e), "delimiter", `
43
- `), k(f(e), "skipEmptyLines", !0), k(f(e), "emptyLineValue", ""), k(f(e), "spaceLineValue", " "), k(f(e), "containerRef", /* @__PURE__ */ z.createRef()), k(f(e), "textarea", void 0), k(f(e), "popper", null), k(f(e), "setPopperTrigger", null), k(f(e), "errorByInteraction", null), k(f(e), "changeTriggerTimeout", 0), k(f(e), "isScrolling", !1), k(f(e), "scrollingTimeout", 0), k(f(e), "toggleErrorsPopperTimeout", 0), k(f(e), "isFocusing", !1), k(f(e), "linesCountTimeout", 0), k(f(e), "state", {
42
+ return le(this, K), e = ie.call(this, o), E(x(e), "delimiter", `
43
+ `), E(x(e), "skipEmptyLines", !0), E(x(e), "emptyLineValue", ""), E(x(e), "spaceLineValue", " "), E(x(e), "containerRef", /* @__PURE__ */ O.createRef()), E(x(e), "textarea", void 0), E(x(e), "popper", null), E(x(e), "setPopperTrigger", null), E(x(e), "errorByInteraction", null), E(x(e), "changeTriggerTimeout", 0), E(x(e), "isScrolling", !1), E(x(e), "scrollingTimeout", 0), E(x(e), "toggleErrorsPopperTimeout", 0), E(x(e), "isFocusing", !1), E(x(e), "linesCountTimeout", 0), E(x(e), "state", {
44
44
  visibleErrorPopper: !1,
45
45
  keyboardLineIndex: -1,
46
46
  mouseLineIndex: -1
47
- }), e.handlePaste = e.handlePaste.bind(f(e)), e.handleChange = e.handleChange.bind(f(e)), e.handleFocus = e.handleFocus.bind(f(e)), e.handleBlur = e.handleBlur.bind(f(e)), e.handleKeyDown = e.handleKeyDown.bind(f(e)), e.handleMouseDown = e.handleMouseDown.bind(f(e)), e.handleMouseMove = e.handleMouseMove.bind(f(e)), e.handleMouseLeave = e.handleMouseLeave.bind(f(e)), e.handleScroll = e.handleScroll.bind(f(e)), e.handleSelectAll = e.handleSelectAll.bind(f(e)), e.textarea = e.createContentEditableElement(s), e;
47
+ }), e.handlePaste = e.handlePaste.bind(x(e)), e.handleChange = e.handleChange.bind(x(e)), e.handleFocus = e.handleFocus.bind(x(e)), e.handleBlur = e.handleBlur.bind(x(e)), e.handleKeyDown = e.handleKeyDown.bind(x(e)), e.handleMouseDown = e.handleMouseDown.bind(x(e)), e.handleMouseMove = e.handleMouseMove.bind(x(e)), e.handleMouseLeave = e.handleMouseLeave.bind(x(e)), e.handleScroll = e.handleScroll.bind(x(e)), e.handleSelectAll = e.handleSelectAll.bind(x(e)), e.textarea = e.createContentEditableElement(o), e;
48
48
  }
49
- return se(O, [{
49
+ return oe(K, [{
50
50
  key: "uncontrolledProps",
51
51
  value: function() {
52
52
  return {
@@ -63,19 +63,23 @@ var me = (
63
63
  }
64
64
  }, {
65
65
  key: "componentDidUpdate",
66
- value: function(e, i) {
67
- var r = this, t = this.props, a = t.value, n = t.errors, l = t.errorIndex, d = t.showErrors, g = t.disabled, m = t.readonly, h = t.highlightErrorIndex, v = t.lineProcessing, o = t["aria-describedby"], E = o === void 0 ? "" : o;
68
- e.value !== a && a !== this.getValues().join(this.delimiter) && this.handleValueOutChange(), (e.showErrors !== d || e.errors.length !== n.length) && (this.toggleAriaInvalid(d, n.length), d === !1 && this.textarea.setAttribute("aria-describedby", E)), e.errorIndex !== l && h && this.handleChangeErrorIndex(l), (e.disabled !== g || e.readonly !== m) && (this.isDisabled ? (this.textarea.setAttribute("contenteditable", "false"), this.removeEventListeners(this.textarea)) : (this.textarea.setAttribute("contenteditable", "true"), this.addEventListeners(this.textarea)), g ? this.textarea.setAttribute("tabindex", "-1") : this.textarea.setAttribute("tabindex", "0"));
69
- var c = this.state.keyboardLineIndex;
70
- if (i.keyboardLineIndex !== -1 && i.keyboardLineIndex !== c) {
71
- if (v) {
72
- var x, y = this.getValues(), L = v((x = y[i.keyboardLineIndex]) !== null && x !== void 0 ? x : "", y), b = document.createTextNode(L), I = this.textarea.childNodes.item(i.keyboardLineIndex);
73
- I instanceof HTMLParagraphElement && (L === "" ? I.innerHTML = this.emptyLineValue : I.replaceChild(b, I.childNodes.item(0))), this.validateLine(I), setTimeout(function() {
74
- var M = r.textarea.childNodes.item(c);
75
- M && r.setErrorIndex(M);
66
+ value: function(e, t) {
67
+ var r = this, i = this.props, a = i.value, n = i.errors, l = i.errorIndex, d = i.showErrors, g = i.disabled, b = i.readonly, c = i.highlightErrorIndex, u = i.lineProcessing, s = i["aria-describedby"], y = s === void 0 ? "" : s;
68
+ if (e.value !== a) {
69
+ var v = this.getValues().join(this.delimiter);
70
+ (typeof a == "string" ? a !== v : a.join(this.delimiter) !== v) && this.handleValueOutChange();
71
+ }
72
+ (e.showErrors !== d || e.errors.length !== n.length) && (this.toggleAriaInvalid(d, n.length), d === !1 && this.textarea.setAttribute("aria-describedby", y)), e.errorIndex !== l && c && this.handleChangeErrorIndex(l), (e.disabled !== g || e.readonly !== b) && (this.isDisabled ? (this.textarea.setAttribute("contenteditable", "false"), this.removeEventListeners(this.textarea)) : (this.textarea.setAttribute("contenteditable", "true"), this.addEventListeners(this.textarea)), g ? this.textarea.setAttribute("tabindex", "-1") : this.textarea.setAttribute("tabindex", "0"));
73
+ var p = this.state.keyboardLineIndex;
74
+ if (t.keyboardLineIndex !== -1 && t.keyboardLineIndex !== p) {
75
+ if (u) {
76
+ var f, I = this.getValues(), L = u((f = I[t.keyboardLineIndex]) !== null && f !== void 0 ? f : "", I), k = document.createTextNode(L), M = this.textarea.childNodes.item(t.keyboardLineIndex);
77
+ M instanceof HTMLParagraphElement && (L === "" ? M.innerHTML = this.emptyLineValue : M.replaceChild(k, M.childNodes.item(0))), this.validateLine(M), setTimeout(function() {
78
+ var P = r.textarea.childNodes.item(p);
79
+ P && r.setErrorIndex(P);
76
80
  }, 0);
77
81
  }
78
- d || this.recalculateErrors(), this.recalculateLinesCount(), this.asProps.onChangeLineIndex(c);
82
+ d || this.recalculateErrors(), this.recalculateLinesCount(), this.asProps.onChangeLineIndex(p);
79
83
  }
80
84
  }
81
85
  }, {
@@ -86,8 +90,8 @@ var me = (
86
90
  }, {
87
91
  key: "isDisabled",
88
92
  get: function() {
89
- var e = this.asProps, i = e.disabled, r = e.readonly;
90
- return !!(i || r);
93
+ var e = this.asProps, t = e.disabled, r = e.readonly;
94
+ return !!(t || r);
91
95
  }
92
96
  }, {
93
97
  key: "popperDescribedId",
@@ -98,37 +102,37 @@ var me = (
98
102
  }, {
99
103
  key: "errorMessage",
100
104
  get: function() {
101
- var e, i, r, t = this.asProps, a = t.errors, n = t.errorIndex, l = t.commonErrorMessage, d = t.prevError, g = this.state, m = g.mouseLineIndex, h = g.keyboardLineIndex, v = this.errorByInteraction === "keyboard" ? h : this.errorByInteraction === "mouse" ? m : -1, o = a[n];
102
- v !== -1 && (o = a.find(function(x) {
103
- return (x == null ? void 0 : x.lineIndex) === v;
105
+ var e, t, r, i = this.asProps, a = i.errors, n = i.errorIndex, l = i.commonErrorMessage, d = i.prevError, g = this.state, b = g.mouseLineIndex, c = g.keyboardLineIndex, u = this.errorByInteraction === "keyboard" ? c : this.errorByInteraction === "mouse" ? b : -1, s = a[n];
106
+ u !== -1 && (s = a.find(function(p) {
107
+ return (p == null ? void 0 : p.lineIndex) === u;
104
108
  }));
105
- var E = a.length === 0 && !d ? null : (e = (i = o) === null || i === void 0 ? void 0 : i.errorMessage) !== null && e !== void 0 ? e : l === "" || a.length === 0 ? d == null ? void 0 : d.errorMessage : l, c = !((r = o) !== null && r !== void 0 && r.errorMessage) && (l === "" || a.length === 0 ? !(d != null && d.errorMessage) : !0);
109
+ var y = a.length === 0 && !d ? null : (e = (t = s) === null || t === void 0 ? void 0 : t.errorMessage) !== null && e !== void 0 ? e : l === "" || a.length === 0 ? d == null ? void 0 : d.errorMessage : l, v = !((r = s) !== null && r !== void 0 && r.errorMessage) && (l === "" || a.length === 0 ? !(d != null && d.errorMessage) : !0);
106
110
  return {
107
- errorMessage: E,
108
- isCommonError: c
111
+ errorMessage: y,
112
+ isCommonError: v
109
113
  };
110
114
  }
111
115
  }, {
112
116
  key: "createContentEditableElement",
113
117
  value: function(e) {
114
- var i = document.createElement("div");
115
- i.setAttribute("contentEditable", e.disabled || e.readonly ? "false" : "true"), i.setAttribute("role", "textbox"), i.setAttribute("classname", "editable"), e.id && i.setAttribute("id", e.id), e.placeholder && i.setAttribute("placeholder", e.placeholder);
116
- var r = $(e), t = r.extractedAriaProps;
117
- for (var a in t) {
118
+ var t = document.createElement("div");
119
+ t.setAttribute("contentEditable", e.disabled || e.readonly ? "false" : "true"), t.setAttribute("role", "textbox"), t.setAttribute("classname", "editable"), e.id && t.setAttribute("id", e.id), e.placeholder && t.setAttribute("placeholder", e.placeholder);
120
+ var r = ee(e), i = r.extractedAriaProps;
121
+ for (var a in i) {
118
122
  var n = e[a];
119
- n && i.setAttribute(a, n);
123
+ n && t.setAttribute(a, n);
120
124
  }
121
- return e.disabled ? i.setAttribute("tabIndex", "-1") : i.setAttribute("tabIndex", "0"), !e.disabled && !e.readonly ? this.addEventListeners(i) : i.addEventListener("keydown", this.handleSelectAll.bind(this)), i;
125
+ return e.disabled ? t.setAttribute("tabIndex", "-1") : t.setAttribute("tabIndex", "0"), !e.disabled && !e.readonly ? this.addEventListeners(t) : t.addEventListener("keydown", this.handleSelectAll.bind(this)), t;
122
126
  }
123
127
  }, {
124
128
  key: "handleValueOutChange",
125
129
  value: function() {
126
- var e = this.props, i = e.value, r = e.onChangeLinesCount;
127
- if (i === "")
130
+ var e = this.props, t = e.value, r = e.onChangeLinesCount;
131
+ if (t === "")
128
132
  this.textarea.textContent = "", r(0);
129
133
  else {
130
- var t, a = this.prepareNodesForPaste(i);
131
- (t = this.textarea).replaceChildren.apply(t, U(a)), this.recalculateLinesCount(), this.recalculateErrors();
134
+ var i, a = this.prepareNodesForPaste(t);
135
+ (i = this.textarea).replaceChildren.apply(i, W(a)), this.recalculateLinesCount(), this.recalculateErrors();
132
136
  }
133
137
  }
134
138
  }, {
@@ -142,16 +146,15 @@ var me = (
142
146
  }, {
143
147
  key: "handleMouseDown",
144
148
  value: function(e) {
145
- this.errorByInteraction = "keyboard";
146
- var i = e.target;
147
- i instanceof HTMLElement && (this.toggleErrorsPopper("keyboardLineIndex", i), this.setErrorIndex(i));
149
+ var t = e.target;
150
+ t instanceof HTMLElement && (this.toggleErrorsPopper("keyboardLineIndex", t), this.setErrorIndex(t));
148
151
  }
149
152
  }, {
150
153
  key: "handleMouseMove",
151
154
  value: function(e) {
152
155
  this.errorByInteraction = "mouse";
153
- var i = e.target;
154
- i !== this.textarea && (this.isFocusing || i instanceof HTMLElement && i.getAttribute("aria-invalid") === "true" ? this.toggleErrorsPopper("mouseLineIndex", i) : this.setState({
156
+ var t = e.target;
157
+ t !== this.textarea && (this.isFocusing || t instanceof HTMLElement && t.getAttribute("aria-invalid") === "true" ? this.toggleErrorsPopper("mouseLineIndex", t) : this.setState({
155
158
  visibleErrorPopper: !1
156
159
  }));
157
160
  }
@@ -160,8 +163,8 @@ var me = (
160
163
  value: function(e) {
161
164
  if (this.changeTriggerTimeout && clearTimeout(this.changeTriggerTimeout), this.isFocusing) {
162
165
  this.errorByInteraction = "keyboard";
163
- var i = this.getNodeFromSelection();
164
- this.toggleErrorsPopper("keyboardLineIndex", i, 0), this.setState({
166
+ var t = this.getNodeFromSelection();
167
+ this.toggleErrorsPopper("keyboardLineIndex", t, 0), this.setState({
165
168
  mouseLineIndex: -1
166
169
  });
167
170
  } else
@@ -172,85 +175,88 @@ var me = (
172
175
  }, {
173
176
  key: "handlePaste",
174
177
  value: function(e) {
175
- var i;
178
+ var t;
176
179
  e.preventDefault();
177
- var r = this.asProps.validateOn, t = (i = e.clipboardData) === null || i === void 0 ? void 0 : i.getData("text/plain"), a = t ? this.prepareNodesForPaste(t) : [], n = document.getSelection();
178
- if (n != null && n.anchorNode && n !== null && n !== void 0 && n.focusNode) {
179
- var l = n.anchorOffset, d = n.focusOffset, g = n.anchorNode.compareDocumentPosition(n.focusNode), m = this.getSelectionDirection(), h = m === "forward" ? n.anchorNode : n.focusNode, v = m === "forward" ? n.focusNode : n.anchorNode, o = m === "forward" ? l : d, E = m === "forward" ? d : l, c = h instanceof Text ? h.parentElement : h, x = v instanceof Text ? v.parentElement : v, y = null, L = null;
180
- if (v === this.textarea) {
181
- var b, I;
182
- (b = this.textarea).replaceChildren.apply(b, U(a));
183
- var M = a[a.length - 1];
184
- y = M.childNodes.item(0), L = ((I = M.textContent) !== null && I !== void 0 ? I : "").length;
185
- } else if (x instanceof HTMLParagraphElement && c instanceof HTMLParagraphElement) {
186
- var C, F, P, w, D, H = (C = c == null || (F = c.textContent) === null || F === void 0 ? void 0 : F.substring(0, o)) !== null && C !== void 0 ? C : "", A = (P = x == null || (w = x.textContent) === null || w === void 0 ? void 0 : w.substring(E)) !== null && P !== void 0 ? P : "";
187
- n.deleteFromDocument(), g !== 0 && this.textarea.removeChild(x);
188
- var T = a.splice(0, 1)[0], u = a[a.length - 1];
189
- if (c.textContent = (D = H + (T == null ? void 0 : T.textContent)) !== null && D !== void 0 ? D : "", c.after.apply(c, U(a)), u) {
190
- var S, _;
191
- u.textContent = ((S = u.textContent) !== null && S !== void 0 ? S : "") + A, y = u.childNodes.item(0), L = ((_ = u.textContent) !== null && _ !== void 0 ? _ : "").length, this.validateLine(u), this.setErrorIndex(u);
180
+ var r = this.asProps.validateOn, i = (t = e.clipboardData) === null || t === void 0 ? void 0 : t.getData("text/plain"), a = i ? this.prepareNodesForPaste(i) : [];
181
+ if (a.length !== 0) {
182
+ var n = document.getSelection();
183
+ if (n != null && n.anchorNode && n !== null && n !== void 0 && n.focusNode) {
184
+ var l = n.anchorOffset, d = n.focusOffset, g = n.anchorNode.compareDocumentPosition(n.focusNode), b = this.getSelectionDirection(), c = b === "forward" ? n.anchorNode : n.focusNode, u = b === "forward" ? n.focusNode : n.anchorNode, s = b === "forward" ? l : d, y = b === "forward" ? d : l, v = c instanceof Text ? c.parentElement : c, p = u instanceof Text ? u.parentElement : u, f = null, I = null;
185
+ if (u === this.textarea) {
186
+ var L, k;
187
+ (L = this.textarea).replaceChildren.apply(L, W(a));
188
+ var M = a[a.length - 1];
189
+ f = M.childNodes.item(0), I = ((k = M.textContent) !== null && k !== void 0 ? k : "").length;
190
+ } else if (p instanceof HTMLParagraphElement && v instanceof HTMLParagraphElement) {
191
+ var P, A, S, C, w, F = (P = v == null || (A = v.textContent) === null || A === void 0 ? void 0 : A.substring(0, s)) !== null && P !== void 0 ? P : "", D = (S = p == null || (C = p.textContent) === null || C === void 0 ? void 0 : C.substring(y)) !== null && S !== void 0 ? S : "", H = F.trim() === "" ? "" : F, h = D.trim() === "" ? "" : D;
192
+ n.deleteFromDocument(), g !== 0 && this.textarea.removeChild(p);
193
+ var T = a.splice(0, 1)[0], _ = a[a.length - 1];
194
+ if (v.textContent = (w = H + (T == null ? void 0 : T.textContent)) !== null && w !== void 0 ? w : "", v.after.apply(v, W(a)), _) {
195
+ var m, B;
196
+ _.textContent = ((m = _.textContent) !== null && m !== void 0 ? m : "") + h, f = _.childNodes.item(0), I = ((B = _.textContent) !== null && B !== void 0 ? B : "").length, this.validateLine(_), this.setErrorIndex(_);
197
+ } else {
198
+ var R, V;
199
+ I = ((R = v.textContent) !== null && R !== void 0 ? R : "").length, v.textContent = ((V = v.textContent) !== null && V !== void 0 ? V : "") + h, f = v.childNodes.item(0), this.validateLine(v), this.setErrorIndex(v);
200
+ }
201
+ }
202
+ if (f instanceof Text) {
203
+ var j, z;
204
+ this.setSelection(f, (j = I) !== null && j !== void 0 ? j : 1, (z = I) !== null && z !== void 0 ? z : 1), this.toggleErrorsPopper("keyboardLineIndex", f.parentNode);
192
205
  } else {
193
- var p, B;
194
- L = ((p = c.textContent) !== null && p !== void 0 ? p : "").length, c.textContent = ((B = c.textContent) !== null && B !== void 0 ? B : "") + A, y = c.childNodes.item(0), this.validateLine(c), this.setErrorIndex(c);
206
+ var Z;
207
+ console.warn("incorrect child type", f, (Z = f) === null || Z === void 0 ? void 0 : Z.parentNode);
195
208
  }
196
209
  }
197
- if (y instanceof Text) {
198
- var R, K;
199
- this.setSelection(y, (R = L) !== null && R !== void 0 ? R : 1, (K = L) !== null && K !== void 0 ? K : 1), this.toggleErrorsPopper("keyboardLineIndex", y.parentNode);
200
- } else {
201
- var V;
202
- console.warn("incorrect child type", y, (V = y) === null || V === void 0 ? void 0 : V.parentNode);
203
- }
210
+ this.recalculateLinesCount(), (r.includes("paste") || this.asProps.showErrors) && this.recalculateErrors();
204
211
  }
205
- this.recalculateLinesCount(), (r.includes("paste") || this.asProps.showErrors) && this.recalculateErrors();
206
212
  }
207
213
  }, {
208
214
  key: "handleChange",
209
215
  value: function(e) {
210
- var i = e.target;
211
- if (i instanceof HTMLDivElement && e instanceof InputEvent) {
212
- var r, t = this.textarea.childNodes, a = t.item(0), n = t.item(1), l = document.getSelection();
216
+ var t = e.target;
217
+ if (t instanceof HTMLDivElement && e instanceof InputEvent) {
218
+ var r, i = this.textarea.childNodes, a = i.item(0), n = i.item(1), l = document.getSelection();
213
219
  if (a instanceof Text) {
214
- var d, g = (d = a.textContent) !== null && d !== void 0 ? d : "", m = document.createElement("p"), h = document.createTextNode(g);
215
- m.append(h), a.replaceWith(m), l == null || l.setPosition(m, g.length);
216
- } else !a || a instanceof HTMLBRElement && t.length === 1 ? (this.textarea.textContent = "", this.setState({
220
+ var d, g = (d = a.textContent) !== null && d !== void 0 ? d : "", b = document.createElement("p"), c = document.createTextNode(g);
221
+ b.append(c), a.replaceWith(b), l == null || l.setPosition(b, g.length);
222
+ } else !a || a instanceof HTMLBRElement && i.length === 1 ? (this.textarea.textContent = "", this.setState({
217
223
  keyboardLineIndex: 0
218
- })) : a instanceof HTMLParagraphElement && !((r = a.textContent) !== null && r !== void 0 && r.trim()) && (t.length <= 1 || n instanceof HTMLBRElement) && (this.textarea.textContent = "", this.setState({
224
+ })) : a instanceof HTMLParagraphElement && !((r = a.textContent) !== null && r !== void 0 && r.trim()) && (i.length <= 1 || n instanceof HTMLBRElement) && (this.textarea.textContent = "", this.setState({
219
225
  keyboardLineIndex: 0
220
226
  }));
221
- for (var v = 10, o = l == null ? void 0 : l.focusNode; ((E = o) === null || E === void 0 ? void 0 : E.parentNode) !== this.textarea && v > 0; ) {
222
- var E, c;
223
- o = (c = o) === null || c === void 0 ? void 0 : c.parentNode, v--;
227
+ for (var u = 10, s = l == null ? void 0 : l.focusNode; ((y = s) === null || y === void 0 ? void 0 : y.parentNode) !== this.textarea && u > 0; ) {
228
+ var y, v;
229
+ s = (v = s) === null || v === void 0 ? void 0 : v.parentNode, u--;
224
230
  }
225
- if (o instanceof HTMLParagraphElement) {
226
- var x, y, L = o.childNodes, b = (x = o.textContent) !== null && x !== void 0 ? x : "";
227
- if (L.length > 1) {
228
- var I, M = (I = L.item(0).textContent) === null || I === void 0 ? void 0 : I.length;
229
- o.textContent = b, M && this.setSelection(o.childNodes.item(0), M, M);
231
+ if (s instanceof HTMLParagraphElement) {
232
+ var p, f, I = s.childNodes, L = (p = s.textContent) !== null && p !== void 0 ? p : "";
233
+ if (I.length > 1) {
234
+ var k, M = (k = I.item(0).textContent) === null || k === void 0 ? void 0 : k.length;
235
+ s.textContent = L, M && this.setSelection(s.childNodes.item(0), M, M);
230
236
  }
231
- if (b.length > 0) {
232
- var C = b.at(0), F = b.at(b.length - 1);
233
- if (C === this.getEmptyParagraph().textContent || F === this.getEmptyParagraph().textContent) {
234
- var P = null;
235
- C === this.getEmptyParagraph().textContent ? (o.textContent = b.substring(1), P = e.inputType === "deleteContentBackward" || e.inputType === "deleteContentForward" ? 0 : o.textContent.length) : F === this.getEmptyParagraph().textContent && (o.textContent = b.substring(0, b.length - 1), P = o.textContent.length), P && this.setSelection(o.childNodes.item(0), P, P);
237
+ if (L.length > 0) {
238
+ var P = L.at(0), A = L.at(L.length - 1);
239
+ if (P === this.getEmptyParagraph().textContent || A === this.getEmptyParagraph().textContent) {
240
+ var S = null;
241
+ P === this.getEmptyParagraph().textContent ? (s.textContent = L.substring(1), S = e.inputType === "deleteContentBackward" || e.inputType === "deleteContentForward" ? 0 : s.textContent.length) : A === this.getEmptyParagraph().textContent && (s.textContent = L.substring(0, L.length - 1), S = s.textContent.length), S && this.setSelection(s.childNodes.item(0), S, S);
236
242
  }
237
- } else L.length === 1 && L[0] instanceof HTMLBRElement && (o.innerHTML = this.emptyLineValue);
238
- var w = this.asProps, D = w.errors, H = w.showErrors, A = this.validateLine(o);
239
- this.recalculateErrors(), this.setErrorIndex(o), !A && H && this.toggleErrorsPopper("keyboardLineIndex", o, 0);
240
- var T = !A || A && D.length === 1 && D[0].lineNode === o ? o : this.textarea;
241
- if (H && ((y = this.popper) === null || y === void 0 ? void 0 : y.current.state.elements.reference) !== T)
242
- if (this.shouldChangePopperTrigger(T)) {
243
- var u;
244
- (u = this.setPopperTrigger) === null || u === void 0 || u.call(this, T);
243
+ } else I.length === 1 && I[0] instanceof HTMLBRElement && (s.innerHTML = this.emptyLineValue);
244
+ var C = this.asProps, w = C.errors, F = C.showErrors, D = this.validateLine(s);
245
+ this.recalculateErrors(), this.setErrorIndex(s), !D && F && this.toggleErrorsPopper("keyboardLineIndex", s, 0);
246
+ var H = !D || D && w.length === 1 && w[0].lineNode === s ? s : this.textarea;
247
+ if (F && ((f = this.popper) === null || f === void 0 ? void 0 : f.current.state.elements.reference) !== H)
248
+ if (this.shouldChangePopperTrigger(H)) {
249
+ var h;
250
+ (h = this.setPopperTrigger) === null || h === void 0 || h.call(this, H);
245
251
  } else
246
252
  this.setState({
247
253
  visibleErrorPopper: !1
248
254
  });
249
- } else if (o === null) {
250
- var S;
251
- if ((S = this.setPopperTrigger) === null || S === void 0 || S.call(this, this.textarea), (l == null ? void 0 : l.focusNode) === this.textarea && this.textarea.childNodes.length > 1) {
252
- var _ = l.focusOffset, p = this.textarea.childNodes.item(_ - 1), B = this.textarea.childNodes.item(_);
253
- this.textarea.removeChild(B), p instanceof HTMLParagraphElement && (p.innerHTML = this.emptyLineValue), p && this.setSelection(p, 0, 0);
255
+ } else if (s === null) {
256
+ var T;
257
+ if ((T = this.setPopperTrigger) === null || T === void 0 || T.call(this, this.textarea), (l == null ? void 0 : l.focusNode) === this.textarea && this.textarea.childNodes.length > 1) {
258
+ var _ = l.focusOffset, m = this.textarea.childNodes.item(_ - 1), B = this.textarea.childNodes.item(_);
259
+ this.textarea.removeChild(B), m instanceof HTMLParagraphElement && (m.innerHTML = this.emptyLineValue), m && this.setSelection(m, 0, 0);
254
260
  } else
255
261
  this.setSelection(this.textarea, 0, 0);
256
262
  }
@@ -265,13 +271,15 @@ var me = (
265
271
  }, {
266
272
  key: "handleBlur",
267
273
  value: function(e) {
268
- var i = this;
274
+ var t = this;
269
275
  this.isFocusing = !1, this.setState({
270
276
  visibleErrorPopper: !1
271
277
  });
272
- var r = this.asProps, t = r.validateOn, a = r.onBlur;
273
- t.includes("blur") && this.recalculateErrors(), a(this.getValues().join(this.delimiter), e), setTimeout(function() {
274
- i.setState({
278
+ var r = this.asProps, i = r.validateOn, a = r.onBlur, n = r.value;
279
+ i.includes("blur") && this.recalculateErrors();
280
+ var l = typeof n == "string" ? this.getValues().join(this.delimiter) : this.getValues();
281
+ a(l, e), setTimeout(function() {
282
+ t.setState({
275
283
  keyboardLineIndex: -1
276
284
  });
277
285
  }, 200);
@@ -279,82 +287,82 @@ var me = (
279
287
  }, {
280
288
  key: "handleKeyDown",
281
289
  value: function(e) {
282
- var i = this;
290
+ var t = this;
283
291
  this.errorByInteraction = "keyboard";
284
- var r = this.asProps.linesDelimiters, t = this.getNodeFromSelection();
292
+ var r = this.asProps.linesDelimiters, i = this.getNodeFromSelection();
285
293
  if (e.key === "Enter" || r != null && r.includes(e.key)) {
286
- if (t === this.textarea && e.preventDefault(), t instanceof HTMLParagraphElement) {
287
- var a, n = (a = t.textContent) === null || a === void 0 ? void 0 : a.trim();
294
+ if (i === this.textarea && e.preventDefault(), i instanceof HTMLParagraphElement) {
295
+ var a, n = (a = i.textContent) === null || a === void 0 ? void 0 : a.trim();
288
296
  if (!n)
289
297
  e.preventDefault();
290
298
  else {
291
- var l, d, g, m;
299
+ var l, d, g, b;
292
300
  e.preventDefault();
293
- var h = document.getSelection(), v = (h == null ? void 0 : h.focusNode) instanceof Text ? h.focusNode : h == null || (l = h.focusNode) === null || l === void 0 ? void 0 : l.childNodes.item(0), o = h == null ? void 0 : h.focusOffset, E = "";
294
- if (v instanceof Text && o !== void 0 && o !== ((d = v.textContent) === null || d === void 0 ? void 0 : d.length)) {
295
- var c, x;
296
- E = (c = (x = v.textContent) === null || x === void 0 ? void 0 : x.substring(o)) !== null && c !== void 0 ? c : this.emptyLineValue, v.textContent && (v.textContent = v.textContent.substring(0, o));
301
+ var c = document.getSelection(), u = (c == null ? void 0 : c.focusNode) instanceof Text ? c.focusNode : c == null || (l = c.focusNode) === null || l === void 0 ? void 0 : l.childNodes.item(0), s = c == null ? void 0 : c.focusOffset, y = "";
302
+ if (u instanceof Text && s !== void 0 && s !== ((d = u.textContent) === null || d === void 0 ? void 0 : d.length)) {
303
+ var v, p;
304
+ y = (v = (p = u.textContent) === null || p === void 0 ? void 0 : p.substring(s)) !== null && v !== void 0 ? v : this.emptyLineValue, u.textContent && (u.textContent = u.textContent.substring(0, s));
297
305
  }
298
- ((g = t.textContent) === null || g === void 0 ? void 0 : g.trim()) === "" && (t.innerHTML = this.emptyLineValue);
299
- var y = document.createElement("p");
300
- E ? y.textContent = E : y.innerHTML = this.emptyLineValue, t.after(y), this.setSelection(y, 0, 0), this.validateLine(t), this.validateLine(y), t.previousSibling && this.validateLine(t.previousSibling), this.setErrorIndex(y), ((m = y.textContent) === null || m === void 0 ? void 0 : m.trim()) !== "" && this.recalculateLinesCount(), setTimeout(function() {
301
- i.recalculateErrors();
306
+ ((g = i.textContent) === null || g === void 0 ? void 0 : g.trim()) === "" && (i.innerHTML = this.emptyLineValue);
307
+ var f = document.createElement("p");
308
+ y ? f.textContent = y : f.innerHTML = this.emptyLineValue, i.after(f), this.setSelection(f, 0, 0), this.validateLine(i), this.validateLine(f), i.previousSibling && this.validateLine(i.previousSibling), this.setErrorIndex(f), ((b = f.textContent) === null || b === void 0 ? void 0 : b.trim()) !== "" && this.recalculateLinesCount(), setTimeout(function() {
309
+ t.recalculateErrors();
302
310
  }, 0), this.toggleErrorsPopperByKeyboard(0);
303
311
  }
304
312
  }
305
313
  } else if (e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "ArrowLeft" || e.key === "ArrowRight")
306
- t instanceof HTMLParagraphElement && this.handleCursorMovement(t, e), this.toggleErrorsPopperByKeyboard(200);
307
- else if (this.isDeleteKey(e) && t instanceof HTMLParagraphElement) {
308
- var L;
309
- if (((L = t.textContent) === null || L === void 0 ? void 0 : L.trim()) === "" && !this.isRangeSelection()) {
310
- var b = t.previousSibling;
311
- if (b instanceof HTMLParagraphElement) {
312
- var I;
313
- if (e.preventDefault(), this.textarea.removeChild(t), this.toggleErrorsPopperByKeyboard(0), ((I = b.textContent) === null || I === void 0 ? void 0 : I.trim()) === "" && b.previousSibling === null && this.textarea.childNodes.length === 1)
314
+ i instanceof HTMLParagraphElement && this.handleCursorMovement(i, e), this.toggleErrorsPopperByKeyboard(200);
315
+ else if (this.isDeleteKey(e) && i instanceof HTMLParagraphElement) {
316
+ var I;
317
+ if (((I = i.textContent) === null || I === void 0 ? void 0 : I.trim()) === "" && !this.isRangeSelection()) {
318
+ var L = i.previousSibling;
319
+ if (L instanceof HTMLParagraphElement) {
320
+ var k;
321
+ if (e.preventDefault(), this.textarea.removeChild(i), this.toggleErrorsPopperByKeyboard(0), ((k = L.textContent) === null || k === void 0 ? void 0 : k.trim()) === "" && L.previousSibling === null && this.textarea.childNodes.length === 1)
314
322
  this.textarea.textContent = "", this.setSelection(this.textarea, 0, 0);
315
- else if (b instanceof HTMLParagraphElement) {
316
- var M, C, F = b.childNodes.item(0), P = (M = (C = F.textContent) === null || C === void 0 ? void 0 : C.length) !== null && M !== void 0 ? M : 0;
317
- this.setSelection(F, P, P);
323
+ else if (L instanceof HTMLParagraphElement) {
324
+ var M, P, A = L.childNodes.item(0), S = (M = (P = A.textContent) === null || P === void 0 ? void 0 : P.length) !== null && M !== void 0 ? M : 0;
325
+ this.setSelection(A, S, S);
318
326
  } else
319
- console.warn("incorrect prevNode type", b);
327
+ console.warn("incorrect prevNode type", L);
320
328
  setTimeout(function() {
321
- i.recalculateErrors();
329
+ t.recalculateErrors();
322
330
  }, 0), this.toggleErrorsPopperByKeyboard(0);
323
331
  }
324
332
  } else if (this.isRangeSelection()) {
325
- var w, D, H, A, T, u = document.getSelection(), S = this.getSelectionDirection(), _ = S === "backward" ? u == null ? void 0 : u.focusNode : u == null ? void 0 : u.anchorNode, p = S === "backward" ? u == null ? void 0 : u.anchorNode : u == null ? void 0 : u.focusNode, B = S === "backward" ? u == null ? void 0 : u.focusOffset : u == null ? void 0 : u.anchorOffset, R = S === "backward" ? u == null ? void 0 : u.anchorOffset : u == null ? void 0 : u.focusOffset;
326
- if (_ === p && B === 0 && (p === t && R === 1 || R === ((w = t.textContent) === null || w === void 0 ? void 0 : w.length))) {
333
+ var C, w, F, D, H, h = document.getSelection(), T = this.getSelectionDirection(), _ = T === "backward" ? h == null ? void 0 : h.focusNode : h == null ? void 0 : h.anchorNode, m = T === "backward" ? h == null ? void 0 : h.anchorNode : h == null ? void 0 : h.focusNode, B = T === "backward" ? h == null ? void 0 : h.focusOffset : h == null ? void 0 : h.anchorOffset, R = T === "backward" ? h == null ? void 0 : h.anchorOffset : h == null ? void 0 : h.focusOffset;
334
+ if (_ === m && B === 0 && (m === i && R === 1 || R === ((C = i.textContent) === null || C === void 0 ? void 0 : C.length))) {
327
335
  e.preventDefault();
328
- var K = _ == null ? void 0 : _.parentElement, V = p == null ? void 0 : p.parentElement, W = this.textarea.childNodes;
329
- K === W.item(0) && V === W.item(W.length - 1) ? (this.textarea.textContent = "", this.setSelection(this.textarea, 0, 0)) : (t.innerHTML = this.emptyLineValue, this.validateLine(t)), this.setErrorIndex(t), this.recalculateLinesCount(), setTimeout(function() {
330
- i.recalculateErrors();
336
+ var V = _ == null ? void 0 : _.parentElement, j = m == null ? void 0 : m.parentElement, z = this.textarea.childNodes;
337
+ V === z.item(0) && j === z.item(z.length - 1) ? (this.textarea.textContent = "", this.setSelection(this.textarea, 0, 0)) : (i.innerHTML = this.emptyLineValue, this.validateLine(i)), this.setErrorIndex(i), this.recalculateLinesCount(), setTimeout(function() {
338
+ t.recalculateErrors();
331
339
  }, 0), this.toggleErrorsPopperByKeyboard(0);
332
- } else if (p !== _ && p instanceof Text && _ instanceof Text && (p == null ? void 0 : p.textContent) === (p == null || (D = p.parentNode) === null || D === void 0 ? void 0 : D.textContent) && (_ == null ? void 0 : _.textContent) === (_ == null || (H = _.parentNode) === null || H === void 0 ? void 0 : H.textContent) && B === 0 && R === (p == null || (A = p.parentNode) === null || A === void 0 || (T = A.textContent) === null || T === void 0 ? void 0 : T.length)) {
340
+ } else if (m !== _ && m instanceof Text && _ instanceof Text && (m == null ? void 0 : m.textContent) === (m == null || (w = m.parentNode) === null || w === void 0 ? void 0 : w.textContent) && (_ == null ? void 0 : _.textContent) === (_ == null || (F = _.parentNode) === null || F === void 0 ? void 0 : F.textContent) && B === 0 && R === (m == null || (D = m.parentNode) === null || D === void 0 || (H = D.textContent) === null || H === void 0 ? void 0 : H.length)) {
333
341
  e.preventDefault();
334
- var te = Array.from(this.textarea.children), X = _.parentElement, j = p.parentElement, Y = this.textarea.childNodes;
335
- if (X === Y.item(0) && j === Y.item(Y.length - 1))
342
+ var Z = Array.from(this.textarea.children), Q = _.parentElement, U = m.parentElement, J = this.textarea.childNodes;
343
+ if (Q === J.item(0) && U === J.item(J.length - 1))
336
344
  this.textarea.textContent = "", this.setSelection(this.textarea, 0, 0);
337
345
  else {
338
- var Q = !1, Z = ne(te), q;
346
+ var q = !1, G = ne(Z), N;
339
347
  try {
340
- for (Z.s(); !(q = Z.n()).done; ) {
341
- var J = q.value;
342
- if (J === X || Q)
343
- if (Q = !0, J === j) {
344
- j.innerHTML = this.emptyLineValue, this.setSelection(j, 0, 0);
348
+ for (G.s(); !(N = G.n()).done; ) {
349
+ var X = N.value;
350
+ if (X === Q || q)
351
+ if (q = !0, X === U) {
352
+ U.innerHTML = this.emptyLineValue, this.setSelection(U, 0, 0);
345
353
  break;
346
354
  } else
347
- this.textarea.removeChild(J);
355
+ this.textarea.removeChild(X);
348
356
  }
349
357
  } catch (re) {
350
- Z.e(re);
358
+ G.e(re);
351
359
  } finally {
352
- Z.f();
360
+ G.f();
353
361
  }
354
- this.validateLine(t);
362
+ this.validateLine(i);
355
363
  }
356
- this.setErrorIndex(t), this.recalculateLinesCount(), setTimeout(function() {
357
- i.recalculateErrors();
364
+ this.setErrorIndex(i), this.recalculateLinesCount(), setTimeout(function() {
365
+ t.recalculateErrors();
358
366
  }, 0), this.toggleErrorsPopperByKeyboard(0);
359
367
  }
360
368
  }
@@ -363,46 +371,46 @@ var me = (
363
371
  }, {
364
372
  key: "render",
365
373
  value: function() {
366
- var e = this.asProps, i, r, t = this, a = ge, n = this.asProps, l = n.styles, d = n.showErrors, g = this.state.visibleErrorPopper, m = this.errorMessage, h = m.errorMessage, v = m.isCommonError, o = d && g && !!h && !this.isDisabled, E = $(this.asProps), c = E.__excludeProps;
367
- return i = ue(l), /* @__PURE__ */ z.createElement(z.Fragment, null, /* @__PURE__ */ z.createElement(N, i.cn("Tooltip", {
374
+ var e = this.asProps, t, r, i = this, a = ge, n = this.asProps, l = n.styles, d = n.showErrors, g = this.state.visibleErrorPopper, b = this.errorMessage, c = b.errorMessage, u = b.isCommonError, s = d && g && !!c && !this.isDisabled, y = ee(this.asProps), v = y.__excludeProps;
375
+ return t = ue(l), /* @__PURE__ */ O.createElement(O.Fragment, null, /* @__PURE__ */ O.createElement($, t.cn("Tooltip", {
368
376
  interaction: "none",
369
- placement: v ? "right-start" : "right",
370
- visible: o,
377
+ placement: u ? "right-start" : "right",
378
+ visible: s,
371
379
  theme: "warning",
372
- offset: v ? void 0 : [0, 26],
380
+ offset: u ? void 0 : [0, 26],
373
381
  preventOverflow: {
374
382
  boundary: (r = this.containerRef.current) !== null && r !== void 0 ? r : void 0,
375
383
  tether: !1
376
384
  }
377
- }), function(x) {
378
- var y = x.popper, L = x.setTrigger;
379
- return t.popper || (t.setPopperTrigger = L, t.popper = y), /* @__PURE__ */ z.createElement(N.Popper, {
380
- id: t.popperDescribedId
381
- }, h);
382
- }), /* @__PURE__ */ z.createElement(a, i.cn("SInputField", ae({}, he({
385
+ }), function(p) {
386
+ var f = p.popper, I = p.setTrigger;
387
+ return i.popper || (i.setPopperTrigger = I, i.popper = f), /* @__PURE__ */ O.createElement($.Popper, {
388
+ id: i.popperDescribedId
389
+ }, c);
390
+ }), /* @__PURE__ */ O.createElement(a, t.cn("SInputField", ae({}, he({
383
391
  ref: this.containerRef,
384
- __excludeProps: ["onBlur", "value"].concat(U(c))
392
+ __excludeProps: ["onBlur", "value"].concat(W(v))
385
393
  }, e)))));
386
394
  }
387
395
  }, {
388
396
  key: "prepareNodesForPaste",
389
397
  value: function(e) {
390
- var i, r, t, a = this, n = [], l = this.asProps.pasteProps, d = (i = l == null ? void 0 : l.lineProcessing) !== null && i !== void 0 ? i : function(h) {
391
- var v = h.trim();
392
- return v === "" ? h : v;
393
- }, g = (r = l == null ? void 0 : l.skipEmptyLines) !== null && r !== void 0 ? r : this.skipEmptyLines, m = (t = l == null ? void 0 : l.delimiter) !== null && t !== void 0 ? t : this.delimiter;
394
- return e.split(m).forEach(function(h) {
395
- var v = d(h);
396
- if (v === "" && g === !1 || v !== "") {
397
- var o = document.createElement("p");
398
- if (v === "")
399
- o.innerHTML = a.emptyLineValue;
400
- else if (v.trim() === "") {
401
- var E = new RegExp("\\s", "g");
402
- o.innerHTML = fe.sanitize(v.replace(E, a.spaceLineValue));
398
+ var t, r, i, a = this, n = [], l = this.asProps.pasteProps, d = (t = l == null ? void 0 : l.lineProcessing) !== null && t !== void 0 ? t : function(u) {
399
+ var s = u.trim();
400
+ return s === "" ? u : s;
401
+ }, g = (r = l == null ? void 0 : l.skipEmptyLines) !== null && r !== void 0 ? r : this.skipEmptyLines, b = (i = l == null ? void 0 : l.delimiter) !== null && i !== void 0 ? i : this.delimiter, c = Array.isArray(e) ? e : e.split(b);
402
+ return c.forEach(function(u, s) {
403
+ var y = d(u, s, c.length);
404
+ if (y === "" && g === !1 || y !== "") {
405
+ var v = document.createElement("p");
406
+ if (y === "")
407
+ v.innerHTML = a.emptyLineValue;
408
+ else if (y.trim() === "") {
409
+ var p = new RegExp("\\s", "g");
410
+ v.innerHTML = fe.sanitize(y.replace(p, a.spaceLineValue));
403
411
  } else
404
- o.append(document.createTextNode(v));
405
- n.push(o), a.validateLine(o);
412
+ v.append(document.createTextNode(y));
413
+ n.push(v), a.validateLine(v);
406
414
  }
407
415
  }), n;
408
416
  }
@@ -410,11 +418,11 @@ var me = (
410
418
  key: "recalculateErrors",
411
419
  value: function() {
412
420
  var e = [];
413
- this.textarea.childNodes.forEach(function(i, r) {
414
- if (i instanceof HTMLParagraphElement && i.getAttribute("aria-invalid") === "true") {
415
- var t, a = {
416
- errorMessage: (t = i.dataset.errormessage) !== null && t !== void 0 ? t : "",
417
- lineNode: i,
421
+ this.textarea.childNodes.forEach(function(t, r) {
422
+ if (t instanceof HTMLParagraphElement && t.getAttribute("aria-invalid") === "true") {
423
+ var i, a = {
424
+ errorMessage: (i = t.dataset.errormessage) !== null && i !== void 0 ? i : "",
425
+ lineNode: t,
418
426
  lineIndex: r
419
427
  };
420
428
  e.push(a);
@@ -426,19 +434,24 @@ var me = (
426
434
  value: function() {
427
435
  var e = this;
428
436
  this.linesCountTimeout && clearTimeout(this.linesCountTimeout), this.linesCountTimeout = window.setTimeout(function() {
429
- var i = 0, r = e.asProps, t = r.maxLines, a = r.linesCount;
437
+ var t = 0, r = e.asProps, i = r.maxLines, a = r.linesCount;
430
438
  e.textarea.childNodes.forEach(function(n, l) {
431
- n instanceof HTMLParagraphElement && (n.dataset.overMaxRows = "false", n.textContent !== e.getEmptyParagraph().textContent && n.textContent !== "" && (i++, i > t && (n.dataset.overMaxRows = "true")));
432
- }), a !== i && e.asProps.onChangeLinesCount(i);
439
+ n instanceof HTMLParagraphElement && (n.dataset.overMaxRows = "false", n.textContent !== e.getEmptyParagraph().textContent && n.textContent !== "" && (t++, t > i && (n.dataset.overMaxRows = "true")));
440
+ }), a !== t && e.asProps.onChangeLinesCount(t);
433
441
  }, 100);
434
442
  }
435
443
  }, {
436
444
  key: "getValues",
437
445
  value: function() {
438
446
  var e = [];
439
- return this.textarea.childNodes.forEach(function(i) {
447
+ return this.textarea.childNodes.forEach(function(t) {
440
448
  var r;
441
- e.push((r = i.textContent) !== null && r !== void 0 ? r : "");
449
+ if (((r = t.textContent) === null || r === void 0 ? void 0 : r.trim()) === "")
450
+ e.push("");
451
+ else {
452
+ var i;
453
+ e.push((i = t.textContent) !== null && i !== void 0 ? i : "");
454
+ }
442
455
  }), e;
443
456
  }
444
457
  }, {
@@ -449,32 +462,33 @@ var me = (
449
462
  }, {
450
463
  key: "toggleErrorsPopperByKeyboard",
451
464
  value: function(e) {
452
- var i = this;
465
+ var t = this;
453
466
  this.toggleErrorsPopperTimeout && clearTimeout(this.toggleErrorsPopperTimeout), this.isScrolling ? this.toggleErrorsPopperTimeout = window.setTimeout(function() {
454
- i.toggleErrorsPopperByKeyboard(e);
467
+ t.toggleErrorsPopperByKeyboard(e);
455
468
  }, 50) : setTimeout(function() {
456
- var r = i.getNodeFromSelection();
457
- i.toggleErrorsPopper("keyboardLineIndex", r, e);
469
+ var r = t.getNodeFromSelection();
470
+ t.toggleErrorsPopper("keyboardLineIndex", r, e);
458
471
  }, 0);
459
472
  }
460
473
  }, {
461
474
  key: "toggleErrorsPopper",
462
- value: function(e, i, r) {
463
- var t = this;
464
- i instanceof HTMLDivElement || i instanceof HTMLParagraphElement ? (this.changeTriggerTimeout && clearTimeout(this.changeTriggerTimeout), this.changeTriggerTimeout = window.setTimeout(function() {
465
- var a = i === t.textarea ? t.getNodeFromSelection() : i, n = -1, l = !1;
466
- a instanceof HTMLParagraphElement ? (l = a.getAttribute("aria-invalid") === "true", n = Array.from(t.textarea.childNodes).indexOf(a)) : a === t.textarea && (n = 0), a instanceof HTMLElement && t.setState(function(d) {
475
+ value: function(e, t, r) {
476
+ var i = this;
477
+ t instanceof HTMLDivElement || t instanceof HTMLParagraphElement ? (this.changeTriggerTimeout && clearTimeout(this.changeTriggerTimeout), this.changeTriggerTimeout = window.setTimeout(function() {
478
+ var a = t === i.textarea ? i.getNodeFromSelection() : t, n = -1, l = !1;
479
+ a instanceof HTMLParagraphElement ? (l = a.getAttribute("aria-invalid") === "true", n = Array.from(i.textarea.childNodes).indexOf(a)) : a === i.textarea && (n = 0), a instanceof HTMLElement && i.setState(function(d) {
467
480
  var g = {
468
- visibleErrorPopper: t.isFocusing && t.asProps.commonErrorMessage ? !0 : l,
481
+ visibleErrorPopper: i.isFocusing && i.asProps.commonErrorMessage ? !0 : l,
469
482
  mouseLineIndex: d.mouseLineIndex,
470
483
  keyboardLineIndex: d.keyboardLineIndex
471
484
  };
472
- return (t.isFocusing || e === "mouseLineIndex" && l) && (g[e] = n), g;
485
+ return (i.isFocusing || e === "mouseLineIndex" && l) && (g[e] = n), g;
473
486
  }, function() {
474
- var d = l ? a : t.textarea;
475
- if (t.shouldChangePopperTrigger(d)) {
487
+ i.errorByInteraction = e === "mouseLineIndex" ? "mouse" : "keyboard";
488
+ var d = l ? a : i.textarea;
489
+ if (i.shouldChangePopperTrigger(d)) {
476
490
  var g;
477
- (g = t.setPopperTrigger) === null || g === void 0 || g.call(t, d), t.forceUpdate();
491
+ (g = i.setPopperTrigger) === null || g === void 0 || g.call(i, d), i.forceUpdate();
478
492
  }
479
493
  });
480
494
  }, r ?? 50)) : this.setState({
@@ -483,13 +497,13 @@ var me = (
483
497
  }
484
498
  }, {
485
499
  key: "toggleAriaInvalid",
486
- value: function(e, i) {
487
- e && i > 0 ? (this.textarea.setAttribute("aria-describedby", this.popperDescribedId), this.textarea.setAttribute("aria-invalid", "true")) : (this.textarea.removeAttribute("aria-invalid"), this.textarea.removeAttribute("aria-describedby"));
500
+ value: function(e, t) {
501
+ e && t > 0 ? (this.textarea.setAttribute("aria-describedby", this.popperDescribedId), this.textarea.setAttribute("aria-invalid", "true")) : (this.textarea.removeAttribute("aria-invalid"), this.textarea.removeAttribute("aria-describedby"));
488
502
  }
489
503
  }, {
490
504
  key: "handleChangeErrorIndex",
491
505
  value: function(e) {
492
- var i, r = this, t = this.asProps.errors[e], a = this.textarea.childNodes, n = t ? (i = t.lineNode) !== null && i !== void 0 ? i : a.item(t.lineIndex) : null, l = document.getSelection();
506
+ var t, r = this, i = this.asProps.errors[e], a = this.textarea.childNodes, n = i ? (t = i.lineNode) !== null && t !== void 0 ? t : a.item(i.lineIndex) : null, l = document.getSelection();
493
507
  l && n instanceof HTMLParagraphElement && (this.setState({
494
508
  visibleErrorPopper: !1
495
509
  }), setTimeout(function() {
@@ -500,63 +514,63 @@ var me = (
500
514
  }, {
501
515
  key: "validateLine",
502
516
  value: function(e) {
503
- var i = this.asProps.lineValidation;
504
- if (i && e instanceof HTMLElement) {
505
- var r, t = i((r = e.textContent) !== null && r !== void 0 ? r : "", this.getValues()), a = t.isValid, n = t.errorMessage;
517
+ var t = this.asProps.lineValidation;
518
+ if (t && e instanceof HTMLElement) {
519
+ var r, i = t((r = e.textContent) !== null && r !== void 0 ? r : "", this.getValues()), a = i.isValid, n = i.errorMessage;
506
520
  return a ? (e.removeAttribute("aria-invalid"), e.dataset.errormessage = void 0) : (e.setAttribute("aria-invalid", "true"), e.dataset.errormessage = n), a;
507
521
  }
508
522
  return !0;
509
523
  }
510
524
  }, {
511
525
  key: "setSelection",
512
- value: function(e, i, r) {
513
- var t = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "center", a = document.getSelection(), n = document.createRange();
514
- n.setStart(e, i), n.setEnd(e, r), a == null || a.removeAllRanges(), a == null || a.addRange(n);
526
+ value: function(e, t, r) {
527
+ var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "center", a = document.getSelection(), n = document.createRange();
528
+ n.setStart(e, t), n.setEnd(e, r), a == null || a.removeAllRanges(), a == null || a.addRange(n);
515
529
  var l = e instanceof Text ? e.parentNode : e;
516
530
  l instanceof HTMLElement && l.scrollIntoView({
517
- block: t,
518
- inline: t,
531
+ block: i,
532
+ inline: i,
519
533
  behavior: "smooth"
520
534
  });
521
535
  }
522
536
  }, {
523
537
  key: "getNodeFromSelection",
524
538
  value: function() {
525
- var e = document.getSelection(), i = (e == null ? void 0 : e.focusNode) instanceof Text ? e.focusNode.parentNode : e == null ? void 0 : e.focusNode;
526
- return i ?? null;
539
+ var e = document.getSelection(), t = (e == null ? void 0 : e.focusNode) instanceof Text ? e.focusNode.parentNode : e == null ? void 0 : e.focusNode;
540
+ return t ?? null;
527
541
  }
528
542
  }, {
529
543
  key: "handleCursorMovement",
530
- value: function(e, i) {
544
+ value: function(e, t) {
531
545
  var r = null;
532
- switch (i.key) {
546
+ switch (t.key) {
533
547
  case "ArrowUp":
534
- i.preventDefault(), r = e.previousSibling;
548
+ t.preventDefault(), r = e.previousSibling;
535
549
  break;
536
550
  case "ArrowDown":
537
- i.preventDefault(), r = e.nextSibling;
551
+ t.preventDefault(), r = e.nextSibling;
538
552
  break;
539
553
  case "ArrowLeft": {
540
- e.textContent === this.getEmptyParagraph().textContent && (i.preventDefault(), r = e.previousSibling);
554
+ e.textContent === this.getEmptyParagraph().textContent && (t.preventDefault(), r = e.previousSibling);
541
555
  break;
542
556
  }
543
557
  case "ArrowRight":
544
- e.textContent === this.getEmptyParagraph().textContent && (i.preventDefault(), r = e.nextSibling);
558
+ e.textContent === this.getEmptyParagraph().textContent && (t.preventDefault(), r = e.nextSibling);
545
559
  }
546
560
  if (r instanceof HTMLParagraphElement) {
547
- var t, a, n, l = document.getSelection(), d = r.childNodes.item(0), g = d instanceof Text ? d : r, m = (t = (a = r.textContent) === null || a === void 0 ? void 0 : a.trim()) !== null && t !== void 0 ? t : "", h = (n = l == null ? void 0 : l.focusOffset) !== null && n !== void 0 ? n : 0, v = h <= m.length ? h : m.length;
548
- i.key === "ArrowLeft" ? v = m.length : i.key === "ArrowRight" && (v = 0), this.setSelection(g, v, v, "nearest");
561
+ var i, a, n, l = document.getSelection(), d = r.childNodes.item(0), g = d instanceof Text ? d : r, b = (i = (a = r.textContent) === null || a === void 0 ? void 0 : a.trim()) !== null && i !== void 0 ? i : "", c = (n = l == null ? void 0 : l.focusOffset) !== null && n !== void 0 ? n : 0, u = c <= b.length ? c : b.length;
562
+ t.key === "ArrowLeft" ? u = b.length : t.key === "ArrowRight" && (u = 0), this.setSelection(g, u, u, "nearest");
549
563
  }
550
564
  }
551
565
  }, {
552
566
  key: "setErrorIndex",
553
567
  value: function(e) {
554
- var i = Array.from(this.textarea.childNodes).filter(function(r) {
568
+ var t = Array.from(this.textarea.childNodes).filter(function(r) {
555
569
  return r instanceof Element && r.getAttribute("aria-invalid") === "true";
556
570
  }).findIndex(function(r) {
557
571
  return r === e;
558
572
  });
559
- this.handlers.errorIndex(i);
573
+ this.handlers.errorIndex(t);
560
574
  }
561
575
  }, {
562
576
  key: "isDeleteKey",
@@ -584,8 +598,8 @@ var me = (
584
598
  value: function(e) {
585
599
  if (e.key === "a" && (e.metaKey || e.ctrlKey)) {
586
600
  e.preventDefault();
587
- var i = e.target;
588
- i instanceof HTMLElement && i === this.textarea && this.setSelection(i, 0, i.childNodes.length);
601
+ var t = e.target;
602
+ t instanceof HTMLElement && t === this.textarea && this.setSelection(t, 0, t.childNodes.length);
589
603
  }
590
604
  }
591
605
  }, {
@@ -599,18 +613,18 @@ var me = (
599
613
  value: function() {
600
614
  var e = document.getSelection();
601
615
  if (e != null && e.anchorNode && e !== null && e !== void 0 && e.focusNode) {
602
- var i = e.anchorNode.compareDocumentPosition(e.focusNode);
603
- return i === 0 && e.anchorOffset > e.focusOffset || // if nodes are the same
604
- i === Node.DOCUMENT_POSITION_PRECEDING ? "backward" : "forward";
616
+ var t = e.anchorNode.compareDocumentPosition(e.focusNode);
617
+ return t === 0 && e.anchorOffset > e.focusOffset || // if nodes are the same
618
+ t === Node.DOCUMENT_POSITION_PRECEDING ? "backward" : "forward";
605
619
  }
606
620
  return null;
607
621
  }
608
- }]), O;
622
+ }]), K;
609
623
  }(ce);
610
- k(G, "displayName", "Textarea");
611
- k(G, "style", me);
612
- k(G, "enhance", [pe()]);
613
- k(G, "defaultProps", {
624
+ E(Y, "displayName", "Textarea");
625
+ E(Y, "style", me);
626
+ E(Y, "enhance", [pe()]);
627
+ E(Y, "defaultProps", {
614
628
  defaultValue: "",
615
629
  size: "m",
616
630
  state: "normal",
@@ -621,5 +635,5 @@ k(G, "defaultProps", {
621
635
  defaultLinesCount: 0
622
636
  });
623
637
  export {
624
- G as InputField
638
+ Y as InputField
625
639
  };