@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.
- package/dist/components/Button/Button.variants.js +7 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +34 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +118 -0
- package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +92 -0
- package/dist/components/ButtonGroup/ButtonGroup.variants.d.ts +13 -0
- package/dist/components/ButtonGroup/ButtonGroup.variants.js +31 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.d.ts +3 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +263 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +21 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +26 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +89 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/index.d.ts +2 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/index.js +4 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.d.ts +3 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +45 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +8 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.d.ts +2 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.js +4 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.d.ts +3 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +37 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +6 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.d.ts +2 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.js +4 -0
- package/dist/components/ButtonGroup/components/index.d.ts +3 -0
- package/dist/components/ButtonGroup/components/index.js +8 -0
- package/dist/components/ButtonGroup/hooks/index.d.ts +2 -0
- package/dist/components/ButtonGroup/hooks/index.js +4 -0
- package/dist/components/ButtonGroup/hooks/useButtonGroup.d.ts +3 -0
- package/dist/components/ButtonGroup/hooks/useButtonGroup.js +67 -0
- package/dist/components/ButtonGroup/hooks/useButtonGroup.types.d.ts +18 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +11 -11
- package/dist/components/Drawer/Drawer.d.ts +36 -0
- package/dist/components/Drawer/Drawer.js +134 -0
- package/dist/components/Drawer/Drawer.types.d.ts +65 -0
- package/dist/components/Drawer/Drawer.variants.d.ts +8 -0
- package/dist/components/Drawer/Drawer.variants.js +92 -0
- package/dist/components/Drawer/components/Body/Body.d.ts +3 -0
- package/dist/components/Drawer/components/Body/Body.js +24 -0
- package/dist/components/Drawer/components/Body/Body.types.d.ts +7 -0
- package/dist/components/Drawer/components/Body/index.d.ts +2 -0
- package/dist/components/Drawer/components/Body/index.js +4 -0
- package/dist/components/Drawer/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Drawer/components/Footer/Footer.js +26 -0
- package/dist/components/Drawer/components/Footer/Footer.types.d.ts +7 -0
- package/dist/components/Drawer/components/Footer/index.d.ts +2 -0
- package/dist/components/Drawer/components/Footer/index.js +4 -0
- package/dist/components/Drawer/components/Header/Header.d.ts +3 -0
- package/dist/components/Drawer/components/Header/Header.js +27 -0
- package/dist/components/Drawer/components/Header/Header.types.d.ts +9 -0
- package/dist/components/Drawer/components/Header/index.d.ts +2 -0
- package/dist/components/Drawer/components/Header/index.js +4 -0
- package/dist/components/Drawer/components/index.d.ts +3 -0
- package/dist/components/Drawer/components/index.js +8 -0
- package/dist/components/Drawer/constants/index.d.ts +6 -0
- package/dist/components/Drawer/constants/index.js +9 -0
- package/dist/components/Drawer/contexts/Drawer.context.d.ts +7 -0
- package/dist/components/Drawer/contexts/Drawer.context.js +6 -0
- package/dist/components/Drawer/contexts/index.d.ts +2 -0
- package/dist/components/Drawer/contexts/index.js +5 -0
- package/dist/components/Drawer/hooks/index.d.ts +2 -0
- package/dist/components/Drawer/hooks/index.js +4 -0
- package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
- package/dist/components/Drawer/hooks/useDrawer.js +66 -0
- package/dist/components/Drawer/hooks/useDrawer.types.d.ts +30 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.js +116 -116
- package/dist/components/RadioGroup/RadioGroup.js +34 -33
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +3 -1
- package/dist/components/Stepper/Stepper.js +29 -25
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.d.ts +1 -2
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +96 -91
- package/dist/components/Stepper/components/StepConnector/StepConnector.d.ts +1 -2
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +10 -9
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.d.ts +1 -2
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +13 -19
- package/dist/components/Stepper/components/StepItem/StepItem.d.ts +1 -2
- package/dist/components/Stepper/components/StepItem/StepItem.js +6 -5
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.d.ts +1 -2
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +65 -60
- package/dist/components/Stepper/constants/index.d.ts +3 -0
- package/dist/components/Stepper/constants/index.js +13 -0
- package/dist/components/Stepper/hooks/index.d.ts +1 -0
- package/dist/components/Stepper/hooks/index.js +4 -0
- package/dist/components/Stepper/hooks/useStepItemLogic.d.ts +2 -0
- package/dist/components/Stepper/hooks/useStepItemLogic.js +27 -0
- package/dist/components/Stepper/hooks/useStepItemLogic.types.d.ts +16 -0
- package/dist/components/Stepper/utils/index.d.ts +3 -0
- package/dist/components/Stepper/utils/index.js +13 -0
- package/dist/components/Tooltip/Tooltip.variants.d.ts +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +113 -109
- package/dist/index.js +115 -111
- package/dist/package.json +18 -17
- package/dist/{proxy-Drz23HDt.js → proxy-i19-YB39.js} +1044 -1035
- package/dist/styles.css +1 -1
- 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
|
|
40
|
-
return
|
|
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,
|
|
153
|
-
(a &&
|
|
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 (
|
|
156
|
-
i.e(
|
|
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
|
|
166
|
+
var s = n.value;
|
|
167
167
|
if (!l && e[u] === void 0) break;
|
|
168
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
168
|
+
Object.prototype.hasOwnProperty.call(o, s) && e[u] !== void 0 ? i += e[u++] : i += s;
|
|
169
169
|
}
|
|
170
|
-
} catch (
|
|
171
|
-
c.e(
|
|
170
|
+
} catch (O) {
|
|
171
|
+
c.e(O);
|
|
172
172
|
} finally {
|
|
173
173
|
c.f();
|
|
174
174
|
}
|
|
175
175
|
if (a && !l) {
|
|
176
|
-
for (var
|
|
177
|
-
i = i.slice(0,
|
|
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),
|
|
193
|
-
var
|
|
194
|
-
|
|
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
|
|
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,
|
|
360
|
-
Object.defineProperty(a, "value", he(he({},
|
|
361
|
-
var
|
|
362
|
-
|
|
363
|
-
} })), a.value =
|
|
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
|
|
367
|
-
|
|
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
|
-
|
|
370
|
-
},
|
|
371
|
-
window.clearTimeout(
|
|
372
|
-
},
|
|
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
|
|
375
|
-
if (
|
|
376
|
-
|
|
377
|
-
var
|
|
378
|
-
if (
|
|
379
|
-
var
|
|
380
|
-
if (y.inputType === void 0 && (
|
|
381
|
-
var
|
|
382
|
-
if (
|
|
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 =
|
|
385
|
-
N =
|
|
384
|
+
var D = I.length - g.length;
|
|
385
|
+
N = P, B = P + D;
|
|
386
386
|
}
|
|
387
|
-
h.value !==
|
|
388
|
-
var F = h.options, R = r({ inputType:
|
|
389
|
-
a.value = A.value, a.setSelectionRange(A.selectionStart, A.selectionEnd), h.value = A.value, h.options = _,
|
|
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 =
|
|
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",
|
|
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,
|
|
420
|
-
return a = l || a ? a :
|
|
421
|
-
var
|
|
422
|
-
|
|
423
|
-
var
|
|
424
|
-
return
|
|
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
|
-
|
|
427
|
-
for (var
|
|
428
|
-
var
|
|
429
|
-
if (!(
|
|
430
|
-
|
|
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
|
-
|
|
435
|
-
})({ initialValue: a, mask: i, replacement: c }), { value: a, options: { mask: i, replacement: c, separate:
|
|
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,
|
|
438
|
-
if (
|
|
439
|
-
|
|
440
|
-
var
|
|
441
|
-
|
|
442
|
-
var y = re(l, J({ end: c }, u)),
|
|
443
|
-
if (y && (y = U(y, { replacementChars:
|
|
444
|
-
if (
|
|
445
|
-
var
|
|
446
|
-
|
|
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
|
-
|
|
449
|
-
var
|
|
450
|
-
var N, B, D, F =
|
|
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:
|
|
472
|
-
return { value:
|
|
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:
|
|
510
|
-
showNameOnSearch:
|
|
511
|
-
wrapperClassName:
|
|
512
|
-
showPlaceHolder:
|
|
513
|
-
...
|
|
509
|
+
showInputFilter: s = !0,
|
|
510
|
+
showNameOnSearch: d = !0,
|
|
511
|
+
wrapperClassName: O,
|
|
512
|
+
showPlaceHolder: k,
|
|
513
|
+
...C
|
|
514
514
|
}, h) => {
|
|
515
|
-
const
|
|
516
|
-
isOpenSelector:
|
|
517
|
-
value:
|
|
518
|
-
selectedCountry:
|
|
519
|
-
onChangeValue:
|
|
520
|
-
handleOpenSelector:
|
|
521
|
-
} = Ke(),
|
|
522
|
-
mask: De(
|
|
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, () =>
|
|
525
|
+
Ge(h, () => g.current, [g]);
|
|
526
526
|
const P = Le(
|
|
527
|
-
(
|
|
528
|
-
|
|
527
|
+
(w) => {
|
|
528
|
+
w.target.value.startsWith(f.prefix) ? y(w.target.value) : y(`${f.prefix} `);
|
|
529
529
|
},
|
|
530
|
-
[
|
|
530
|
+
[f.prefix, y]
|
|
531
531
|
);
|
|
532
532
|
return se(() => {
|
|
533
|
-
const
|
|
534
|
-
E.key === "Escape" &&
|
|
535
|
-
},
|
|
536
|
-
|
|
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",
|
|
539
|
-
signal:
|
|
540
|
-
}), document.addEventListener("mousedown",
|
|
541
|
-
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 &&
|
|
545
|
+
document.hidden && m(!1);
|
|
546
546
|
},
|
|
547
547
|
{
|
|
548
|
-
signal:
|
|
548
|
+
signal: w.signal
|
|
549
549
|
}
|
|
550
550
|
), () => {
|
|
551
|
-
|
|
551
|
+
w.abort();
|
|
552
552
|
};
|
|
553
|
-
}, [
|
|
554
|
-
|
|
555
|
-
}, [
|
|
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:
|
|
559
|
+
id: p,
|
|
560
560
|
className: Ve({ className: l }),
|
|
561
|
-
onClick: () => !e &&
|
|
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:
|
|
579
|
-
"data-state":
|
|
578
|
+
ref: b,
|
|
579
|
+
"data-state": S ? "open" : "closed",
|
|
580
580
|
className: xe({
|
|
581
|
-
className:
|
|
582
|
-
variant:
|
|
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 ?
|
|
591
|
-
ref:
|
|
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:
|
|
607
|
+
value: j,
|
|
608
608
|
onChange: P,
|
|
609
609
|
disabled: e,
|
|
610
|
-
...
|
|
610
|
+
...C
|
|
611
611
|
}
|
|
612
612
|
)
|
|
613
613
|
] }),
|
|
614
|
-
|
|
614
|
+
S && /* @__PURE__ */ V(
|
|
615
615
|
Ue,
|
|
616
616
|
{
|
|
617
617
|
placeholder: i,
|
|
618
618
|
showFlagOnSearch: c,
|
|
619
|
-
showInputFilter:
|
|
620
|
-
showNameOnSearch:
|
|
621
|
-
showPlaceHolder:
|
|
619
|
+
showInputFilter: s,
|
|
620
|
+
showNameOnSearch: d,
|
|
621
|
+
showPlaceHolder: k
|
|
622
622
|
}
|
|
623
623
|
)
|
|
624
624
|
]
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { S as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Radio as
|
|
6
|
-
import { radioGroupVariants as
|
|
7
|
-
const
|
|
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:
|
|
10
|
-
defaultChecked:
|
|
11
|
-
direction:
|
|
12
|
-
name:
|
|
13
|
-
options:
|
|
14
|
-
theme:
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
19
|
-
() =>
|
|
20
|
-
), h =
|
|
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
|
-
|
|
23
|
+
t || C(o), r?.(o);
|
|
23
24
|
},
|
|
24
|
-
[t]
|
|
25
|
+
[t, r]
|
|
25
26
|
);
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
|
|
27
|
+
return /* @__PURE__ */ s(
|
|
28
|
+
S,
|
|
28
29
|
{
|
|
29
|
-
className:
|
|
30
|
-
|
|
30
|
+
className: c(
|
|
31
|
+
u({ className: f, direction: i })
|
|
31
32
|
),
|
|
32
|
-
"data-theme":
|
|
33
|
-
children:
|
|
34
|
-
|
|
33
|
+
"data-theme": p,
|
|
34
|
+
children: l.map(({ value: o, ...x }) => /* @__PURE__ */ s(
|
|
35
|
+
j,
|
|
35
36
|
{
|
|
36
37
|
value: o,
|
|
37
|
-
name:
|
|
38
|
-
className:
|
|
39
|
-
checked:
|
|
40
|
-
onChange: () =>
|
|
41
|
-
...
|
|
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
|
-
|
|
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
|
|
4
|
-
import { stepItemVariants as
|
|
5
|
-
const
|
|
6
|
-
className:
|
|
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:
|
|
9
|
-
currentStep:
|
|
10
|
-
icons:
|
|
9
|
+
clickable: u = !1,
|
|
10
|
+
currentStep: o,
|
|
11
|
+
icons: f,
|
|
11
12
|
orientation: p = "vertical",
|
|
12
|
-
showConnector:
|
|
13
|
-
size:
|
|
14
|
-
steps:
|
|
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
|
|
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
|
-
|
|
25
|
-
|
|
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
|
-
|
|
38
|
+
C({ orientation: e }),
|
|
35
39
|
r?.list
|
|
36
40
|
),
|
|
37
|
-
children:
|
|
41
|
+
children: n.map((t, i) => /* @__PURE__ */ a(
|
|
38
42
|
"li",
|
|
39
43
|
{
|
|
40
44
|
className: s(
|
|
41
|
-
|
|
45
|
+
k({ orientation: e }),
|
|
42
46
|
r?.item
|
|
43
47
|
),
|
|
44
48
|
children: /* @__PURE__ */ a(
|
|
45
|
-
|
|
49
|
+
b,
|
|
46
50
|
{
|
|
47
51
|
step: t,
|
|
48
52
|
index: i,
|
|
49
|
-
isLast: i ===
|
|
53
|
+
isLast: i === n.length - 1,
|
|
50
54
|
orientation: e,
|
|
51
|
-
clickable:
|
|
55
|
+
clickable: u ?? !1,
|
|
52
56
|
onClick: () => z?.(t, i),
|
|
53
|
-
size:
|
|
54
|
-
showConnector:
|
|
55
|
-
nextStepStatus:
|
|
56
|
-
variant:
|
|
57
|
+
size: V,
|
|
58
|
+
showConnector: h ?? !0,
|
|
59
|
+
nextStepStatus: n[i + 1]?.status,
|
|
60
|
+
variant: m,
|
|
57
61
|
classNames: r,
|
|
58
|
-
icons:
|
|
62
|
+
icons: f
|
|
59
63
|
}
|
|
60
64
|
)
|
|
61
65
|
},
|
|
@@ -67,5 +71,5 @@ const O = ({
|
|
|
67
71
|
);
|
|
68
72
|
};
|
|
69
73
|
export {
|
|
70
|
-
|
|
74
|
+
P as Stepper
|
|
71
75
|
};
|