@vlalg-nimbus/nb-inputs 8.0.3 → 8.0.4
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/nb-inputs.js +212 -213
- package/dist/nb-inputs.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/nb-inputs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCssVars as sa, onMounted as ua, ref as Q, toRefs as da, computed as a, watch as U, openBlock as P, createElementBlock as O, normalizeClass as
|
|
1
|
+
import { useCssVars as sa, onMounted as ua, ref as Q, toRefs as da, computed as a, watch as U, openBlock as P, createElementBlock as O, normalizeClass as Ne, normalizeStyle as We, createElementVNode as be, mergeProps as ra, Fragment as Oa, renderList as Fa, unref as o, withDirectives as ca, vModelRadio as al, withKeys as Et, withModifiers as ia, toDisplayString as ht, createCommentVNode as Le, vModelCheckbox as ll, onUnmounted as ma, renderSlot as oa, createTextVNode as ga, vModelDynamic as qa, vModelText as ja, defineAsyncComponent as nl, nextTick as ya, createVNode as ol } from "vue";
|
|
2
2
|
const fa = (e, m) => {
|
|
3
3
|
const h = e.__vccOpts || e;
|
|
4
4
|
for (const [z, _] of m)
|
|
@@ -178,7 +178,7 @@ const fa = (e, m) => {
|
|
|
178
178
|
lightTextColor: Be,
|
|
179
179
|
lightColor: ae,
|
|
180
180
|
lightColorHover: le,
|
|
181
|
-
darkTextColor:
|
|
181
|
+
darkTextColor: N,
|
|
182
182
|
darkColor: D,
|
|
183
183
|
darkColorHover: J,
|
|
184
184
|
hoverEffect: Z,
|
|
@@ -190,36 +190,36 @@ const fa = (e, m) => {
|
|
|
190
190
|
fontFamily: ke,
|
|
191
191
|
fontSize: ce,
|
|
192
192
|
fontWeight: fe
|
|
193
|
-
} = da(z),
|
|
194
|
-
const g = ee.value ? "component-disabled" : "", V = se.value !== "b" ? "inline-block" : "block", ve = ke.value ? ke.value : "'Lato', sans-serif", G = ce.value ? ce.value : "1.6em", te = fe.value !== 0 && !fe.value || fe.value < 0 ? 200 : fe.value, je = [!1, !0].includes(Z.value) ? Z.value : !1, He = [!1, !0].includes(ye.value) ? ye.value : !1, K = de.value !== 0 && !de.value || de.value < 0 ? 15 : de.value,
|
|
193
|
+
} = da(z), I = a(() => {
|
|
194
|
+
const g = ee.value ? "component-disabled" : "", V = se.value !== "b" ? "inline-block" : "block", ve = ke.value ? ke.value : "'Lato', sans-serif", G = ce.value ? ce.value : "1.6em", te = fe.value !== 0 && !fe.value || fe.value < 0 ? 200 : fe.value, je = [!1, !0].includes(Z.value) ? Z.value : !1, He = [!1, !0].includes(ye.value) ? ye.value : !1, K = de.value !== 0 && !de.value || de.value < 0 ? 15 : de.value, c = F.value !== 0 && !F.value || F.value < 0 ? 6 : F.value, y = ne.value !== 0 && !ne.value || ne.value < 0 ? 1 : ne.value;
|
|
195
195
|
return {
|
|
196
196
|
disabled: g,
|
|
197
197
|
display: V,
|
|
198
198
|
hoverEffect: je,
|
|
199
199
|
activeHoverEffect: He,
|
|
200
200
|
itemGap: K,
|
|
201
|
-
internalGap:
|
|
201
|
+
internalGap: c,
|
|
202
202
|
scale: y,
|
|
203
203
|
font: ve,
|
|
204
204
|
fontSize: G,
|
|
205
205
|
fontWeight: te
|
|
206
206
|
};
|
|
207
|
-
}), me = a(() =>
|
|
208
|
-
display:
|
|
209
|
-
})), Ae = a(() =>
|
|
210
|
-
const g =
|
|
207
|
+
}), me = a(() => I.value.disabled), d = a(() => ({
|
|
208
|
+
display: I.value.display
|
|
209
|
+
})), Ae = a(() => I.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), qe = a(() => {
|
|
210
|
+
const g = I.value;
|
|
211
211
|
return {
|
|
212
212
|
fontSize: g.fontSize,
|
|
213
213
|
fontWeight: g.fontWeight
|
|
214
214
|
};
|
|
215
|
-
}), Ge = a(() => Array.isArray(X.value) && X.value.constructor === Array && X.value.length > 0), Pe = a(() => Ee.value === "dark" ? "component__theme--dark" : "component__theme--light"), Ke = a(() =>
|
|
216
|
-
const V =
|
|
215
|
+
}), Ge = a(() => Array.isArray(X.value) && X.value.constructor === Array && X.value.length > 0), Pe = a(() => Ee.value === "dark" ? "component__theme--dark" : "component__theme--light"), Ke = a(() => I.value.font), tt = a(() => Be.value), it = a(() => ae.value), vt = a(() => I.value.hoverEffect ? le.value : ae.value), Ye = a(() => I.value.activeHoverEffect ? le.value : ae.value), $e = a(() => N.value), he = a(() => D.value), pt = a(() => I.value.hoverEffect ? J.value : D.value), at = a(() => I.value.activeHoverEffect ? J.value : D.value), st = a(() => {
|
|
216
|
+
const V = I.value.internalGap;
|
|
217
217
|
return !V || V < 0 ? 0 : `${V}px`;
|
|
218
218
|
}), bt = a(() => {
|
|
219
|
-
const V =
|
|
219
|
+
const V = I.value.itemGap;
|
|
220
220
|
return !V || V < 0 ? 0 : `${V}px`;
|
|
221
221
|
}), _e = a(() => ({
|
|
222
|
-
zoom:
|
|
222
|
+
zoom: I.value.scale
|
|
223
223
|
})), lt = a(() => {
|
|
224
224
|
const g = {};
|
|
225
225
|
ge.value && Object.keys(ge.value).forEach((G) => g[`aria-${G}`] = ge.value[G]);
|
|
@@ -243,7 +243,7 @@ const fa = (e, m) => {
|
|
|
243
243
|
g !== V && (h("current-value", g), h("changed", g));
|
|
244
244
|
}), (g, V) => e.nbId && Ge.value ? (P(), O("div", {
|
|
245
245
|
key: 0,
|
|
246
|
-
class:
|
|
246
|
+
class: Ne(["nb-wrapper", me.value]),
|
|
247
247
|
style: We([d.value, _e.value])
|
|
248
248
|
}, [
|
|
249
249
|
be("div", ra({
|
|
@@ -448,7 +448,7 @@ const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["for", "tabin
|
|
|
448
448
|
},
|
|
449
449
|
emits: ["current-value", "changed", "clicked"],
|
|
450
450
|
setup(e, { emit: m }) {
|
|
451
|
-
sa((
|
|
451
|
+
sa((c) => ({
|
|
452
452
|
"49e2c63f": it.value,
|
|
453
453
|
"107babaa": ve.value,
|
|
454
454
|
"3c7cc5ce": V.value,
|
|
@@ -478,7 +478,7 @@ const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["for", "tabin
|
|
|
478
478
|
lightColor: Be,
|
|
479
479
|
lightColorHover: ae,
|
|
480
480
|
darkTextColor: le,
|
|
481
|
-
darkColor:
|
|
481
|
+
darkColor: N,
|
|
482
482
|
darkColorHover: D,
|
|
483
483
|
boxRadius: J,
|
|
484
484
|
hoverEffect: Z,
|
|
@@ -490,12 +490,12 @@ const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["for", "tabin
|
|
|
490
490
|
background: ke,
|
|
491
491
|
disabled: ce,
|
|
492
492
|
fontFamily: fe,
|
|
493
|
-
fontSize:
|
|
493
|
+
fontSize: I,
|
|
494
494
|
fontWeight: me
|
|
495
495
|
} = da(z), d = a(() => {
|
|
496
|
-
const
|
|
496
|
+
const c = ce.value ? "component-disabled" : "", y = Ve.value !== "b" ? "inline-block" : "block", pe = fe.value ? fe.value : "'Lato', sans-serif", q = I.value ? I.value : "1.6em", oe = me.value !== 0 && !me.value || me.value < 0 ? 200 : me.value, we = J.value !== 0 && !J.value || J.value < 0 ? 0 : J.value, Re = [!1, !0].includes(Z.value) ? Z.value : !1, Oe = [!1, !0].includes(ye.value) ? ye.value : !1, Fe = de.value !== 0 && !de.value || de.value < 0 ? 15 : de.value, Ue = F.value !== 0 && !F.value || F.value < 0 ? 6 : F.value, nt = ["box", "circle"].includes(ee.value) ? ee.value : "box", ot = ne.value !== 0 && !ne.value || ne.value < 0 ? 1 : ne.value, C = [!1, !0].includes(ke.value) ? ke.value : !1;
|
|
497
497
|
return {
|
|
498
|
-
disabled:
|
|
498
|
+
disabled: c,
|
|
499
499
|
display: y,
|
|
500
500
|
boxRadius: we,
|
|
501
501
|
hoverEffect: Re,
|
|
@@ -512,40 +512,40 @@ const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["for", "tabin
|
|
|
512
512
|
}), Ae = a(() => d.value.disabled), qe = a(() => ({
|
|
513
513
|
display: d.value.display
|
|
514
514
|
})), Ge = a(() => d.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), Pe = a(() => {
|
|
515
|
-
const
|
|
515
|
+
const c = d.value;
|
|
516
516
|
return {
|
|
517
|
-
fontSize:
|
|
518
|
-
fontWeight:
|
|
517
|
+
fontSize: c.fontSize,
|
|
518
|
+
fontWeight: c.fontWeight
|
|
519
519
|
};
|
|
520
520
|
}), Ke = a(() => Array.isArray(se.value) && se.value.constructor === Array && se.value.length > 0), tt = a(() => X.value === "dark" ? "component__theme--dark" : "component__theme--light"), it = a(() => d.value.font), vt = a(() => Ee.value), Ye = a(() => Be.value), $e = a(() => d.value.hoverEffect ? ae.value : Be.value), he = a(() => d.value.activeHoverEffect ? ae.value : Be.value), pt = a(() => {
|
|
521
|
-
const
|
|
522
|
-
return
|
|
523
|
-
}), at = a(() => le.value), st = a(() =>
|
|
524
|
-
const
|
|
525
|
-
return
|
|
521
|
+
const c = d.value;
|
|
522
|
+
return c.activeHoverEffect && c.background ? `${ae.value}80` : ae.value;
|
|
523
|
+
}), at = a(() => le.value), st = a(() => N.value), bt = a(() => d.value.hoverEffect ? D.value : N.value), _e = a(() => d.value.activeHoverEffect ? D.value : N.value), lt = a(() => {
|
|
524
|
+
const c = d.value;
|
|
525
|
+
return c.activeHoverEffect && c.background ? `${D.value}80` : D.value;
|
|
526
526
|
}), Qe = a(() => d.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), Xe = a(() => {
|
|
527
|
-
const
|
|
528
|
-
return
|
|
527
|
+
const c = d.value, y = X.value === "dark" ? le.value : Ee.value;
|
|
528
|
+
return c.background ? "#ffffff" : y;
|
|
529
529
|
});
|
|
530
530
|
a(() => d.value.background ? "19px" : "auto");
|
|
531
531
|
const g = a(() => {
|
|
532
532
|
const y = d.value.internalGap;
|
|
533
533
|
return !y || y < 0 ? 0 : `${y}px`;
|
|
534
534
|
}), V = a(() => {
|
|
535
|
-
const
|
|
536
|
-
return `${
|
|
535
|
+
const c = d.value;
|
|
536
|
+
return `${c.boxRadius > 7 ? 7 : c.boxRadius}px`;
|
|
537
537
|
}), ve = a(() => {
|
|
538
538
|
const y = d.value.itemGap;
|
|
539
539
|
return !y || y < 0 ? 0 : `${y}px`;
|
|
540
540
|
}), G = a(() => d.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), te = a(() => ({
|
|
541
541
|
zoom: d.value.scale
|
|
542
542
|
})), je = a(() => {
|
|
543
|
-
const
|
|
544
|
-
ge.value && Object.keys(ge.value).forEach((q) =>
|
|
543
|
+
const c = {};
|
|
544
|
+
ge.value && Object.keys(ge.value).forEach((q) => c[`aria-${q}`] = ge.value[q]);
|
|
545
545
|
const y = {
|
|
546
546
|
"aria-label": Se.value,
|
|
547
547
|
"aria-disabled": ce.value,
|
|
548
|
-
...
|
|
548
|
+
...c
|
|
549
549
|
};
|
|
550
550
|
return Object.fromEntries(
|
|
551
551
|
Object.entries(y).filter(([pe, q]) => q != null)
|
|
@@ -555,13 +555,13 @@ const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["for", "tabin
|
|
|
555
555
|
}, K = () => {
|
|
556
556
|
h("clicked");
|
|
557
557
|
};
|
|
558
|
-
return U(Te, (
|
|
559
|
-
|
|
560
|
-
}), U(_, (
|
|
561
|
-
|
|
562
|
-
}), (
|
|
558
|
+
return U(Te, (c, y) => {
|
|
559
|
+
c !== y && He();
|
|
560
|
+
}), U(_, (c, y) => {
|
|
561
|
+
c !== y && (h("current-value", c), h("changed", c));
|
|
562
|
+
}), (c, y) => e.nbId && Ke.value ? (P(), O("div", {
|
|
563
563
|
key: 0,
|
|
564
|
-
class:
|
|
564
|
+
class: Ne(["nb-wrapper", Ae.value]),
|
|
565
565
|
style: We([qe.value, te.value])
|
|
566
566
|
}, [
|
|
567
567
|
be("div", ra({
|
|
@@ -588,7 +588,7 @@ const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["for", "tabin
|
|
|
588
588
|
]),
|
|
589
589
|
be("label", {
|
|
590
590
|
for: `${e.nbId}-${pe.value}`,
|
|
591
|
-
class:
|
|
591
|
+
class: Ne([[G.value], "component-checkbox__item--label"]),
|
|
592
592
|
tabindex: o(ce) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[q] : e.tabIndex >= 0 ? e.tabIndex : q + 1,
|
|
593
593
|
onKeydown: [
|
|
594
594
|
y[1] || (y[1] = Et(ia((oe) => !o(ce) && e.hasTabIndexEnter && oe.target.click(), ["prevent"]), ["enter"])),
|
|
@@ -596,7 +596,7 @@ const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["for", "tabin
|
|
|
596
596
|
]
|
|
597
597
|
}, [
|
|
598
598
|
be("div", {
|
|
599
|
-
class:
|
|
599
|
+
class: Ne([Qe.value])
|
|
600
600
|
}, null, 2),
|
|
601
601
|
be("span", {
|
|
602
602
|
style: We([Pe.value])
|
|
@@ -1043,7 +1043,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1043
1043
|
a33e780a: o(g),
|
|
1044
1044
|
"2ca961d8": o(Qe),
|
|
1045
1045
|
"60451b3a": o(Xe),
|
|
1046
|
-
"20c505f6":
|
|
1046
|
+
"20c505f6": It.value,
|
|
1047
1047
|
"19ddf317": o(_e),
|
|
1048
1048
|
"5d2fc801": o(lt),
|
|
1049
1049
|
"7830866a": o(we),
|
|
@@ -1070,7 +1070,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1070
1070
|
})), ua(() => {
|
|
1071
1071
|
xe.value = Ke.value;
|
|
1072
1072
|
}), ma(() => {
|
|
1073
|
-
|
|
1073
|
+
Nt();
|
|
1074
1074
|
});
|
|
1075
1075
|
const h = m, z = e, {
|
|
1076
1076
|
nbId: _,
|
|
@@ -1084,7 +1084,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1084
1084
|
selectionTextColor: Be,
|
|
1085
1085
|
hasBorderRadius: ae,
|
|
1086
1086
|
borderRadius: le,
|
|
1087
|
-
disabled:
|
|
1087
|
+
disabled: N,
|
|
1088
1088
|
fontFamily: D,
|
|
1089
1089
|
fontSize: J,
|
|
1090
1090
|
fontWeight: Z,
|
|
@@ -1096,7 +1096,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1096
1096
|
inputStyle: ke,
|
|
1097
1097
|
activeTextStyle: ce,
|
|
1098
1098
|
sizeMediaQuery: fe,
|
|
1099
|
-
inputReadonly:
|
|
1099
|
+
inputReadonly: I,
|
|
1100
1100
|
showInputEye: me,
|
|
1101
1101
|
inputType: d,
|
|
1102
1102
|
hasTrim: Ae,
|
|
@@ -1126,7 +1126,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1126
1126
|
showMsg: je,
|
|
1127
1127
|
hasMsg: He,
|
|
1128
1128
|
hasIcon: K,
|
|
1129
|
-
iconDirection:
|
|
1129
|
+
iconDirection: c,
|
|
1130
1130
|
iconPadding: y,
|
|
1131
1131
|
iconPaddingInput: pe,
|
|
1132
1132
|
iconMargin: q,
|
|
@@ -1158,7 +1158,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1158
1158
|
darkTextColorLabel: Vt,
|
|
1159
1159
|
darkTextColorLabelActive: _t
|
|
1160
1160
|
} = da(z), xe = Q(""), dt = Q(""), gt = Q(!1), ut = Q(!1), k = a(() => {
|
|
1161
|
-
const u =
|
|
1161
|
+
const u = N.value ? "component-disabled" : "", p = Se.value !== "b" ? "inline-block" : "block", t = se ? se.value : "ffffff", n = X.value ? X.value : "", r = Ee.value ? Ee.value : "", i = Be.value ? Be.value : "", v = ae.value ? ae.value : !1, f = le.value !== 0 && !le.value || le.value < 0 ? 0 : le.value, b = D.value ? D.value : "'Lato', sans-serif", S = J.value && J.value >= 0 ? J.value : null, B = Z.value !== 0 && !Z.value || Z.value < 0 ? 100 : Z.value, $ = ye.value ? ye.value : "'Lato', sans-serif", E = de.value ? de.value : "1em", ie = F.value !== 0 && !F.value || F.value < 0 ? 100 : F.value, ze = ne.value ? ne.value : "#f15574", et = ee.value ? ee.value : 200, De = ce.value ? ce.value : "normal", Ie = fe.value ? fe.value : "xs", va = I.value ? I.value : !1, pa = me.value ? me.value : !1, ba = d.value ? d.value : "text", ha = qe.value ? qe.value : !1, Ca = tt.value ? tt.value : "normal", xa = te.value ? te.value : "left", Sa = ke.value ? ke.value : "background", Va = y.value ? y.value : "5px 10px", ka = q.value ? q.value : "0", La = pe.value ? pe.value : 10, Ta = we.value ? we.value : "#000000", Ba = Re.value ? Re.value : "#000000", Aa = Oe.value ? Oe.value : "transparent", $a = Fe.value ? Fe.value : "transparent", _a = oe.value !== 0 && !oe.value || oe.value < 0 ? 0 : oe.value, wa = Ue.value ? Ue.value : "transparent", Ra = nt.value ? nt.value : "transparent", Ma = A.value ? A.value : 32, za = M.value ? M.value : 1, Da = j.value ? j.value : !1, Ia = Je.value !== 0 && !Je.value || Je.value < 0 ? 5 : Je.value, Na = Ce.value ? Ce.value : "transparent", Wa = Ze.value !== 0 && !Ze.value || Ze.value < 0 ? 15 : Ze.value, Ea = L.value ? L.value : "1px 5px", Ha = Me.value !== 0 && !Me.value || Me.value < 0 ? 0 : Me.value, Ua = H.value !== 0 && !H.value || H.value < 0 ? -13 : H.value, Ga = W.value !== 0 && !W.value || W.value < 0 ? -10 : W.value, Ka = T.value ? T.value : "'Lato', sans-serif", Ya = x.value ? x.value : "1em", Qa = ue.value ? ue.value : "0.8em", Xa = w.value ? w.value : 400, Ja = At.value ? At.value : "#ffffff", Za = Vt.value ? Vt.value : "#000000", el = $t.value ? $t.value : "#ffffff", tl = _t.value ? _t.value : "#000000";
|
|
1162
1162
|
return {
|
|
1163
1163
|
disabled: u,
|
|
1164
1164
|
display: p,
|
|
@@ -1173,12 +1173,12 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1173
1173
|
caretColor: n,
|
|
1174
1174
|
selectionBgColor: r,
|
|
1175
1175
|
selectionTextColor: i,
|
|
1176
|
-
hasBorderRadius:
|
|
1177
|
-
borderRadius:
|
|
1176
|
+
hasBorderRadius: v,
|
|
1177
|
+
borderRadius: f,
|
|
1178
1178
|
textAlign: xa,
|
|
1179
1179
|
inputWidth: et,
|
|
1180
1180
|
activeTextStyle: De,
|
|
1181
|
-
sizeMediaQuery:
|
|
1181
|
+
sizeMediaQuery: Ie,
|
|
1182
1182
|
inputReadonly: va,
|
|
1183
1183
|
showInputEye: pa,
|
|
1184
1184
|
inputType: ba,
|
|
@@ -1198,10 +1198,10 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1198
1198
|
iconWidth: Ma,
|
|
1199
1199
|
iconSize: za,
|
|
1200
1200
|
showLabel: Da,
|
|
1201
|
-
labelBackground:
|
|
1201
|
+
labelBackground: Na,
|
|
1202
1202
|
labelPadding: Ea,
|
|
1203
1203
|
labelBorderRadius: Ha,
|
|
1204
|
-
labelLeft:
|
|
1204
|
+
labelLeft: Ia,
|
|
1205
1205
|
inputLabelMarginActive: Wa,
|
|
1206
1206
|
labelActiveTop: Ua,
|
|
1207
1207
|
labelActiveLeft: Ga,
|
|
@@ -1300,19 +1300,19 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1300
1300
|
Ve.value && Object.keys(Ve.value).forEach((n) => u[`aria-${n}`] = Ve.value[n]);
|
|
1301
1301
|
const p = {
|
|
1302
1302
|
"aria-label": Te.value,
|
|
1303
|
-
"aria-disabled":
|
|
1303
|
+
"aria-disabled": N.value,
|
|
1304
1304
|
...u
|
|
1305
1305
|
};
|
|
1306
1306
|
return Object.fromEntries(
|
|
1307
1307
|
Object.entries(p).filter(([t, n]) => n != null)
|
|
1308
1308
|
);
|
|
1309
|
-
}), ta = a(() => K.value ? `${M.value}rem` : "0"), aa = a(() => K.value ? `${A.value}px` : "0"), la = a(() => K.value ? `component__icon--${
|
|
1309
|
+
}), ta = a(() => K.value ? `${M.value}rem` : "0"), aa = a(() => K.value ? `${A.value}px` : "0"), la = a(() => K.value ? `component__icon--${c.value}` : ""), zt = a(() => {
|
|
1310
1310
|
const u = k.value;
|
|
1311
1311
|
return K.value ? u.iconPadding : "0";
|
|
1312
1312
|
}), Dt = a(() => {
|
|
1313
1313
|
const u = k.value;
|
|
1314
1314
|
return K.value ? u.iconMargin : "0";
|
|
1315
|
-
}),
|
|
1315
|
+
}), It = a(() => {
|
|
1316
1316
|
const u = k.value;
|
|
1317
1317
|
return K.value ? u.theme === "dark" ? u.iconDarkBgColor : u.iconLightBgColor : "transparent";
|
|
1318
1318
|
}), ft = a(() => {
|
|
@@ -1320,7 +1320,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1320
1320
|
return K.value ? `${u.iconBorderRadius}rem` : "0";
|
|
1321
1321
|
}), St = a(() => {
|
|
1322
1322
|
const u = k.value;
|
|
1323
|
-
return K.value ?
|
|
1323
|
+
return K.value ? c.value === "left" ? { paddingLeft: `${u.iconPaddingInput}px` } : { paddingRight: `${u.iconPaddingInput}px` } : {};
|
|
1324
1324
|
}), mt = a(() => {
|
|
1325
1325
|
const u = k.value, p = ct.value, t = p ? u.lightTextColorLabelActive : u.lightTextColorLabel, n = p ? u.darkTextColorLabelActive : u.darkTextColorLabel;
|
|
1326
1326
|
return {
|
|
@@ -1341,7 +1341,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1341
1341
|
const u = k.value;
|
|
1342
1342
|
return u.theme === "dark" ? u.darkTextColorLabelActive : u.lightTextColorLabelActive;
|
|
1343
1343
|
});
|
|
1344
|
-
const
|
|
1344
|
+
const Nt = () => {
|
|
1345
1345
|
xe.value = Ke.value, dt.value = d.value;
|
|
1346
1346
|
}, na = () => {
|
|
1347
1347
|
const u = k.value;
|
|
@@ -1352,7 +1352,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1352
1352
|
}, Wt = () => {
|
|
1353
1353
|
h("clicked");
|
|
1354
1354
|
}, re = () => {
|
|
1355
|
-
|
|
1355
|
+
N.value || k.value.inputReadonly || !ge.value || h("entered", xe.value);
|
|
1356
1356
|
};
|
|
1357
1357
|
return U(d, (u) => {
|
|
1358
1358
|
dt.value = u;
|
|
@@ -1379,7 +1379,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1379
1379
|
}, Bt.value), [
|
|
1380
1380
|
be("div", {
|
|
1381
1381
|
id: o(_),
|
|
1382
|
-
class:
|
|
1382
|
+
class: Ne(["nb-reset", "component", s.value, R.value, Y.value, Tt.value]),
|
|
1383
1383
|
style: We([Ot.value, Lt.value, rt.value]),
|
|
1384
1384
|
onClick: Wt
|
|
1385
1385
|
}, [
|
|
@@ -1391,13 +1391,13 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1391
1391
|
}, ht(e.label), 13, yl)) : Le("", !0),
|
|
1392
1392
|
Rt.value ? (P(), O("div", {
|
|
1393
1393
|
key: 1,
|
|
1394
|
-
class:
|
|
1394
|
+
class: Ne(["component__eye", Jt.value]),
|
|
1395
1395
|
style: We([rt.value]),
|
|
1396
1396
|
onClick: na
|
|
1397
1397
|
}, [
|
|
1398
1398
|
be("label", {
|
|
1399
1399
|
for: yt.value,
|
|
1400
|
-
class:
|
|
1400
|
+
class: Ne(["component__eye-icon", "fas"])
|
|
1401
1401
|
}, [
|
|
1402
1402
|
e.inputEyeCustomIcon ? (P(), O("span", Cl, [
|
|
1403
1403
|
gt.value ? oa(u.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
@@ -1413,29 +1413,29 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1413
1413
|
id: yt.value,
|
|
1414
1414
|
name: yt.value,
|
|
1415
1415
|
type: dt.value,
|
|
1416
|
-
class:
|
|
1416
|
+
class: Ne(["component__input", [
|
|
1417
1417
|
Yt.value,
|
|
1418
1418
|
Xt.value,
|
|
1419
1419
|
l.value
|
|
1420
1420
|
]]),
|
|
1421
1421
|
placeholder: Qt.value,
|
|
1422
|
-
disabled: o(
|
|
1422
|
+
disabled: o(N) || o(I),
|
|
1423
1423
|
required: e.required,
|
|
1424
|
-
readonly: o(
|
|
1424
|
+
readonly: o(I),
|
|
1425
1425
|
autocomplete: e.inputAutocomplete,
|
|
1426
|
-
tabindex: o(
|
|
1426
|
+
tabindex: o(N) || o(I) ? -1 : o(vt),
|
|
1427
1427
|
role: "input",
|
|
1428
1428
|
style: We([rt.value, St.value]),
|
|
1429
1429
|
onFocus: p[1] || (p[1] = (t) => ut.value = !0),
|
|
1430
1430
|
onBlur: p[2] || (p[2] = (t) => ut.value = !1),
|
|
1431
|
-
onKeydown: p[3] || (p[3] = Et((t) => !o(
|
|
1431
|
+
onKeydown: p[3] || (p[3] = Et((t) => !o(N) && o(ge) && re(), ["enter"]))
|
|
1432
1432
|
}, null, 46, xl), [
|
|
1433
1433
|
[qa, xe.value]
|
|
1434
1434
|
]),
|
|
1435
1435
|
o(K) ? (P(), O("label", {
|
|
1436
1436
|
key: 2,
|
|
1437
1437
|
for: yt.value,
|
|
1438
|
-
class:
|
|
1438
|
+
class: Ne(["component__icon", la.value])
|
|
1439
1439
|
}, [
|
|
1440
1440
|
oa(u.$slots, "icon", {}, () => [
|
|
1441
1441
|
p[6] || (p[6] = be("span", null, "♥", -1))
|
|
@@ -1444,7 +1444,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1444
1444
|
], 14, gl),
|
|
1445
1445
|
ea.value ? (P(), O("div", {
|
|
1446
1446
|
key: 0,
|
|
1447
|
-
class:
|
|
1447
|
+
class: Ne(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
1448
1448
|
}, [
|
|
1449
1449
|
oa(u.$slots, "message", {}, () => [
|
|
1450
1450
|
ga(ht(e.message), 1)
|
|
@@ -1819,7 +1819,7 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
1819
1819
|
fontSize: Be,
|
|
1820
1820
|
fontWeight: ae,
|
|
1821
1821
|
currentList: le,
|
|
1822
|
-
allowDuplicates:
|
|
1822
|
+
allowDuplicates: N,
|
|
1823
1823
|
minChips: D,
|
|
1824
1824
|
maxChips: J,
|
|
1825
1825
|
inputPosition: Z,
|
|
@@ -1831,7 +1831,7 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
1831
1831
|
inputAutocomplete: ke,
|
|
1832
1832
|
required: ce,
|
|
1833
1833
|
textAlign: fe,
|
|
1834
|
-
hasBorderRadius:
|
|
1834
|
+
hasBorderRadius: I,
|
|
1835
1835
|
activeTextStyle: me,
|
|
1836
1836
|
theme: d,
|
|
1837
1837
|
inputStyle: Ae,
|
|
@@ -1861,7 +1861,7 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
1861
1861
|
ariaAttrs: je,
|
|
1862
1862
|
caretColor: He,
|
|
1863
1863
|
selectionBgColor: K,
|
|
1864
|
-
selectionTextColor:
|
|
1864
|
+
selectionTextColor: c,
|
|
1865
1865
|
showLabel: y,
|
|
1866
1866
|
label: pe,
|
|
1867
1867
|
labelBackground: q,
|
|
@@ -1880,7 +1880,7 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
1880
1880
|
darkTextColorLabel: Ce,
|
|
1881
1881
|
darkTextColorLabelActive: L
|
|
1882
1882
|
} = da(z), Me = Q(""), Je = Q(null), Ze = Q(null), H = Q(null), W = Q([]), T = Q(!1), x = a(() => {
|
|
1883
|
-
const l = X.value ? "component-disabled" : "", s = Se.value !== "b" ? "inline-block" : "block", R = !ye.value || ye.value < 185 ? 185 : ye.value, Y = ge ? ge.value : "ffffff", Yt = He.value ? He.value : "", Rt = K.value ? K.value : "", Mt =
|
|
1883
|
+
const l = X.value ? "component-disabled" : "", s = Se.value !== "b" ? "inline-block" : "block", R = !ye.value || ye.value < 185 ? 185 : ye.value, Y = ge ? ge.value : "ffffff", Yt = He.value ? He.value : "", Rt = K.value ? K.value : "", Mt = c.value ? c.value : "", yt = Te.value !== 0 && !Te.value || Te.value < 0 ? 1 : Te.value, Qt = Ve.value !== 0 && !Ve.value || Ve.value < 0 ? 0.2 : Ve.value, ct = se.value !== 0 && !se.value || se.value < 0 ? 0 : se.value, Xt = Ee.value ? Ee.value : "'Lato', sans-serif", Jt = Be.value ? Be.value : "1.6rem", Zt = ae.value !== 0 && !ae.value || ae.value < 0 ? 100 : ae.value, ea = D.value !== 0 && !D.value || D.value < 0 ? 0 : D.value, Bt = J.value !== 0 && !J.value || J.value < 0 ? 10 : J.value, ta = !Z.value || !["top", "bottom"].includes(Z.value) ? "bottom" : Z.value, aa = !Ae.value || !["background", "line", "border"].includes(Ae.value) ? "background" : Ae.value, la = d.value ? d.value : "light", zt = y.value ? y.value : !1, Dt = Re.value !== 0 && !Re.value || Re.value < 0 ? 5 : Re.value, It = q.value ? q.value : "transparent", ft = Oe.value !== 0 && !Oe.value || Oe.value < 0 ? 15 : Oe.value, St = oe.value ? oe.value : "1px 5px", mt = we.value !== 0 && !we.value || we.value < 0 ? 0 : we.value, Nt = Fe.value !== 0 && !Fe.value || Fe.value < 0 ? 13 : Fe.value, na = Ue.value !== 0 && !Ue.value || Ue.value < 0 ? 5 : Ue.value, Wt = nt.value ? nt.value : "'Lato', sans-serif", re = ot.value ? ot.value : "1em", u = C.value ? C.value : "0.8em", p = A.value ? A.value : 400, t = M.value ? M.value : "#333333", n = Ce.value ? Ce.value : "#ffffff", r = j.value ? j.value : "#333333", i = L.value ? L.value : "#ffffff";
|
|
1884
1884
|
return {
|
|
1885
1885
|
disabled: l,
|
|
1886
1886
|
display: s,
|
|
@@ -1902,11 +1902,11 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
1902
1902
|
theme: la,
|
|
1903
1903
|
showLabel: zt,
|
|
1904
1904
|
labelLeft: Dt,
|
|
1905
|
-
labelBackground:
|
|
1905
|
+
labelBackground: It,
|
|
1906
1906
|
inputLabelMarginActive: ft,
|
|
1907
1907
|
labelPadding: St,
|
|
1908
1908
|
labelBorderRadius: mt,
|
|
1909
|
-
labelActiveTop:
|
|
1909
|
+
labelActiveTop: Nt,
|
|
1910
1910
|
labelActiveLeft: na,
|
|
1911
1911
|
fontFamilyLabel: Wt,
|
|
1912
1912
|
fontSizeLabel: re,
|
|
@@ -1945,7 +1945,7 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
1945
1945
|
}
|
|
1946
1946
|
}), Vt = a(() => {
|
|
1947
1947
|
const l = x.value;
|
|
1948
|
-
return l.inputStyle !== "line" &&
|
|
1948
|
+
return l.inputStyle !== "line" && I.value ? { borderRadius: `${l.borderRadius}rem` } : {};
|
|
1949
1949
|
}), _t = a(() => x.value.font), xe = a(() => x.value.textColor), dt = a(() => x.value.inputPosition === "top" ? "column" : "column-reverse"), gt = a(() => {
|
|
1950
1950
|
const l = {};
|
|
1951
1951
|
je.value && Object.keys(je.value).forEach((Y) => l[`aria-${Y}`] = je.value[Y]);
|
|
@@ -2017,7 +2017,7 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
2017
2017
|
if (!(X.value || ee.value) && l.key === "Enter" && Me.value.trim() !== "") {
|
|
2018
2018
|
l.preventDefault();
|
|
2019
2019
|
let s = Me.value.trim();
|
|
2020
|
-
ne.value && (s = s.toUpperCase()), (
|
|
2020
|
+
ne.value && (s = s.toUpperCase()), (N.value || !W.value.includes(s)) && Lt(s), Me.value = "";
|
|
2021
2021
|
}
|
|
2022
2022
|
}, Lt = (l) => {
|
|
2023
2023
|
W.value.push(l), h("added", l);
|
|
@@ -2044,7 +2044,7 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
2044
2044
|
id: o(_),
|
|
2045
2045
|
ref_key: "chipsContainer",
|
|
2046
2046
|
ref: Je,
|
|
2047
|
-
class:
|
|
2047
|
+
class: Ne(["nb-reset", "component", jt.value, Ht.value]),
|
|
2048
2048
|
style: We([At.value, Ot.value, Vt.value])
|
|
2049
2049
|
}, [
|
|
2050
2050
|
W.value.length > 0 ? (P(), O("div", {
|
|
@@ -2083,7 +2083,7 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
2083
2083
|
autocomplete: o(ke),
|
|
2084
2084
|
required: o(ce),
|
|
2085
2085
|
tabindex: o(X) || o(ee) ? -1 : o(ve),
|
|
2086
|
-
class:
|
|
2086
|
+
class: Ne(["chips-input", $t.value]),
|
|
2087
2087
|
style: We([Pt.value, Ct.value]),
|
|
2088
2088
|
onKeydown: s[1] || (s[1] = Et((R) => !o(X) && o(G) && Kt(R), ["enter"])),
|
|
2089
2089
|
onFocus: Gt,
|
|
@@ -2502,7 +2502,7 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2502
2502
|
selectionTextColor: Be,
|
|
2503
2503
|
hasBorderRadius: ae,
|
|
2504
2504
|
borderRadius: le,
|
|
2505
|
-
disabled:
|
|
2505
|
+
disabled: N,
|
|
2506
2506
|
fontFamily: D,
|
|
2507
2507
|
fontSize: J,
|
|
2508
2508
|
fontWeight: Z,
|
|
@@ -2514,7 +2514,7 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2514
2514
|
inputStyle: ke,
|
|
2515
2515
|
activeTextStyle: ce,
|
|
2516
2516
|
inputReadonly: fe,
|
|
2517
|
-
hasTrim:
|
|
2517
|
+
hasTrim: I,
|
|
2518
2518
|
inputUppercase: me,
|
|
2519
2519
|
inputName: d,
|
|
2520
2520
|
inputPlaceholder: Ae,
|
|
@@ -2544,7 +2544,7 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2544
2544
|
fontSizeLabel: je,
|
|
2545
2545
|
fontSizeLabelActive: He,
|
|
2546
2546
|
fontWeightLabel: K,
|
|
2547
|
-
lightTextColorLabel:
|
|
2547
|
+
lightTextColorLabel: c,
|
|
2548
2548
|
lightTextColorLabelActive: y,
|
|
2549
2549
|
darkTextColorLabel: pe,
|
|
2550
2550
|
darkTextColorLabelActive: q,
|
|
@@ -2560,7 +2560,7 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2560
2560
|
minRows: A,
|
|
2561
2561
|
maxRows: M
|
|
2562
2562
|
} = da(z), j = Q(""), Ce = Q(!1), L = a(() => {
|
|
2563
|
-
const l =
|
|
2563
|
+
const l = N.value ? "component-disabled" : "", s = Se.value !== "b" ? "inline-block" : "block", R = se ? se.value : "ffffff", Y = X.value ? X.value : "", Yt = Ee.value ? Ee.value : "", Rt = Be.value ? Be.value : "", Mt = ae.value ? ae.value : !1, yt = le.value !== 0 && !le.value || le.value < 0 ? 0 : le.value, Qt = D.value ? D.value : "'Lato', sans-serif", ct = J.value && J.value >= 0 ? J.value : null, Xt = Z.value !== 0 && !Z.value || Z.value < 0 ? 100 : Z.value, Jt = ye.value ? ye.value : "'Lato', sans-serif", Zt = de.value ? de.value : "1em", ea = F.value !== 0 && !F.value || F.value < 0 ? 100 : F.value, Bt = ne.value ? ne.value : "#f15574", ta = ee.value ? ee.value : 200, aa = ce.value ? ce.value : "normal", la = fe.value ? fe.value : !1, zt = me.value ? me.value : !1, Dt = Ge.value ? Ge.value : "normal", It = at.value ? at.value : "left", ft = ke.value ? ke.value : "background", St = _e.value ? _e.value : !1, mt = g.value !== 0 && !g.value || g.value < 0 ? 5 : g.value, Nt = lt.value ? lt.value : "transparent", na = V.value !== 0 && !V.value || V.value < 0 ? 15 : V.value, Wt = Qe.value ? Qe.value : "1px 5px", re = Xe.value !== 0 && !Xe.value || Xe.value < 0 ? 0 : Xe.value, u = ve.value !== 0 && !ve.value || ve.value < 0 ? -13 : ve.value, p = G.value !== 0 && !G.value || G.value < 0 ? -10 : G.value, t = te.value ? te.value : "'Lato', sans-serif", n = je.value ? je.value : "1em", r = He.value ? He.value : "0.8em", i = K.value ? K.value : 400, v = c.value ? c.value : "#ffffff", f = pe.value ? pe.value : "#000000", b = y.value ? y.value : "#ffffff", S = q.value ? q.value : "#000000", B = oe.value && oe.value > 0 ? oe.value : 2, $ = we.value && we.value > 0 ? we.value : 20, E = Re.value !== null && Re.value >= 0 ? Re.value : null, ie = Oe.value !== null && Oe.value >= 0 ? Oe.value : null, ze = Fe.value && ["soft", "hard", "off"].includes(Fe.value) ? Fe.value : "soft", et = Ue.value !== void 0 ? Ue.value : "default", De = nt.value !== void 0 ? nt.value : !1, Ie = ot.value && ["none", "both", "vertical", "horizontal"].includes(ot.value) ? ot.value : "vertical", va = C.value !== void 0 ? C.value : !1, pa = A.value !== null && A.value > 0 ? A.value : null, ba = M.value !== null && M.value > 0 ? M.value : null;
|
|
2564
2564
|
return {
|
|
2565
2565
|
disabled: l,
|
|
2566
2566
|
display: s,
|
|
@@ -2577,7 +2577,7 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2577
2577
|
selectionTextColor: Rt,
|
|
2578
2578
|
hasBorderRadius: Mt,
|
|
2579
2579
|
borderRadius: yt,
|
|
2580
|
-
textAlign:
|
|
2580
|
+
textAlign: It,
|
|
2581
2581
|
inputWidth: ta,
|
|
2582
2582
|
activeTextStyle: aa,
|
|
2583
2583
|
inputReadonly: la,
|
|
@@ -2585,7 +2585,7 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2585
2585
|
theme: Dt,
|
|
2586
2586
|
inputStyle: ft,
|
|
2587
2587
|
showLabel: St,
|
|
2588
|
-
labelBackground:
|
|
2588
|
+
labelBackground: Nt,
|
|
2589
2589
|
labelPadding: Wt,
|
|
2590
2590
|
labelBorderRadius: re,
|
|
2591
2591
|
labelLeft: mt,
|
|
@@ -2596,8 +2596,8 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2596
2596
|
fontSizeLabel: n,
|
|
2597
2597
|
fontSizeLabelActive: r,
|
|
2598
2598
|
fontWeightLabel: i,
|
|
2599
|
-
lightTextColorLabel:
|
|
2600
|
-
darkTextColorLabel:
|
|
2599
|
+
lightTextColorLabel: v,
|
|
2600
|
+
darkTextColorLabel: f,
|
|
2601
2601
|
lightTextColorLabelActive: b,
|
|
2602
2602
|
darkTextColorLabelActive: S,
|
|
2603
2603
|
rows: B,
|
|
@@ -2607,7 +2607,7 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2607
2607
|
wrap: ze,
|
|
2608
2608
|
spellcheck: et,
|
|
2609
2609
|
autofocus: De,
|
|
2610
|
-
resize:
|
|
2610
|
+
resize: Ie,
|
|
2611
2611
|
autoResize: va,
|
|
2612
2612
|
minRows: pa,
|
|
2613
2613
|
maxRows: ba
|
|
@@ -2673,7 +2673,7 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2673
2673
|
Ve.value && Object.keys(Ve.value).forEach((Y) => l[`aria-${Y}`] = Ve.value[Y]);
|
|
2674
2674
|
const s = {
|
|
2675
2675
|
"aria-label": Te.value,
|
|
2676
|
-
"aria-disabled":
|
|
2676
|
+
"aria-disabled": N.value,
|
|
2677
2677
|
...l
|
|
2678
2678
|
};
|
|
2679
2679
|
return Object.fromEntries(
|
|
@@ -2718,15 +2718,15 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2718
2718
|
}, Kt = () => {
|
|
2719
2719
|
h("clicked");
|
|
2720
2720
|
}, Lt = () => {
|
|
2721
|
-
|
|
2721
|
+
N.value || L.value.inputReadonly || !ge.value || h("entered", j.value);
|
|
2722
2722
|
}, Tt = () => {
|
|
2723
2723
|
let l = j.value;
|
|
2724
|
-
|
|
2724
|
+
I.value && (l = l.trim()), h("current-value", l);
|
|
2725
2725
|
};
|
|
2726
2726
|
return U(qe, (l) => {
|
|
2727
2727
|
l !== j.value && (j.value = l);
|
|
2728
2728
|
}, { immediate: !0 }), U(j, (l) => {
|
|
2729
|
-
|
|
2729
|
+
I.value && (l = l.trim()), h("changed", l);
|
|
2730
2730
|
}), U(Ce, (l) => {
|
|
2731
2731
|
h(l ? "focused" : "blurred");
|
|
2732
2732
|
}), U(j, () => {
|
|
@@ -2739,7 +2739,7 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2739
2739
|
}, qt.value), [
|
|
2740
2740
|
be("div", {
|
|
2741
2741
|
id: o(_),
|
|
2742
|
-
class:
|
|
2742
|
+
class: Ne(["nb-reset", "component", k.value, wt.value, gt.value]),
|
|
2743
2743
|
style: We([H.value, dt.value, W.value]),
|
|
2744
2744
|
onClick: Kt
|
|
2745
2745
|
}, [
|
|
@@ -2759,24 +2759,24 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2759
2759
|
ut.value
|
|
2760
2760
|
]],
|
|
2761
2761
|
placeholder: Ot.value,
|
|
2762
|
-
disabled: o(
|
|
2762
|
+
disabled: o(N) || o(fe),
|
|
2763
2763
|
required: e.required,
|
|
2764
2764
|
readonly: o(fe),
|
|
2765
2765
|
autocomplete: e.inputAutocomplete,
|
|
2766
|
-
tabindex: o(
|
|
2766
|
+
tabindex: o(N) || o(fe) ? -1 : o(Pe),
|
|
2767
2767
|
role: "textbox",
|
|
2768
2768
|
style: [W.value, Ut.value, Gt.value],
|
|
2769
2769
|
onFocus: s[1] || (s[1] = (R) => Ce.value = !0),
|
|
2770
2770
|
onBlur: s[2] || (s[2] = (R) => Ce.value = !1),
|
|
2771
2771
|
onInput: Tt,
|
|
2772
|
-
onKeydown: s[3] || (s[3] = Et((R) => !o(
|
|
2772
|
+
onKeydown: s[3] || (s[3] = Et((R) => !o(N) && o(ge) && Lt(), ["enter"]))
|
|
2773
2773
|
}), null, 16, zl), [
|
|
2774
2774
|
[ja, j.value]
|
|
2775
2775
|
])
|
|
2776
2776
|
], 14, Rl),
|
|
2777
2777
|
Ft.value ? (P(), O("div", {
|
|
2778
2778
|
key: 0,
|
|
2779
|
-
class:
|
|
2779
|
+
class: Ne(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
2780
2780
|
}, [
|
|
2781
2781
|
oa(l.$slots, "message", {}, () => [
|
|
2782
2782
|
ga(ht(e.message), 1)
|
|
@@ -2784,8 +2784,8 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2784
2784
|
], 2)) : Le("", !0)
|
|
2785
2785
|
], 16)) : Le("", !0);
|
|
2786
2786
|
}
|
|
2787
|
-
}),
|
|
2788
|
-
const
|
|
2787
|
+
}), Il = /* @__PURE__ */ fa(Dl, [["__scopeId", "data-v-23147953"]]);
|
|
2788
|
+
const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "min", "max", "step", "tabindex"], Pl = /* @__PURE__ */ Object.assign({
|
|
2789
2789
|
name: "NbDatePicker",
|
|
2790
2790
|
inheritAttrs: !1
|
|
2791
2791
|
}, {
|
|
@@ -3122,29 +3122,29 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3122
3122
|
],
|
|
3123
3123
|
setup(e, { emit: m }) {
|
|
3124
3124
|
sa((t) => ({
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
"
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
"
|
|
3134
|
-
"
|
|
3135
|
-
"
|
|
3136
|
-
"
|
|
3137
|
-
"
|
|
3138
|
-
"
|
|
3139
|
-
"
|
|
3140
|
-
"
|
|
3141
|
-
"
|
|
3142
|
-
|
|
3143
|
-
"
|
|
3144
|
-
"
|
|
3145
|
-
|
|
3146
|
-
"
|
|
3147
|
-
|
|
3125
|
+
"5c41ef1c": dt.value,
|
|
3126
|
+
fcb8c444: Vt.value,
|
|
3127
|
+
"276dde23": o(_e),
|
|
3128
|
+
"58e8022e": Ct.value,
|
|
3129
|
+
22801600: Ot.value,
|
|
3130
|
+
"54d646d0": rt.value,
|
|
3131
|
+
cce742c6: o(g),
|
|
3132
|
+
"5947f729": o(Xe),
|
|
3133
|
+
"276b9776": o(lt),
|
|
3134
|
+
"67c31393": o(Qe),
|
|
3135
|
+
"57a227c9": Y.value,
|
|
3136
|
+
"05aab28f": Yt.value,
|
|
3137
|
+
"22513a2f": o(bt),
|
|
3138
|
+
"2571dd4b": o(at),
|
|
3139
|
+
"3c3a1e4d": o(st),
|
|
3140
|
+
"0c85b795": o(V),
|
|
3141
|
+
"1deda3ec": l.value,
|
|
3142
|
+
"0d118b35": gt.value,
|
|
3143
|
+
"4fe428f4": ut.value,
|
|
3144
|
+
"50820f1d": k.value,
|
|
3145
|
+
"3517b777": Pt.value,
|
|
3146
|
+
"7bbd2efa": t.styleButtonColor,
|
|
3147
|
+
"21e273e8": wt.value
|
|
3148
3148
|
}));
|
|
3149
3149
|
const h = nl(
|
|
3150
3150
|
() => import("@vlalg-nimbus/nb-calendar").then((t) => t.Calendar ? t.Calendar : t.default && t.default.Calendar ? t.default.Calendar : t.default)
|
|
@@ -3165,7 +3165,7 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3165
3165
|
selectionBgColor: Be,
|
|
3166
3166
|
selectionTextColor: ae,
|
|
3167
3167
|
hasBorderRadius: le,
|
|
3168
|
-
borderRadius:
|
|
3168
|
+
borderRadius: N,
|
|
3169
3169
|
disabled: D,
|
|
3170
3170
|
fontFamily: J,
|
|
3171
3171
|
fontSize: Z,
|
|
@@ -3177,7 +3177,7 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3177
3177
|
inputWidth: ke,
|
|
3178
3178
|
inputStyle: ce,
|
|
3179
3179
|
activeTextStyle: fe,
|
|
3180
|
-
sizeMediaQuery:
|
|
3180
|
+
sizeMediaQuery: I,
|
|
3181
3181
|
inputReadonly: me,
|
|
3182
3182
|
inputType: d,
|
|
3183
3183
|
hasTrim: Ae,
|
|
@@ -3207,7 +3207,7 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3207
3207
|
labelBackground: je,
|
|
3208
3208
|
labelPadding: He,
|
|
3209
3209
|
labelBorderRadius: K,
|
|
3210
|
-
labelLeft:
|
|
3210
|
+
labelLeft: c,
|
|
3211
3211
|
inputLabelMarginActive: y,
|
|
3212
3212
|
labelActiveTop: pe,
|
|
3213
3213
|
labelActiveLeft: q,
|
|
@@ -3230,8 +3230,8 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3230
3230
|
if (!r)
|
|
3231
3231
|
return null;
|
|
3232
3232
|
if (/^\d{4}-\d{2}-\d{2}$/.test(r)) {
|
|
3233
|
-
const [i,
|
|
3234
|
-
return new Date(i,
|
|
3233
|
+
const [i, v, f] = r.split("-").map(Number);
|
|
3234
|
+
return new Date(i, v - 1, f);
|
|
3235
3235
|
}
|
|
3236
3236
|
return new Date(r);
|
|
3237
3237
|
};
|
|
@@ -3254,9 +3254,9 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3254
3254
|
if (n === "date") {
|
|
3255
3255
|
if (he.value && typeof t == "string" && t.startsWith("{"))
|
|
3256
3256
|
try {
|
|
3257
|
-
const
|
|
3258
|
-
if (
|
|
3259
|
-
const
|
|
3257
|
+
const v = JSON.parse(t);
|
|
3258
|
+
if (v && (v.startDate || v.endDate)) {
|
|
3259
|
+
const f = (B) => {
|
|
3260
3260
|
if (!B)
|
|
3261
3261
|
return "";
|
|
3262
3262
|
if (/^\d{4}-\d{2}-\d{2}$/.test(B)) {
|
|
@@ -3264,7 +3264,7 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3264
3264
|
return i === "pt-BR" ? `${ie}/${E}/${$}` : `${E}/${ie}/${$}`;
|
|
3265
3265
|
}
|
|
3266
3266
|
return B;
|
|
3267
|
-
}, b =
|
|
3267
|
+
}, b = f(v.startDate), S = f(v.endDate);
|
|
3268
3268
|
if (b && S)
|
|
3269
3269
|
return `${b} - ${S}`;
|
|
3270
3270
|
if (b)
|
|
@@ -3275,27 +3275,27 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3275
3275
|
} catch {
|
|
3276
3276
|
}
|
|
3277
3277
|
if (typeof t == "string" && /^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
3278
|
-
const [
|
|
3279
|
-
return i === "pt-BR" ? `${b}/${
|
|
3278
|
+
const [v, f, b] = t.split("-");
|
|
3279
|
+
return i === "pt-BR" ? `${b}/${f}/${v}` : `${f}/${b}/${v}`;
|
|
3280
3280
|
}
|
|
3281
3281
|
return t;
|
|
3282
3282
|
} else if (n === "datetime-local") {
|
|
3283
3283
|
if (typeof t == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/.test(t)) {
|
|
3284
|
-
const [
|
|
3285
|
-
return i === "pt-BR" ? `${B}/${S}/${b} ${
|
|
3284
|
+
const [v, f] = t.split("T"), [b, S, B] = v.split("-");
|
|
3285
|
+
return i === "pt-BR" ? `${B}/${S}/${b} ${f}` : `${S}/${B}/${b} ${f}`;
|
|
3286
3286
|
}
|
|
3287
3287
|
return t;
|
|
3288
3288
|
} else if (n === "month") {
|
|
3289
3289
|
if (typeof t == "string" && /^\d{4}-\d{2}$/.test(t)) {
|
|
3290
|
-
const [
|
|
3291
|
-
return `${
|
|
3290
|
+
const [v, f] = t.split("-");
|
|
3291
|
+
return `${f}/${v}`;
|
|
3292
3292
|
}
|
|
3293
3293
|
return t;
|
|
3294
3294
|
} else if (n === "week") {
|
|
3295
3295
|
if (typeof t == "string" && /^\d{4}-W\d{2}$/i.test(t)) {
|
|
3296
|
-
const
|
|
3297
|
-
if (
|
|
3298
|
-
return i === "pt-BR" ? `Semana ${
|
|
3296
|
+
const v = t.match(/^(\d{4})-W(\d{2})$/i);
|
|
3297
|
+
if (v)
|
|
3298
|
+
return i === "pt-BR" ? `Semana ${v[2]} de ${v[1]}` : `Week ${v[2]} of ${v[1]}`;
|
|
3299
3299
|
}
|
|
3300
3300
|
return t;
|
|
3301
3301
|
}
|
|
@@ -3303,28 +3303,28 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3303
3303
|
}, Ze = (t, n, r) => {
|
|
3304
3304
|
if (!t || !t.trim())
|
|
3305
3305
|
return "";
|
|
3306
|
-
const i = t.trim(),
|
|
3306
|
+
const i = t.trim(), v = r || Ye.value;
|
|
3307
3307
|
if (n === "date") {
|
|
3308
3308
|
if (he.value && i.includes("-")) {
|
|
3309
|
-
const
|
|
3309
|
+
const f = i.split(/\s*-\s*/).map(($) => $.trim()), b = ($) => {
|
|
3310
3310
|
if (!$)
|
|
3311
3311
|
return null;
|
|
3312
3312
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test($)) {
|
|
3313
3313
|
const E = $.split("/");
|
|
3314
|
-
if (
|
|
3315
|
-
const [ie, ze, et] = E, De = ie.padStart(2, "0"),
|
|
3316
|
-
return `${et}-${
|
|
3314
|
+
if (v === "pt-BR") {
|
|
3315
|
+
const [ie, ze, et] = E, De = ie.padStart(2, "0"), Ie = ze.padStart(2, "0");
|
|
3316
|
+
return `${et}-${Ie}-${De}`;
|
|
3317
3317
|
} else {
|
|
3318
|
-
const [ie, ze, et] = E, De = ze.padStart(2, "0"),
|
|
3319
|
-
return `${et}-${
|
|
3318
|
+
const [ie, ze, et] = E, De = ze.padStart(2, "0"), Ie = ie.padStart(2, "0");
|
|
3319
|
+
return `${et}-${Ie}-${De}`;
|
|
3320
3320
|
}
|
|
3321
3321
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test($)) {
|
|
3322
|
-
const E = $.split("-"), [ie, ze, et] = E, De = et.padStart(2, "0"),
|
|
3323
|
-
return `${ie}-${
|
|
3322
|
+
const E = $.split("-"), [ie, ze, et] = E, De = et.padStart(2, "0"), Ie = ze.padStart(2, "0");
|
|
3323
|
+
return `${ie}-${Ie}-${De}`;
|
|
3324
3324
|
}
|
|
3325
3325
|
return null;
|
|
3326
3326
|
};
|
|
3327
|
-
let S = b(
|
|
3327
|
+
let S = b(f[0]), B = f[1] ? b(f[1]) : null;
|
|
3328
3328
|
if (S && B) {
|
|
3329
3329
|
const $ = new Date(S);
|
|
3330
3330
|
if (new Date(B) < $) {
|
|
@@ -3337,55 +3337,55 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3337
3337
|
return "";
|
|
3338
3338
|
}
|
|
3339
3339
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(i)) {
|
|
3340
|
-
const
|
|
3341
|
-
if (
|
|
3342
|
-
const [b, S, B] =
|
|
3340
|
+
const f = i.split("/");
|
|
3341
|
+
if (v === "pt-BR") {
|
|
3342
|
+
const [b, S, B] = f, $ = b.padStart(2, "0"), E = S.padStart(2, "0");
|
|
3343
3343
|
return `${B}-${E}-${$}`;
|
|
3344
3344
|
} else {
|
|
3345
|
-
const [b, S, B] =
|
|
3345
|
+
const [b, S, B] = f, $ = S.padStart(2, "0"), E = b.padStart(2, "0");
|
|
3346
3346
|
return `${B}-${E}-${$}`;
|
|
3347
3347
|
}
|
|
3348
3348
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(i)) {
|
|
3349
|
-
const
|
|
3349
|
+
const f = i.split("-"), [b, S, B] = f, $ = B.padStart(2, "0"), E = S.padStart(2, "0");
|
|
3350
3350
|
return `${b}-${E}-${$}`;
|
|
3351
3351
|
}
|
|
3352
3352
|
return "";
|
|
3353
3353
|
} else if (n === "datetime-local") {
|
|
3354
3354
|
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(i)) {
|
|
3355
|
-
const [
|
|
3356
|
-
if (
|
|
3357
|
-
const [B, $, E] = S, ie = B.padStart(2, "0"), ze = $.padStart(2, "0"), De = b.split(":").map((
|
|
3355
|
+
const [f, b] = i.split(" "), S = f.split("/");
|
|
3356
|
+
if (v === "pt-BR") {
|
|
3357
|
+
const [B, $, E] = S, ie = B.padStart(2, "0"), ze = $.padStart(2, "0"), De = b.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3358
3358
|
return `${E}-${ze}-${ie}T${De}`;
|
|
3359
3359
|
} else {
|
|
3360
|
-
const [B, $, E] = S, ie = $.padStart(2, "0"), ze = B.padStart(2, "0"), De = b.split(":").map((
|
|
3360
|
+
const [B, $, E] = S, ie = $.padStart(2, "0"), ze = B.padStart(2, "0"), De = b.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3361
3361
|
return `${E}-${ze}-${ie}T${De}`;
|
|
3362
3362
|
}
|
|
3363
3363
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(i)) {
|
|
3364
|
-
const [
|
|
3364
|
+
const [f, b] = i.split("T"), S = f.split("-"), [B, $, E] = S, ie = E.padStart(2, "0"), ze = $.padStart(2, "0"), De = b.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3365
3365
|
return `${B}-${ze}-${ie}T${De}`;
|
|
3366
3366
|
}
|
|
3367
3367
|
return "";
|
|
3368
3368
|
} else if (n === "month") {
|
|
3369
3369
|
if (/^\d{1,2}\/\d{4}$/.test(i)) {
|
|
3370
|
-
const [
|
|
3370
|
+
const [f, b] = i.split("/"), S = f.padStart(2, "0");
|
|
3371
3371
|
return `${b}-${S}`;
|
|
3372
3372
|
} else if (/^\d{4}-\d{1,2}$/.test(i)) {
|
|
3373
|
-
const [
|
|
3374
|
-
return `${
|
|
3373
|
+
const [f, b] = i.split("-"), S = b.padStart(2, "0");
|
|
3374
|
+
return `${f}-${S}`;
|
|
3375
3375
|
}
|
|
3376
3376
|
return "";
|
|
3377
3377
|
} else if (n === "week") {
|
|
3378
3378
|
if (/^\d{4}-W\d{2}$/i.test(i))
|
|
3379
3379
|
return i.toUpperCase();
|
|
3380
|
-
const
|
|
3381
|
-
if (
|
|
3382
|
-
return `${
|
|
3380
|
+
const f = i.match(/semana\s+W?(\d{2})\s+de\s+(\d{4})/i);
|
|
3381
|
+
if (f)
|
|
3382
|
+
return `${f[2]}-W${f[1]}`;
|
|
3383
3383
|
const b = i.match(/week\s+W?(\d{2})\s+of\s+(\d{4})/i);
|
|
3384
3384
|
return b ? `${b[2]}-W${b[1]}` : "";
|
|
3385
3385
|
}
|
|
3386
3386
|
return i;
|
|
3387
3387
|
}, H = Q(!1), W = Q({ top: 0, left: 0 }), T = Q(null), x = Q(null), ue = a(() => vt.value === !0), w = a(() => {
|
|
3388
|
-
const t = D.value ? "component-disabled" : "", n = ge.value !== "b" ? "inline-block" : "block", r = X ? X.value : "ffffff", i = Ee.value ? Ee.value : "",
|
|
3388
|
+
const t = D.value ? "component-disabled" : "", n = ge.value !== "b" ? "inline-block" : "block", r = X ? X.value : "ffffff", i = Ee.value ? Ee.value : "", v = Be.value ? Be.value : "", f = ae.value ? ae.value : "", b = le.value ? le.value : !1, S = N.value !== 0 && !N.value || N.value < 0 ? 0 : N.value, B = J.value ? J.value : "'Lato', sans-serif", $ = Z.value && Z.value >= 0 ? Z.value : null, E = ye.value !== 0 && !ye.value || ye.value < 0 ? 100 : ye.value, ie = de.value ? de.value : "'Lato', sans-serif", ze = F.value ? F.value : "1em", et = ne.value !== 0 && !ne.value || ne.value < 0 ? 100 : ne.value, De = ee.value ? ee.value : "#f15574", Ie = ke.value ? ke.value : 200, va = fe.value ? fe.value : "normal", pa = "sm", ba = me.value ? me.value : !1, ha = d.value ? d.value : "date", Ca = qe.value ? qe.value : !1, xa = $e.value ? $e.value : "normal", Sa = V.value ? V.value : "left", Va = ce.value ? ce.value : "background", ka = te.value ? te.value : !1, La = c.value !== 0 && !c.value || c.value < 0 ? 5 : c.value, Ta = je.value ? je.value : "transparent", Ba = y.value !== 0 && !y.value || y.value < 0 ? 15 : y.value, Aa = He.value ? He.value : "1px 5px", $a = K.value !== 0 && !K.value || K.value < 0 ? 0 : K.value, _a = pe.value !== 0 && !pe.value || pe.value < 0 ? -13 : pe.value, wa = q.value !== 0 && !q.value || q.value < 0 ? -10 : q.value, Ra = oe.value ? oe.value : "'Lato', sans-serif", Ma = we.value ? we.value : "1em", za = Re.value ? Re.value : "0.8em", Da = Oe.value ? Oe.value : 400, Ia = Fe.value ? Fe.value : "#ffffff", Na = nt.value ? nt.value : "#000000", Wa = Ue.value ? Ue.value : "#ffffff", Ea = ot.value ? ot.value : "#000000";
|
|
3389
3389
|
return {
|
|
3390
3390
|
disabled: t,
|
|
3391
3391
|
display: n,
|
|
@@ -3398,12 +3398,12 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3398
3398
|
textMessageColor: De,
|
|
3399
3399
|
textColor: r,
|
|
3400
3400
|
caretColor: i,
|
|
3401
|
-
selectionBgColor:
|
|
3402
|
-
selectionTextColor:
|
|
3401
|
+
selectionBgColor: v,
|
|
3402
|
+
selectionTextColor: f,
|
|
3403
3403
|
hasBorderRadius: b,
|
|
3404
3404
|
borderRadius: S,
|
|
3405
3405
|
textAlign: Sa,
|
|
3406
|
-
inputWidth:
|
|
3406
|
+
inputWidth: Ie,
|
|
3407
3407
|
activeTextStyle: va,
|
|
3408
3408
|
sizeMediaQuery: pa,
|
|
3409
3409
|
inputReadonly: ba,
|
|
@@ -3423,8 +3423,8 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3423
3423
|
fontSizeLabel: Ma,
|
|
3424
3424
|
fontSizeLabelActive: za,
|
|
3425
3425
|
fontWeightLabel: Da,
|
|
3426
|
-
lightTextColorLabel:
|
|
3427
|
-
darkTextColorLabel:
|
|
3426
|
+
lightTextColorLabel: Ia,
|
|
3427
|
+
darkTextColorLabel: Na,
|
|
3428
3428
|
lightTextColorLabelActive: Wa,
|
|
3429
3429
|
darkTextColorLabelActive: Ea
|
|
3430
3430
|
};
|
|
@@ -3531,16 +3531,16 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3531
3531
|
T.value && ya(() => {
|
|
3532
3532
|
const t = T.value.closest(".nb-wrapper"), n = 4;
|
|
3533
3533
|
if (t) {
|
|
3534
|
-
const r = t.getBoundingClientRect(), i = T.value.getBoundingClientRect(),
|
|
3534
|
+
const r = t.getBoundingClientRect(), i = T.value.getBoundingClientRect(), v = i.bottom - r.top + n, f = i.left - r.left;
|
|
3535
3535
|
W.value = {
|
|
3536
|
-
top: `${
|
|
3537
|
-
left: `${
|
|
3536
|
+
top: `${v}px`,
|
|
3537
|
+
left: `${f}px`
|
|
3538
3538
|
};
|
|
3539
3539
|
} else {
|
|
3540
|
-
const r = T.value.getBoundingClientRect(), i = window.scrollY || window.pageYOffset,
|
|
3540
|
+
const r = T.value.getBoundingClientRect(), i = window.scrollY || window.pageYOffset, v = window.scrollX || window.pageXOffset;
|
|
3541
3541
|
W.value = {
|
|
3542
3542
|
top: `${r.bottom + i + n}px`,
|
|
3543
|
-
left: `${r.left +
|
|
3543
|
+
left: `${r.left + v}px`
|
|
3544
3544
|
};
|
|
3545
3545
|
}
|
|
3546
3546
|
});
|
|
@@ -3561,8 +3561,8 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3561
3561
|
if (x.value && x.value.contains(n) || t.relatedTarget && x.value && x.value.contains(t.relatedTarget))
|
|
3562
3562
|
return;
|
|
3563
3563
|
if (n === document.body && x.value) {
|
|
3564
|
-
const
|
|
3565
|
-
if (Array.from(
|
|
3564
|
+
const v = x.value.querySelectorAll('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
3565
|
+
if (Array.from(v).some((b) => b === document.activeElement || b.contains(document.activeElement)))
|
|
3566
3566
|
return;
|
|
3567
3567
|
}
|
|
3568
3568
|
}
|
|
@@ -3620,8 +3620,8 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3620
3620
|
if (he.value) {
|
|
3621
3621
|
if (n.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/), n.length > 23 && !i.test(n)) {
|
|
3622
3622
|
A.value = M.value, t && T.value && ya(() => {
|
|
3623
|
-
const
|
|
3624
|
-
T.value.setSelectionRange(
|
|
3623
|
+
const v = Math.min(t.start, M.value.length);
|
|
3624
|
+
T.value.setSelectionRange(v, v);
|
|
3625
3625
|
}), setTimeout(() => {
|
|
3626
3626
|
re = !1;
|
|
3627
3627
|
}, 50);
|
|
@@ -3636,8 +3636,8 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3636
3636
|
} else {
|
|
3637
3637
|
if (n.length > 10 && !i.test(n)) {
|
|
3638
3638
|
A.value = M.value, t && T.value && ya(() => {
|
|
3639
|
-
const
|
|
3640
|
-
T.value.setSelectionRange(
|
|
3639
|
+
const v = Math.min(t.start, M.value.length);
|
|
3640
|
+
T.value.setSelectionRange(v, v);
|
|
3641
3641
|
}), setTimeout(() => {
|
|
3642
3642
|
re = !1;
|
|
3643
3643
|
}, 50);
|
|
@@ -3664,9 +3664,9 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3664
3664
|
return;
|
|
3665
3665
|
}
|
|
3666
3666
|
else if (n.includes("-")) {
|
|
3667
|
-
const
|
|
3668
|
-
if (
|
|
3669
|
-
const
|
|
3667
|
+
const v = n.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*$/);
|
|
3668
|
+
if (v) {
|
|
3669
|
+
const f = v[1], b = Ze(f, d.value);
|
|
3670
3670
|
if (b) {
|
|
3671
3671
|
const S = JSON.stringify({ startDate: b, endDate: null });
|
|
3672
3672
|
S !== C.value && (p = !0, C.value = S, M.value = n);
|
|
@@ -3684,8 +3684,8 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3684
3684
|
}
|
|
3685
3685
|
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(n))
|
|
3686
3686
|
if (r = Ze(n, d.value), r) {
|
|
3687
|
-
const
|
|
3688
|
-
|
|
3687
|
+
const f = JSON.stringify({ startDate: r, endDate: null });
|
|
3688
|
+
f !== C.value && (p = !0, C.value = f, M.value = n);
|
|
3689
3689
|
} else {
|
|
3690
3690
|
M.value = n, setTimeout(() => {
|
|
3691
3691
|
re = !1;
|
|
@@ -3735,35 +3735,34 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3735
3735
|
}
|
|
3736
3736
|
if (!document.body.contains(n))
|
|
3737
3737
|
return;
|
|
3738
|
-
|
|
3739
|
-
n && n.tagName === "INPUT" && ["date", "time", "datetime-local", "month", "week"].includes(n.type), c || (H.value = !1, (!A.value || A.value.trim().length === 0) && (Ce.value = !1));
|
|
3738
|
+
T.value && (n === T.value || T.value.contains(n)) || (H.value = !1, (!A.value || A.value.trim().length === 0) && (Ce.value = !1));
|
|
3740
3739
|
}, 50);
|
|
3741
3740
|
}, Dt = () => {
|
|
3742
3741
|
H.value && ue.value && ct();
|
|
3743
|
-
},
|
|
3742
|
+
}, It = () => {
|
|
3744
3743
|
H.value && ue.value && ct();
|
|
3745
3744
|
};
|
|
3746
3745
|
let ft = null, St = null, mt = { top: 0, left: 0 };
|
|
3747
|
-
const
|
|
3746
|
+
const Nt = () => {
|
|
3748
3747
|
if (!H.value || !ue.value || !T.value)
|
|
3749
3748
|
return;
|
|
3750
3749
|
const t = T.value.closest(".nb-wrapper"), n = 4;
|
|
3751
3750
|
let r, i;
|
|
3752
3751
|
if (t) {
|
|
3753
|
-
const
|
|
3754
|
-
r =
|
|
3752
|
+
const v = t.getBoundingClientRect(), f = T.value.getBoundingClientRect();
|
|
3753
|
+
r = f.bottom - v.top + n, i = f.left - v.left;
|
|
3755
3754
|
} else {
|
|
3756
|
-
const
|
|
3757
|
-
r =
|
|
3755
|
+
const v = T.value.getBoundingClientRect(), f = window.scrollY || window.pageYOffset, b = window.scrollX || window.pageXOffset;
|
|
3756
|
+
r = v.bottom + f + n, i = v.left + b;
|
|
3758
3757
|
}
|
|
3759
3758
|
(mt.top !== r || mt.left !== i) && (mt.top = r, mt.left = i, W.value = {
|
|
3760
3759
|
top: `${r}px`,
|
|
3761
3760
|
left: `${i}px`
|
|
3762
|
-
}), St = requestAnimationFrame(
|
|
3761
|
+
}), St = requestAnimationFrame(Nt);
|
|
3763
3762
|
}, na = () => {
|
|
3764
3763
|
if (!T.value || !ue.value)
|
|
3765
3764
|
return;
|
|
3766
|
-
mt = { top: 0, left: 0 },
|
|
3765
|
+
mt = { top: 0, left: 0 }, Nt(), ft = new ResizeObserver(() => {
|
|
3767
3766
|
H.value && ct();
|
|
3768
3767
|
}), ft.observe(T.value);
|
|
3769
3768
|
const t = T.value.closest(".component");
|
|
@@ -3776,9 +3775,9 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3776
3775
|
na();
|
|
3777
3776
|
}) : Wt();
|
|
3778
3777
|
}), ua(() => {
|
|
3779
|
-
C.value = Pe.value, A.value = Je(Pe.value, d.value), document.addEventListener("click", zt, !1), window.addEventListener("scroll", Dt, { capture: !0, passive: !0 }), window.addEventListener("resize",
|
|
3778
|
+
C.value = Pe.value, A.value = Je(Pe.value, d.value), document.addEventListener("click", zt, !1), window.addEventListener("scroll", Dt, { capture: !0, passive: !0 }), window.addEventListener("resize", It);
|
|
3780
3779
|
}), ma(() => {
|
|
3781
|
-
Mt(), Wt(), document.removeEventListener("click", zt), window.removeEventListener("scroll", Dt, { capture: !0, passive: !0 }), window.removeEventListener("resize",
|
|
3780
|
+
Mt(), Wt(), document.removeEventListener("click", zt), window.removeEventListener("scroll", Dt, { capture: !0, passive: !0 }), window.removeEventListener("resize", It);
|
|
3782
3781
|
}), U(d, (t) => {
|
|
3783
3782
|
j.value = t;
|
|
3784
3783
|
}, { immediate: !0 }), U(Ye, () => {
|
|
@@ -3808,16 +3807,16 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3808
3807
|
try {
|
|
3809
3808
|
const n = JSON.parse(t);
|
|
3810
3809
|
if (n && (n.startDate || n.endDate)) {
|
|
3811
|
-
const r = (
|
|
3812
|
-
if (!
|
|
3810
|
+
const r = (f) => {
|
|
3811
|
+
if (!f)
|
|
3813
3812
|
return null;
|
|
3814
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
3815
|
-
const [b, S, B] =
|
|
3813
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(f)) {
|
|
3814
|
+
const [b, S, B] = f.split("-").map(Number);
|
|
3816
3815
|
return new Date(b, S - 1, B);
|
|
3817
3816
|
}
|
|
3818
|
-
return new Date(
|
|
3819
|
-
}, i = n.startDate ? r(n.startDate) : null,
|
|
3820
|
-
z("changed", { startDate: i, endDate:
|
|
3817
|
+
return new Date(f);
|
|
3818
|
+
}, i = n.startDate ? r(n.startDate) : null, v = n.endDate ? r(n.endDate) : null;
|
|
3819
|
+
z("changed", { startDate: i, endDate: v });
|
|
3821
3820
|
return;
|
|
3822
3821
|
}
|
|
3823
3822
|
} catch {
|
|
@@ -3835,7 +3834,7 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3835
3834
|
}, R.value), [
|
|
3836
3835
|
be("div", {
|
|
3837
3836
|
id: o(Se),
|
|
3838
|
-
class:
|
|
3837
|
+
class: Ne(["nb-reset", "component", jt.value, Ht.value, Ut.value, Ft.value]),
|
|
3839
3838
|
style: We([_t.value, xt.value, xe.value]),
|
|
3840
3839
|
onClick: yt
|
|
3841
3840
|
}, [
|
|
@@ -3857,7 +3856,7 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3857
3856
|
id: kt.value,
|
|
3858
3857
|
name: kt.value,
|
|
3859
3858
|
type: ue.value ? "text" : j.value,
|
|
3860
|
-
class:
|
|
3859
|
+
class: Ne(["component__input", [
|
|
3861
3860
|
Gt.value,
|
|
3862
3861
|
qt.value,
|
|
3863
3862
|
Tt.value
|
|
@@ -3879,10 +3878,10 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3879
3878
|
}, null, 46, El), [
|
|
3880
3879
|
[qa, A.value]
|
|
3881
3880
|
])
|
|
3882
|
-
], 14,
|
|
3881
|
+
], 14, Nl),
|
|
3883
3882
|
s.value ? (P(), O("div", {
|
|
3884
3883
|
key: 0,
|
|
3885
|
-
class:
|
|
3884
|
+
class: Ne(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
3886
3885
|
}, [
|
|
3887
3886
|
oa(t.$slots, "message", {}, () => [
|
|
3888
3887
|
ga(ht(e.message), 1)
|
|
@@ -3917,12 +3916,12 @@ const Il = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3917
3916
|
], 36)) : Le("", !0)
|
|
3918
3917
|
], 16)) : Le("", !0);
|
|
3919
3918
|
}
|
|
3920
|
-
}), Ol = /* @__PURE__ */ fa(Pl, [["__scopeId", "data-v-
|
|
3919
|
+
}), Ol = /* @__PURE__ */ fa(Pl, [["__scopeId", "data-v-7d7e3ebb"]]), Pa = {
|
|
3921
3920
|
NbInputRadio: dl,
|
|
3922
3921
|
NbInputCheckbox: bl,
|
|
3923
3922
|
NbInput: kl,
|
|
3924
3923
|
NbInputChip: wl,
|
|
3925
|
-
NbTextarea:
|
|
3924
|
+
NbTextarea: Il,
|
|
3926
3925
|
NbDatePicker: Ol
|
|
3927
3926
|
}, ql = {
|
|
3928
3927
|
install(e) {
|