prlg-ui 1.8.143 → 1.8.145
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/icons/index.cjs.js +1 -1
- package/dist/icons/index.es.js +255 -236
- package/dist/icons.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/prlg-ui.cjs.js +1 -1
- package/dist/prlg-ui.es.js +25 -9
- package/package.json +1 -1
package/dist/prlg-ui.es.js
CHANGED
|
@@ -4655,7 +4655,7 @@ const As = /* @__PURE__ */ W({
|
|
|
4655
4655
|
}), ki = /* @__PURE__ */ ue(As, [["__scopeId", "data-v-a004643e"]]), Os = {
|
|
4656
4656
|
key: 0,
|
|
4657
4657
|
class: "otp__label"
|
|
4658
|
-
}, Bs = { key: 0 }, Ds = { class: "otp__wrapper" }, Es = ["id", "onUpdate:modelValue", "disabled", "readonly", "onInput", "onKeydown", "onPaste", "onFocus", "onBlur"], Ls = {
|
|
4658
|
+
}, Bs = { key: 0 }, Ds = { class: "otp__wrapper" }, Es = ["id", "onUpdate:modelValue", "disabled", "readonly", "inputmode", "onInput", "onKeydown", "onPaste", "onFocus", "onBlur"], Ls = {
|
|
4659
4659
|
key: 1,
|
|
4660
4660
|
class: "otp__error"
|
|
4661
4661
|
}, $i = /* @__PURE__ */ W({
|
|
@@ -4669,7 +4669,8 @@ const As = /* @__PURE__ */ W({
|
|
|
4669
4669
|
errorText: {},
|
|
4670
4670
|
required: { type: Boolean, default: !1 },
|
|
4671
4671
|
size: { default: "default" },
|
|
4672
|
-
variant: { default: "outlined" }
|
|
4672
|
+
variant: { default: "outlined" },
|
|
4673
|
+
inputmode: { default: "text" }
|
|
4673
4674
|
}, {
|
|
4674
4675
|
modelValue: { default: "" },
|
|
4675
4676
|
modelModifiers: {}
|
|
@@ -4677,12 +4678,22 @@ const As = /* @__PURE__ */ W({
|
|
|
4677
4678
|
emits: /* @__PURE__ */ ae(["change", "complete", "focus", "blur"], ["update:modelValue"]),
|
|
4678
4679
|
setup(e, { emit: l }) {
|
|
4679
4680
|
const t = e, n = l, o = ie(e, "modelValue"), i = M([]), a = M([]), s = P(() => t.length);
|
|
4680
|
-
J(
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4681
|
+
J(
|
|
4682
|
+
() => o.value,
|
|
4683
|
+
(g) => {
|
|
4684
|
+
a.value = g.split("").concat(
|
|
4685
|
+
Array(Math.max(0, s.value - g.length)).fill("")
|
|
4686
|
+
);
|
|
4687
|
+
},
|
|
4688
|
+
{ immediate: !0 }
|
|
4689
|
+
), J(
|
|
4690
|
+
a,
|
|
4691
|
+
(g) => {
|
|
4692
|
+
const C = g.join("").slice(0, s.value);
|
|
4693
|
+
C !== o.value && (o.value = C, n("change", C), C.length === s.value && C.replace(/\s/g, "").length === s.value && n("complete", C));
|
|
4694
|
+
},
|
|
4695
|
+
{ deep: !0 }
|
|
4696
|
+
);
|
|
4686
4697
|
const u = P(() => [
|
|
4687
4698
|
"otp",
|
|
4688
4699
|
`otp--${t.size}`,
|
|
@@ -4706,7 +4717,10 @@ const As = /* @__PURE__ */ W({
|
|
|
4706
4717
|
E.forEach((O, A) => {
|
|
4707
4718
|
g + A < s.value && (a.value[g + A] = O);
|
|
4708
4719
|
});
|
|
4709
|
-
const V = Math.min(
|
|
4720
|
+
const V = Math.min(
|
|
4721
|
+
g + E.length,
|
|
4722
|
+
s.value - 1
|
|
4723
|
+
);
|
|
4710
4724
|
fe(() => {
|
|
4711
4725
|
i.value[V]?.focus();
|
|
4712
4726
|
});
|
|
@@ -4735,6 +4749,8 @@ const As = /* @__PURE__ */ W({
|
|
|
4735
4749
|
maxlength: "1",
|
|
4736
4750
|
disabled: g.disabled,
|
|
4737
4751
|
readonly: g.readonly,
|
|
4752
|
+
inputmode: g.inputmode,
|
|
4753
|
+
pattern: "[0-9]*",
|
|
4738
4754
|
onInput: (V) => r(E, V),
|
|
4739
4755
|
onKeydown: (V) => c(E, V),
|
|
4740
4756
|
onPaste: (V) => v(E, V),
|