@prom-ui/core 1.3.1 → 1.4.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 (233) hide show
  1. package/Avatar/cjs/index.development.js +99 -67
  2. package/Avatar/cjs/index.development.v2.js +99 -67
  3. package/Avatar/cjs/index.production.js +1 -1
  4. package/Avatar/cjs/index.production.v2.js +1 -1
  5. package/Avatar/index.d.ts +14 -14
  6. package/Avatar/package.json +1 -1
  7. package/Avatar/utils.d.ts +2 -2
  8. package/Backdrop/cjs/index.development.js +131 -77
  9. package/Backdrop/cjs/index.development.v2.js +131 -77
  10. package/Backdrop/cjs/index.production.js +1 -1
  11. package/Backdrop/cjs/index.production.v2.js +1 -1
  12. package/Backdrop/index.d.ts +25 -25
  13. package/Backdrop/package.json +1 -1
  14. package/Body/cjs/index.development.js +2 -0
  15. package/Body/cjs/index.development.v2.js +2 -0
  16. package/Body/index.d.ts +36 -36
  17. package/Body/package.json +1 -1
  18. package/BodyContext/cjs/index.development.js +6 -7
  19. package/BodyContext/cjs/index.development.v2.js +6 -7
  20. package/BodyContext/cjs/index.production.js +1 -1
  21. package/BodyContext/cjs/index.production.v2.js +1 -1
  22. package/BodyContext/index.d.ts +12 -12
  23. package/BodyContext/package.json +1 -1
  24. package/BodyProvider/cjs/index.development.js +7 -6
  25. package/BodyProvider/cjs/index.development.v2.js +7 -6
  26. package/BodyProvider/index.d.ts +10 -10
  27. package/BodyProvider/package.json +1 -1
  28. package/Box/cjs/index.development.js +4 -4
  29. package/Box/cjs/index.development.v2.js +4 -4
  30. package/Box/index.d.ts +106 -106
  31. package/Box/package.json +1 -1
  32. package/Button/cjs/index.development.js +67 -62
  33. package/Button/cjs/index.development.v2.js +67 -62
  34. package/Button/cjs/index.production.js +1 -1
  35. package/Button/cjs/index.production.v2.js +1 -1
  36. package/Button/index.d.ts +45 -45
  37. package/Button/package.json +1 -1
  38. package/ButtonPageUp/cjs/index.development.js +195 -85
  39. package/ButtonPageUp/cjs/index.development.v2.js +195 -85
  40. package/ButtonPageUp/cjs/index.production.js +1 -1
  41. package/ButtonPageUp/cjs/index.production.v2.js +1 -1
  42. package/ButtonPageUp/index.d.ts +18 -18
  43. package/ButtonPageUp/package.json +1 -1
  44. package/Checkbox/cjs/index.development.js +99 -67
  45. package/Checkbox/cjs/index.development.v2.js +99 -67
  46. package/Checkbox/cjs/index.production.js +1 -1
  47. package/Checkbox/cjs/index.production.v2.js +1 -1
  48. package/Checkbox/index.d.ts +8 -8
  49. package/Checkbox/package.json +1 -1
  50. package/Flex/index.d.ts +34 -34
  51. package/Flex/package.json +1 -1
  52. package/Grid/index.d.ts +46 -46
  53. package/Grid/package.json +1 -1
  54. package/Icon/index.d.ts +9 -9
  55. package/Icon/package.json +1 -1
  56. package/Image/index.d.ts +42 -42
  57. package/Image/package.json +1 -1
  58. package/ImageEmoji/cjs/index.development.js +70 -63
  59. package/ImageEmoji/cjs/index.development.v2.js +70 -63
  60. package/ImageEmoji/cjs/index.production.js +1 -1
  61. package/ImageEmoji/cjs/index.production.v2.js +1 -1
  62. package/ImageEmoji/index.d.ts +9 -9
  63. package/ImageEmoji/package.json +1 -1
  64. package/Input/index.d.ts +18 -18
  65. package/Input/package.json +1 -1
  66. package/InputField/addons/AfterClearValue.d.ts +3 -3
  67. package/InputField/addons/AfterCorrectValue.d.ts +2 -2
  68. package/InputField/addons/AfterLoading.d.ts +2 -2
  69. package/InputField/addons/AfterTogglePassword.d.ts +6 -6
  70. package/InputField/addons/ErrorText.d.ts +6 -6
  71. package/InputField/cjs/index.development.js +237 -173
  72. package/InputField/cjs/index.development.v2.js +237 -173
  73. package/InputField/cjs/index.production.js +1 -1
  74. package/InputField/cjs/index.production.v2.js +1 -1
  75. package/InputField/index.d.ts +18 -18
  76. package/InputField/package.json +1 -1
  77. package/InputField/utils.d.ts +10 -10
  78. package/KeyPress/cjs/index.development.js +13 -13
  79. package/KeyPress/cjs/index.development.v2.js +13 -13
  80. package/KeyPress/index.d.ts +14 -14
  81. package/KeyPress/package.json +1 -1
  82. package/Line/index.d.ts +13 -13
  83. package/Line/package.json +1 -1
  84. package/Link/cjs/index.development.js +5 -5
  85. package/Link/cjs/index.development.v2.js +5 -5
  86. package/Link/index.d.ts +28 -28
  87. package/Link/package.json +1 -1
  88. package/List/index.d.ts +23 -23
  89. package/List/package.json +1 -1
  90. package/Media/MediaProvider.d.ts +8 -8
  91. package/Media/cjs/index.development.js +70 -19
  92. package/Media/cjs/index.development.v2.js +70 -19
  93. package/Media/cjs/index.production.js +1 -1
  94. package/Media/cjs/index.production.v2.js +1 -1
  95. package/Media/index.d.ts +20 -20
  96. package/Media/package.json +1 -1
  97. package/OutsideClick/cjs/index.development.js +117 -61
  98. package/OutsideClick/cjs/index.development.v2.js +117 -61
  99. package/OutsideClick/cjs/index.production.js +1 -1
  100. package/OutsideClick/cjs/index.production.v2.js +1 -1
  101. package/OutsideClick/index.d.ts +12 -12
  102. package/OutsideClick/package.json +1 -1
  103. package/Overlay/cjs/index.development.js +197 -183
  104. package/Overlay/cjs/index.development.v2.js +197 -183
  105. package/Overlay/cjs/index.production.js +1 -1
  106. package/Overlay/cjs/index.production.v2.js +1 -1
  107. package/Overlay/components/OverlayHeader.d.ts +11 -11
  108. package/Overlay/components/SwipeClose.d.ts +11 -11
  109. package/Overlay/components/TouchScrollable.d.ts +8 -8
  110. package/Overlay/index.d.ts +76 -76
  111. package/Overlay/package.json +1 -1
  112. package/Overlay/utils.d.ts +10 -10
  113. package/Picture/index.d.ts +70 -70
  114. package/Picture/package.json +1 -1
  115. package/Portal/cjs/index.development.js +11 -11
  116. package/Portal/cjs/index.development.v2.js +11 -11
  117. package/Portal/index.d.ts +10 -10
  118. package/Portal/package.json +1 -1
  119. package/QRCode/cjs/index.development.js +11 -11
  120. package/QRCode/cjs/index.development.v2.js +11 -11
  121. package/QRCode/index.d.ts +17 -17
  122. package/QRCode/package.json +1 -1
  123. package/Rating/cjs/index.development.js +75 -69
  124. package/Rating/cjs/index.development.v2.js +75 -69
  125. package/Rating/cjs/index.production.js +1 -1
  126. package/Rating/cjs/index.production.v2.js +1 -1
  127. package/Rating/index.d.ts +17 -17
  128. package/Rating/package.json +1 -1
  129. package/RatingSelect/cjs/index.development.js +148 -68
  130. package/RatingSelect/cjs/index.development.v2.js +148 -68
  131. package/RatingSelect/cjs/index.production.js +1 -1
  132. package/RatingSelect/cjs/index.production.v2.js +1 -1
  133. package/RatingSelect/index.d.ts +22 -18
  134. package/RatingSelect/package.json +1 -1
  135. package/SafeQuery/cjs/index.development.js +158 -110
  136. package/SafeQuery/cjs/index.development.v2.js +158 -110
  137. package/SafeQuery/cjs/index.production.js +1 -1
  138. package/SafeQuery/cjs/index.production.v2.js +1 -1
  139. package/SafeQuery/components/Error.d.ts +7 -7
  140. package/SafeQuery/index.d.ts +10 -10
  141. package/SafeQuery/package.json +1 -1
  142. package/Scroll/index.d.ts +25 -25
  143. package/Scroll/package.json +1 -1
  144. package/ScrollControls/ScrollControlsButton.d.ts +11 -11
  145. package/ScrollControls/cjs/index.development.js +201 -113
  146. package/ScrollControls/cjs/index.development.v2.js +201 -113
  147. package/ScrollControls/cjs/index.production.js +1 -1
  148. package/ScrollControls/cjs/index.production.v2.js +1 -1
  149. package/ScrollControls/index.d.ts +16 -16
  150. package/ScrollControls/package.json +1 -1
  151. package/SimpleSlider/cjs/index.development.js +270 -158
  152. package/SimpleSlider/cjs/index.development.v2.js +270 -158
  153. package/SimpleSlider/cjs/index.production.js +1 -1
  154. package/SimpleSlider/cjs/index.production.v2.js +1 -1
  155. package/SimpleSlider/index.d.ts +41 -41
  156. package/SimpleSlider/package.json +1 -1
  157. package/SimpleSlider/useAutoPlay.d.ts +3 -3
  158. package/SimpleSlider/utils.d.ts +19 -19
  159. package/Skeleton/cjs/index.development.js +118 -64
  160. package/Skeleton/cjs/index.development.v2.js +118 -64
  161. package/Skeleton/cjs/index.production.js +1 -1
  162. package/Skeleton/cjs/index.production.v2.js +1 -1
  163. package/Skeleton/index.d.ts +37 -37
  164. package/Skeleton/package.json +1 -1
  165. package/Spinner/cjs/index.development.js +66 -61
  166. package/Spinner/cjs/index.development.v2.js +66 -61
  167. package/Spinner/cjs/index.production.js +1 -1
  168. package/Spinner/cjs/index.production.v2.js +1 -1
  169. package/Spinner/index.d.ts +29 -29
  170. package/Spinner/package.json +1 -1
  171. package/Text/index.d.ts +25 -25
  172. package/Text/package.json +1 -1
  173. package/TextEmoji/cjs/index.development.js +65 -60
  174. package/TextEmoji/cjs/index.development.v2.js +65 -60
  175. package/TextEmoji/cjs/index.production.js +1 -1
  176. package/TextEmoji/cjs/index.production.v2.js +1 -1
  177. package/TextEmoji/index.d.ts +9 -9
  178. package/TextEmoji/package.json +1 -1
  179. package/Tooltip/cjs/index.development.js +80 -91
  180. package/Tooltip/cjs/index.development.v2.js +80 -91
  181. package/Tooltip/cjs/index.production.js +1 -1
  182. package/Tooltip/cjs/index.production.v2.js +1 -1
  183. package/Tooltip/index.d.ts +87 -87
  184. package/Tooltip/package.json +1 -1
  185. package/Tumbler/cjs/index.development.js +98 -66
  186. package/Tumbler/cjs/index.development.v2.js +98 -66
  187. package/Tumbler/cjs/index.production.js +1 -1
  188. package/Tumbler/cjs/index.production.v2.js +1 -1
  189. package/Tumbler/index.d.ts +8 -8
  190. package/Tumbler/package.json +1 -1
  191. package/package.json +7 -5
  192. package/useBodyTTag/cjs/index.development.js +1 -1
  193. package/useBodyTTag/cjs/index.development.v2.js +1 -1
  194. package/useBodyTTag/index.d.ts +2 -2
  195. package/useBodyTTag/package.json +1 -1
  196. package/useDebounce/cjs/index.development.js +58 -6
  197. package/useDebounce/cjs/index.development.v2.js +58 -6
  198. package/useDebounce/cjs/index.production.js +1 -1
  199. package/useDebounce/cjs/index.production.v2.js +1 -1
  200. package/useDebounce/index.d.ts +4 -4
  201. package/useDebounce/package.json +1 -1
  202. package/useId/cjs/index.development.js +6 -7
  203. package/useId/cjs/index.development.v2.js +6 -7
  204. package/useId/cjs/index.production.js +1 -1
  205. package/useId/cjs/index.production.v2.js +1 -1
  206. package/useId/index.d.ts +4 -4
  207. package/useId/package.json +1 -1
  208. package/useIsMounted/cjs/index.development.js +3 -3
  209. package/useIsMounted/cjs/index.development.v2.js +3 -3
  210. package/useIsMounted/index.d.ts +4 -4
  211. package/useIsMounted/package.json +1 -1
  212. package/useKeyPress/cjs/index.development.js +76 -22
  213. package/useKeyPress/cjs/index.development.v2.js +76 -22
  214. package/useKeyPress/cjs/index.production.js +1 -1
  215. package/useKeyPress/cjs/index.production.v2.js +1 -1
  216. package/useKeyPress/index.d.ts +6 -6
  217. package/useKeyPress/package.json +1 -1
  218. package/useMedia/cjs/index.development.js +5 -5
  219. package/useMedia/cjs/index.development.v2.js +5 -5
  220. package/useMedia/index.d.ts +21 -21
  221. package/useMedia/package.json +1 -1
  222. package/useOutsideClick/cjs/index.development.js +2 -2
  223. package/useOutsideClick/cjs/index.development.v2.js +2 -2
  224. package/useOutsideClick/index.d.ts +5 -5
  225. package/useOutsideClick/package.json +1 -1
  226. package/usePortal/cjs/index.development.js +32 -27
  227. package/usePortal/cjs/index.development.v2.js +32 -27
  228. package/usePortal/index.d.ts +12 -12
  229. package/usePortal/package.json +1 -1
  230. package/useScrollPosition/cjs/index.development.js +2 -2
  231. package/useScrollPosition/cjs/index.development.v2.js +2 -2
  232. package/useScrollPosition/index.d.ts +5 -5
  233. package/useScrollPosition/package.json +1 -1
