ab-ui-library 1.42.6 → 1.42.8

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 (112) hide show
  1. package/components/AdvancedTable/AdvancedPagination.js +1 -1
  2. package/components/AdvancedTable/ColumnSettings.js +1 -1
  3. package/components/AdvancedTable/IndeterminateCheckbox.js +1 -1
  4. package/components/AdvancedTable/Table.js +1 -1
  5. package/components/AdvancedTable/hooks/useTableControl.js +1 -1
  6. package/components/AdvancedTable/index.js +1 -1
  7. package/components/Alert/Alert.js +1 -1
  8. package/components/Alert/index.js +1 -1
  9. package/components/Avatar/Avatar.js +1 -1
  10. package/components/Avatar/AvatarGroup.js +1 -1
  11. package/components/Avatar/index.js +1 -1
  12. package/components/Button/Button.js +1 -1
  13. package/components/Button/index.js +1 -1
  14. package/components/ButtonIcon/ButtonIcon.js +1 -1
  15. package/components/ButtonIcon/index.js +1 -1
  16. package/components/CardBody/CardBody.js +1 -1
  17. package/components/CardBody/index.js +1 -1
  18. package/components/CardSelect/CardSelect.js +1 -1
  19. package/components/CardSelect/CardSelectGroup.js +1 -1
  20. package/components/CardSelect/components/CardInput.js +1 -1
  21. package/components/CardSelect/components/index.js +1 -1
  22. package/components/CardSelect/index.js +1 -1
  23. package/components/Checkbox/Checkbox.js +1 -1
  24. package/components/Checkbox/index.js +1 -1
  25. package/components/Copy/Copy.d.ts +1 -1
  26. package/components/Copy/Copy.js +4 -3
  27. package/components/Copy/index.js +1 -1
  28. package/components/Copy/types.d.ts +1 -0
  29. package/components/Counter/Counter.js +1 -1
  30. package/components/Counter/index.js +1 -1
  31. package/components/DatePicker/CustomHeader/CustomHeader.js +1 -1
  32. package/components/DatePicker/RangeDatePicker.js +2 -1
  33. package/components/DatePicker/SimpleDatePicker.js +2 -1
  34. package/components/DatePicker/TimePicker.js +2 -1
  35. package/components/DatePicker/hooks.js +3 -335
  36. package/components/DatePicker/index.js +2 -1
  37. package/components/Empty/Empty.js +1 -1
  38. package/components/Empty/index.js +1 -1
  39. package/components/FileUpload/FileUpload.js +1 -1
  40. package/components/FileUpload/UploadItems.js +1 -1
  41. package/components/FileUpload/index.js +1 -1
  42. package/components/FormContainer/FormContainer.js +45 -11
  43. package/components/FormContainer/index.js +3 -2
  44. package/components/FormField/FormField.js +1 -1
  45. package/components/FormField/index.js +1 -1
  46. package/components/Input/Input.js +1 -1
  47. package/components/Input/InputPassword.js +1 -1
  48. package/components/Input/index.js +1 -1
  49. package/components/ItemSelect/ItemSelect.js +1 -1
  50. package/components/ItemSelect/ItemSelectGroup.js +1 -1
  51. package/components/ItemSelect/index.js +1 -1
  52. package/components/Menu/Menu.js +1 -1
  53. package/components/Menu/NestedMenu.js +1 -1
  54. package/components/Menu/index.js +1 -1
  55. package/components/Modal/Modal.js +1 -1
  56. package/components/Modal/ModalConfirmation.js +1 -1
  57. package/components/Modal/index.js +1 -1
  58. package/components/More/More.js +1 -1
  59. package/components/More/index.js +1 -1
  60. package/components/MultiTextareaWithChips/MultiTextareaWithChips.js +1 -1
  61. package/components/MultiTextareaWithChips/index.js +1 -1
  62. package/components/OneTimePassword/OneTimePassword.js +1 -1
  63. package/components/OneTimePassword/index.js +1 -1
  64. package/components/Radio/RadioGroup.js +1 -1
  65. package/components/Radio/index.js +1 -1
  66. package/components/Select/ButtonSelect/ButtonSelect.js +1 -1
  67. package/components/Select/FilterSelect/FilterDropdown.js +1 -1
  68. package/components/Select/FilterSelect/FilterGroupDropdown.js +1 -1
  69. package/components/Select/FilterSelect/FilterSelect.js +1 -1
  70. package/components/Select/MultiSelect/MultiBase/MultiBase.js +1 -1
  71. package/components/Select/MultiSelect/MultiSelect.js +1 -1
  72. package/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js +1 -1
  73. package/components/Select/MultiSelect/MultiSelectTree/MultiSelectTree.js +1 -1
  74. package/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js +1 -1
  75. package/components/Select/MultiSelect/OptionsWrapper.js +1 -1
  76. package/components/Select/MultiSelect/RadioSelectGrouped/RadioSelectGrouped.js +1 -1
  77. package/components/Select/NestedSelect/NestedSelect.js +1 -1
  78. package/components/Select/Select/Select.js +1 -1
  79. package/components/Select/SharedComponents/Actions.js +1 -1
  80. package/components/Select/SharedComponents/ContentTop.js +1 -1
  81. package/components/Select/SharedComponents/Footer.js +1 -1
  82. package/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js +1 -1
  83. package/components/Select/SharedComponents/index.js +1 -1
  84. package/components/Select/index.js +1 -1
  85. package/components/SideNavigation/NavigationItem/index.js +1 -1
  86. package/components/SideNavigation/SideNavigation.js +1 -1
  87. package/components/SideNavigation/index.js +1 -1
  88. package/components/SideSheet/Footer/Footer.js +1 -1
  89. package/components/SideSheet/SideSheet.js +1 -1
  90. package/components/SideSheet/index.js +1 -1
  91. package/components/Snackbar/Snackbar.js +1 -1
  92. package/components/Snackbar/index.js +1 -1
  93. package/components/Switcher/Switcher.js +1 -1
  94. package/components/Switcher/index.js +1 -1
  95. package/components/Table/Header.js +1 -1
  96. package/components/Table/IndeterminateCheckbox.js +1 -1
  97. package/components/Table/Row.js +1 -1
  98. package/components/Table/Table.js +1 -1
  99. package/components/Table/index.js +1 -1
  100. package/components/Table/utils.js +1 -1
  101. package/components/Textarea/Textarea.js +1 -1
  102. package/components/Textarea/index.js +1 -1
  103. package/helperComponents/OptionItem/OptionItem.js +1 -1
  104. package/helperComponents/OptionItem/index.js +1 -1
  105. package/helperComponents/index.js +1 -1
  106. package/hooks/useHideOnScroll.d.ts +1 -1
  107. package/hooks/useHideOnScroll.js +10 -11
  108. package/index-c044b88c.js +334 -0
  109. package/index.js +3 -2
  110. package/package.json +1 -2
  111. package/stories/Copy.stories.d.ts +1 -1
  112. /package/{RadioGroup-5fd70c2f.js → RadioGroup-eab8ff76.js} +0 -0
