@konstructio/ui 0.1.2-alpha.54 → 0.1.2-alpha.56

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 (138) hide show
  1. package/dist/assets/icons/components/BookOpen.d.ts +3 -0
  2. package/dist/assets/icons/components/BookOpen.js +32 -0
  3. package/dist/assets/icons/components/DollarSign.d.ts +3 -0
  4. package/dist/assets/icons/components/DollarSign.js +30 -0
  5. package/dist/assets/icons/components/LightBulb.d.ts +3 -0
  6. package/dist/assets/icons/components/LightBulb.js +43 -0
  7. package/dist/assets/icons/components/index.d.ts +3 -0
  8. package/dist/assets/icons/components/index.js +114 -108
  9. package/dist/assets/icons/index.js +114 -108
  10. package/dist/components/Autocomplete/Autocomplete.js +41 -40
  11. package/dist/components/Autocomplete/Autocomplete.types.d.ts +2 -0
  12. package/dist/components/Button/Button.variants.js +7 -1
  13. package/dist/components/ButtonGroup/ButtonGroup.d.ts +34 -0
  14. package/dist/components/ButtonGroup/ButtonGroup.js +136 -0
  15. package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +94 -0
  16. package/dist/components/ButtonGroup/ButtonGroup.variants.d.ts +14 -0
  17. package/dist/components/ButtonGroup/ButtonGroup.variants.js +39 -0
  18. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.d.ts +3 -0
  19. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +112 -0
  20. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +19 -0
  21. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +22 -0
  22. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +85 -0
  23. package/dist/components/ButtonGroup/components/ButtonGroupItem/index.d.ts +2 -0
  24. package/dist/components/ButtonGroup/components/ButtonGroupItem/index.js +4 -0
  25. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.d.ts +3 -0
  26. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +45 -0
  27. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +8 -0
  28. package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.d.ts +2 -0
  29. package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.js +4 -0
  30. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.d.ts +3 -0
  31. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +37 -0
  32. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +6 -0
  33. package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.d.ts +2 -0
  34. package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.js +4 -0
  35. package/dist/components/ButtonGroup/components/index.d.ts +3 -0
  36. package/dist/components/ButtonGroup/components/index.js +8 -0
  37. package/dist/components/ButtonGroup/hooks/index.d.ts +2 -0
  38. package/dist/components/ButtonGroup/hooks/index.js +4 -0
  39. package/dist/components/ButtonGroup/hooks/useButtonGroup.d.ts +3 -0
  40. package/dist/components/ButtonGroup/hooks/useButtonGroup.js +67 -0
  41. package/dist/components/ButtonGroup/hooks/useButtonGroup.types.d.ts +18 -0
  42. package/dist/components/Checkbox/Checkbox.js +152 -144
  43. package/dist/components/Checkbox/Checkbox.types.d.ts +2 -0
  44. package/dist/components/Counter/Counter.js +43 -42
  45. package/dist/components/Counter/Counter.types.d.ts +2 -0
  46. package/dist/components/DateRangePicker/DateRangePicker.js +94 -93
  47. package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +2 -0
  48. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
  49. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
  50. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +11 -11
  51. package/dist/components/Drawer/Drawer.d.ts +36 -0
  52. package/dist/components/Drawer/Drawer.js +134 -0
  53. package/dist/components/Drawer/Drawer.types.d.ts +65 -0
  54. package/dist/components/Drawer/Drawer.variants.d.ts +8 -0
  55. package/dist/components/Drawer/Drawer.variants.js +92 -0
  56. package/dist/components/Drawer/components/Body/Body.d.ts +3 -0
  57. package/dist/components/Drawer/components/Body/Body.js +24 -0
  58. package/dist/components/Drawer/components/Body/Body.types.d.ts +7 -0
  59. package/dist/components/Drawer/components/Body/index.d.ts +2 -0
  60. package/dist/components/Drawer/components/Body/index.js +4 -0
  61. package/dist/components/Drawer/components/Footer/Footer.d.ts +3 -0
  62. package/dist/components/Drawer/components/Footer/Footer.js +26 -0
  63. package/dist/components/Drawer/components/Footer/Footer.types.d.ts +7 -0
  64. package/dist/components/Drawer/components/Footer/index.d.ts +2 -0
  65. package/dist/components/Drawer/components/Footer/index.js +4 -0
  66. package/dist/components/Drawer/components/Header/Header.d.ts +3 -0
  67. package/dist/components/Drawer/components/Header/Header.js +27 -0
  68. package/dist/components/Drawer/components/Header/Header.types.d.ts +9 -0
  69. package/dist/components/Drawer/components/Header/index.d.ts +2 -0
  70. package/dist/components/Drawer/components/Header/index.js +4 -0
  71. package/dist/components/Drawer/components/index.d.ts +3 -0
  72. package/dist/components/Drawer/components/index.js +8 -0
  73. package/dist/components/Drawer/constants/index.d.ts +6 -0
  74. package/dist/components/Drawer/constants/index.js +9 -0
  75. package/dist/components/Drawer/contexts/Drawer.context.d.ts +7 -0
  76. package/dist/components/Drawer/contexts/Drawer.context.js +6 -0
  77. package/dist/components/Drawer/contexts/index.d.ts +2 -0
  78. package/dist/components/Drawer/contexts/index.js +5 -0
  79. package/dist/components/Drawer/hooks/index.d.ts +2 -0
  80. package/dist/components/Drawer/hooks/index.js +4 -0
  81. package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
  82. package/dist/components/Drawer/hooks/useDrawer.js +66 -0
  83. package/dist/components/Drawer/hooks/useDrawer.types.d.ts +30 -0
  84. package/dist/components/ImageUpload/ImageUpload.d.ts +1 -1
  85. package/dist/components/ImageUpload/ImageUpload.js +51 -50
  86. package/dist/components/ImageUpload/ImageUpload.types.d.ts +2 -0
  87. package/dist/components/Input/Input.js +72 -58
  88. package/dist/components/Input/Input.types.d.ts +4 -0
  89. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +2 -0
  90. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +40 -39
  91. package/dist/components/PhoneNumberInput/PhoneNumberInput.types.d.ts +2 -0
  92. package/dist/components/PhoneNumberInput/components/Wrapper.js +163 -162
  93. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +172 -116
  94. package/dist/components/RadioGroup/RadioGroup.js +34 -33
  95. package/dist/components/RadioGroup/RadioGroup.types.d.ts +3 -1
  96. package/dist/components/Range/Range.js +26 -24
  97. package/dist/components/Range/Range.types.d.ts +2 -0
  98. package/dist/components/Select/Select.types.d.ts +1 -0
  99. package/dist/components/Select/Select.variants.js +2 -1
  100. package/dist/components/Select/components/Wrapper.js +74 -73
  101. package/dist/components/Slider/Slider.js +30 -20
  102. package/dist/components/Slider/Slider.types.d.ts +2 -0
  103. package/dist/components/Stepper/Stepper.js +29 -25
  104. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.d.ts +1 -2
  105. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +96 -91
  106. package/dist/components/Stepper/components/StepConnector/StepConnector.d.ts +1 -2
  107. package/dist/components/Stepper/components/StepConnector/StepConnector.js +10 -9
  108. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.d.ts +1 -2
  109. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +13 -19
  110. package/dist/components/Stepper/components/StepItem/StepItem.d.ts +1 -2
  111. package/dist/components/Stepper/components/StepItem/StepItem.js +6 -5
  112. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.d.ts +1 -2
  113. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +65 -60
  114. package/dist/components/Stepper/constants/index.d.ts +3 -0
  115. package/dist/components/Stepper/constants/index.js +13 -0
  116. package/dist/components/Stepper/hooks/index.d.ts +1 -0
  117. package/dist/components/Stepper/hooks/index.js +4 -0
  118. package/dist/components/Stepper/hooks/useStepItemLogic.d.ts +2 -0
  119. package/dist/components/Stepper/hooks/useStepItemLogic.js +27 -0
  120. package/dist/components/Stepper/hooks/useStepItemLogic.types.d.ts +16 -0
  121. package/dist/components/Stepper/utils/index.d.ts +3 -0
  122. package/dist/components/Stepper/utils/index.js +13 -0
  123. package/dist/components/Switch/Switch.js +89 -87
  124. package/dist/components/Switch/Switch.types.d.ts +2 -0
  125. package/dist/components/TagSelect/TagSelect.types.d.ts +2 -0
  126. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +47 -46
  127. package/dist/components/TextArea/TextArea.js +27 -26
  128. package/dist/components/TextArea/TextArea.types.d.ts +2 -0
  129. package/dist/components/Tooltip/Tooltip.variants.d.ts +2 -2
  130. package/dist/components/index.d.ts +2 -0
  131. package/dist/components/index.js +113 -109
  132. package/dist/icons.d.ts +1 -1
  133. package/dist/icons.js +114 -108
  134. package/dist/index.js +115 -111
  135. package/dist/package.json +26 -25
  136. package/dist/{proxy-Drz23HDt.js → proxy-BhEKW5n7.js} +1743 -1588
  137. package/dist/styles.css +1 -1
  138. package/package.json +23 -24
