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

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 (97) hide show
  1. package/dist/components/Button/Button.variants.js +7 -1
  2. package/dist/components/ButtonGroup/ButtonGroup.d.ts +34 -0
  3. package/dist/components/ButtonGroup/ButtonGroup.js +118 -0
  4. package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +92 -0
  5. package/dist/components/ButtonGroup/ButtonGroup.variants.d.ts +13 -0
  6. package/dist/components/ButtonGroup/ButtonGroup.variants.js +31 -0
  7. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.d.ts +3 -0
  8. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +263 -0
  9. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +21 -0
  10. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +26 -0
  11. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +89 -0
  12. package/dist/components/ButtonGroup/components/ButtonGroupItem/index.d.ts +2 -0
  13. package/dist/components/ButtonGroup/components/ButtonGroupItem/index.js +4 -0
  14. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.d.ts +3 -0
  15. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +45 -0
  16. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +8 -0
  17. package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.d.ts +2 -0
  18. package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.js +4 -0
  19. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.d.ts +3 -0
  20. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +37 -0
  21. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +6 -0
  22. package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.d.ts +2 -0
  23. package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.js +4 -0
  24. package/dist/components/ButtonGroup/components/index.d.ts +3 -0
  25. package/dist/components/ButtonGroup/components/index.js +8 -0
  26. package/dist/components/ButtonGroup/hooks/index.d.ts +2 -0
  27. package/dist/components/ButtonGroup/hooks/index.js +4 -0
  28. package/dist/components/ButtonGroup/hooks/useButtonGroup.d.ts +3 -0
  29. package/dist/components/ButtonGroup/hooks/useButtonGroup.js +67 -0
  30. package/dist/components/ButtonGroup/hooks/useButtonGroup.types.d.ts +18 -0
  31. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
  32. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
  33. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +11 -11
  34. package/dist/components/Drawer/Drawer.d.ts +36 -0
  35. package/dist/components/Drawer/Drawer.js +134 -0
  36. package/dist/components/Drawer/Drawer.types.d.ts +65 -0
  37. package/dist/components/Drawer/Drawer.variants.d.ts +8 -0
  38. package/dist/components/Drawer/Drawer.variants.js +92 -0
  39. package/dist/components/Drawer/components/Body/Body.d.ts +3 -0
  40. package/dist/components/Drawer/components/Body/Body.js +24 -0
  41. package/dist/components/Drawer/components/Body/Body.types.d.ts +7 -0
  42. package/dist/components/Drawer/components/Body/index.d.ts +2 -0
  43. package/dist/components/Drawer/components/Body/index.js +4 -0
  44. package/dist/components/Drawer/components/Footer/Footer.d.ts +3 -0
  45. package/dist/components/Drawer/components/Footer/Footer.js +26 -0
  46. package/dist/components/Drawer/components/Footer/Footer.types.d.ts +7 -0
  47. package/dist/components/Drawer/components/Footer/index.d.ts +2 -0
  48. package/dist/components/Drawer/components/Footer/index.js +4 -0
  49. package/dist/components/Drawer/components/Header/Header.d.ts +3 -0
  50. package/dist/components/Drawer/components/Header/Header.js +27 -0
  51. package/dist/components/Drawer/components/Header/Header.types.d.ts +9 -0
  52. package/dist/components/Drawer/components/Header/index.d.ts +2 -0
  53. package/dist/components/Drawer/components/Header/index.js +4 -0
  54. package/dist/components/Drawer/components/index.d.ts +3 -0
  55. package/dist/components/Drawer/components/index.js +8 -0
  56. package/dist/components/Drawer/constants/index.d.ts +6 -0
  57. package/dist/components/Drawer/constants/index.js +9 -0
  58. package/dist/components/Drawer/contexts/Drawer.context.d.ts +7 -0
  59. package/dist/components/Drawer/contexts/Drawer.context.js +6 -0
  60. package/dist/components/Drawer/contexts/index.d.ts +2 -0
  61. package/dist/components/Drawer/contexts/index.js +5 -0
  62. package/dist/components/Drawer/hooks/index.d.ts +2 -0
  63. package/dist/components/Drawer/hooks/index.js +4 -0
  64. package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
  65. package/dist/components/Drawer/hooks/useDrawer.js +66 -0
  66. package/dist/components/Drawer/hooks/useDrawer.types.d.ts +30 -0
  67. package/dist/components/PhoneNumberInput/components/Wrapper.js +116 -116
  68. package/dist/components/RadioGroup/RadioGroup.js +34 -33
  69. package/dist/components/RadioGroup/RadioGroup.types.d.ts +3 -1
  70. package/dist/components/Stepper/Stepper.js +29 -25
  71. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.d.ts +1 -2
  72. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +96 -91
  73. package/dist/components/Stepper/components/StepConnector/StepConnector.d.ts +1 -2
  74. package/dist/components/Stepper/components/StepConnector/StepConnector.js +10 -9
  75. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.d.ts +1 -2
  76. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +13 -19
  77. package/dist/components/Stepper/components/StepItem/StepItem.d.ts +1 -2
  78. package/dist/components/Stepper/components/StepItem/StepItem.js +6 -5
  79. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.d.ts +1 -2
  80. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +65 -60
  81. package/dist/components/Stepper/constants/index.d.ts +3 -0
  82. package/dist/components/Stepper/constants/index.js +13 -0
  83. package/dist/components/Stepper/hooks/index.d.ts +1 -0
  84. package/dist/components/Stepper/hooks/index.js +4 -0
  85. package/dist/components/Stepper/hooks/useStepItemLogic.d.ts +2 -0
  86. package/dist/components/Stepper/hooks/useStepItemLogic.js +27 -0
  87. package/dist/components/Stepper/hooks/useStepItemLogic.types.d.ts +16 -0
  88. package/dist/components/Stepper/utils/index.d.ts +3 -0
  89. package/dist/components/Stepper/utils/index.js +13 -0
  90. package/dist/components/Tooltip/Tooltip.variants.d.ts +2 -2
  91. package/dist/components/index.d.ts +2 -0
  92. package/dist/components/index.js +113 -109
  93. package/dist/index.js +115 -111
  94. package/dist/package.json +18 -17
  95. package/dist/{proxy-Drz23HDt.js → proxy-i19-YB39.js} +1044 -1035
  96. package/dist/styles.css +1 -1
  97. package/package.json +15 -16