@@ -1,344 +1,12 @@
1
+ import { _ as _asyncToGenerator, r as regenerator } from '../../index-c044b88c.js';
1
2
  import { _ as _slicedToArray } from '../../slicedToArray-e10dcad6.js';
2
3
  import { useState, useEffect } from 'react';
3
4
  import { registerLocale } from 'react-datepicker';
4
5
  import dayjs, { locale as locale$3 } from 'dayjs';
5
- import { _ as _typeof$1 } from '../../typeof-5f3abdcb.js';
6
-
7
- function asyncGeneratorStep(n, t, e, r, o, a, c) {
8
- try {
9
- var i = n[a](c),
10
- u = i.value;
11
- } catch (n) {
12
- return void e(n);
13
- }
14
- i.done ? t(u) : Promise.resolve(u).then(r, o);
15
- }
16
- function _asyncToGenerator(n) {
17
- return function () {
18
- var t = this,
19
- e = arguments;
20
- return new Promise(function (r, o) {
21
- var a = n.apply(t, e);
22
- function _next(n) {
23
- asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
24
- }
25
- function _throw(n) {
26
- asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
27
- }
28
- _next(void 0);
29
- });
30
- };
31
- }
6
+ import { _ as _typeof } from '../../typeof-5f3abdcb.js';
32
7
 
33
8
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
34
9
 