@@ -1,9 +1,9 @@
1
1
  import "./FlagSelectorList/FlagSelectorList.js";
2
- import { jsxs as Z, jsx as V } from "react/jsx-runtime";
2
+ import { jsxs as Z, jsx as B } from "react/jsx-runtime";
3
3
  import { i as Ae } from "../../../index-BmVmDQGH.js";
4
- import { useRef as te, useMemo as Ne, forwardRef as Be, useId as Re, useImperativeHandle as Ge, useCallback as Le, useEffect as se } from "react";
4
+ import { useRef as ne, useMemo as Ne, forwardRef as Be, useId as Re, useImperativeHandle as Ge, useCallback as Le, useEffect as pe } from "react";
5
5
  import { Typography as X } from "../../Typography/Typography.js";
6
- import { cn as pe } from "../../../utils/index.js";
6
+ import { cn as ee } from "../../../utils/index.js";
7
7
  import { labelVariants as Ve, phoneNumberInputVariants as xe } from "../PhoneNumberInput.variants.js";
8
8
  import { usePhoneNumberContext as Ke } from "../contexts/phone-number.hook.js";
9
9
  import { getPhoneMask as De } from "../utils/index.js";
@@ -36,8 +36,8 @@ function Oe(e, t) {
36
36
  if (Array.isArray(e) || (n = (function(i, c) {
37
37
  if (i) {
38
38
  if (typeof i == "string") return fe(i, c);
39
- var p = {}.toString.call(i).slice(8, -1);
40
- return p === "Object" && i.constructor && (p = i.constructor.name), p === "Map" || p === "Set" ? Array.from(i) : p === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p) ? fe(i, c) : void 0;
39
+ var s = {}.toString.call(i).slice(8, -1);
40
+ return s === "Object" && i.constructor && (s = i.constructor.name), s === "Map" || s === "Set" ? Array.from(i) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? fe(i, c) : void 0;
41
41
  }
42
42
  })(e)) || t) {
43
43
  n && (e = n);
@@ -90,7 +90,7 @@ function Y(e) {
90
90
  }
91
91
  function _e(e, t) {
92
92
  if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
93
- e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && ne(e, t);
93
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && re(e, t);
94
94
  }
95
95
  function we() {
96
96
  try {
@@ -140,20 +140,20 @@ function We(e, t) {
140
140
  }
141
141
  return o;
142
142
  }
143
- function ne(e, t) {
144
- return ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
143
+ function re(e, t) {
144
+ return re = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
145
145
  return n.__proto__ = r, n;
146
- }, ne(e, t);
146
+ }, re(e, t);
147
147
  }
148
148
  function U(e, t) {
149
149
  var n, r = t.replacementChars, o = t.replacement, a = t.separate, l = r, u = "", i = Oe(e);
150
150
  try {
151
151
  for (i.s(); !(n = i.n()).done; ) {
152
- var c, p = n.value, f = !Object.prototype.hasOwnProperty.call(o, p) && ((c = o[l[0]]) === null || c === void 0 ? void 0 : c.test(p));
153
- (a && p === l[0] || f) && (l = l.slice(1), u += p);
152
+ var c, s = n.value, f = !Object.prototype.hasOwnProperty.call(o, s) && ((c = o[l[0]]) === null || c === void 0 ? void 0 : c.test(s));
153
+ (a && s === l[0] || f) && (l = l.slice(1), u += s);
154
154
  }
155
- } catch (b) {
156
- i.e(b);
155
+ } catch (S) {
156
+ i.e(S);
157
157
  } finally {
158
158
  i.f();
159
159
  }
@@ -163,12 +163,12 @@ function ke(e, t) {
163
163
  var n, r = t.mask, o = t.replacement, a = t.separate, l = t.showMask, u = 0, i = "", c = Oe(r);
164
164
  try {
165
165
  for (c.s(); !(n = c.n()).done; ) {
166
- var p = n.value;
166
+ var s = n.value;
167
167
  if (!l && e[u] === void 0) break;
168
- Object.prototype.hasOwnProperty.call(o, p) && e[u] !== void 0 ? i += e[u++] : i += p;
168
+ Object.prototype.hasOwnProperty.call(o, s) && e[u] !== void 0 ? i += e[u++] : i += s;
169
169
  }
170
- } catch (b) {
171
- c.e(b);
170
+ } catch (S) {
171
+ c.e(S);
172
172
  } finally {
173
173
  c.f();
174
174
  }
@@ -188,19 +188,19 @@ function Pe(e, t) {
188
188
  function K(e) {
189
189
  return e.length > 0 ? Se({}, e, /./) : {};
190
190
  }
191
- function re(e, t) {
192
- for (var n = t.start, r = n === void 0 ? 0 : n, o = t.end, a = t.mask, l = t.replacement, u = t.separate, i = e.slice(r, o), c = a.slice(r, o), p = "", f = 0; f < c.length; f++) {
193
- var b = Object.prototype.hasOwnProperty.call(l, c[f]);
194
- b && i[f] !== void 0 && i[f] !== c[f] ? p += i[f] : b && u && (p += c[f]);
191
+ function ae(e, t) {
192
+ for (var n = t.start, r = n === void 0 ? 0 : n, o = t.end, a = t.mask, l = t.replacement, u = t.separate, i = e.slice(r, o), c = a.slice(r, o), s = "", f = 0; f < c.length; f++) {
193
+ var S = Object.prototype.hasOwnProperty.call(l, c[f]);
194
+ S && i[f] !== void 0 && i[f] !== c[f] ? s += i[f] : S && u && (s += c[f]);
195
195
  }
196
- return p;
196
+ return s;
197
197
  }
198
198
  function Me(e, t) {
199
199
  var n = t.mask, r = t.replacement, o = typeof r == "string" ? K(r) : r, a = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
200
200
  return ke(U(e, { replacementChars: n.replace(a, ""), replacement: o, separate: !1 }), { mask: n, replacement: o, separate: !1, showMask: !1 });
201
201
  }
202
202
  function Ze(e, t) {
203
- var n = t.mask, r = t.replacement, o = typeof r == "string" ? K(r) : r, a = re(e, { mask: n, replacement: o, separate: !1 }), l = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
203
+ var n = t.mask, r = t.replacement, o = typeof r == "string" ? K(r) : r, a = ae(e, { mask: n, replacement: o, separate: !1 }), l = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
204
204
  return U(a, { replacementChars: n.replace(l, ""), replacement: o, separate: !1 });
205
205
  }
206
206
  function Je(e, t) {
@@ -231,7 +231,7 @@ function Xe(e, t, n) {
231
231
  if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
232
232
  return a;
233
233
  })(r);
234
- })(e, oe() ? Reflect.construct(t, n || [], z(e).constructor) : t.apply(e, n));
234
+ })(e, ie() ? Reflect.construct(t, n || [], z(e).constructor) : t.apply(e, n));
235
235
  }
236
236
  function Ee(e, t) {
237
237
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
@@ -263,13 +263,13 @@ function tt(e, t) {
263
263
  if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
264
264
  e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && H(e, t);
265
265
  }
266
- function oe() {
266
+ function ie() {
267
267
  try {
268
268
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {
269
269
  })));
270
270
  } catch {
271
271
  }
272
- return (oe = function() {
272
+ return (ie = function() {
273
273
  return !!e;
274
274
  })();
275
275
  }
@@ -316,9 +316,9 @@ function H(e, t) {
316
316
  return n.__proto__ = r, n;
317
317
  }, H(e, t);
318
318
  }
319
- function ae(e) {
319
+ function oe(e) {
320
320
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
321
- return ae = function(n) {
321
+ return oe = function(n) {
322
322
  if (n === null || !(function(o) {
323
323
  try {
324
324
  return Function.toString.call(o).indexOf("[native code]") !== -1;
@@ -333,7 +333,7 @@ function ae(e) {
333
333
  }
334
334
  function r() {
335
335
  return (function(o, a, l) {
336
- if (oe()) return Reflect.construct.apply(null, arguments);
336
+ if (ie()) return Reflect.construct.apply(null, arguments);
337
337
  var u = [null];
338
338
  u.push.apply(u, a);
339
339
  var i = new (o.bind.apply(o, u))();
@@ -341,7 +341,7 @@ function ae(e) {
341
341
  })(n, arguments, z(this).constructor);
342
342
  }
343
343
  return r.prototype = Object.create(n.prototype, { constructor: { value: r, enumerable: !1, writable: !0, configurable: !0 } }), H(r, n);
344
- }, ae(e);
344
+ }, oe(e);
345
345
  }
346
346
  var $ = (function(e) {
347
347
  function t(n) {
@@ -349,49 +349,49 @@ var $ = (function(e) {
349
349
  return Ee(this, t), (r = Xe(this, t, [n])).name = "SyntheticChangeError", r;
350
350
  }
351
351
  return tt(t, e), Ce(t);
352
- })(ae(Error)), ye, rt = ["options"], ge = ["text", "email", "tel", "search", "url"], je = Ce((function e(t) {
352
+ })(oe(Error)), ye, rt = ["options"], ge = ["text", "email", "tel", "search", "url"], je = Ce((function e(t) {
353
353
  var n = t.init, r = t.tracking;
354
354
  Ee(this, e);
355
355
  var o = /* @__PURE__ */ new WeakMap();
356
356
  this.register = function(a) {
357
357
  var l;
358
358
  if (ge.includes(a.type)) {
359
- var u = (l = a._wrapperState) !== null && l !== void 0 ? l : {}, i = u.initialValue, c = i === void 0 ? "" : i, p = u.controlled, f = p !== void 0 && p, b = n({ initialValue: a.value || c, controlled: f }), M = b.value, j = b.options, h = { value: M, options: j, fallbackOptions: j }, m = { id: -1, cachedId: -1 }, s = { value: "", selectionStart: 0, selectionEnd: 0 }, O = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
360
- Object.defineProperty(a, "value", he(he({}, O), {}, { set: function(y) {
361
- var v;
362
- s.value = y, O == null || (v = O.set) === null || v === void 0 || v.call(a, y);
359
+ var u = (l = a._wrapperState) !== null && l !== void 0 ? l : {}, i = u.initialValue, c = i === void 0 ? "" : i, s = u.controlled, f = s !== void 0 && s, S = n({ initialValue: a.value || c, controlled: f }), M = S.value, j = S.options, y = { value: M, options: j, fallbackOptions: j }, m = { id: -1, cachedId: -1 }, p = { value: "", selectionStart: 0, selectionEnd: 0 }, w = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
360
+ Object.defineProperty(a, "value", he(he({}, w), {}, { set: function(h) {
361
+ var d;
362
+ p.value = h, w == null || (d = w.set) === null || d === void 0 || d.call(a, h);
363
363
  } })), a.value = M;
364
- var S = function() {
365
- var y = function() {
366
- var v, k;
367
- s.selectionStart = (v = a.selectionStart) !== null && v !== void 0 ? v : 0, s.selectionEnd = (k = a.selectionEnd) !== null && k !== void 0 ? k : 0, m.id = window.setTimeout(y);
364
+ var g = function() {
365
+ var h = function() {
366
+ var d, k;
367
+ p.selectionStart = (d = a.selectionStart) !== null && d !== void 0 ? d : 0, p.selectionEnd = (k = a.selectionEnd) !== null && k !== void 0 ? k : 0, m.id = window.setTimeout(h);
368
368
  };
369
- m.id = window.setTimeout(y);
370
- }, w = function() {
369
+ m.id = window.setTimeout(h);
370
+ }, E = function() {
371
371
  window.clearTimeout(m.id), m.id = -1, m.cachedId = -1;
372
- }, d = function(y) {
372
+ }, v = function(h) {
373
373
  try {
374
- var v, k;
374
+ var d, k;
375
375
  if (m.cachedId === m.id) throw new $("The input selection has not been updated.");
376
376
  m.cachedId = m.id;
377
- var P = a.value, g = a.selectionStart, T = a.selectionEnd;
378
- if (g === null || T === null) throw new $("The selection attributes have not been initialized.");
379
- var C, E = s.value;
380
- if (y.inputType === void 0 && (s.selectionStart = 0, s.selectionEnd = E.length), g > s.selectionStart ? C = "insert" : g <= s.selectionStart && g < s.selectionEnd ? C = "deleteBackward" : g === s.selectionEnd && P.length < E.length && (C = "deleteForward"), C === void 0 || (C === "deleteBackward" || C === "deleteForward") && P.length > E.length) throw new $("Input type detection error.");
381
- var I = "", N = s.selectionStart, B = s.selectionEnd;
382
- if (C === "insert") I = P.slice(s.selectionStart, g);
377
+ var P = a.value, b = a.selectionStart, N = a.selectionEnd;
378
+ if (b === null || N === null) throw new $("The selection attributes have not been initialized.");
379
+ var O, C = p.value;
380
+ if (h.inputType === void 0 && (p.selectionStart = 0, p.selectionEnd = C.length), b > p.selectionStart ? O = "insert" : b <= p.selectionStart && b < p.selectionEnd ? O = "deleteBackward" : b === p.selectionEnd && P.length < C.length && (O = "deleteForward"), O === void 0 || (O === "deleteBackward" || O === "deleteForward") && P.length > C.length) throw new $("Input type detection error.");
381
+ var T = "", I = p.selectionStart, R = p.selectionEnd;
382
+ if (O === "insert") T = P.slice(p.selectionStart, b);
383
383
  else {
384
- var D = E.length - P.length;
385
- N = g, B = g + D;
384
+ var D = C.length - P.length;
385
+ I = b, R = b + D;
386
386
  }
387
- h.value !== E ? h.options = h.fallbackOptions : h.fallbackOptions = h.options;
388
- var F = h.options, R = r({ inputType: C, previousValue: E, previousOptions: F, value: P, addedValue: I, changeStart: N, changeEnd: B, selectionStart: g, selectionEnd: T }), _ = R.options, A = nt(R, rt);
389
- a.value = A.value, a.setSelectionRange(A.selectionStart, A.selectionEnd), h.value = A.value, h.options = _, s.selectionStart = A.selectionStart, s.selectionEnd = A.selectionEnd, (v = a._valueTracker) === null || v === void 0 || (k = v.setValue) === null || k === void 0 || k.call(v, E);
387
+ y.value !== C ? y.options = y.fallbackOptions : y.fallbackOptions = y.options;
388
+ var F = y.options, G = r({ inputType: O, previousValue: C, previousOptions: F, value: P, addedValue: T, changeStart: I, changeEnd: R, selectionStart: b, selectionEnd: N }), _ = G.options, A = nt(G, rt);
389
+ a.value = A.value, a.setSelectionRange(A.selectionStart, A.selectionEnd), y.value = A.value, y.options = _, p.selectionStart = A.selectionStart, p.selectionEnd = A.selectionEnd, (d = a._valueTracker) === null || d === void 0 || (k = d.setValue) === null || k === void 0 || k.call(d, C);
390
390
  } catch (W) {
391
- if (a.value = s.value, a.setSelectionRange(s.selectionStart, s.selectionEnd), y.preventDefault(), y.stopPropagation(), W.name !== "SyntheticChangeError") throw W;
391
+ if (a.value = p.value, a.setSelectionRange(p.selectionStart, p.selectionEnd), h.preventDefault(), h.stopPropagation(), W.name !== "SyntheticChangeError") throw W;
392
392
  }
393
393
  };
394
- document.activeElement === a && S(), a.addEventListener("focus", S), a.addEventListener("blur", w), a.addEventListener("input", d), o.set(a, { onFocus: S, onBlur: w, onInput: d });
394
+ document.activeElement === a && g(), a.addEventListener("focus", g), a.addEventListener("blur", E), a.addEventListener("input", v), o.set(a, { onFocus: g, onBlur: E, onInput: v });
395
395
  } else process.env.NODE_ENV !== "production" && console.warn("Warn: The input element type does not match one of the types: ".concat(ge.join(", "), "."));
396
396
  }, this.unregister = function(a) {
397
397
  var l = o.get(a);
@@ -399,7 +399,7 @@ var $ = (function(e) {
399
399
  };
400
400
  }));
401
401
  ye = je, Object.defineProperty(ye.prototype, Symbol.toStringTag, { writable: !1, enumerable: !1, configurable: !0, value: "Input" });
402
- var ee = function(e) {
402
+ var te = function(e) {
403
403
  return function() {
404
404
  for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
405
405
  return new e("".concat(n.join(`
@@ -416,60 +416,60 @@ var Te = (function(e) {
416
416
  function t() {
417
417
  var n, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
418
418
  return ze(this, t), (n = $e(this, t, [{ init: function(o) {
419
- var a = o.initialValue, l = o.controlled, u = x(r), i = u.mask, c = u.replacement, p = u.separate, f = u.showMask;
420
- return a = l || a ? a : f ? i : "", process.env.NODE_ENV !== "production" && (function(b) {
421
- var M = b.initialValue, j = b.mask, h = b.replacement;
422
- M.length > j.length && console.error(ee(Error)("The initialized value of the `value` or `defaultValue` property is longer than the value specified in the `mask` property. Check the correctness of the initialized value in the specified property.", 'Invalid value: "'.concat(M, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
423
- var m = Object.keys(h).filter((function(d) {
424
- return d.length > 1;
419
+ var a = o.initialValue, l = o.controlled, u = x(r), i = u.mask, c = u.replacement, s = u.separate, f = u.showMask;
420
+ return a = l || a ? a : f ? i : "", process.env.NODE_ENV !== "production" && (function(S) {
421
+ var M = S.initialValue, j = S.mask, y = S.replacement;
422
+ M.length > j.length && console.error(te(Error)("The initialized value of the `value` or `defaultValue` property is longer than the value specified in the `mask` property. Check the correctness of the initialized value in the specified property.", 'Invalid value: "'.concat(M, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
423
+ var m = Object.keys(y).filter((function(v) {
424
+ return v.length > 1;
425
425
  }));
426
- m.length > 0 && console.error(ee(Error)("Object keys in the `replacement` property are longer than one character. Replacement keys must be one character long. Check the correctness of the value in the specified property.", "Invalid keys: ".concat(m.join(", "), "."), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
427
- for (var s = j.slice(0, M.length), O = -1, S = 0; S < s.length; S++) {
428
- var w = Object.prototype.hasOwnProperty.call(h, s[S]);
429
- if (!(s[S] === M[S] || w && h[s[S]].test(M[S]))) {
430
- O = S;
426
+ m.length > 0 && console.error(te(Error)("Object keys in the `replacement` property are longer than one character. Replacement keys must be one character long. Check the correctness of the value in the specified property.", "Invalid keys: ".concat(m.join(", "), "."), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
427
+ for (var p = j.slice(0, M.length), w = -1, g = 0; g < p.length; g++) {
428
+ var E = Object.prototype.hasOwnProperty.call(y, p[g]);
429
+ if (!(p[g] === M[g] || E && y[p[g]].test(M[g]))) {
430
+ w = g;
431
431
  break;
432
432
  }
433
433
  }
434
- O !== -1 && console.error(ee(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(O, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(M, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
435
- })({ initialValue: a, mask: i, replacement: c }), { value: a, options: { mask: i, replacement: c, separate: p } };
434
+ w !== -1 && console.error(te(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(w, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(M, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
435
+ })({ initialValue: a, mask: i, replacement: c }), { value: a, options: { mask: i, replacement: c, separate: s } };
436
436
  }, tracking: function(o) {
437
- var a = o.inputType, l = o.previousValue, u = o.previousOptions, i = o.addedValue, c = o.changeStart, p = o.changeEnd, f = x(r), b = f.track, M = f.modify, j = We(f, at), h = j.mask, m = j.replacement, s = j.showMask, O = j.separate, S = J(J({}, a === "insert" ? { inputType: a, data: i } : { inputType: a, data: null }), {}, { value: l, selectionStart: c, selectionEnd: p }), w = b?.(S);
438
- if (w === !1) throw new $("Custom tracking stop.");
439
- w === null ? i = "" : w !== !0 && w !== void 0 && (i = w);
440
- var d = M?.(S);
441
- d?.mask !== void 0 && (h = d.mask), d?.replacement !== void 0 && (m = typeof d?.replacement == "string" ? K(d?.replacement) : d.replacement), d?.showMask !== void 0 && (s = d.showMask), d?.separate !== void 0 && (O = d.separate);
442
- var y = re(l, J({ end: c }, u)), v = re(l, J({ start: p }, u)), k = RegExp("[^".concat(Object.keys(m).join(""), "]"), "g"), P = h.replace(k, "");
443
- if (y && (y = U(y, { replacementChars: P, replacement: m, separate: O }), P = P.slice(y.length)), i && (i = U(i, { replacementChars: P, replacement: m, separate: !1 }), P = P.slice(i.length)), a === "insert" && i === "") throw new $("The character does not match the key value of the `replacement` object.");
444
- if (O) {
445
- var g = h.slice(c, p).replace(k, ""), T = g.length - i.length;
446
- T < 0 ? v = v.slice(-T) : T > 0 && (v = g.slice(-T) + v);
437
+ var a = o.inputType, l = o.previousValue, u = o.previousOptions, i = o.addedValue, c = o.changeStart, s = o.changeEnd, f = x(r), S = f.track, M = f.modify, j = We(f, at), y = j.mask, m = j.replacement, p = j.showMask, w = j.separate, g = J(J({}, a === "insert" ? { inputType: a, data: i } : { inputType: a, data: null }), {}, { value: l, selectionStart: c, selectionEnd: s }), E = S?.(g);
438
+ if (E === !1) throw new $("Custom tracking stop.");
439
+ E === null ? i = "" : E !== !0 && E !== void 0 && (i = E);
440
+ var v = M?.(g);
441
+ v?.mask !== void 0 && (y = v.mask), v?.replacement !== void 0 && (m = typeof v?.replacement == "string" ? K(v?.replacement) : v.replacement), v?.showMask !== void 0 && (p = v.showMask), v?.separate !== void 0 && (w = v.separate);
442
+ var h = ae(l, J({ end: c }, u)), d = ae(l, J({ start: s }, u)), k = RegExp("[^".concat(Object.keys(m).join(""), "]"), "g"), P = y.replace(k, "");
443
+ if (h && (h = U(h, { replacementChars: P, replacement: m, separate: w }), P = P.slice(h.length)), i && (i = U(i, { replacementChars: P, replacement: m, separate: !1 }), P = P.slice(i.length)), a === "insert" && i === "") throw new $("The character does not match the key value of the `replacement` object.");
444
+ if (w) {
445
+ var b = y.slice(c, s).replace(k, ""), N = b.length - i.length;
446
+ N < 0 ? d = d.slice(-N) : N > 0 && (d = b.slice(-N) + d);
447
447
  }
448
- v && (v = U(v, { replacementChars: P, replacement: m, separate: O }));
449
- var C = ke(y + i + v, { mask: h, replacement: m, separate: O, showMask: s }), E = (function(I) {
450
- var N, B, D, F = I.inputType, R = I.value, _ = I.addedValue, A = I.beforeChangeValue, W = I.mask, ie = I.replacement, Ie = I.separate, Q = Pe(R, { mask: W, replacement: ie }).filter((function(q) {
451
- var ce = q.type;
452
- return ce === "input" || Ie && ce === "replacement";
453
- })), le = (N = Q[A.length + _.length - 1]) === null || N === void 0 ? void 0 : N.index, G = (B = Q[A.length - 1]) === null || B === void 0 ? void 0 : B.index, L = (D = Q[A.length + _.length]) === null || D === void 0 ? void 0 : D.index;
448
+ d && (d = U(d, { replacementChars: P, replacement: m, separate: w }));
449
+ var O = ke(h + i + d, { mask: y, replacement: m, separate: w, showMask: p }), C = (function(T) {
450
+ var I, R, D, F = T.inputType, G = T.value, _ = T.addedValue, A = T.beforeChangeValue, W = T.mask, le = T.replacement, Ie = T.separate, Q = Pe(G, { mask: W, replacement: le }).filter((function(q) {
451
+ var se = q.type;
452
+ return se === "input" || Ie && se === "replacement";
453
+ })), ue = (I = Q[A.length + _.length - 1]) === null || I === void 0 ? void 0 : I.index, L = (R = Q[A.length - 1]) === null || R === void 0 ? void 0 : R.index, V = (D = Q[A.length + _.length]) === null || D === void 0 ? void 0 : D.index;
454
454
  if (F === "insert") {
455
- if (le !== void 0) return le + 1;
456
- if (L !== void 0) return L;
457
- if (G !== void 0) return G + 1;
455
+ if (ue !== void 0) return ue + 1;
456
+ if (V !== void 0) return V;
457
+ if (L !== void 0) return L + 1;
458
458
  }
459
459
  if (F === "deleteForward") {
460
- if (L !== void 0) return L;
461
- if (G !== void 0) return G + 1;
460
+ if (V !== void 0) return V;
461
+ if (L !== void 0) return L + 1;
462
462
  }
463
463
  if (F === "deleteBackward") {
464
- if (G !== void 0) return G + 1;
465
- if (L !== void 0) return L;
464
+ if (L !== void 0) return L + 1;
465
+ if (V !== void 0) return V;
466
466
  }
467
- var ue = R.split("").findIndex((function(q) {
468
- return Object.prototype.hasOwnProperty.call(ie, q);
467
+ var ce = G.split("").findIndex((function(q) {
468
+ return Object.prototype.hasOwnProperty.call(le, q);
469
469
  }));
470
- return ue !== -1 ? ue : R.length;
471
- })({ inputType: a, value: C, addedValue: i, beforeChangeValue: y, mask: h, replacement: m, separate: O });
472
- return { value: C, selectionStart: E, selectionEnd: E, options: { mask: h, replacement: m, separate: O } };
470
+ return ce !== -1 ? ce : G.length;
471
+ })({ inputType: a, value: O, addedValue: i, beforeChangeValue: h, mask: y, replacement: m, separate: w });
472
+ return { value: O, selectionStart: C, selectionEnd: C, options: { mask: y, replacement: m, separate: w } };
473
473
  } }])).format = function(o) {
474
474
  return Me(o, x(r));
475
475
  }, n.formatToParts = function(o) {
@@ -484,7 +484,7 @@ var Te = (function(e) {
484
484
  })();
485
485
  be = Te, Object.defineProperty(be.prototype, Symbol.toStringTag, { writable: !1, enumerable: !1, configurable: !0, value: "Mask" });
486
486
  function ot() {
487
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.mask, n = e.replacement, r = e.showMask, o = e.separate, a = e.track, l = e.modify, u = te(null), i = te({ mask: t, replacement: n, showMask: r, separate: o, track: a, modify: l });
487
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.mask, n = e.replacement, r = e.showMask, o = e.separate, a = e.track, l = e.modify, u = ne(null), i = ne({ mask: t, replacement: n, showMask: r, separate: o, track: a, modify: l });
488
488
  return i.current.mask = t, i.current.replacement = n, i.current.showMask = r, i.current.separate = o, i.current.track = a, i.current.modify = l, Ne((function() {
489
489
  return qe(u, new Te(i.current));
490
490
  }), []);
@@ -503,65 +503,66 @@ const Ot = Be(
503
503
  isRequired: o,
504
504
  label: a,
505
505
  labelClassName: l,
506
- name: u,
507
- placeholder: i,
508
- showFlagOnSearch: c = !0,
509
- showInputFilter: p = !0,
510
- showNameOnSearch: f = !0,
511
- wrapperClassName: b,
512
- showPlaceHolder: M,
513
- ...j
514
- }, h) => {
515
- const m = u ?? Re(), s = te(null), {
516
- isOpenSelector: O,
517
- value: S,
518
- selectedCountry: w,
506
+ labelWrapperClassName: u,
507
+ name: i,
508
+ placeholder: c,
509
+ showFlagOnSearch: s = !0,
510
+ showInputFilter: f = !0,
511
+ showNameOnSearch: S = !0,
512
+ wrapperClassName: M,
513
+ showPlaceHolder: j,
514
+ ...y
515
+ }, m) => {
516
+ const p = Re(), w = i ?? p, g = ne(null), {
517
+ isOpenSelector: E,
518
+ value: v,
519
+ selectedCountry: h,
519
520
  onChangeValue: d,
520
- handleOpenSelector: y
521
- } = Ke(), v = typeof t == "string" && t.length >= 0, k = ot({
522
- mask: De(w),
521
+ handleOpenSelector: k
522
+ } = Ke(), P = typeof t == "string" && t.length >= 0, b = ot({
523
+ mask: De(h),
523
524
  replacement: { _: /\d/ }
524
525
  });
525
- Ge(h, () => k.current, [k]);
526
- const P = Le(
527
- (g) => {
528
- g.target.value.startsWith(w.prefix) ? d(g.target.value) : d(`${w.prefix} `);
526
+ Ge(m, () => b.current, [b]);
527
+ const N = Le(
528
+ (O) => {
529
+ O.target.value.startsWith(h.prefix) ? d(O.target.value) : d(`${h.prefix} `);
529
530
  },
530
- [w.prefix, d]
531
+ [h.prefix, d]
531
532
  );
532
- return se(() => {
533
- const g = new AbortController(), T = (E) => {
534
- E.key === "Escape" && y(!1);
535
- }, C = (E) => {
536
- s.current?.contains(E.target) || y(!1);
533
+ return pe(() => {
534
+ const O = new AbortController(), C = (I) => {
535
+ I.key === "Escape" && k(!1);
536
+ }, T = (I) => {
537
+ g.current?.contains(I.target) || k(!1);
537
538
  };
538
- return document.addEventListener("keydown", T, {
539
- signal: g.signal
540
- }), document.addEventListener("mousedown", C, {
541
- signal: g.signal
539
+ return document.addEventListener("keydown", C, {
540
+ signal: O.signal
541
+ }), document.addEventListener("mousedown", T, {
542
+ signal: O.signal
542
543
  }), document.addEventListener(
543
544
  "visibilitychange",
544
545
  () => {
545
- document.hidden && y(!1);
546
+ document.hidden && k(!1);
546
547
  },
547
548
  {
548
- signal: g.signal
549
+ signal: O.signal
549
550
  }
550
551
  ), () => {
551
- g.abort();
552
+ O.abort();
552
553
  };
553
- }, [y, s]), se(() => {
554
- k.current && (k.current.value = w.prefix + " ");
555
- }, [w.code]), /* @__PURE__ */ Z("div", { className: "w-full flex flex-col gap-2", children: [
556
- a ? /* @__PURE__ */ Z(
554
+ }, [k, g]), pe(() => {
555
+ b.current && (b.current.value = h.prefix + " ");
556
+ }, [h.code]), /* @__PURE__ */ Z("div", { className: "w-full flex flex-col gap-2", children: [
557
+ a ? /* @__PURE__ */ B("div", { className: ee(u), children: /* @__PURE__ */ Z(
557
558
  "label",
558
559
  {
559
- id: m,
560
+ id: w,
560
561
  className: Ve({ className: l }),
561
- onClick: () => !e && k.current?.focus(),
562
+ onClick: () => !e && b.current?.focus(),
562
563
  children: [
563
564
  a,
564
- o && /* @__PURE__ */ V(
565
+ o && /* @__PURE__ */ B(
565
566
  X,
566
567
  {
567
568
  component: "span",
@@ -571,27 +572,27 @@ const Ot = Be(
571
572
  )
572
573
  ]
573
574
  }
574
- ) : null,
575
+ ) }) : null,
575
576
  /* @__PURE__ */ Z(
576
577
  "div",
577
578
  {
578
- ref: s,
579
- "data-state": O ? "open" : "closed",
579
+ ref: g,
580
+ "data-state": E ? "open" : "closed",
580
581
  className: xe({
581
- className: b,
582
- variant: v ? "error" : "default"
582
+ className: M,
583
+ variant: P ? "error" : "default"
583
584
  }),
584
585
  children: [
585
586
  /* @__PURE__ */ Z("div", { className: "p-2 flex items-center gap-2.5", children: [
586
- /* @__PURE__ */ V(Fe, {}),
587
- /* @__PURE__ */ V(
587
+ /* @__PURE__ */ B(Fe, {}),
588
+ /* @__PURE__ */ B(
588
589
  "input",
589
590
  {
590
- id: a ? m : void 0,
591
- ref: k,
592
- name: u,
591
+ id: a ? w : void 0,
592
+ ref: b,
593
+ name: i,
593
594
  autoComplete: "off",
594
- className: pe(
595
+ className: ee(
595
596
  "outline-0",
596
597
  "w-full",
597
598
  "caret-slate-800",
@@ -604,27 +605,27 @@ const Ot = Be(
604
605
  ),
605
606
  type: "tel",
606
607
  inputMode: "tel",
607
- value: S,
608
- onChange: P,
608
+ value: v,
609
+ onChange: N,
609
610
  disabled: e,
610
- ...j
611
+ ...y
611
612
  }
612
613
  )
613
614
  ] }),
614
- O && /* @__PURE__ */ V(
615
+ E && /* @__PURE__ */ B(
615
616
  Ue,
616
617
  {
617
- placeholder: i,
618
- showFlagOnSearch: c,
619
- showInputFilter: p,
620
- showNameOnSearch: f,
621
- showPlaceHolder: M
618
+ placeholder: c,
619
+ showFlagOnSearch: s,
620
+ showInputFilter: f,
621
+ showNameOnSearch: S,
622
+ showPlaceHolder: j
622
623
  }
623
624
  )
624
625
  ]
625
626
  }
626
627
  ),
627
- t ? /* @__PURE__ */ V(
628
+ t ? /* @__PURE__ */ B(
628
629
  X,
629
630
  {
630
631
  component: "span",
@@ -632,11 +633,11 @@ const Ot = Be(
632
633
  children: t
633
634
  }
634
635
  ) : null,
635
- !t && n ? /* @__PURE__ */ V(
636
+ !t && n ? /* @__PURE__ */ B(
636
637
  X,
637
638
  {
638
639
  component: "span",
639
- className: pe(
640
+ className: ee(
640
641
  "text-xs kubefirst-dark:text-slate-200",
641
642
  r
642
643
  ),