@@ -15,136 +15,195 @@ var Ok = require('@prom-ui/icons/Ok');
15
15
  var Cancel = require('@prom-ui/icons/Cancel');
16
16
 
17
17
  function _interopNamespaceCompat(e) {
18
- if (e && typeof e === 'object' && 'default' in e) return e;
19
- var n = Object.create(null);
20
- if (e) {
21
- Object.keys(e).forEach(function (k) {
22
- if (k !== 'default') {
23
- var d = Object.getOwnPropertyDescriptor(e, k);
24
- Object.defineProperty(n, k, d.get ? d : {
25
- enumerable: true,
26
- get: function () { return e[k]; }
27
- });
28
- }
18
+ if (e && typeof e === 'object' && 'default' in e) return e;
19
+ var n = Object.create(null);
20
+ if (e) {
21
+ Object.keys(e).forEach(function (k) {
22
+ if (k !== 'default') {
23
+ var d = Object.getOwnPropertyDescriptor(e, k);
24
+ Object.defineProperty(n, k, d.get ? d : {
25
+ enumerable: true,
26
+ get: function () { return e[k]; }
29
27
  });
30
- }
31
- n.default = e;
32
- return Object.freeze(n);
28
+ }
29
+ });
30
+ }
31
+ n.default = e;
32
+ return Object.freeze(n);
33
33
  }
34
34
 
35
35
  var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
36
36
 
37
- /******************************************************************************
38
- Copyright (c) Microsoft Corporation.
39
-
40
- Permission to use, copy, modify, and/or distribute this software for any
41
- purpose with or without fee is hereby granted.
42
-
43
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
44
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
45
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
46
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
47
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
48
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
49
- PERFORMANCE OF THIS SOFTWARE.
50
- ***************************************************************************** */
51
-
52
- var __assign = function() {
53
- __assign = Object.assign || function __assign(t) {
54
- for (var s, i = 1, n = arguments.length; i < n; i++) {
55
- s = arguments[i];
56
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
57
- }
58
- return t;
59
- };
60
- return __assign.apply(this, arguments);
61
- };
62
-
63
- function __rest(s, e) {
64
- var t = {};
65
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
66
- t[p] = s[p];
67
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
68
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
69
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
70
- t[p[i]] = s[p[i]];
71
- }
72
- return t;
73
- }
74
-
75
- function __makeTemplateObject(cooked, raw) {
76
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
77
- return cooked;
37
+ function _iterableToArrayLimit(arr, i) {
38
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
39
+ if (null != _i) {
40
+ var _s,
41
+ _e,
42
+ _x,
43
+ _r,
44
+ _arr = [],
45
+ _n = !0,
46
+ _d = !1;
47
+ try {
48
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
49
+ if (Object(_i) !== _i) return;
50
+ _n = !1;
51
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
52
+ } catch (err) {
53
+ _d = !0, _e = err;
54
+ } finally {
55
+ try {
56
+ if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
57
+ } finally {
58
+ if (_d) throw _e;
59
+ }
60
+ }
61
+ return _arr;
62
+ }
63
+ }
64
+ function _extends() {
65
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
66
+ for (var i = 1; i < arguments.length; i++) {
67
+ var source = arguments[i];
68
+ for (var key in source) {
69
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
70
+ target[key] = source[key];
71
+ }
72
+ }
73
+ }
74
+ return target;
75
+ };
76
+ return _extends.apply(this, arguments);
77
+ }
78
+ function _objectWithoutPropertiesLoose(source, excluded) {
79
+ if (source == null) return {};
80
+ var target = {};
81
+ var sourceKeys = Object.keys(source);
82
+ var key, i;
83
+ for (i = 0; i < sourceKeys.length; i++) {
84
+ key = sourceKeys[i];
85
+ if (excluded.indexOf(key) >= 0) continue;
86
+ target[key] = source[key];
87
+ }
88
+ return target;
89
+ }
90
+ function _objectWithoutProperties(source, excluded) {
91
+ if (source == null) return {};
92
+ var target = _objectWithoutPropertiesLoose(source, excluded);
93
+ var key, i;
94
+ if (Object.getOwnPropertySymbols) {
95
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
96
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
97
+ key = sourceSymbolKeys[i];
98
+ if (excluded.indexOf(key) >= 0) continue;
99
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
100
+ target[key] = source[key];
101
+ }
102
+ }
103
+ return target;
104
+ }
105
+ function _taggedTemplateLiteral(strings, raw) {
106
+ if (!raw) {
107
+ raw = strings.slice(0);
108
+ }
109
+ return Object.freeze(Object.defineProperties(strings, {
110
+ raw: {
111
+ value: Object.freeze(raw)
112
+ }
113
+ }));
114
+ }
115
+ function _slicedToArray(arr, i) {
116
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
117
+ }
118
+ function _arrayWithHoles(arr) {
119
+ if (Array.isArray(arr)) return arr;
120
+ }
121
+ function _unsupportedIterableToArray(o, minLen) {
122
+ if (!o) return;
123
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
124
+ var n = Object.prototype.toString.call(o).slice(8, -1);
125
+ if (n === "Object" && o.constructor) n = o.constructor.name;
126
+ if (n === "Map" || n === "Set") return Array.from(o);
127
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
128
+ }
129
+ function _arrayLikeToArray(arr, len) {
130
+ if (len == null || len > arr.length) len = arr.length;
131
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
132
+ return arr2;
133
+ }
134
+ function _nonIterableRest() {
135
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
78
136
  }