@@ -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);
@@ -149,11 +149,11 @@ 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, d = !Object.prototype.hasOwnProperty.call(o, s) && ((c = o[l[0]]) === null || c === void 0 ? void 0 : c.test(s));
153
+ (a && s === l[0] || d) && (l = l.slice(1), u += s);
154
154
  }
155
- } catch (b) {
156
- i.e(b);
155
+ } catch (O) {
156
+ i.e(O);
157
157
  } finally {
158
158
  i.f();
159
159
  }
@@ -163,18 +163,18 @@ 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 (O) {
171
+ c.e(O);
172
172
  } finally {
173
173
  c.f();
174
174
  }
175
175
  if (a && !l) {
176
- for (var f = r.length - 1; f >= 0 && i[f] === r[f]; f--) ;
177
- i = i.slice(0, f + 1);
176
+ for (var d = r.length - 1; d >= 0 && i[d] === r[d]; d--) ;
177
+ i = i.slice(0, d + 1);
178
178
  }
179
179
  return i;
180
180
  }
@@ -189,11 +189,11 @@ function K(e) {
189
189
  return e.length > 0 ? Se({}, e, /./) : {};
190
190
  }
191
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]);
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 = "", d = 0; d < c.length; d++) {
193
+ var O = Object.prototype.hasOwnProperty.call(l, c[d]);
194
+ O && i[d] !== void 0 && i[d] !== c[d] ? s += i[d] : O && u && (s += c[d]);
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");
@@ -356,42 +356,42 @@ var $ = (function(e) {
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);
363
- } })), a.value = M;
359
+ var u = (l = a._wrapperState) !== null && l !== void 0 ? l : {}, i = u.initialValue, c = i === void 0 ? "" : i, s = u.controlled, d = s !== void 0 && s, O = n({ initialValue: a.value || c, controlled: d }), k = O.value, C = O.options, h = { value: k, options: C, fallbackOptions: C }, v = { id: -1, cachedId: -1 }, p = { value: "", selectionStart: 0, selectionEnd: 0 }, b = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
360
+ Object.defineProperty(a, "value", he(he({}, b), {}, { set: function(y) {
361
+ var m;
362
+ p.value = y, b == null || (m = b.set) === null || m === void 0 || m.call(a, y);
363
+ } })), a.value = k;
364
364
  var S = function() {
365
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);
366
+ var m, T;
367
+ p.selectionStart = (m = a.selectionStart) !== null && m !== void 0 ? m : 0, p.selectionEnd = (T = a.selectionEnd) !== null && T !== void 0 ? T : 0, v.id = window.setTimeout(y);
368
368
  };