35
- var regeneratorRuntime$1 = {exports: {}};
36
-
37
- var _typeof = {exports: {}};
38
-
39
- (function (module) {
40
- function _typeof(o) {
41
- "@babel/helpers - typeof";
42
-
43
- return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
44
- return typeof o;
45
- } : function (o) {
46
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
47
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
48
- }
49
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
50
- } (_typeof));
51
-
52
- (function (module) {
53
- var _typeof$1 = _typeof.exports["default"];
54
- function _regeneratorRuntime() {
55
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
56
- return r;
57
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
58
- var t,
59
- r = {},
60
- e = Object.prototype,
61
- n = e.hasOwnProperty,
62
- o = "function" == typeof Symbol ? Symbol : {},
63
- i = o.iterator || "@@iterator",
64
- a = o.asyncIterator || "@@asyncIterator",
65
- u = o.toStringTag || "@@toStringTag";
66
- function c(t, r, e, n) {
67
- return Object.defineProperty(t, r, {
68
- value: e,
69
- enumerable: !n,
70
- configurable: !n,
71
- writable: !n
72
- });
73
- }
74
- try {
75
- c({}, "");
76
- } catch (t) {
77
- c = function c(t, r, e) {
78
- return t[r] = e;
79
- };
80
- }
81
- function h(r, e, n, o) {
82
- var i = e && e.prototype instanceof Generator ? e : Generator,
83
- a = Object.create(i.prototype);
84
- return c(a, "_invoke", function (r, e, n) {
85
- var o = 1;
86
- return function (i, a) {
87
- if (3 === o) throw Error("Generator is already running");
88
- if (4 === o) {
89
- if ("throw" === i) throw a;
90
- return {
91
- value: t,
92
- done: !0
93
- };
94
- }
95
- for (n.method = i, n.arg = a;;) {
96
- var u = n.delegate;
97
- if (u) {
98
- var c = d(u, n);
99
- if (c) {
100
- if (c === f) continue;
101
- return c;
102
- }
103
- }
104
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
105
- if (1 === o) throw o = 4, n.arg;
106
- n.dispatchException(n.arg);
107
- } else "return" === n.method && n.abrupt("return", n.arg);
108
- o = 3;
109
- var h = s(r, e, n);
110
- if ("normal" === h.type) {
111
- if (o = n.done ? 4 : 2, h.arg === f) continue;
112
- return {
113
- value: h.arg,
114
- done: n.done
115
- };
116
- }
117
- "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg);
118
- }
119
- };
120
- }(r, n, new Context(o || [])), !0), a;
121
- }
122
- function s(t, r, e) {
123
- try {
124
- return {
125
- type: "normal",
126
- arg: t.call(r, e)
127
- };
128
- } catch (t) {
129
- return {
130
- type: "throw",
131
- arg: t
132
- };
133
- }
134
- }
135
- r.wrap = h;
136
- var f = {};
137
- function Generator() {}
138
- function GeneratorFunction() {}
139
- function GeneratorFunctionPrototype() {}
140
- var l = {};
141
- c(l, i, function () {
142
- return this;
143
- });
144
- var p = Object.getPrototypeOf,
145
- y = p && p(p(x([])));
146
- y && y !== e && n.call(y, i) && (l = y);
147
- var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l);
148
- function g(t) {
149
- ["next", "throw", "return"].forEach(function (r) {
150
- c(t, r, function (t) {
151
- return this._invoke(r, t);
152
- });
153
- });
154
- }
155
- function AsyncIterator(t, r) {
156
- function e(o, i, a, u) {
157
- var c = s(t[o], t, i);
158
- if ("throw" !== c.type) {
159
- var h = c.arg,
160
- f = h.value;
161
- return f && "object" == _typeof$1(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) {
162
- e("next", t, a, u);
163
- }, function (t) {
164
- e("throw", t, a, u);
165
- }) : r.resolve(f).then(function (t) {
166
- h.value = t, a(h);
167
- }, function (t) {
168
- return e("throw", t, a, u);
169
- });
170
- }
171
- u(c.arg);
172
- }
173
- var o;
174
- c(this, "_invoke", function (t, n) {
175
- function i() {
176
- return new r(function (r, o) {
177
- e(t, n, r, o);
178
- });
179
- }
180
- return o = o ? o.then(i, i) : i();
181
- }, !0);
182
- }
183
- function d(r, e) {
184
- var n = e.method,
185
- o = r.i[n];
186
- if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f;
187
- var i = s(o, r.i, e.arg);
188
- if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f;
189
- var a = i.arg;
190
- return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f);
191
- }
192
- function w(t) {
193
- this.tryEntries.push(t);
194
- }
195
- function m(r) {
196
- var e = r[4] || {};
197
- e.type = "normal", e.arg = t, r[4] = e;
198
- }
199
- function Context(t) {
200
- this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0);
201
- }
202
- function x(r) {
203
- if (null != r) {
204
- var e = r[i];
205
- if (e) return e.call(r);
206
- if ("function" == typeof r.next) return r;
207
- if (!isNaN(r.length)) {
208
- var o = -1,
209
- a = function e() {
210
- for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e;
211
- return e.value = t, e.done = !0, e;
212
- };
213
- return a.next = a;
214
- }
215
- }
216
- throw new TypeError(_typeof$1(r) + " is not iterable");
217
- }
218
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) {
219
- var r = "function" == typeof t && t.constructor;
220
- return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name));
221
- }, r.mark = function (t) {
222
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t;
223
- }, r.awrap = function (t) {
224
- return {
225
- __await: t
226
- };
227
- }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () {
228
- return this;
229
- }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) {
230
- void 0 === i && (i = Promise);
231
- var a = new AsyncIterator(h(t, e, n, o), i);
232
- return r.isGeneratorFunction(e) ? a : a.next().then(function (t) {
233
- return t.done ? t.value : a.next();
234
- });
235
- }, g(v), c(v, u, "Generator"), c(v, i, function () {
236
- return this;
237
- }), c(v, "toString", function () {
238
- return "[object Generator]";
239
- }), r.keys = function (t) {
240
- var r = Object(t),
241
- e = [];
242
- for (var n in r) e.unshift(n);
243
- return function t() {
244
- for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t;
245
- return t.done = !0, t;
246
- };
247
- }, r.values = x, Context.prototype = {
248
- constructor: Context,
249
- reset: function reset(r) {
250
- if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t);
251
- },
252
- stop: function stop() {
253
- this.done = !0;
254
- var t = this.tryEntries[0][4];
255
- if ("throw" === t.type) throw t.arg;
256
- return this.rval;
257
- },
258
- dispatchException: function dispatchException(r) {
259
- if (this.done) throw r;
260
- var e = this;
261
- function n(t) {
262
- a.type = "throw", a.arg = r, e.next = t;
263
- }
264
- for (var o = e.tryEntries.length - 1; o >= 0; --o) {
265
- var i = this.tryEntries[o],
266
- a = i[4],
267
- u = this.prev,
268
- c = i[1],
269
- h = i[2];
270
- if (-1 === i[0]) return n("end"), !1;
271
- if (!c && !h) throw Error("try statement without catch or finally");
272
- if (null != i[0] && i[0] <= u) {
273
- if (u < c) return this.method = "next", this.arg = t, n(c), !0;
274
- if (u < h) return n(h), !1;
275
- }
276
- }
277
- },
278
- abrupt: function abrupt(t, r) {
279
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
280
- var n = this.tryEntries[e];
281
- if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) {
282
- var o = n;
283
- break;
284
- }
285
- }
286
- o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null);
287
- var i = o ? o[4] : {};
288
- return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i);
289
- },
290
- complete: function complete(t, r) {
291
- if ("throw" === t.type) throw t.arg;
292
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f;
293
- },
294
- finish: function finish(t) {
295
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
296
- var e = this.tryEntries[r];
297
- if (e[2] === t) return this.complete(e[4], e[3]), m(e), f;
298
- }
299
- },
300
- "catch": function _catch(t) {
301
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
302
- var e = this.tryEntries[r];
303
- if (e[0] === t) {
304
- var n = e[4];
305
- if ("throw" === n.type) {
306
- var o = n.arg;
307
- m(e);
308
- }
309
- return o;
310
- }
311
- }
312
- throw Error("illegal catch attempt");
313
- },
314
- delegateYield: function delegateYield(r, e, n) {
315
- return this.delegate = {
316
- i: x(r),
317
- r: e,
318
- n: n
319
- }, "next" === this.method && (this.arg = t), f;
320
- }
321
- }, r;
322
- }
323
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
324
- } (regeneratorRuntime$1));
325
-
326
- // TODO(Babel 8): Remove this file.
327
-
328
- var runtime = regeneratorRuntime$1.exports();
329
- var regenerator = runtime;
330
-
331
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
332
- try {
333
- regeneratorRuntime = runtime;
334
- } catch (accidentalStrictMode) {
335
- if (typeof globalThis === "object") {
336
- globalThis.regeneratorRuntime = runtime;
337
- } else {
338
- Function("r", "regeneratorRuntime = r")(runtime);
339
- }
340
- }
341
-
342
10
  var formatDistanceLocale$2 = {
343
11
  lessThanXSeconds: {
344
12
  one: 'ավելի քիչ քան 1 վայրկյան',
@@ -1493,7 +1161,7 @@ function toDate(argument) {
1493
1161
  var argStr = Object.prototype.toString.call(argument);
1494
1162
 
1495
1163
  // Clone the date
1496
- if (argument instanceof Date || _typeof$1(argument) === 'object' && argStr === '[object Date]') {
1164
+ if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
1497
1165
  // Prevent the date to lose the milliseconds when passed to new Date() in IE10
1498
1166
  return new Date(argument.getTime());
1499
1167
  } else if (typeof argument === 'number' || argStr === '[object Number]') {
@@ -19,7 +19,7 @@ import '../Text/Text.js';
19
19
  import '../../utils/helpers.js';
20
20
  import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
21
21
  import '../../helperComponents/IconDynamicComponent/constants.js';
22
- import '../../RadioGroup-5fd70c2f.js';
22
+ import '../../RadioGroup-eab8ff76.js';
23
23
  import '../Radio/Radio.js';
24
24
  import '../Popover/Popover.js';
25
25
  import '../../hooks/useGetTooltipStyles.js';
@@ -44,6 +44,7 @@ import '../SVGIcons/IconEyeOn.js';
44
44
  import '../Divider/Divider.js';
45
45
  import '../Tooltip/Tooltip.js';
46
46
  import './hooks.js';
47
+ import '../../index-c044b88c.js';
47
48
  import '../SVGIcons/IconClock.js';
48
49
  import './CustomHeader/CustomHeader.js';
49
50
  import 'react-dom';
@@ -10,7 +10,7 @@ import '../../defineProperty-41a50022.js';
10
10
  import '../../typeof-5f3abdcb.js';
11
11
  import '../../objectWithoutProperties-e2930596.js';
12
12
  import '../../helperComponents/Loader/Loader.js';
13
- import '../../RadioGroup-5fd70c2f.js';
13
+ import '../../RadioGroup-eab8ff76.js';
14
14
  import '../Radio/Radio.js';
15
15
  import '../../helperComponents/Label/Label.js';
16
16
  import '../Popover/Popover.js';
@@ -11,7 +11,7 @@ import '../../defineProperty-41a50022.js';
11
11
  import '../../typeof-5f3abdcb.js';
12
12
  import '../../objectWithoutProperties-e2930596.js';
13
13
  import '../../helperComponents/Loader/Loader.js';
14
- import '../../RadioGroup-5fd70c2f.js';
14
+ import '../../RadioGroup-eab8ff76.js';
15
15
  import '../Radio/Radio.js';
16
16
  import '../../helperComponents/Label/Label.js';
17
17
  import '../Popover/Popover.js';
@@ -6,7 +6,7 @@ import { Button } from '../Button/Button.js';
6
6
  import { Label } from '../../helperComponents/Label/Label.js';
7
7
  import 'classnames';
8
8
  import { uniqueFiles, checkIsAllowedFileSize, checkIsAllowedTypes, getFormattedValues } from '../../utils/helpers.js';
9
- import '../../RadioGroup-5fd70c2f.js';
9
+ import '../../RadioGroup-eab8ff76.js';
10
10
  import { FILE_UPLOAD_ERRORS } from '../../consts/index.js';
11
11
  import '../../hooks/useScreenSize.js';
12
12
  import 'react-hook-form';
@@ -6,7 +6,7 @@ import '../../hooks/useScreenSize.js';
6
6
  import 'react-hook-form';
7
7
  import 'classnames';
8
8
  import { ErrorMessage } from '../../helperComponents/ErrorMessage/ErrorMessage.js';
9
- import '../../RadioGroup-5fd70c2f.js';
9
+ import '../../RadioGroup-eab8ff76.js';
10
10
  import { Button } from '../Button/Button.js';
11
11
  import '../Radio/Radio.js';
12
12
  import 'react-syntax-highlighter';
@@ -11,7 +11,7 @@ import '../../objectWithoutProperties-e2930596.js';
11
11
  import 'classnames';
12
12
  import 'dayjs';
13
13
  import '../../helperComponents/Loader/Loader.js';
14
- import '../../RadioGroup-5fd70c2f.js';
14
+ import '../../RadioGroup-eab8ff76.js';
15
15
  import '../Radio/Radio.js';
16
16
  import '../Text/Text.js';
17
17
  import '../../utils/helpers.js';
@@ -1,17 +1,18 @@
1
1
  import { _ as _extends } from '../../extends-74a403b8.js';
2
+ import { _ as _asyncToGenerator, r as regenerator } from '../../index-c044b88c.js';
2
3
  import React from 'react';
3
- import { appendErrors, useForm } from 'react-hook-form';
4
- import { validateFieldsNatively, toNestError } from '@hookform/resolvers';
4
+ import { useForm } from 'react-hook-form';
5
5
  import classNames from 'classnames';
6
6
  import { FormContext } from '../../context/types.js';
7
7
  import { Button } from '../Button/Button.js';
8
+ import * as yup from 'yup';
8
9
  import '../../utils/helpers.js';
9
10
  import 'dayjs';
10
11
  import '../../defineProperty-41a50022.js';
11
12
  import '../../typeof-5f3abdcb.js';
12
13
  import '../../objectWithoutProperties-e2930596.js';
13
14
  import '../../helperComponents/Loader/Loader.js';
14
- import '../../RadioGroup-5fd70c2f.js';
15
+ import '../../RadioGroup-eab8ff76.js';
15
16
  import '../Radio/Radio.js';
16
17
  import '../Text/Text.js';
17
18
  import '../../helperComponents/Label/Label.js';
@@ -33,8 +34,6 @@ import '../../helperComponents/IconDynamicComponent/constants.js';
33
34
  import 'react-syntax-highlighter';
34
35
  import '../Button/consts.js';
35
36
 
36
- var o=function(o,n,a){return void 0===n&&(n={}),void 0===a&&(a={}),function(s,i,c){try{return Promise.resolve(function(t,r){try{var u=(n.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(o["sync"===a.mode?"validateSync":"validate"](s,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&validateFieldsNatively({},c),{values:a.rawValues?s:t,errors:{}}}));}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return {values:{},errors:toNestError((o=e,n=!c.shouldUseNativeValidation&&"all"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,a=o&&o[t.type];e[t.path]=appendErrors(t.path,n,e,t.type,a?[].concat(a,t.message):t.message);}return e},{})),c)};var o,n;}))}catch(e){return Promise.reject(e)}}};
37
-
38
37
  var FormContainer = function FormContainer(props) {
39
38
  var children = props.children,
40
39
  _props$className = props.className,
@@ -52,7 +51,6 @@ var FormContainer = function FormContainer(props) {
52
51
  onSubmit = props.onSubmit;
53
52
  var _useForm = useForm({
54
53
  mode: mode,
55
- resolver: o(validationScheme),
56
54
  context: validationContext,
57
55
  defaultValues: initialValues,
58
56
  shouldFocusError: shouldFocusError,
@@ -76,11 +74,47 @@ var FormContainer = function FormContainer(props) {
76
74
  isSubmitted = formState.isSubmitted,
77
75
  isSubmitting = formState.isSubmitting,
78
76
  dirtyFields = formState.dirtyFields;
79
- var customSubmit = function customSubmit(data) {
80
- if (onSubmit) {
81
- onSubmit(data, formState, dirtyFields);
82
- }
83
- };
77
+ var customSubmit = /*#__PURE__*/function () {
78
+ var _ref = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee(data) {
79
+ return regenerator.wrap(function _callee$(_context) {
80
+ while (1) switch (_context.prev = _context.next) {
81
+ case 0:
82
+ _context.prev = 0;
83
+ if (!validationScheme) {
84
+ _context.next = 4;
85
+ break;
86
+ }
87
+ _context.next = 4;
88
+ return validationScheme.validate(data, {
89
+ abortEarly: false
90
+ });
91
+ case 4:
92
+ if (onSubmit) {
93
+ onSubmit(data, formState, dirtyFields);
94
+ }
95
+ _context.next = 10;
96
+ break;
97
+ case 7:
98
+ _context.prev = 7;
99
+ _context.t0 = _context["catch"](0);
100
+ if (_context.t0 instanceof yup.ValidationError) {
101
+ _context.t0.inner.forEach(function (err) {
102
+ setError(err.path, {
103
+ type: 'manual',
104
+ message: err.message
105
+ });
106
+ });
107
+ }
108
+ case 10:
109
+ case "end":
110
+ return _context.stop();
111
+ }
112
+ }, _callee, null, [[0, 7]]);
113
+ }));
114
+ return function customSubmit(_x) {
115
+ return _ref.apply(this, arguments);
116
+ };
117
+ }();
84
118
  return /*#__PURE__*/React.createElement("form", {
85
119
  onSubmit: handleSubmit(customSubmit),
86
120
  id: formId,
@@ -1,8 +1,8 @@
1
1
  export { FormContainer } from './FormContainer.js';
2
2
  import '../../extends-74a403b8.js';
3
+ import '../../index-c044b88c.js';
3
4
  import 'react';
4
5
  import 'react-hook-form';
5
- import '@hookform/resolvers';
6
6
  import 'classnames';
7
7
  import '../../context/types.js';
8
8
  import '../../utils/helpers.js';
@@ -12,7 +12,7 @@ import '../../defineProperty-41a50022.js';
12
12
  import '../../typeof-5f3abdcb.js';
13
13
  import '../../objectWithoutProperties-e2930596.js';
14
14
  import '../../helperComponents/Loader/Loader.js';
15
- import '../../RadioGroup-5fd70c2f.js';
15
+ import '../../RadioGroup-eab8ff76.js';
16
16
  import '../Radio/Radio.js';
17
17
  import '../Text/Text.js';
18
18
  import '../../helperComponents/Label/Label.js';
@@ -33,3 +33,4 @@ import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
33
33
  import '../../helperComponents/IconDynamicComponent/constants.js';
34
34
  import 'react-syntax-highlighter';
35
35
  import '../Button/consts.js';
36
+ import 'yup';
@@ -3,7 +3,7 @@ import React, { useContext } from 'react';
3
3
  import { ErrorMessage } from '@hookform/error-message';
4
4
  import classNames from 'classnames';
5
5
  import { ErrorMessage as ErrorMessage$1 } from '../../helperComponents/ErrorMessage/ErrorMessage.js';
6
- import '../../RadioGroup-5fd70c2f.js';
6
+ import '../../RadioGroup-eab8ff76.js';
7
7
  import 'dayjs';
8
8
  import { FormContext } from '../../context/types.js';
9
9
  import '../../hooks/useScreenSize.js';
@@ -10,7 +10,7 @@ import '../../utils/helpers.js';
10
10
  import 'dayjs';
11
11
  import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
12
12
  import '../../helperComponents/IconDynamicComponent/constants.js';
13
- import '../../RadioGroup-5fd70c2f.js';
13
+ import '../../RadioGroup-eab8ff76.js';
14
14
  import '../Radio/Radio.js';
15
15
  import '../../helperComponents/Label/Label.js';
16
16
  import '../../extends-74a403b8.js';
@@ -7,7 +7,7 @@ import classNames from 'classnames';
7
7
  import { PatternFormat, NumericFormat } from 'react-number-format';
8
8
  import { Label } from '../../helperComponents/Label/Label.js';
9
9
  import { ErrorMessage } from '../../helperComponents/ErrorMessage/ErrorMessage.js';
10
- import '../../RadioGroup-5fd70c2f.js';
10
+ import '../../RadioGroup-eab8ff76.js';
11
11
  import { Text } from '../Text/Text.js';
12
12
  import 'dayjs';
13
13
  import '../../hooks/useScreenSize.js';
@@ -22,7 +22,7 @@ import '../../helperComponents/Label/Label.js';
22
22
  import '../../helperComponents/ErrorMessage/ErrorMessage.js';
23
23
  import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
24
24
  import '../../helperComponents/IconDynamicComponent/constants.js';
25
- import '../../RadioGroup-5fd70c2f.js';
25
+ import '../../RadioGroup-eab8ff76.js';
26
26
  import '../Radio/Radio.js';
27
27
  import 'dayjs';
28
28
  import '../Link/Link.js';
@@ -15,7 +15,7 @@ import '../../utils/helpers.js';
15
15
  import 'dayjs';
16
16
  import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
17
17
  import '../../helperComponents/IconDynamicComponent/constants.js';
18
- import '../../RadioGroup-5fd70c2f.js';
18
+ import '../../RadioGroup-eab8ff76.js';
19
19
  import '../Radio/Radio.js';
20
20
  import '../Popover/Popover.js';
21
21
  import '../../slicedToArray-e10dcad6.js';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Text } from '../Text/Text.js';
3
3
  import { Image } from '../Image/Image.js';
4
4
  import { Radio } from '../Radio/Radio.js';
5
- import '../../RadioGroup-5fd70c2f.js';
5
+ import '../../RadioGroup-eab8ff76.js';
6
6
  import classNames from 'classnames';
7
7
  import '../../utils/helpers.js';
8
8
  import 'dayjs';
@@ -6,7 +6,7 @@ import '../../utils/helpers.js';
6
6
  import 'dayjs';
7
7
  import '../Image/Image.js';
8
8
  import '../Radio/Radio.js';
9
- import '../../RadioGroup-5fd70c2f.js';
9
+ import '../../RadioGroup-eab8ff76.js';
10
10
  import '../../helperComponents/Label/Label.js';
11
11
  import '../../defineProperty-41a50022.js';
12
12
  import '../../typeof-5f3abdcb.js';
@@ -7,7 +7,7 @@ import '../../utils/helpers.js';
7
7
  import 'dayjs';
8
8
  import '../Image/Image.js';
9
9
  import '../Radio/Radio.js';
10
- import '../../RadioGroup-5fd70c2f.js';
10
+ import '../../RadioGroup-eab8ff76.js';
11
11
  import '../../helperComponents/Label/Label.js';
12
12
  import '../../defineProperty-41a50022.js';
13
13
  import '../../typeof-5f3abdcb.js';
@@ -14,7 +14,7 @@ import { OptionItem } from '../../helperComponents/OptionItem/OptionItem.js';
14
14
  import 'react-syntax-highlighter';
15
15
  import '../../consts/index.js';
16
16
  import '../../extends-74a403b8.js';
17
- import '../../RadioGroup-5fd70c2f.js';
17
+ import '../../RadioGroup-eab8ff76.js';
18
18
  import '../Radio/Radio.js';
19
19
  import '../Text/Text.js';
20
20
  import '../../utils/helpers.js';
@@ -24,7 +24,7 @@ import '../Text/Text.js';
24
24
  import '../../utils/helpers.js';
25
25
  import '../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
26
26
  import '../SVGIcons/IconChevronDown.js';
27
- import '../../RadioGroup-5fd70c2f.js';
27
+ import '../../RadioGroup-eab8ff76.js';
28
28
  import '../Radio/Radio.js';
29
29
  import '../../helperComponents/Label/Label.js';
30
30
  import '../Popover/Popover.js';
@@ -15,7 +15,7 @@ import 'react-hook-form';
15
15
  import 'classnames';
16
16
  import '../../helperComponents/OptionItem/OptionItem.js';
17
17
  import '../../extends-74a403b8.js';
18
- import '../../RadioGroup-5fd70c2f.js';
18
+ import '../../RadioGroup-eab8ff76.js';
19
19
  import '../Radio/Radio.js';
20
20
  import '../Text/Text.js';
21
21
  import '../../utils/helpers.js';
@@ -15,7 +15,7 @@ import { Text } from '../Text/Text.js';
15
15
  import { IconDismiss } from '../SVGIcons/IconDismiss.js';
16
16
  import { ButtonIcon } from '../ButtonIcon/ButtonIcon.js';
17
17
  import { Tooltip } from '../Tooltip/Tooltip.js';
18
- import { C as Checkbox } from '../../RadioGroup-5fd70c2f.js';
18
+ import { C as Checkbox } from '../../RadioGroup-eab8ff76.js';
19
19
  import '../../consts/index.js';
20
20
  import '../../defineProperty-41a50022.js';
21
21
  import '../../typeof-5f3abdcb.js';