79
137
 
80
- var AfterTogglePassword = function (_a) {
81
- var inputType = _a.inputType,
82
- onChange = _a.onChange;
83
- var t = useBodyTTag.useBodyTTag().t;
138
+ var _templateObject$1, _templateObject2;
139
+ var AfterTogglePassword = function AfterTogglePassword(_ref) {
140
+ var inputType = _ref.inputType,
141
+ onChange = _ref.onChange;
142
+ var _useBodyTTag = useBodyTTag.useBodyTTag(),
143
+ t = _useBodyTTag.t;
84
144
  if (inputType === 'text') {
85
- return React__namespace.createElement(Button.Button, {
86
- type: 'button',
87
- "button-height": '1-1',
88
- "button-width": '1-1',
89
- "button-padding": 'none',
90
- onClick: function () {
145
+ return /*#__PURE__*/React__namespace.createElement(Button.Button, {
146
+ type: "button",
147
+ "button-height": "1-1",
148
+ "button-width": "1-1",
149
+ "button-padding": "none",
150
+ onClick: function onClick() {
91
151
  return onChange('password');
92
152
  },
93
- title: t(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C"], ["\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C"]))),
153
+ title: t(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C"]))),
94
154
  tabIndex: -1,
95
- "data-qaid": 'input_field_hide_password',
96
- "data-testid": 'input_field_hide_password'
97
- }, React__namespace.createElement(Icon.Icon, {
155
+ "data-qaid": "input_field_hide_password",
156
+ "data-testid": "input_field_hide_password"
157
+ }, /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
98
158
  "icon-as": EyeOpen.SvgEyeOpen,
99
- "icon-color": 'black-700',
100
- "icon-events": 'none',
159
+ "icon-color": "black-700",
160
+ "icon-events": "none",
101
161
  style: {
102
162
  width: 16,
103
163
  height: 16
104
164
  }
105
165
  }));
106
166
  }
107
- return React__namespace.createElement(Button.Button, {
108
- type: 'button',
109
- "button-height": '1-1',
110
- "button-width": '1-1',
111
- "button-padding": 'none',
112
- onClick: function () {
167
+ return /*#__PURE__*/React__namespace.createElement(Button.Button, {
168
+ type: "button",
169
+ "button-height": "1-1",
170
+ "button-width": "1-1",
171
+ "button-padding": "none",
172
+ onClick: function onClick() {
113
173
  return onChange('text');
114
174
  },
115
- title: t(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C"], ["\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C"]))),
175
+ title: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C"]))),
116
176
  tabIndex: -1,
117
- "data-qaid": 'input_field_show_password',
118
- "data-testid": 'input_field_show_password'
119
- }, React__namespace.createElement(Icon.Icon, {
177
+ "data-qaid": "input_field_show_password",
178
+ "data-testid": "input_field_show_password"
179
+ }, /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
120
180
  "icon-as": EyeClose.SvgEyeClose,
121
- "icon-color": 'black-600',
122
- "icon-events": 'none',
181
+ "icon-color": "black-600",
182
+ "icon-events": "none",
123
183
  style: {
124
184
  width: 16,
125
185
  height: 16
126
186
  }
127
187
  }));
128
188
  };
129
- var templateObject_1$1, templateObject_2;
130
189
 
131
- var AfterLoading = function () {
132
- return React__namespace.createElement(Spinner.Spinner, {
133
- "spinner-color": 'violet-500',
190
+ var AfterLoading = function AfterLoading() {
191
+ return /*#__PURE__*/React__namespace.createElement(Spinner.Spinner, {
192
+ "spinner-color": "violet-500",
134
193
  width: 16,
135
194
  height: 16,
136
- "data-qaid": 'input_field_loading',
137
- "data-testid": 'input_field_loading'
195
+ "data-qaid": "input_field_loading",
196
+ "data-testid": "input_field_loading"
138
197
  });
139
198
  };
140
199
 
141
- var AfterCorrectValue = function () {
142
- return React__namespace.createElement(Icon.Icon, {
200
+ var AfterCorrectValue = function AfterCorrectValue() {
201
+ return /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
143
202
  "icon-as": Ok.SvgOk,
144
- "icon-color": 'green-800',
145
- "icon-events": 'none',
146
- "data-qaid": 'input_field_correct_value',
147
- "data-testid": 'input_field_correct_value',
203
+ "icon-color": "green-800",
204
+ "icon-events": "none",
205
+ "data-qaid": "input_field_correct_value",
206
+ "data-testid": "input_field_correct_value",
148
207
  style: {
149
208
  width: 16,
150
209
  height: 16
@@ -152,39 +211,40 @@ var AfterCorrectValue = function () {
152
211
  });
153
212
  };
154
213
 
155
- var AfterClearValue = function (props) {
156
- var t = useBodyTTag.useBodyTTag().t;
157
- return React__namespace.createElement(Button.Button, __assign({
158
- type: 'button',
159
- "button-height": '1-1',
160
- "button-width": '1-1',
161
- "button-padding": 'none',
162
- title: t(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C"], ["\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C"]))),
214
+ var _templateObject;
215
+ var AfterClearValue = function AfterClearValue(props) {
216
+ var _useBodyTTag = useBodyTTag.useBodyTTag(),
217
+ t = _useBodyTTag.t;
218
+ return /*#__PURE__*/React__namespace.createElement(Button.Button, _extends({
219
+ type: "button",
220
+ "button-height": "1-1",
221
+ "button-width": "1-1",
222
+ "button-padding": "none",
223
+ title: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C"]))),
163
224
  tabIndex: -1,
164
- "data-qaid": 'input_field_clear_value',
165
- "data-testid": 'input_field_clear_value'
166
- }, props), React__namespace.createElement(Icon.Icon, {
225
+ "data-qaid": "input_field_clear_value",
226
+ "data-testid": "input_field_clear_value"
227
+ }, props), /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
167
228
  "icon-as": Cancel.SvgCancel,
168
- "icon-color": 'black-600',
169
- "icon-events": 'none',
229
+ "icon-color": "black-600",
230
+ "icon-events": "none",
170
231
  style: {
171
232
  width: 16,
172
233
  height: 16
173
234
  }
174
235
  }));
175
236
  };
176
- var templateObject_1;
177
237
 
178
238
  var css = {"root":"InputField__root___EVTeN","input":"InputField__input___rfpBC","beforeAndAfter":"InputField__beforeAndAfter___oqO-V","before":"InputField__before___GeS6- InputField__beforeAndAfter___oqO-V","after":"InputField__after___Cl38- InputField__beforeAndAfter___oqO-V","error":"InputField__error___hSs8w","label":"InputField__label___bwxYk","labelRequired":"InputField__labelRequired___bTTTw"};
179
239
 
180
- var ErrorText = function (_a) {
181
- var id = _a.id,
182
- children = _a.children;
183
- return React__namespace.createElement("div", {
240
+ var ErrorText = function ErrorText(_ref) {
241
+ var id = _ref.id,
242
+ children = _ref.children;
243
+ return /*#__PURE__*/React__namespace.createElement("div", {
184
244
  id: id,
185
245
  className: css.error,
186
- "data-qaid": 'input_field_error',
187
- "data-testid": 'input_field_error'
246
+ "data-qaid": "input_field_error",
247
+ "data-testid": "input_field_error"
188
248
  }, children);
189
249
  };
190
250
 
@@ -205,7 +265,9 @@ function resolveOnChange(target, e, onChange, targetValue) {
205
265
  // setQuery((prevStatus) => e.target.value);
206
266
  // }}
207
267
  // />
268
+
208
269
  var currentTarget = target.cloneNode(true);
270
+
209
271
  // Click clear button
210
272
  event = Object.create(e, {
211
273
  target: {
@@ -219,6 +281,7 @@ function resolveOnChange(target, e, onChange, targetValue) {
219
281
  onChange(event);
220
282
  return;
221
283
  }
284
+
222
285
  // Trigger by composition event, this means we need force change the input value
223
286
  if (targetValue !== undefined) {
224
287
  event = Object.create(e, {
@@ -250,10 +313,8 @@ function isNotEmptyArray(arr) {
250
313
  function getIsValueEmpty(value) {
251
314
  return valueToString(value).length <= 0;
252
315
  }
253
- var useForwardRef = function (ref, initialValue) {
254
- if (initialValue === void 0) {
255
- initialValue = null;
256
- }
316
+ var useForwardRef = function useForwardRef(ref) {
317
+ var initialValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
257
318
  var targetRef = React__namespace.useRef(initialValue);
258
319
  React__namespace.useEffect(function () {
259
320
  if (ref) {
@@ -267,7 +328,7 @@ var useForwardRef = function (ref, initialValue) {
267
328
  }, [ref]);
268
329
  return targetRef;
269
330
  };
270
- var prepareErrorList = function (prefix, error) {
331
+ var prepareErrorList = function prepareErrorList(prefix, error) {
271
332
  var result = [];
272
333
  if (Array.isArray(error)) {
273
334
  result = error.filter(function (errorItem) {
@@ -287,29 +348,32 @@ var prepareErrorList = function (prefix, error) {
287
348
  return result;
288
349
  };
289
350
 
290
- var InputField = React__namespace.forwardRef(function (_a, ref) {
291
- var addonBefore = _a.addonBefore,
292
- addonAfter = _a.addonAfter,
293
- _b = _a.addonBeforeWidth,
294
- addonBeforeWidth = _b === void 0 ? 40 : _b,
295
- _c = _a.addonAfterWidth,
296
- addonAfterWidth = _c === void 0 ? 40 : _c,
297
- _d = _a.error,
298
- error = _d === void 0 ? false : _d,
299
- label = _a.label,
300
- isLabelRequired = _a.isLabelRequired,
301
- props = __rest(_a, ["addonBefore", "addonAfter", "addonBeforeWidth", "addonAfterWidth", "error", "label", "isLabelRequired"]);
351
+ var _excluded = ["addonBefore", "addonAfter", "addonBeforeWidth", "addonAfterWidth", "error", "label", "isLabelRequired"];
352
+ var InputField = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
353
+ var addonBefore = _ref.addonBefore,
354
+ addonAfter = _ref.addonAfter,
355
+ _ref$addonBeforeWidth = _ref.addonBeforeWidth,
356
+ addonBeforeWidth = _ref$addonBeforeWidth === void 0 ? 40 : _ref$addonBeforeWidth,
357
+ _ref$addonAfterWidth = _ref.addonAfterWidth,
358
+ addonAfterWidth = _ref$addonAfterWidth === void 0 ? 40 : _ref$addonAfterWidth,
359
+ _ref$error = _ref.error,
360
+ error = _ref$error === void 0 ? false : _ref$error,
361
+ label = _ref.label,
362
+ isLabelRequired = _ref.isLabelRequired,
363
+ props = _objectWithoutProperties(_ref, _excluded);
302
364
  var componentId = useId.useId();
303
365
  var isMounted = React__namespace.useRef(false);
304
366
  var isSkipOnFocus = React__namespace.useRef(false);
305
367
  var isSkipOnBlur = React__namespace.useRef(false);
306
368
  var inputRef = useForwardRef(ref, null);
307
- var _e = React__namespace.useState(props.type),
308
- localType = _e[0],
309
- setLocalType = _e[1];
310
- var _f = React__namespace.useState(getIsValueEmpty(props.value || props.defaultValue)),
311
- isValueEmpty = _f[0],
312
- setIsValueEmpty = _f[1];
369
+ var _React$useState = React__namespace.useState(props.type),
370
+ _React$useState2 = _slicedToArray(_React$useState, 2),
371
+ localType = _React$useState2[0],
372
+ setLocalType = _React$useState2[1];
373
+ var _React$useState3 = React__namespace.useState(getIsValueEmpty(props.value || props.defaultValue)),
374
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
375
+ isValueEmpty = _React$useState4[0],
376
+ setIsValueEmpty = _React$useState4[1];
313
377
  React__namespace.useEffect(function () {
314
378
  if (isMounted.current) {
315
379
  var nextIsValueEmpty = getIsValueEmpty(props.value);
@@ -322,18 +386,18 @@ var InputField = React__namespace.forwardRef(function (_a, ref) {
322
386
  }, [props.value]);
323
387
  var currentAddonAfter = null;
324
388
  if (props.type === 'password' && addonAfter === 'togglePassword') {
325
- currentAddonAfter = React__namespace.createElement(AfterTogglePassword, {
389
+ currentAddonAfter = /*#__PURE__*/React__namespace.createElement(AfterTogglePassword, {
326
390
  inputType: localType,
327
- onChange: function (type) {
391
+ onChange: function onChange(type) {
328
392
  return setLocalType(type);
329
393
  }
330
394
  });
331
395
  } else if (addonAfter === 'clearValue') {
332
- currentAddonAfter = isValueEmpty ? null : React__namespace.createElement(AfterClearValue, {
333
- onClick: function (e) {
334
- var _a;
396
+ currentAddonAfter = isValueEmpty ? null : /*#__PURE__*/React__namespace.createElement(AfterClearValue, {
397
+ onClick: function onClick(e) {
335
398
  if (!getIsValueEmpty(props.value) && !props.onChange) {
336
- (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
399
+ var _inputRef$current;
400
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
337
401
  return;
338
402
  }
339
403
  if (inputRef.current) {
@@ -345,27 +409,27 @@ var InputField = React__namespace.forwardRef(function (_a, ref) {
345
409
  }
346
410
  }
347
411
  },
348
- onMouseEnter: function () {
412
+ onMouseEnter: function onMouseEnter() {
349
413
  isSkipOnFocus.current = true;
350
414
  isSkipOnBlur.current = true;
351
415
  },
352
- onTouchStart: function () {
416
+ onTouchStart: function onTouchStart() {
353
417
  isSkipOnFocus.current = true;
354
418
  isSkipOnBlur.current = true;
355
419
  },
356
- onMouseLeave: function () {
420
+ onMouseLeave: function onMouseLeave() {
357
421
  isSkipOnFocus.current = false;
358
422
  isSkipOnBlur.current = false;
359
423
  },
360
- onTouchEnd: function () {
424
+ onTouchEnd: function onTouchEnd() {
361
425
  isSkipOnFocus.current = false;
362
426
  isSkipOnBlur.current = false;
363
427
  }
364
428
  });
365
429
  } else if (addonAfter === 'correctValue') {
366
- currentAddonAfter = React__namespace.createElement(AfterCorrectValue, null);
430
+ currentAddonAfter = /*#__PURE__*/React__namespace.createElement(AfterCorrectValue, null);
367
431
  } else if (addonAfter === 'loading') {
368
- currentAddonAfter = React__namespace.createElement(AfterLoading, null);
432
+ currentAddonAfter = /*#__PURE__*/React__namespace.createElement(AfterLoading, null);
369
433
  } else {
370
434
  currentAddonAfter = addonAfter;
371
435
  }
@@ -377,72 +441,72 @@ var InputField = React__namespace.forwardRef(function (_a, ref) {
377
441
  var isRenderError = isNotEmptyArray(currentErrorList);
378
442
  var isInputError = isRenderError || error === true;
379
443
  var isInputRequired = Boolean((props === null || props === void 0 ? void 0 : props.required) || isLabelRequired);
380
- return React__namespace.createElement("div", {
444
+ return /*#__PURE__*/React__namespace.createElement("div", {
381
445
  className: props.className,
382
446
  style: props.style,
383
447
  "data-qaid": props['data-qaid'] || 'input_field',
384
448
  "data-testid": props['data-testid'] || 'input_field'
385
- }, isLabel && React__namespace.createElement("div", {
449
+ }, isLabel && /*#__PURE__*/React__namespace.createElement("div", {
386
450
  className: css.label
387
- }, React__namespace.createElement("label", {
388
- "data-qaid": 'input_field_label',
389
- "data-testid": 'input_field_label',
451
+ }, /*#__PURE__*/React__namespace.createElement("label", {
452
+ "data-qaid": "input_field_label",
453
+ "data-testid": "input_field_label",
390
454
  htmlFor: currentInputId
391
- }, label), isInputRequired && React__namespace.createElement(React__namespace.Fragment, null, "\u00A0", React__namespace.createElement("span", {
455
+ }, label), isInputRequired && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, "\xA0", /*#__PURE__*/React__namespace.createElement("span", {
392
456
  className: css.labelRequired,
393
- "data-qaid": 'input_field_label_required',
394
- "data-testid": 'input_field_label_required'
395
- }, "*"))), React__namespace.createElement("div", {
457
+ "data-qaid": "input_field_label_required",
458
+ "data-testid": "input_field_label_required"
459
+ }, "*"))), /*#__PURE__*/React__namespace.createElement("div", {
396
460
  className: css.root
397
- }, React__namespace.createElement(Input.Input, __assign({
461
+ }, /*#__PURE__*/React__namespace.createElement(Input.Input, _extends({
398
462
  ref: inputRef,
399
463
  "input-theme": isInputError ? 'red' : 'white',
400
464
  "aria-invalid": isInputError,
401
465
  "aria-required": isInputRequired,
402
- "aria-describedby": isRenderError ? currentErrorList.map(function (_a) {
403
- var id = _a.id;
466
+ "aria-describedby": isRenderError ? currentErrorList.map(function (_ref2) {
467
+ var id = _ref2.id;
404
468
  return id;
405
469
  }).join(' ') : undefined
406
470
  }, props, {
407
471
  id: currentInputId,
408
- "data-qaid": 'input_field_textbox',
409
- "data-testid": 'input_field_textbox',
472
+ "data-qaid": "input_field_textbox",
473
+ "data-testid": "input_field_textbox",
410
474
  style: {
411
475
  paddingLeft: isBefore ? addonBeforeWidth : undefined,
412
476
  paddingRight: isAfter ? addonAfterWidth : undefined
413
477
  },
414
478
  className: css.input,
415
479
  type: localType,
416
- onFocus: function (e) {
480
+ onFocus: function onFocus(e) {
417
481
  if (!isSkipOnFocus.current && props.onFocus) {
418
482
  props.onFocus(e);
419
483
  }
420
484
  isSkipOnFocus.current = false;
421
485
  },
422
- onBlur: function (e) {
486
+ onBlur: function onBlur(e) {
423
487
  if (!isSkipOnBlur.current && props.onBlur) {
424
488
  props.onBlur(e);
425
489
  }
426
490
  isSkipOnBlur.current = false;
427
491
  },
428
- onChange: function (e) {
492
+ onChange: function onChange(e) {
429
493
  setIsValueEmpty(getIsValueEmpty(e.target.value));
430
494
  resolveOnChange(e.currentTarget, e, props.onChange);
431
495
  }
432
- })), isBefore && React__namespace.createElement("div", {
496
+ })), isBefore && /*#__PURE__*/React__namespace.createElement("div", {
433
497
  className: css.before,
434
498
  style: {
435
499
  width: addonBeforeWidth
436
500
  }
437
- }, addonBefore), isAfter && React__namespace.createElement("div", {
501
+ }, addonBefore), isAfter && /*#__PURE__*/React__namespace.createElement("div", {
438
502
  className: css.after,
439
503
  style: {
440
504
  width: addonAfterWidth
441
505
  }
442
- }, currentAddonAfter)), isRenderError && currentErrorList.map(function (_a) {
443
- var id = _a.id,
444
- content = _a.content;
445
- return React__namespace.createElement(ErrorText, {
506
+ }, currentAddonAfter)), isRenderError && currentErrorList.map(function (_ref3) {
507
+ var id = _ref3.id,
508
+ content = _ref3.content;
509
+ return /*#__PURE__*/React__namespace.createElement(ErrorText, {
446
510
  key: id,
447
511
  id: id
448
512
  }, content);