369
- m.id = window.setTimeout(y);
370
- }, w = function() {
371
- window.clearTimeout(m.id), m.id = -1, m.cachedId = -1;
372
- }, d = function(y) {
369
+ v.id = window.setTimeout(y);
370
+ }, j = function() {
371
+ window.clearTimeout(v.id), v.id = -1, v.cachedId = -1;
372
+ }, f = function(y) {
373
373
  try {
374
- var v, k;
375
- if (m.cachedId === m.id) throw new $("The input selection has not been updated.");
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);
374
+ var m, T;
375
+ if (v.cachedId === v.id) throw new $("The input selection has not been updated.");
376
+ v.cachedId = v.id;
377
+ var g = a.value, P = a.selectionStart, w = a.selectionEnd;
378
+ if (P === null || w === null) throw new $("The selection attributes have not been initialized.");
379
+ var M, I = p.value;
380
+ if (y.inputType === void 0 && (p.selectionStart = 0, p.selectionEnd = I.length), P > p.selectionStart ? M = "insert" : P <= p.selectionStart && P < p.selectionEnd ? M = "deleteBackward" : P === p.selectionEnd && g.length < I.length && (M = "deleteForward"), M === void 0 || (M === "deleteBackward" || M === "deleteForward") && g.length > I.length) throw new $("Input type detection error.");
381
+ var E = "", N = p.selectionStart, B = p.selectionEnd;
382
+ if (M === "insert") E = g.slice(p.selectionStart, P);
383
383
  else {
384
- var D = E.length - P.length;
385
- N = g, B = g + D;
384
+ var D = I.length - g.length;
385
+ N = P, B = P + 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
+ h.value !== I ? h.options = h.fallbackOptions : h.fallbackOptions = h.options;
388
+ var F = h.options, R = r({ inputType: M, previousValue: I, previousOptions: F, value: g, addedValue: E, changeStart: N, changeEnd: B, selectionStart: P, selectionEnd: w }), _ = R.options, A = nt(R, rt);
389
+ a.value = A.value, a.setSelectionRange(A.selectionStart, A.selectionEnd), h.value = A.value, h.options = _, p.selectionStart = A.selectionStart, p.selectionEnd = A.selectionEnd, (m = a._valueTracker) === null || m === void 0 || (T = m.setValue) === null || T === void 0 || T.call(m, I);
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), y.preventDefault(), y.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 && S(), a.addEventListener("focus", S), a.addEventListener("blur", j), a.addEventListener("input", f), o.set(a, { onFocus: S, onBlur: j, onInput: f });
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);
@@ -416,38 +416,38 @@ 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, d = u.showMask;
420
+ return a = l || a ? a : d ? i : "", process.env.NODE_ENV !== "production" && (function(O) {
421
+ var k = O.initialValue, C = O.mask, h = O.replacement;
422
+ k.length > C.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(k, '".'), "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 v = Object.keys(h).filter((function(f) {
424
+ return f.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
+ v.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(v.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 = C.slice(0, k.length), b = -1, S = 0; S < p.length; S++) {
428
+ var j = Object.prototype.hasOwnProperty.call(h, p[S]);
429
+ if (!(p[S] === k[S] || j && h[p[S]].test(k[S]))) {
430
+ b = S;
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
+ b !== -1 && console.error(ee(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(b, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(k, '".'), "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, d = x(r), O = d.track, k = d.modify, C = We(d, at), h = C.mask, v = C.replacement, p = C.showMask, b = C.separate, S = J(J({}, a === "insert" ? { inputType: a, data: i } : { inputType: a, data: null }), {}, { value: l, selectionStart: c, selectionEnd: s }), j = O?.(S);
438
+ if (j === !1) throw new $("Custom tracking stop.");
439
+ j === null ? i = "" : j !== !0 && j !== void 0 && (i = j);
440
+ var f = k?.(S);
441
+ f?.mask !== void 0 && (h = f.mask), f?.replacement !== void 0 && (v = typeof f?.replacement == "string" ? K(f?.replacement) : f.replacement), f?.showMask !== void 0 && (p = f.showMask), f?.separate !== void 0 && (b = f.separate);
442
+ var y = re(l, J({ end: c }, u)), m = re(l, J({ start: s }, u)), T = RegExp("[^".concat(Object.keys(v).join(""), "]"), "g"), g = h.replace(T, "");
443
+ if (y && (y = U(y, { replacementChars: g, replacement: v, separate: b }), g = g.slice(y.length)), i && (i = U(i, { replacementChars: g, replacement: v, separate: !1 }), g = g.slice(i.length)), a === "insert" && i === "") throw new $("The character does not match the key value of the `replacement` object.");
444
+ if (b) {
445
+ var P = h.slice(c, s).replace(T, ""), w = P.length - i.length;
446
+ w < 0 ? m = m.slice(-w) : w > 0 && (m = P.slice(-w) + m);
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) {
448
+ m && (m = U(m, { replacementChars: g, replacement: v, separate: b }));
449
+ var M = ke(y + i + m, { mask: h, replacement: v, separate: b, showMask: p }), I = (function(E) {
450
+ var N, B, D, F = E.inputType, R = E.value, _ = E.addedValue, A = E.beforeChangeValue, W = E.mask, ie = E.replacement, Ie = E.separate, Q = Pe(R, { mask: W, replacement: ie }).filter((function(q) {
451
451
  var ce = q.type;
452
452
  return ce === "input" || Ie && ce === "replacement";
453
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;
@@ -468,8 +468,8 @@ var Te = (function(e) {
468
468
  return Object.prototype.hasOwnProperty.call(ie, q);
469
469
  }));
470
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 } };
471
+ })({ inputType: a, value: M, addedValue: i, beforeChangeValue: y, mask: h, replacement: v, separate: b });
472
+ return { value: M, selectionStart: I, selectionEnd: I, options: { mask: h, replacement: v, separate: b } };
473
473
  } }])).format = function(o) {
474
474
  return Me(o, x(r));
475
475
  }, n.formatToParts = function(o) {
@@ -506,59 +506,59 @@ const Ot = Be(
506
506
  name: u,
507
507
  placeholder: i,
508
508
  showFlagOnSearch: c = !0,
509
- showInputFilter: p = !0,
510
- showNameOnSearch: f = !0,
511
- wrapperClassName: b,
512
- showPlaceHolder: M,
513
- ...j
509
+ showInputFilter: s = !0,
510
+ showNameOnSearch: d = !0,
511
+ wrapperClassName: O,
512
+ showPlaceHolder: k,
513
+ ...C
514
514
  }, h) => {
515
- const m = u ?? Re(), s = te(null), {
516
- isOpenSelector: O,
517
- value: S,
518
- selectedCountry: w,
519
- onChangeValue: d,
520
- handleOpenSelector: y
521
- } = Ke(), v = typeof t == "string" && t.length >= 0, k = ot({
522
- mask: De(w),
515
+ const v = Re(), p = u ?? v, b = te(null), {
516
+ isOpenSelector: S,
517
+ value: j,
518
+ selectedCountry: f,
519
+ onChangeValue: y,
520
+ handleOpenSelector: m
521
+ } = Ke(), T = typeof t == "string" && t.length >= 0, g = ot({
522
+ mask: De(f),
523
523
  replacement: { _: /\d/ }
524
524
  });
525
- Ge(h, () => k.current, [k]);
525
+ Ge(h, () => g.current, [g]);
526
526
  const P = Le(
527
- (g) => {
528
- g.target.value.startsWith(w.prefix) ? d(g.target.value) : d(`${w.prefix} `);
527
+ (w) => {
528
+ w.target.value.startsWith(f.prefix) ? y(w.target.value) : y(`${f.prefix} `);
529
529
  },
530
- [w.prefix, d]
530
+ [f.prefix, y]
531
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
+ const w = new AbortController(), M = (E) => {
534
+ E.key === "Escape" && m(!1);
535
+ }, I = (E) => {
536
+ b.current?.contains(E.target) || m(!1);
537
537
  };
538
- return document.addEventListener("keydown", T, {
539
- signal: g.signal
540
- }), document.addEventListener("mousedown", C, {
541
- signal: g.signal
538
+ return document.addEventListener("keydown", M, {
539
+ signal: w.signal
540
+ }), document.addEventListener("mousedown", I, {
541
+ signal: w.signal
542
542
  }), document.addEventListener(
543
543
  "visibilitychange",
544
544
  () => {
545
- document.hidden && y(!1);
545
+ document.hidden && m(!1);
546
546
  },
547
547
  {
548
- signal: g.signal
548
+ signal: w.signal
549
549
  }
550
550
  ), () => {
551
- g.abort();
551
+ w.abort();
552
552
  };
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: [
553
+ }, [m, b]), se(() => {
554
+ g.current && (g.current.value = f.prefix + " ");
555
+ }, [f.code]), /* @__PURE__ */ Z("div", { className: "w-full flex flex-col gap-2", children: [
556
556
  a ? /* @__PURE__ */ Z(
557
557
  "label",
558
558
  {
559
- id: m,
559
+ id: p,
560
560
  className: Ve({ className: l }),
561
- onClick: () => !e && k.current?.focus(),
561
+ onClick: () => !e && g.current?.focus(),
562
562
  children: [
563
563
  a,
564
564
  o && /* @__PURE__ */ V(
@@ -575,11 +575,11 @@ const Ot = Be(
575
575
  /* @__PURE__ */ Z(
576
576
  "div",
577
577
  {
578
- ref: s,
579
- "data-state": O ? "open" : "closed",
578
+ ref: b,
579
+ "data-state": S ? "open" : "closed",
580
580
  className: xe({
581
- className: b,
582
- variant: v ? "error" : "default"
581
+ className: O,
582
+ variant: T ? "error" : "default"
583
583
  }),
584
584
  children: [
585
585
  /* @__PURE__ */ Z("div", { className: "p-2 flex items-center gap-2.5", children: [
@@ -587,8 +587,8 @@ const Ot = Be(
587
587
  /* @__PURE__ */ V(
588
588
  "input",
589
589
  {
590
- id: a ? m : void 0,
591
- ref: k,
590
+ id: a ? p : void 0,
591
+ ref: g,
592
592
  name: u,
593
593
  autoComplete: "off",
594
594
  className: pe(
@@ -604,21 +604,21 @@ const Ot = Be(
604
604
  ),
605
605
  type: "tel",
606
606
  inputMode: "tel",
607
- value: S,
607
+ value: j,
608
608
  onChange: P,
609
609
  disabled: e,
610
- ...j
610
+ ...C
611
611
  }
612
612
  )
613
613
  ] }),
614
- O && /* @__PURE__ */ V(
614
+ S && /* @__PURE__ */ V(
615
615
  Ue,
616
616
  {
617
617
  placeholder: i,
618
618
  showFlagOnSearch: c,
619
- showInputFilter: p,
620
- showNameOnSearch: f,
621
- showPlaceHolder: M
619
+ showInputFilter: s,
620
+ showNameOnSearch: d,
621
+ showPlaceHolder: k
622
622
  }
623
623
  )
624
624
  ]
@@ -1,44 +1,45 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { S as k } from "../../index-BvoZGpli.js";
3
- import { useState as x, useCallback as C } from "react";
4
- import { cn as r } from "../../utils/index.js";
5
- import { Radio as G } from "../Radio/Radio.js";
6
- import { radioGroupVariants as R } from "./RadioGroup.variants.js";
7
- const y = ({
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { S as G } from "../../index-BvoZGpli.js";
3
+ import { useState as R, useCallback as b } from "react";
4
+ import { cn as c } from "../../utils/index.js";
5
+ import { Radio as j } from "../Radio/Radio.js";
6
+ import { radioGroupVariants as u } from "./RadioGroup.variants.js";
7
+ const A = ({
8
8
  asChild: m,
9
- className: s,
10
- defaultChecked: c,
11
- direction: a,
12
- name: i,
13
- options: d,
14
- theme: n,
15
- wrapperClassName: p,
16
- onValueChange: t
9
+ className: a,
10
+ defaultChecked: n,
11
+ direction: i,
12
+ name: d,
13
+ options: l,
14
+ theme: p,
15
+ value: e,
16
+ wrapperClassName: f,
17
+ onValueChange: r
17
18
  }) => {
18
- const f = m ? k : "div", [l, S] = x(
19
- () => c
20
- ), h = C(
19
+ const S = m ? G : "div", t = e !== void 0, [h, C] = R(
20
+ () => n
21
+ ), N = t ? e : h, k = b(
21
22
  (o) => {
22
- S(o), t?.(o);
23
+ t || C(o), r?.(o);
23
24
  },
24
- [t]
25
+ [t, r]
25
26
  );
26
- return /* @__PURE__ */ e(
27
- f,
27
+ return /* @__PURE__ */ s(
28
+ S,
28
29
  {
29
- className: r(
30
- R({ className: p, direction: a })
30
+ className: c(
31
+ u({ className: f, direction: i })
31
32
  ),
32
- "data-theme": n,
33
- children: d.map(({ value: o, ...N }) => /* @__PURE__ */ e(
34
- G,
33
+ "data-theme": p,
34
+ children: l.map(({ value: o, ...x }) => /* @__PURE__ */ s(
35
+ j,
35
36
  {
36
37
  value: o,
37
- name: i,
38
- className: r(s),
39
- checked: l === o,
40
- onChange: () => h(o),
41
- ...N
38
+ name: d,
39
+ className: c(a),
40
+ checked: N === o,
41
+ onChange: () => k(o),
42
+ ...x
42
43
  },
43
44
  o
44
45
  ))
@@ -46,5 +47,5 @@ const y = ({
46
47
  );
47
48
  };
48
49
  export {
49
- y as RadioGroup
50
+ A as RadioGroup
50
51
  };
@@ -23,7 +23,7 @@ export interface RadioGroupProps {
23
23
  asChild?: boolean;
24
24
  /** CSS classes for each radio option */
25
25
  className?: RadioProps['className'];
26
- /** Initially selected value */
26
+ /** Initially selected value (uncontrolled mode) */
27
27
  defaultChecked?: string;
28
28
  /** Layout direction (row or col) */
29
29
  direction?: 'row' | 'col';
@@ -35,6 +35,8 @@ export interface RadioGroupProps {
35
35
  options: Omit<RadioProps, 'name' | 'checked' | 'defaultChecked'>[];
36
36
  /** Theme override for this component */
37
37
  theme?: Theme;
38
+ /** Currently selected value (controlled mode) */
39
+ value?: string;
38
40
  /** CSS classes for the wrapper */
39
41
  wrapperClassName?: string;
40
42
  /** Callback when selection changes */
@@ -1,28 +1,32 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
+ import { useMemo as S } from "react";
2
3
  import { cn as s } from "../../utils/index.js";
3
- import { StepItem as V } from "./components/StepItem/StepItem.js";
4
- import { stepItemVariants as b, stepListVariants as k, stepperVariants as C } from "./Stepper.variants.js";
5
- const O = ({
6
- className: m,
4
+ import { StepItem as b } from "./components/StepItem/StepItem.js";
5
+ import { stepItemVariants as k, stepListVariants as C, stepperVariants as I } from "./Stepper.variants.js";
6
+ const P = ({
7
+ className: c,
7
8
  classNames: r,
8
- clickable: c = !1,
9
- currentStep: n,
10
- icons: u,
9
+ clickable: u = !1,
10
+ currentStep: o,
11
+ icons: f,
11
12
  orientation: p = "vertical",
12
- showConnector: f = !0,
13
- size: h = "sm",
14
- steps: v,
13
+ showConnector: h = !0,
14
+ size: v = "sm",
15
+ steps: l,
15
16
  theme: d,
16
17
  variant: g = "inline",
17
18
  onStepClick: z
18
19
  }) => {
19
- const l = g ?? "inline", e = l === "horizontal" ? "horizontal" : p ?? "vertical", S = h ?? "sm", o = v.map((t, i) => t.status ? t : n !== void 0 ? i < n ? { ...t, status: "completed" } : i === n ? { ...t, status: "active" } : { ...t, status: "pending" } : { ...t, status: "pending" });
20
+ const m = g ?? "inline", e = m === "horizontal" ? "horizontal" : p ?? "vertical", V = v ?? "sm", n = S(
21
+ () => l.map((t, i) => t.status ? t : o !== void 0 ? i < o ? { ...t, status: "completed" } : i === o ? { ...t, status: "active" } : { ...t, status: "pending" } : { ...t, status: "pending" }),
22
+ [l, o]
23
+ );
20
24
  return /* @__PURE__ */ a(
21
25
  "nav",
22
26
  {
23
27
  className: s(
24
- C({ orientation: e }),
25
- m,
28
+ I({ orientation: e }),
29
+ c,
26
30
  r?.root
27
31
  ),
28
32
  "data-theme": d,
@@ -31,31 +35,31 @@ const O = ({
31
35
  "ol",
32
36
  {
33
37
  className: s(
34
- k({ orientation: e }),
38
+ C({ orientation: e }),
35
39
  r?.list
36
40
  ),
37
- children: o.map((t, i) => /* @__PURE__ */ a(
41
+ children: n.map((t, i) => /* @__PURE__ */ a(
38
42
  "li",
39
43
  {
40
44
  className: s(
41
- b({ orientation: e }),
45
+ k({ orientation: e }),
42
46
  r?.item
43
47
  ),
44
48
  children: /* @__PURE__ */ a(
45
- V,
49
+ b,
46
50
  {
47
51
  step: t,
48
52
  index: i,
49
- isLast: i === o.length - 1,
53
+ isLast: i === n.length - 1,
50
54
  orientation: e,
51
- clickable: c ?? !1,
55
+ clickable: u ?? !1,
52
56
  onClick: () => z?.(t, i),
53
- size: S,
54
- showConnector: f ?? !0,
55
- nextStepStatus: o[i + 1]?.status,
56
- variant: l,
57
+ size: V,
58
+ showConnector: h ?? !0,
59
+ nextStepStatus: n[i + 1]?.status,
60
+ variant: m,
57
61
  classNames: r,
58
- icons: u
62
+ icons: f
59
63
  }
60
64
  )
61
65
  },
@@ -67,5 +71,5 @@ const O = ({
67
71
  );
68
72
  };
69
73
  export {
70
- O as Stepper
74
+ P as Stepper
71
75
  };
@@ -1,3 +1,2 @@
1
- import { FC } from 'react';
2
1
  import { Props } from './HorizontalStepItem.types';
3
- export declare const HorizontalStepItem: FC<Props>;
2
+ export declare const HorizontalStepItem: import('react').NamedExoticComponent<Props>;