@vlalg-nimbus/nb-inputs 8.0.10 → 8.0.11
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 +248 -247
- 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
|
@@ -191,7 +191,7 @@ const ba = (e, m) => {
|
|
|
191
191
|
fontSize: be,
|
|
192
192
|
fontWeight: he
|
|
193
193
|
} = va(E), _ = a(() => {
|
|
194
|
-
const y = X.value ? "component-disabled" : "", S = ie.value !== "b" ? "inline-block" : "block", oe = me.value ? me.value : "'Lato', sans-serif", Z = be.value ? be.value : "1.6em", ge = he.value !== 0 && !he.value || he.value < 0 ? 200 : he.value, $e = [!1, !0].includes(K.value) ? K.value : !1, Ge = [!1, !0].includes(Ve.value) ? Ve.value : !1, ue = de.value !== 0 && !de.value || de.value < 0 ? 15 : de.value, d = F.value !== 0 && !F.value || F.value < 0 ? 6 : F.value,
|
|
194
|
+
const y = X.value ? "component-disabled" : "", S = ie.value !== "b" ? "inline-block" : "block", oe = me.value ? me.value : "'Lato', sans-serif", Z = be.value ? be.value : "1.6em", ge = he.value !== 0 && !he.value || he.value < 0 ? 200 : he.value, $e = [!1, !0].includes(K.value) ? K.value : !1, Ge = [!1, !0].includes(Ve.value) ? Ve.value : !1, ue = de.value !== 0 && !de.value || de.value < 0 ? 15 : de.value, d = F.value !== 0 && !F.value || F.value < 0 ? 6 : F.value, b = pe.value !== 0 && !pe.value || pe.value < 0 ? 1 : pe.value;
|
|
195
195
|
return {
|
|
196
196
|
disabled: y,
|
|
197
197
|
display: S,
|
|
@@ -199,7 +199,7 @@ const ba = (e, m) => {
|
|
|
199
199
|
activeHoverEffect: Ge,
|
|
200
200
|
itemGap: ue,
|
|
201
201
|
internalGap: d,
|
|
202
|
-
scale:
|
|
202
|
+
scale: b,
|
|
203
203
|
font: oe,
|
|
204
204
|
fontSize: Z,
|
|
205
205
|
fontWeight: ge
|
|
@@ -493,10 +493,10 @@ const vl = ["id"], pl = ["id", "disabled", "value", "name"], bl = ["for", "tabin
|
|
|
493
493
|
fontSize: _,
|
|
494
494
|
fontWeight: k
|
|
495
495
|
} = va(E), L = a(() => {
|
|
496
|
-
const d = be.value ? "component-disabled" : "",
|
|
496
|
+
const d = be.value ? "component-disabled" : "", b = Se.value !== "b" ? "inline-block" : "block", ce = he.value ? he.value : "'Lato', sans-serif", Y = _.value ? _.value : "1.6em", ee = k.value !== 0 && !k.value || k.value < 0 ? 200 : k.value, we = se.value !== 0 && !se.value || se.value < 0 ? 0 : se.value, Re = [!1, !0].includes(K.value) ? K.value : !1, Ee = [!1, !0].includes(Ve.value) ? Ve.value : !1, Ke = de.value !== 0 && !de.value || de.value < 0 ? 15 : de.value, et = F.value !== 0 && !F.value || F.value < 0 ? 6 : F.value, ot = ["box", "circle"].includes(X.value) ? X.value : "box", ut = pe.value !== 0 && !pe.value || pe.value < 0 ? 1 : pe.value, ft = [!1, !0].includes(me.value) ? me.value : !1;
|
|
497
497
|
return {
|
|
498
498
|
disabled: d,
|
|
499
|
-
display:
|
|
499
|
+
display: b,
|
|
500
500
|
boxRadius: we,
|
|
501
501
|
hoverEffect: Re,
|
|
502
502
|
activeHoverEffect: Ee,
|
|
@@ -524,42 +524,42 @@ const vl = ["id"], pl = ["id", "disabled", "value", "name"], bl = ["for", "tabin
|
|
|
524
524
|
const d = L.value;
|
|
525
525
|
return d.activeHoverEffect && d.background ? `${ne.value}80` : ne.value;
|
|
526
526
|
}), Ze = a(() => L.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), Ue = a(() => {
|
|
527
|
-
const d = L.value,
|
|
528
|
-
return d.background ? "#ffffff" :
|
|
527
|
+
const d = L.value, b = J.value === "dark" ? G.value : Pe.value;
|
|
528
|
+
return d.background ? "#ffffff" : b;
|
|
529
529
|
});
|
|
530
530
|
a(() => L.value.background ? "19px" : "auto");
|
|
531
531
|
const y = a(() => {
|
|
532
|
-
const
|
|
533
|
-
return !
|
|
532
|
+
const b = L.value.internalGap;
|
|
533
|
+
return !b || b < 0 ? 0 : `${b}px`;
|
|
534
534
|
}), S = a(() => {
|
|
535
535
|
const d = L.value;
|
|
536
536
|
return `${d.boxRadius > 7 ? 7 : d.boxRadius}px`;
|
|
537
537
|
}), oe = a(() => {
|
|
538
|
-
const
|
|
539
|
-
return !
|
|
538
|
+
const b = L.value.itemGap;
|
|
539
|
+
return !b || b < 0 ? 0 : `${b}px`;
|
|
540
540
|
}), Z = a(() => L.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), ge = a(() => ({
|
|
541
541
|
zoom: L.value.scale
|
|
542
542
|
})), $e = a(() => {
|
|
543
543
|
const d = {};
|
|
544
544
|
ve.value && Object.keys(ve.value).forEach((Y) => d[`aria-${Y}`] = ve.value[Y]);
|
|
545
|
-
const
|
|
545
|
+
const b = {
|
|
546
546
|
"aria-label": xe.value,
|
|
547
547
|
"aria-disabled": be.value,
|
|
548
548
|
...d
|
|
549
549
|
};
|
|
550
550
|
return Object.fromEntries(
|
|
551
|
-
Object.entries(
|
|
551
|
+
Object.entries(b).filter(([ce, Y]) => Y != null)
|
|
552
552
|
);
|
|
553
553
|
}), Ge = () => {
|
|
554
554
|
I.value = Te.value;
|
|
555
555
|
}, ue = () => {
|
|
556
556
|
C("clicked");
|
|
557
557
|
};
|
|
558
|
-
return U(Te, (d,
|
|
559
|
-
d !==
|
|
560
|
-
}), U(I, (d,
|
|
561
|
-
d !==
|
|
562
|
-
}), (d,
|
|
558
|
+
return U(Te, (d, b) => {
|
|
559
|
+
d !== b && Ge();
|
|
560
|
+
}), U(I, (d, b) => {
|
|
561
|
+
d !== b && (C("current-value", d), C("changed", d));
|
|
562
|
+
}), (d, b) => e.nbId && Je.value ? (O(), j("div", {
|
|
563
563
|
key: 0,
|
|
564
564
|
class: Ne(["nb-wrapper", Ae.value]),
|
|
565
565
|
style: We([qe.value, ge.value])
|
|
@@ -576,7 +576,7 @@ const vl = ["id"], pl = ["id", "disabled", "value", "name"], bl = ["for", "tabin
|
|
|
576
576
|
}, [
|
|
577
577
|
pa(fe("input", {
|
|
578
578
|
id: `${e.nbId}-${ce.value}`,
|
|
579
|
-
"onUpdate:modelValue":
|
|
579
|
+
"onUpdate:modelValue": b[0] || (b[0] = (ee) => I.value = ee),
|
|
580
580
|
type: "checkbox",
|
|
581
581
|
class: "component-checkbox__item--input",
|
|
582
582
|
disabled: n(be),
|
|
@@ -591,8 +591,8 @@ const vl = ["id"], pl = ["id", "disabled", "value", "name"], bl = ["for", "tabin
|
|
|
591
591
|
class: Ne([[Z.value], "component-checkbox__item--label"]),
|
|
592
592
|
tabindex: n(be) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[Y] : e.tabIndex >= 0 ? e.tabIndex : Y + 1,
|
|
593
593
|
onKeydown: [
|
|
594
|
-
|
|
595
|
-
|
|
594
|
+
b[1] || (b[1] = jt(ca((ee) => !n(be) && e.hasTabIndexEnter && ee.target.click(), ["prevent"]), ["enter"])),
|
|
595
|
+
b[2] || (b[2] = jt(ca((ee) => !n(be) && e.hasTabIndexSpace && ee.target.click(), ["prevent"]), ["space"]))
|
|
596
596
|
]
|
|
597
597
|
}, [
|
|
598
598
|
fe("div", {
|
|
@@ -1127,7 +1127,7 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1127
1127
|
hasMsg: Ge,
|
|
1128
1128
|
hasIcon: ue,
|
|
1129
1129
|
iconDirection: d,
|
|
1130
|
-
iconPadding:
|
|
1130
|
+
iconPadding: b,
|
|
1131
1131
|
iconPaddingInput: ce,
|
|
1132
1132
|
iconMargin: Y,
|
|
1133
1133
|
iconBorderRadius: ee,
|
|
@@ -1158,14 +1158,14 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1158
1158
|
darkTextColorLabel: wt,
|
|
1159
1159
|
darkTextColorLabelActive: Rt
|
|
1160
1160
|
} = va(E), Me = Q(""), vt = Q(""), it = Q(!1), pt = Q(!1), B = a(() => {
|
|
1161
|
-
const o = R.value ? "component-disabled" : "",
|
|
1161
|
+
const o = R.value ? "component-disabled" : "", p = xe.value !== "b" ? "inline-block" : "block", w = ie ? ie.value : "ffffff", Ye = J.value ? J.value : "", Qe = Pe.value ? Pe.value : "", t = Be.value ? Be.value : "", l = le.value ? le.value : !1, s = G.value !== 0 && !G.value || G.value < 0 ? 0 : G.value, i = ne.value ? ne.value : "'Lato', sans-serif", f = se.value ? se.value : null, c = K.value !== 0 && !K.value || K.value < 0 ? 100 : K.value, v = Ve.value ? Ve.value : "'Lato', sans-serif", x = de.value ? de.value : "1em", A = F.value !== 0 && !F.value || F.value < 0 ? 100 : F.value, D = pe.value ? pe.value : "#f15574", q = X.value ? X.value : 200, re = be.value ? be.value : "normal", ze = he.value ? he.value : "xs", tt = _.value ? _.value : !1, De = k.value ? k.value : !1, Ie = L.value ? L.value : "text", ha = qe.value ? qe.value : !1, Ca = lt.value ? lt.value : "normal", xa = ge.value ? ge.value : "left", Sa = me.value ? me.value : "background", Va = b.value ? b.value : "5px 10px", ka = Y.value ? Y.value : "0", La = ce.value ? ce.value : 10, Ta = we.value ? we.value : "#000000", Ba = Re.value ? Re.value : "#000000", Aa = Ee.value ? Ee.value : "transparent", _a = Ke.value ? Ke.value : "transparent", $a = ee.value !== 0 && !ee.value || ee.value < 0 ? 0 : ee.value, wa = et.value ? et.value : "transparent", Ra = ot.value ? ot.value : "transparent", Ma = h.value ? h.value : 32, za = M.value ? M.value : 1, Da = V.value ? V.value : !1, Ia = Vt.value !== 0 && !Vt.value || Vt.value < 0 ? 5 : Vt.value, Na = Fe.value ? Fe.value : "transparent", Wa = kt.value !== 0 && !kt.value || kt.value < 0 ? 15 : kt.value, Pa = T.value ? T.value : "1px 5px", Ea = ye.value !== 0 && !ye.value || ye.value < 0 ? 0 : ye.value, Fa = rt.value === null || rt.value === void 0 ? -13 : rt.value, Ga = H.value === null || H.value === void 0 ? -10 : H.value, Ka = N.value ? N.value : "'Lato', sans-serif", Ya = te.value ? te.value : "1em", Qa = $.value ? $.value : "0.8em", Ja = z.value ? z.value : 400, Xa = ae.value ? ae.value : "#ffffff", Za = wt.value ? wt.value : "#000000", el = W.value ? W.value : "#ffffff", tl = Rt.value ? Rt.value : "#000000";
|
|
1162
1162
|
return {
|
|
1163
1163
|
disabled: o,
|
|
1164
|
-
display:
|
|
1165
|
-
font:
|
|
1166
|
-
fontSize:
|
|
1164
|
+
display: p,
|
|
1165
|
+
font: i,
|
|
1166
|
+
fontSize: f,
|
|
1167
1167
|
fontWeight: c,
|
|
1168
|
-
fontFamilyMsg:
|
|
1168
|
+
fontFamilyMsg: v,
|
|
1169
1169
|
fontSizeMsg: x,
|
|
1170
1170
|
fontWeightMsg: A,
|
|
1171
1171
|
textMessageColor: D,
|
|
@@ -1174,7 +1174,7 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1174
1174
|
selectionBgColor: Qe,
|
|
1175
1175
|
selectionTextColor: t,
|
|
1176
1176
|
hasBorderRadius: l,
|
|
1177
|
-
borderRadius:
|
|
1177
|
+
borderRadius: s,
|
|
1178
1178
|
textAlign: xa,
|
|
1179
1179
|
inputWidth: q,
|
|
1180
1180
|
activeTextStyle: re,
|
|
@@ -1220,7 +1220,7 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1220
1220
|
const o = B.value;
|
|
1221
1221
|
if (o.fontSize)
|
|
1222
1222
|
return o.fontSize;
|
|
1223
|
-
let
|
|
1223
|
+
let p = "";
|
|
1224
1224
|
switch (o.sizeMediaQuery) {
|
|
1225
1225
|
case "sm":
|
|
1226
1226
|
return "1.2em";
|
|
@@ -1229,14 +1229,14 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1229
1229
|
case "lg":
|
|
1230
1230
|
return "2em";
|
|
1231
1231
|
default:
|
|
1232
|
-
|
|
1232
|
+
p = "1.2em";
|
|
1233
1233
|
}
|
|
1234
|
-
return
|
|
1234
|
+
return p;
|
|
1235
1235
|
}), Ht = a(() => {
|
|
1236
|
-
const o = B.value,
|
|
1236
|
+
const o = B.value, p = Pt.value;
|
|
1237
1237
|
return {
|
|
1238
1238
|
fontWeight: o.fontWeight,
|
|
1239
|
-
marginTop:
|
|
1239
|
+
marginTop: p && V.value ? `${o.inputLabelMarginActive}px` : "0"
|
|
1240
1240
|
};
|
|
1241
1241
|
}), mt = a(() => {
|
|
1242
1242
|
const o = B.value;
|
|
@@ -1284,7 +1284,7 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1284
1284
|
default:
|
|
1285
1285
|
return "";
|
|
1286
1286
|
}
|
|
1287
|
-
}),
|
|
1287
|
+
}), g = a(() => {
|
|
1288
1288
|
switch (B.value.theme) {
|
|
1289
1289
|
case "dark":
|
|
1290
1290
|
return "component__theme--dark";
|
|
@@ -1297,13 +1297,13 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1297
1297
|
}), Xt = a(() => it.value ? gt.value : ke.value), ht = a(() => _e.value ? _e.value : `${I.value}-name-label`), Wt = a(() => V.value ? pt.value ? at.value : "" : at.value), Pt = a(() => pt.value || Me.value && Me.value.trim().length > 0), Zt = a(() => B.value.inputType === "password" ? "component__input__eye-default--hidden" : ""), ea = a(() => pt.value ? "component__input--active" : "component__input--no-active"), Ct = a(() => Nt.value ? "6px 50px 6px 10px" : "6px 10px"), ta = a(() => !!($e.value && Ge.value)), aa = a(() => {
|
|
1298
1298
|
const o = {};
|
|
1299
1299
|
Se.value && Object.keys(Se.value).forEach((Ye) => o[`aria-${Ye}`] = Se.value[Ye]);
|
|
1300
|
-
const
|
|
1300
|
+
const p = {
|
|
1301
1301
|
"aria-label": Te.value,
|
|
1302
1302
|
"aria-disabled": R.value,
|
|
1303
1303
|
...o
|
|
1304
1304
|
};
|
|
1305
1305
|
return Object.fromEntries(
|
|
1306
|
-
Object.entries(
|
|
1306
|
+
Object.entries(p).filter(([w, Ye]) => Ye != null)
|
|
1307
1307
|
);
|
|
1308
1308
|
}), la = a(() => ue.value ? `${M.value}rem` : "0"), na = a(() => ue.value ? `${h.value}px` : "0"), $t = a(() => ue.value ? `component__icon--${d.value}` : ""), oa = a(() => {
|
|
1309
1309
|
const o = B.value;
|
|
@@ -1321,19 +1321,19 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1321
1321
|
const o = B.value;
|
|
1322
1322
|
return ue.value ? d.value === "left" ? { paddingLeft: `${o.iconPaddingInput}px` } : { paddingRight: `${o.iconPaddingInput}px` } : {};
|
|
1323
1323
|
}), Ot = a(() => {
|
|
1324
|
-
const o = B.value,
|
|
1324
|
+
const o = B.value, p = Pt.value, w = p ? o.lightTextColorLabelActive : o.lightTextColorLabel, Ye = p ? o.darkTextColorLabelActive : o.darkTextColorLabel;
|
|
1325
1325
|
return {
|
|
1326
1326
|
fontFamily: o.fontFamilyLabel,
|
|
1327
|
-
fontSize:
|
|
1327
|
+
fontSize: p ? o.fontSizeLabelActive : o.fontSizeLabel,
|
|
1328
1328
|
fontWeight: o.fontWeightLabel,
|
|
1329
1329
|
color: o.theme === "dark" ? Ye : w,
|
|
1330
|
-
top:
|
|
1331
|
-
left:
|
|
1332
|
-
transform:
|
|
1330
|
+
top: p ? `${o.labelActiveTop}px` : "50%",
|
|
1331
|
+
left: p ? `${o.labelActiveLeft}px` : `${o.labelLeft}px`,
|
|
1332
|
+
transform: p ? "translateY(0)" : "translateY(-50%)",
|
|
1333
1333
|
transition: "all 0.2s ease",
|
|
1334
|
-
backgroundColor:
|
|
1335
|
-
padding:
|
|
1336
|
-
borderRadius:
|
|
1334
|
+
backgroundColor: p ? o.labelBackground : "transparent",
|
|
1335
|
+
padding: p ? o.labelPadding : "0",
|
|
1336
|
+
borderRadius: p ? `${o.labelBorderRadius}rem` : "0"
|
|
1337
1337
|
};
|
|
1338
1338
|
});
|
|
1339
1339
|
a(() => {
|
|
@@ -1346,8 +1346,8 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1346
1346
|
const o = B.value;
|
|
1347
1347
|
if (o.inputReadonly || o.disabled)
|
|
1348
1348
|
return;
|
|
1349
|
-
const
|
|
1350
|
-
|
|
1349
|
+
const p = !it.value;
|
|
1350
|
+
p ? vt.value = "text" : vt.value = L.value, it.value = p;
|
|
1351
1351
|
}, xt = () => {
|
|
1352
1352
|
C("clicked");
|
|
1353
1353
|
}, qt = () => {
|
|
@@ -1367,10 +1367,10 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1367
1367
|
Ae.value && (o = o.trim()), C("current-value", o);
|
|
1368
1368
|
}), U(L, (o) => {
|
|
1369
1369
|
o === "password" && nextTick(() => {
|
|
1370
|
-
const
|
|
1371
|
-
|
|
1370
|
+
const p = document.getElementById(_e.value);
|
|
1371
|
+
p && (p.type = "password", p.removeAttribute("autocomplete"));
|
|
1372
1372
|
});
|
|
1373
|
-
}), (o,
|
|
1373
|
+
}), (o, p) => n(I) ? (O(), j("div", da({
|
|
1374
1374
|
key: 0,
|
|
1375
1375
|
class: ["nb-wrapper", Mt.value],
|
|
1376
1376
|
style: [zt.value, Lt.value, mt.value],
|
|
@@ -1378,7 +1378,7 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1378
1378
|
}, aa.value), [
|
|
1379
1379
|
fe("div", {
|
|
1380
1380
|
id: n(I),
|
|
1381
|
-
class: Ne(["nb-reset", "component", u.value,
|
|
1381
|
+
class: Ne(["nb-reset", "component", u.value, g.value, P.value, It.value]),
|
|
1382
1382
|
style: We([Ht.value, Lt.value, mt.value]),
|
|
1383
1383
|
onClick: xt
|
|
1384
1384
|
}, [
|
|
@@ -1400,15 +1400,15 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1400
1400
|
}, [
|
|
1401
1401
|
e.inputEyeCustomIcon ? (O(), j("span", Sl, [
|
|
1402
1402
|
it.value ? ia(o.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
1403
|
-
|
|
1403
|
+
p[4] || (p[4] = ga("show"))
|
|
1404
1404
|
], !0) : ia(o.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1405
|
-
|
|
1405
|
+
p[5] || (p[5] = ga("hidden"))
|
|
1406
1406
|
], !0)
|
|
1407
1407
|
])) : (O(), j("span", xl, St(Xt.value), 1))
|
|
1408
1408
|
], 8, Cl)
|
|
1409
1409
|
], 6)) : Le("", !0),
|
|
1410
1410
|
pa(fe("input", {
|
|
1411
|
-
"onUpdate:modelValue":
|
|
1411
|
+
"onUpdate:modelValue": p[0] || (p[0] = (w) => Me.value = w),
|
|
1412
1412
|
id: ht.value,
|
|
1413
1413
|
name: ht.value,
|
|
1414
1414
|
type: vt.value,
|
|
@@ -1425,9 +1425,9 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1425
1425
|
tabindex: n(R) || n(_) ? -1 : n(Xe),
|
|
1426
1426
|
role: "input",
|
|
1427
1427
|
style: We([mt.value, Ft.value]),
|
|
1428
|
-
onFocus:
|
|
1429
|
-
onBlur:
|
|
1430
|
-
onKeydown:
|
|
1428
|
+
onFocus: p[1] || (p[1] = (w) => pt.value = !0),
|
|
1429
|
+
onBlur: p[2] || (p[2] = (w) => pt.value = !1),
|
|
1430
|
+
onKeydown: p[3] || (p[3] = jt((w) => !n(R) && n(ve) && qt(), ["enter"]))
|
|
1431
1431
|
}, null, 46, Vl), [
|
|
1432
1432
|
[Ha, Me.value]
|
|
1433
1433
|
]),
|
|
@@ -1437,7 +1437,7 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1437
1437
|
class: Ne(["component__icon", $t.value])
|
|
1438
1438
|
}, [
|
|
1439
1439
|
ia(o.$slots, "icon", {}, () => [
|
|
1440
|
-
|
|
1440
|
+
p[6] || (p[6] = fe("span", null, "♥", -1))
|
|
1441
1441
|
], !0)
|
|
1442
1442
|
], 10, kl)) : Le("", !0)
|
|
1443
1443
|
], 14, ml),
|
|
@@ -1861,7 +1861,7 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
1861
1861
|
caretColor: Ge,
|
|
1862
1862
|
selectionBgColor: ue,
|
|
1863
1863
|
selectionTextColor: d,
|
|
1864
|
-
showLabel:
|
|
1864
|
+
showLabel: b,
|
|
1865
1865
|
label: ce,
|
|
1866
1866
|
labelBackground: Y,
|
|
1867
1867
|
labelPadding: ee,
|
|
@@ -1879,10 +1879,10 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
1879
1879
|
darkTextColorLabel: Fe,
|
|
1880
1880
|
darkTextColorLabelActive: T
|
|
1881
1881
|
} = va(E), ye = Q(""), Vt = Q(null), kt = Q(null), rt = Q(null), H = Q([]), N = Q(!1), te = a(() => {
|
|
1882
|
-
const u = J.value ? "component-disabled" : "",
|
|
1882
|
+
const u = J.value ? "component-disabled" : "", g = xe.value !== "b" ? "inline-block" : "block", P = !Ve.value || Ve.value < 185 ? 185 : Ve.value, Oe = ve ? ve.value : "ffffff", Nt = Ge.value ? Ge.value : "", Xt = ue.value ? ue.value : "", ht = d.value ? d.value : "", Wt = Te.value !== 0 && !Te.value || Te.value < 0 ? 1 : Te.value, Pt = Se.value !== 0 && !Se.value || Se.value < 0 ? 0.2 : Se.value, Zt = ie.value !== 0 && !ie.value || ie.value < 0 ? 0 : ie.value, ea = Pe.value ? Pe.value : "'Lato', sans-serif", Ct = Be.value ? Be.value : "1.4em", ta = le.value !== 0 && !le.value || le.value < 0 ? 100 : le.value, aa = ne.value !== 0 && !ne.value || ne.value < 0 ? 0 : ne.value, la = se.value !== 0 && !se.value || se.value < 0 ? 10 : se.value, na = !K.value || !["top", "bottom"].includes(K.value) ? "bottom" : K.value, $t = !Ae.value || !["background", "line", "border"].includes(Ae.value) ? "background" : Ae.value, oa = L.value ? L.value : "light", ua = b.value ? b.value : !1, ra = Re.value !== 0 && !Re.value || Re.value < 0 ? 5 : Re.value, Et = Y.value ? Y.value : "transparent", Ft = Ee.value !== 0 && !Ee.value || Ee.value < 0 ? 15 : Ee.value, Ot = ee.value ? ee.value : "1px 5px", bt = we.value !== 0 && !we.value || we.value < 0 ? 0 : we.value, Tt = Ke.value === null || Ke.value === void 0 ? 13 : Ke.value, xt = et.value === null || et.value === void 0 ? 5 : et.value, qt = ot.value ? ot.value : "'Lato', sans-serif", o = ut.value ? ut.value : "1em", p = ft.value ? ft.value : "0.8em", w = h.value ? h.value : 400, Ye = M.value ? M.value : "#333333", Qe = Fe.value ? Fe.value : "#ffffff", t = V.value ? V.value : "#333333", l = T.value ? T.value : "#ffffff";
|
|
1883
1883
|
return {
|
|
1884
1884
|
disabled: u,
|
|
1885
|
-
display:
|
|
1885
|
+
display: g,
|
|
1886
1886
|
width: P,
|
|
1887
1887
|
font: ea,
|
|
1888
1888
|
fontSize: Ct,
|
|
@@ -1909,7 +1909,7 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
1909
1909
|
labelActiveLeft: xt,
|
|
1910
1910
|
fontFamilyLabel: qt,
|
|
1911
1911
|
fontSizeLabel: o,
|
|
1912
|
-
fontSizeLabelActive:
|
|
1912
|
+
fontSizeLabelActive: p,
|
|
1913
1913
|
fontWeightLabel: w,
|
|
1914
1914
|
lightTextColorLabel: Ye,
|
|
1915
1915
|
darkTextColorLabel: Qe,
|
|
@@ -1917,23 +1917,23 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
1917
1917
|
darkTextColorLabelActive: l
|
|
1918
1918
|
};
|
|
1919
1919
|
}), $ = a(() => te.value.disabled), z = a(() => {
|
|
1920
|
-
const u = te.value,
|
|
1920
|
+
const u = te.value, g = _t.value;
|
|
1921
1921
|
return {
|
|
1922
1922
|
display: u.display,
|
|
1923
1923
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
1924
|
-
paddingTop:
|
|
1924
|
+
paddingTop: g && b.value ? `${Math.abs(u.labelActiveTop)}px` : "0"
|
|
1925
1925
|
};
|
|
1926
1926
|
}), ae = a(() => {
|
|
1927
1927
|
const u = te.value;
|
|
1928
1928
|
return u.fontSize ? u.fontSize : "1.4em";
|
|
1929
1929
|
}), W = a(() => {
|
|
1930
|
-
const u = te.value,
|
|
1930
|
+
const u = te.value, g = _t.value;
|
|
1931
1931
|
return {
|
|
1932
1932
|
color: u.textColor,
|
|
1933
1933
|
padding: `${u.paddingY}rem ${u.paddingX}rem`,
|
|
1934
1934
|
fontWeight: u.fontWeight,
|
|
1935
1935
|
textAlign: he.value,
|
|
1936
|
-
marginTop:
|
|
1936
|
+
marginTop: g && b.value ? `${u.inputLabelMarginActive}px` : "0"
|
|
1937
1937
|
};
|
|
1938
1938
|
}), wt = a(() => {
|
|
1939
1939
|
switch (k.value) {
|
|
@@ -1950,13 +1950,13 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
1950
1950
|
}), Me = a(() => te.value.font), vt = a(() => te.value.textColor), it = a(() => te.value.inputPosition === "top" ? "column" : "column-reverse"), pt = a(() => {
|
|
1951
1951
|
const u = {};
|
|
1952
1952
|
$e.value && Object.keys($e.value).forEach((Oe) => u[`aria-${Oe}`] = $e.value[Oe]);
|
|
1953
|
-
const
|
|
1953
|
+
const g = {
|
|
1954
1954
|
"aria-label": ge.value,
|
|
1955
1955
|
"aria-disabled": J.value,
|
|
1956
1956
|
...u
|
|
1957
1957
|
};
|
|
1958
1958
|
return Object.fromEntries(
|
|
1959
|
-
Object.entries(
|
|
1959
|
+
Object.entries(g).filter(([P, Oe]) => Oe != null)
|
|
1960
1960
|
);
|
|
1961
1961
|
}), B = a(() => {
|
|
1962
1962
|
const u = te.value;
|
|
@@ -1973,24 +1973,24 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
1973
1973
|
"--selection-bg-color": Mt.value,
|
|
1974
1974
|
"--selection-text-color": zt.value
|
|
1975
1975
|
})), mt = a(() => {
|
|
1976
|
-
const u = te.value,
|
|
1976
|
+
const u = te.value, g = {
|
|
1977
1977
|
width: `${u.width}px`
|
|
1978
1978
|
};
|
|
1979
|
-
return u.display === "block" ? { width: "auto" } :
|
|
1980
|
-
}), At = a(() => de.value ? de.value : `${I.value}-name-label`), _t = a(() => N.value || H.value.length > 0 || ye.value && ye.value.trim().length > 0), Dt = a(() =>
|
|
1981
|
-
const u = te.value,
|
|
1979
|
+
return u.display === "block" ? { width: "auto" } : g;
|
|
1980
|
+
}), At = a(() => de.value ? de.value : `${I.value}-name-label`), _t = a(() => N.value || H.value.length > 0 || ye.value && ye.value.trim().length > 0), Dt = a(() => b.value ? N.value || H.value.length > 0 ? F.value : "" : F.value), Ut = a(() => {
|
|
1981
|
+
const u = te.value, g = _t.value, P = g ? u.lightTextColorLabelActive : u.lightTextColorLabel, Oe = g ? u.darkTextColorLabelActive : u.darkTextColorLabel;
|
|
1982
1982
|
return {
|
|
1983
1983
|
fontFamily: u.fontFamilyLabel,
|
|
1984
|
-
fontSize:
|
|
1984
|
+
fontSize: g ? u.fontSizeLabelActive : u.fontSizeLabel,
|
|
1985
1985
|
fontWeight: u.fontWeightLabel,
|
|
1986
1986
|
color: u.theme === "dark" ? Oe : P,
|
|
1987
|
-
top:
|
|
1988
|
-
left:
|
|
1989
|
-
transform:
|
|
1987
|
+
top: g ? `${u.labelActiveTop}px` : "50%",
|
|
1988
|
+
left: g ? `${u.labelActiveLeft}px` : `${u.labelLeft}px`,
|
|
1989
|
+
transform: g ? "translateY(0)" : "translateY(-50%)",
|
|
1990
1990
|
transition: "all 0.2s ease",
|
|
1991
|
-
backgroundColor:
|
|
1992
|
-
padding:
|
|
1993
|
-
borderRadius:
|
|
1991
|
+
backgroundColor: g ? u.labelBackground : "transparent",
|
|
1992
|
+
padding: g ? u.labelPadding : "0",
|
|
1993
|
+
borderRadius: g ? `${u.labelBorderRadius}rem` : "0"
|
|
1994
1994
|
};
|
|
1995
1995
|
}), Gt = a(() => {
|
|
1996
1996
|
switch (L.value) {
|
|
@@ -2017,25 +2017,25 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
2017
2017
|
}, Lt = (u) => {
|
|
2018
2018
|
if (!(J.value || X.value) && u.key === "Enter" && ye.value.trim() !== "") {
|
|
2019
2019
|
u.preventDefault();
|
|
2020
|
-
let
|
|
2021
|
-
pe.value && (
|
|
2020
|
+
let g = ye.value.trim();
|
|
2021
|
+
pe.value && (g = g.toUpperCase()), (R.value || !H.value.includes(g)) && It(g), ye.value = "";
|
|
2022
2022
|
}
|
|
2023
2023
|
}, It = (u) => {
|
|
2024
2024
|
H.value.push(u), C("added", u);
|
|
2025
2025
|
}, r = (u) => {
|
|
2026
|
-
H.value = H.value.filter((
|
|
2026
|
+
H.value = H.value.filter((g) => g !== u), C("removed", u);
|
|
2027
2027
|
};
|
|
2028
2028
|
return U(G, (u) => {
|
|
2029
2029
|
H.value = u, C("changed", u);
|
|
2030
2030
|
}), U(ye, (u) => {
|
|
2031
2031
|
C("input-changed", u);
|
|
2032
|
-
}), (u,
|
|
2032
|
+
}), (u, g) => n(I) ? (O(), j("div", da({
|
|
2033
2033
|
key: 0,
|
|
2034
2034
|
class: ["nb-wrapper", $.value],
|
|
2035
2035
|
style: [z.value],
|
|
2036
2036
|
role: "input"
|
|
2037
2037
|
}, pt.value, { onClick: Yt }), [
|
|
2038
|
-
n(
|
|
2038
|
+
n(b) ? (O(), j("label", {
|
|
2039
2039
|
key: 0,
|
|
2040
2040
|
for: At.value,
|
|
2041
2041
|
class: "component__label",
|
|
@@ -2076,7 +2076,7 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
2076
2076
|
ref_key: "chipInput",
|
|
2077
2077
|
ref: kt,
|
|
2078
2078
|
type: "text",
|
|
2079
|
-
"onUpdate:modelValue":
|
|
2079
|
+
"onUpdate:modelValue": g[0] || (g[0] = (P) => ye.value = P),
|
|
2080
2080
|
id: At.value,
|
|
2081
2081
|
name: At.value,
|
|
2082
2082
|
placeholder: Dt.value,
|
|
@@ -2086,7 +2086,7 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
2086
2086
|
tabindex: n(J) || n(X) ? -1 : n(oe),
|
|
2087
2087
|
class: Ne(["chips-input", wt.value]),
|
|
2088
2088
|
style: We([Bt.value, Ht.value]),
|
|
2089
|
-
onKeydown:
|
|
2089
|
+
onKeydown: g[1] || (g[1] = jt((P) => !n(J) && n(Z) && Lt(P), ["enter"])),
|
|
2090
2090
|
onFocus: Qt,
|
|
2091
2091
|
onBlur: Jt
|
|
2092
2092
|
}, null, 46, wl), [
|
|
@@ -2547,7 +2547,7 @@ const zl = ["id"], Dl = ["for"], Il = ["id", "name", "placeholder", "disabled",
|
|
|
2547
2547
|
fontSizeLabelActive: Ge,
|
|
2548
2548
|
fontWeightLabel: ue,
|
|
2549
2549
|
lightTextColorLabel: d,
|
|
2550
|
-
lightTextColorLabelActive:
|
|
2550
|
+
lightTextColorLabelActive: b,
|
|
2551
2551
|
darkTextColorLabel: ce,
|
|
2552
2552
|
darkTextColorLabelActive: Y,
|
|
2553
2553
|
rows: ee,
|
|
@@ -2562,7 +2562,7 @@ const zl = ["id"], Dl = ["for"], Il = ["id", "name", "placeholder", "disabled",
|
|
|
2562
2562
|
minRows: h,
|
|
2563
2563
|
maxRows: M
|
|
2564
2564
|
} = va(E), V = Q(""), Fe = Q(!1), T = a(() => {
|
|
2565
|
-
const r = R.value ? "component-disabled" : "", u = xe.value !== "b" ? "inline-block" : "block",
|
|
2565
|
+
const r = R.value ? "component-disabled" : "", u = xe.value !== "b" ? "inline-block" : "block", g = ie ? ie.value : "ffffff", P = J.value ? J.value : "", Oe = Pe.value ? Pe.value : "", Nt = Be.value ? Be.value : "", Xt = le.value ? le.value : !1, ht = G.value !== 0 && !G.value || G.value < 0 ? 0 : G.value, Wt = ne.value ? ne.value : "'Lato', sans-serif", Pt = se.value ? se.value : "1.4em", Zt = K.value !== 0 && !K.value || K.value < 0 ? 100 : K.value, ea = Ve.value ? Ve.value : "'Lato', sans-serif", Ct = de.value ? de.value : "1em", ta = F.value !== 0 && !F.value || F.value < 0 ? 100 : F.value, aa = pe.value ? pe.value : "#f15574", la = X.value ? X.value : 200, na = be.value ? be.value : "normal", $t = he.value ? he.value : !1, oa = k.value ? k.value : !1, ua = _e.value ? _e.value : "normal", ra = st.value ? st.value : "left", Et = me.value ? me.value : "background", Ft = je.value ? je.value : !1, Ot = y.value !== 0 && !y.value || y.value < 0 ? 5 : y.value, bt = He.value ? He.value : "transparent", Tt = S.value !== 0 && !S.value || S.value < 0 ? 15 : S.value, xt = Ze.value ? Ze.value : "1px 5px", qt = Ue.value !== 0 && !Ue.value || Ue.value < 0 ? 0 : Ue.value, o = oe.value === null || oe.value === void 0 ? -13 : oe.value, p = Z.value === null || Z.value === void 0 ? -10 : Z.value, w = ge.value ? ge.value : "'Lato', sans-serif", Ye = $e.value ? $e.value : "1em", Qe = Ge.value ? Ge.value : "0.8em", t = ue.value ? ue.value : 400, l = d.value ? d.value : "#ffffff", s = ce.value ? ce.value : "#000000", i = b.value ? b.value : "#ffffff", f = Y.value ? Y.value : "#000000", c = ee.value && ee.value > 0 ? ee.value : 2, v = we.value && we.value > 0 ? we.value : 20, x = Re.value !== null && Re.value >= 0 ? Re.value : null, A = Ee.value !== null && Ee.value >= 0 ? Ee.value : null, D = Ke.value && ["soft", "hard", "off"].includes(Ke.value) ? Ke.value : "soft", q = et.value !== void 0 ? et.value : "default", re = ot.value !== void 0 ? ot.value : !1, ze = ut.value && ["none", "both", "vertical", "horizontal"].includes(ut.value) ? ut.value : "vertical", tt = ft.value !== void 0 ? ft.value : !1, De = h.value !== null && h.value > 0 ? h.value : null, Ie = M.value !== null && M.value > 0 ? M.value : null;
|
|
2566
2566
|
return {
|
|
2567
2567
|
disabled: r,
|
|
2568
2568
|
display: u,
|
|
@@ -2573,7 +2573,7 @@ const zl = ["id"], Dl = ["for"], Il = ["id", "name", "placeholder", "disabled",
|
|
|
2573
2573
|
fontSizeMsg: Ct,
|
|
2574
2574
|
fontWeightMsg: ta,
|
|
2575
2575
|
textMessageColor: aa,
|
|
2576
|
-
textColor:
|
|
2576
|
+
textColor: g,
|
|
2577
2577
|
caretColor: P,
|
|
2578
2578
|
selectionBgColor: Oe,
|
|
2579
2579
|
selectionTextColor: Nt,
|
|
@@ -2593,17 +2593,17 @@ const zl = ["id"], Dl = ["for"], Il = ["id", "name", "placeholder", "disabled",
|
|
|
2593
2593
|
labelLeft: Ot,
|
|
2594
2594
|
inputLabelMarginActive: Tt,
|
|
2595
2595
|
labelActiveTop: o,
|
|
2596
|
-
labelActiveLeft:
|
|
2596
|
+
labelActiveLeft: p,
|
|
2597
2597
|
fontFamilyLabel: w,
|
|
2598
2598
|
fontSizeLabel: Ye,
|
|
2599
2599
|
fontSizeLabelActive: Qe,
|
|
2600
2600
|
fontWeightLabel: t,
|
|
2601
2601
|
lightTextColorLabel: l,
|
|
2602
|
-
darkTextColorLabel:
|
|
2603
|
-
lightTextColorLabelActive:
|
|
2604
|
-
darkTextColorLabelActive:
|
|
2602
|
+
darkTextColorLabel: s,
|
|
2603
|
+
lightTextColorLabelActive: i,
|
|
2604
|
+
darkTextColorLabelActive: f,
|
|
2605
2605
|
rows: c,
|
|
2606
|
-
cols:
|
|
2606
|
+
cols: v,
|
|
2607
2607
|
maxlength: x,
|
|
2608
2608
|
minlength: A,
|
|
2609
2609
|
wrap: D,
|
|
@@ -2678,15 +2678,15 @@ const zl = ["id"], Dl = ["for"], Il = ["id", "name", "placeholder", "disabled",
|
|
|
2678
2678
|
...r
|
|
2679
2679
|
};
|
|
2680
2680
|
return Object.fromEntries(
|
|
2681
|
-
Object.entries(u).filter(([
|
|
2681
|
+
Object.entries(u).filter(([g, P]) => P != null)
|
|
2682
2682
|
);
|
|
2683
2683
|
}), Ut = a(() => {
|
|
2684
|
-
const r = T.value, u = mt.value,
|
|
2684
|
+
const r = T.value, u = mt.value, g = u ? r.lightTextColorLabelActive : r.lightTextColorLabel, P = u ? r.darkTextColorLabelActive : r.darkTextColorLabel;
|
|
2685
2685
|
return {
|
|
2686
2686
|
fontFamily: r.fontFamilyLabel,
|
|
2687
2687
|
fontSize: u ? r.fontSizeLabelActive : r.fontSizeLabel,
|
|
2688
2688
|
fontWeight: r.fontWeightLabel,
|
|
2689
|
-
color: r.theme === "dark" ? P :
|
|
2689
|
+
color: r.theme === "dark" ? P : g,
|
|
2690
2690
|
top: u ? `${r.labelActiveTop}px` : "50%",
|
|
2691
2691
|
left: u ? `${r.labelActiveLeft}px` : `${r.labelLeft}px`,
|
|
2692
2692
|
transform: u ? "translateY(0)" : "translateY(-50%)",
|
|
@@ -2751,7 +2751,7 @@ const zl = ["id"], Dl = ["for"], Il = ["id", "name", "placeholder", "disabled",
|
|
|
2751
2751
|
style: We([Ut.value])
|
|
2752
2752
|
}, St(e.label), 13, Dl)) : Le("", !0),
|
|
2753
2753
|
pa(fe("textarea", da({
|
|
2754
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
2754
|
+
"onUpdate:modelValue": u[0] || (u[0] = (g) => V.value = g),
|
|
2755
2755
|
id: Bt.value,
|
|
2756
2756
|
name: Bt.value
|
|
2757
2757
|
}, Gt.value, {
|
|
@@ -2767,10 +2767,10 @@ const zl = ["id"], Dl = ["for"], Il = ["id", "name", "placeholder", "disabled",
|
|
|
2767
2767
|
tabindex: n(R) || n(he) ? -1 : n(at),
|
|
2768
2768
|
role: "textbox",
|
|
2769
2769
|
style: [H.value, Kt.value, Yt.value],
|
|
2770
|
-
onFocus: u[1] || (u[1] = (
|
|
2771
|
-
onBlur: u[2] || (u[2] = (
|
|
2770
|
+
onFocus: u[1] || (u[1] = (g) => Fe.value = !0),
|
|
2771
|
+
onBlur: u[2] || (u[2] = (g) => Fe.value = !1),
|
|
2772
2772
|
onInput: It,
|
|
2773
|
-
onKeydown: u[3] || (u[3] = jt((
|
|
2773
|
+
onKeydown: u[3] || (u[3] = jt((g) => !n(R) && n(ve) && Lt(), ["enter"]))
|
|
2774
2774
|
}), null, 16, Il), [
|
|
2775
2775
|
[Ua, V.value]
|
|
2776
2776
|
])
|
|
@@ -3128,29 +3128,29 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3128
3128
|
],
|
|
3129
3129
|
setup(e, { emit: m }) {
|
|
3130
3130
|
fa((t) => ({
|
|
3131
|
-
|
|
3132
|
-
"
|
|
3133
|
-
"
|
|
3134
|
-
|
|
3135
|
-
"
|
|
3136
|
-
|
|
3137
|
-
"
|
|
3138
|
-
|
|
3139
|
-
"
|
|
3140
|
-
|
|
3141
|
-
"
|
|
3142
|
-
"
|
|
3143
|
-
"
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
"
|
|
3148
|
-
"
|
|
3149
|
-
"
|
|
3150
|
-
|
|
3151
|
-
"
|
|
3152
|
-
"
|
|
3153
|
-
"
|
|
3131
|
+
b75e22cc: pt.value,
|
|
3132
|
+
"056e24b6": Me.value,
|
|
3133
|
+
"1cf4324b": n(He),
|
|
3134
|
+
"142c3306": mt.value,
|
|
3135
|
+
"173bb850": At.value,
|
|
3136
|
+
"09329520": _t.value,
|
|
3137
|
+
"1d56e575": n(S),
|
|
3138
|
+
fa5007fe: n(y),
|
|
3139
|
+
"3238911d": n(Ze),
|
|
3140
|
+
"9ffc6e5a": Bt.value,
|
|
3141
|
+
"1504fdbb": n(Ue),
|
|
3142
|
+
"04e411f1": Nt.value,
|
|
3143
|
+
"0b4ce167": Xt.value,
|
|
3144
|
+
"2ac1d057": n(je),
|
|
3145
|
+
c561c91a: n(dt),
|
|
3146
|
+
37357925: n(ct),
|
|
3147
|
+
"50d52b26": n(oe),
|
|
3148
|
+
"68e66c32": g.value,
|
|
3149
|
+
"52ffe80d": B.value,
|
|
3150
|
+
"0b2859cc": Mt.value,
|
|
3151
|
+
"4b7d69f5": zt.value,
|
|
3152
|
+
"3ab9e64f": Ht.value,
|
|
3153
|
+
"6f6352ab": t.styleButtonColor
|
|
3154
3154
|
}));
|
|
3155
3155
|
const C = nl(
|
|
3156
3156
|
() => import("@vlalg-nimbus/nb-calendar").then((t) => t.Calendar ? t.Calendar : t.default && t.default.Calendar ? t.default.Calendar : t.default)
|
|
@@ -3214,7 +3214,7 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3214
3214
|
labelBackground: Ge,
|
|
3215
3215
|
labelPadding: ue,
|
|
3216
3216
|
labelBorderRadius: d,
|
|
3217
|
-
labelLeft:
|
|
3217
|
+
labelLeft: b,
|
|
3218
3218
|
inputLabelMarginActive: ce,
|
|
3219
3219
|
labelActiveTop: Y,
|
|
3220
3220
|
labelActiveLeft: ee,
|
|
@@ -3233,14 +3233,14 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3233
3233
|
try {
|
|
3234
3234
|
const t = JSON.parse(h.value);
|
|
3235
3235
|
if (t && (t.startDate || t.endDate)) {
|
|
3236
|
-
const l = (
|
|
3237
|
-
if (!
|
|
3236
|
+
const l = (s) => {
|
|
3237
|
+
if (!s)
|
|
3238
3238
|
return null;
|
|
3239
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
3240
|
-
const [
|
|
3241
|
-
return new Date(
|
|
3239
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(s)) {
|
|
3240
|
+
const [i, f, c] = s.split("-").map(Number);
|
|
3241
|
+
return new Date(i, f - 1, c);
|
|
3242
3242
|
}
|
|
3243
|
-
return new Date(
|
|
3243
|
+
return new Date(s);
|
|
3244
3244
|
};
|
|
3245
3245
|
return {
|
|
3246
3246
|
startDate: t.startDate ? l(t.startDate) : null,
|
|
@@ -3250,75 +3250,75 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3250
3250
|
} catch {
|
|
3251
3251
|
}
|
|
3252
3252
|
if (k.value === "date" && typeof h.value == "string" && /^\d{4}-\d{2}-\d{2}$/.test(h.value)) {
|
|
3253
|
-
const [t, l,
|
|
3254
|
-
return new Date(t, l - 1,
|
|
3253
|
+
const [t, l, s] = h.value.split("-").map(Number);
|
|
3254
|
+
return new Date(t, l - 1, s);
|
|
3255
3255
|
}
|
|
3256
3256
|
return h.value;
|
|
3257
|
-
}), rt = (t, l,
|
|
3257
|
+
}), rt = (t, l, s) => {
|
|
3258
3258
|
if (!t)
|
|
3259
3259
|
return "";
|
|
3260
|
-
const
|
|
3260
|
+
const i = s || Xe.value;
|
|
3261
3261
|
if (l === "date") {
|
|
3262
3262
|
if (Ce.value && typeof t == "string" && t.startsWith("{"))
|
|
3263
3263
|
try {
|
|
3264
|
-
const
|
|
3265
|
-
if (
|
|
3264
|
+
const f = JSON.parse(t);
|
|
3265
|
+
if (f && (f.startDate || f.endDate)) {
|
|
3266
3266
|
const c = (A) => {
|
|
3267
3267
|
if (!A)
|
|
3268
3268
|
return "";
|
|
3269
3269
|
if (/^\d{4}-\d{2}-\d{2}$/.test(A)) {
|
|
3270
3270
|
const [D, q, re] = A.split("-");
|
|
3271
|
-
return
|
|
3271
|
+
return i === "pt-BR" ? `${re}/${q}/${D}` : `${q}/${re}/${D}`;
|
|
3272
3272
|
}
|
|
3273
3273
|
return A;
|
|
3274
|
-
},
|
|
3275
|
-
if (
|
|
3276
|
-
return `${
|
|
3277
|
-
if (
|
|
3278
|
-
return
|
|
3274
|
+
}, v = c(f.startDate), x = c(f.endDate);
|
|
3275
|
+
if (v && x)
|
|
3276
|
+
return `${v} - ${x}`;
|
|
3277
|
+
if (v)
|
|
3278
|
+
return v;
|
|
3279
3279
|
if (x)
|
|
3280
3280
|
return x;
|
|
3281
3281
|
}
|
|
3282
3282
|
} catch {
|
|
3283
3283
|
}
|
|
3284
3284
|
if (typeof t == "string" && /^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
3285
|
-
const [
|
|
3286
|
-
return
|
|
3285
|
+
const [f, c, v] = t.split("-");
|
|
3286
|
+
return i === "pt-BR" ? `${v}/${c}/${f}` : `${c}/${v}/${f}`;
|
|
3287
3287
|
}
|
|
3288
3288
|
return t;
|
|
3289
3289
|
} else if (l === "datetime-local") {
|
|
3290
3290
|
if (typeof t == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/.test(t)) {
|
|
3291
|
-
const [
|
|
3292
|
-
return
|
|
3291
|
+
const [f, c] = t.split("T"), [v, x, A] = f.split("-");
|
|
3292
|
+
return i === "pt-BR" ? `${A}/${x}/${v} ${c}` : `${x}/${A}/${v} ${c}`;
|
|
3293
3293
|
}
|
|
3294
3294
|
return t;
|
|
3295
3295
|
} else if (l === "month") {
|
|
3296
3296
|
if (typeof t == "string" && /^\d{4}-\d{2}$/.test(t)) {
|
|
3297
|
-
const [
|
|
3298
|
-
return `${c}/${
|
|
3297
|
+
const [f, c] = t.split("-");
|
|
3298
|
+
return `${c}/${f}`;
|
|
3299
3299
|
}
|
|
3300
3300
|
return t;
|
|
3301
3301
|
} else if (l === "week") {
|
|
3302
3302
|
if (typeof t == "string" && /^\d{4}-W\d{2}$/i.test(t)) {
|
|
3303
|
-
const
|
|
3304
|
-
if (
|
|
3305
|
-
return
|
|
3303
|
+
const f = t.match(/^(\d{4})-W(\d{2})$/i);
|
|
3304
|
+
if (f)
|
|
3305
|
+
return i === "pt-BR" ? `Semana ${f[2]} de ${f[1]}` : `Week ${f[2]} of ${f[1]}`;
|
|
3306
3306
|
}
|
|
3307
3307
|
return t;
|
|
3308
3308
|
}
|
|
3309
3309
|
return t;
|
|
3310
|
-
}, H = (t, l,
|
|
3310
|
+
}, H = (t, l, s) => {
|
|
3311
3311
|
if (!t || !t.trim())
|
|
3312
3312
|
return "";
|
|
3313
|
-
const
|
|
3313
|
+
const i = t.trim(), f = s || Xe.value;
|
|
3314
3314
|
if (l === "date") {
|
|
3315
|
-
if (Ce.value &&
|
|
3316
|
-
const c =
|
|
3315
|
+
if (Ce.value && i.includes("-")) {
|
|
3316
|
+
const c = i.split(/\s*-\s*/).map((D) => D.trim()), v = (D) => {
|
|
3317
3317
|
if (!D)
|
|
3318
3318
|
return null;
|
|
3319
3319
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(D)) {
|
|
3320
3320
|
const q = D.split("/");
|
|
3321
|
-
if (
|
|
3321
|
+
if (f === "pt-BR") {
|
|
3322
3322
|
const [re, ze, tt] = q, De = re.padStart(2, "0"), Ie = ze.padStart(2, "0");
|
|
3323
3323
|
return `${tt}-${Ie}-${De}`;
|
|
3324
3324
|
} else {
|
|
@@ -3331,7 +3331,7 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3331
3331
|
}
|
|
3332
3332
|
return null;
|
|
3333
3333
|
};
|
|
3334
|
-
let x =
|
|
3334
|
+
let x = v(c[0]), A = c[1] ? v(c[1]) : null;
|
|
3335
3335
|
if (x && A) {
|
|
3336
3336
|
const D = new Date(x);
|
|
3337
3337
|
if (new Date(A) < D) {
|
|
@@ -3343,56 +3343,56 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3343
3343
|
return JSON.stringify({ startDate: x, endDate: null });
|
|
3344
3344
|
return "";
|
|
3345
3345
|
}
|
|
3346
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(
|
|
3347
|
-
const c =
|
|
3348
|
-
if (
|
|
3349
|
-
const [
|
|
3346
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(i)) {
|
|
3347
|
+
const c = i.split("/");
|
|
3348
|
+
if (f === "pt-BR") {
|
|
3349
|
+
const [v, x, A] = c, D = v.padStart(2, "0"), q = x.padStart(2, "0");
|
|
3350
3350
|
return `${A}-${q}-${D}`;
|
|
3351
3351
|
} else {
|
|
3352
|
-
const [
|
|
3352
|
+
const [v, x, A] = c, D = x.padStart(2, "0"), q = v.padStart(2, "0");
|
|
3353
3353
|
return `${A}-${q}-${D}`;
|
|
3354
3354
|
}
|
|
3355
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
3356
|
-
const c =
|
|
3357
|
-
return `${
|
|
3355
|
+
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(i)) {
|
|
3356
|
+
const c = i.split("-"), [v, x, A] = c, D = A.padStart(2, "0"), q = x.padStart(2, "0");
|
|
3357
|
+
return `${v}-${q}-${D}`;
|
|
3358
3358
|
}
|
|
3359
3359
|
return "";
|
|
3360
3360
|
} else if (l === "datetime-local") {
|
|
3361
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(
|
|
3362
|
-
const [c,
|
|
3363
|
-
if (
|
|
3364
|
-
const [A, D, q] = x, re = A.padStart(2, "0"), ze = D.padStart(2, "0"), De =
|
|
3361
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(i)) {
|
|
3362
|
+
const [c, v] = i.split(" "), x = c.split("/");
|
|
3363
|
+
if (f === "pt-BR") {
|
|
3364
|
+
const [A, D, q] = x, re = A.padStart(2, "0"), ze = D.padStart(2, "0"), De = v.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3365
3365
|
return `${q}-${ze}-${re}T${De}`;
|
|
3366
3366
|
} else {
|
|
3367
|
-
const [A, D, q] = x, re = D.padStart(2, "0"), ze = A.padStart(2, "0"), De =
|
|
3367
|
+
const [A, D, q] = x, re = D.padStart(2, "0"), ze = A.padStart(2, "0"), De = v.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3368
3368
|
return `${q}-${ze}-${re}T${De}`;
|
|
3369
3369
|
}
|
|
3370
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(
|
|
3371
|
-
const [c,
|
|
3370
|
+
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(i)) {
|
|
3371
|
+
const [c, v] = i.split("T"), x = c.split("-"), [A, D, q] = x, re = q.padStart(2, "0"), ze = D.padStart(2, "0"), De = v.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3372
3372
|
return `${A}-${ze}-${re}T${De}`;
|
|
3373
3373
|
}
|
|
3374
3374
|
return "";
|
|
3375
3375
|
} else if (l === "month") {
|
|
3376
|
-
if (/^\d{1,2}\/\d{4}$/.test(
|
|
3377
|
-
const [c,
|
|
3378
|
-
return `${
|
|
3379
|
-
} else if (/^\d{4}-\d{1,2}$/.test(
|
|
3380
|
-
const [c,
|
|
3376
|
+
if (/^\d{1,2}\/\d{4}$/.test(i)) {
|
|
3377
|
+
const [c, v] = i.split("/"), x = c.padStart(2, "0");
|
|
3378
|
+
return `${v}-${x}`;
|
|
3379
|
+
} else if (/^\d{4}-\d{1,2}$/.test(i)) {
|
|
3380
|
+
const [c, v] = i.split("-"), x = v.padStart(2, "0");
|
|
3381
3381
|
return `${c}-${x}`;
|
|
3382
3382
|
}
|
|
3383
3383
|
return "";
|
|
3384
3384
|
} else if (l === "week") {
|
|
3385
|
-
if (/^\d{4}-W\d{2}$/i.test(
|
|
3386
|
-
return
|
|
3387
|
-
const c =
|
|
3385
|
+
if (/^\d{4}-W\d{2}$/i.test(i))
|
|
3386
|
+
return i.toUpperCase();
|
|
3387
|
+
const c = i.match(/semana\s+W?(\d{2})\s+de\s+(\d{4})/i);
|
|
3388
3388
|
if (c)
|
|
3389
3389
|
return `${c[2]}-W${c[1]}`;
|
|
3390
|
-
const
|
|
3391
|
-
return
|
|
3390
|
+
const v = i.match(/week\s+W?(\d{2})\s+of\s+(\d{4})/i);
|
|
3391
|
+
return v ? `${v[2]}-W${v[1]}` : "";
|
|
3392
3392
|
}
|
|
3393
|
-
return
|
|
3393
|
+
return i;
|
|
3394
3394
|
}, N = Q(!1), te = Q({ top: 0, left: 0 }), $ = Q(null), z = Q(null), ae = a(() => gt.value === !0), W = a(() => {
|
|
3395
|
-
const t = R.value ? "component-disabled" : "", l = ve.value !== "b" ? "inline-block" : "block",
|
|
3395
|
+
const t = R.value ? "component-disabled" : "", l = ve.value !== "b" ? "inline-block" : "block", s = J.value ? J.value : "", i = Pe.value ? Pe.value : "", f = Be.value ? Be.value : "", c = le.value ? le.value : !1, v = G.value !== 0 && !G.value || G.value < 0 ? 0 : G.value, x = ne.value ? ne.value : "'Lato', sans-serif", A = se.value ? se.value : "1.4em", D = K.value !== 0 && !K.value || K.value < 0 ? 100 : K.value, q = Ve.value ? Ve.value : "'Lato', sans-serif", re = de.value ? de.value : "1em", ze = F.value !== 0 && !F.value || F.value < 0 ? 100 : F.value, tt = pe.value ? pe.value : "#f15574", De = X.value ? X.value : 200, Ie = be.value ? be.value : "normal", ha = "sm", Ca = _.value ? _.value : !1, xa = k.value ? k.value : "date", Sa = Ae.value ? Ae.value : !1, Va = ke.value ? ke.value : "normal", ka = oe.value ? oe.value : "left", La = me.value ? me.value : "background", Ta = $e.value ? $e.value : !1, Ba = b.value !== 0 && !b.value || b.value < 0 ? 5 : b.value, Aa = Ge.value ? Ge.value : "transparent", _a = ce.value !== 0 && !ce.value || ce.value < 0 ? 15 : ce.value, $a = ue.value ? ue.value : "1px 5px", wa = d.value !== 0 && !d.value || d.value < 0 ? 0 : d.value, Ra = Y.value === null || Y.value === void 0 ? -13 : Y.value, Ma = ee.value === null || ee.value === void 0 ? -10 : ee.value, za = we.value ? we.value : "'Lato', sans-serif", Da = Re.value ? Re.value : "1em", Ia = Ee.value ? Ee.value : "0.8em", Na = Ke.value ? Ke.value : 400, Wa = et.value ? et.value : "#ffffff", Pa = ut.value ? ut.value : "#000000", Ea = ot.value ? ot.value : "#ffffff", Fa = ft.value ? ft.value : "#000000";
|
|
3396
3396
|
return {
|
|
3397
3397
|
disabled: t,
|
|
3398
3398
|
display: l,
|
|
@@ -3403,11 +3403,11 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3403
3403
|
fontSizeMsg: re,
|
|
3404
3404
|
fontWeightMsg: ze,
|
|
3405
3405
|
textMessageColor: tt,
|
|
3406
|
-
caretColor:
|
|
3407
|
-
selectionBgColor:
|
|
3408
|
-
selectionTextColor:
|
|
3406
|
+
caretColor: s,
|
|
3407
|
+
selectionBgColor: i,
|
|
3408
|
+
selectionTextColor: f,
|
|
3409
3409
|
hasBorderRadius: c,
|
|
3410
|
-
borderRadius:
|
|
3410
|
+
borderRadius: v,
|
|
3411
3411
|
textAlign: ka,
|
|
3412
3412
|
inputWidth: De,
|
|
3413
3413
|
activeTextStyle: Ie,
|
|
@@ -3489,16 +3489,16 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3489
3489
|
}
|
|
3490
3490
|
}), Qt = a(() => W.value.inputReadonly ? "component__input--read-only" : ""), Jt = a(() => W.value.inputUppercase ? "component__input--uppercase" : ""), Lt = a(() => qe.value ? qe.value : `${xe.value}-name-label`), It = a(() => ""), r = a(() => T.value || M.value && M.value.trim().length > 0), u = a(() => !M.value || M.value.trim().length === 0 ? "component__input--empty" : "");
|
|
3491
3491
|
a(() => T.value ? "component__input--active" : "component__input--no-active");
|
|
3492
|
-
const
|
|
3492
|
+
const g = a(() => "6px 10px"), P = a(() => !!(Z.value && ge.value)), Oe = a(() => {
|
|
3493
3493
|
const t = {};
|
|
3494
|
-
ie.value && Object.keys(ie.value).forEach((
|
|
3494
|
+
ie.value && Object.keys(ie.value).forEach((i) => t[`aria-${i}`] = ie.value[i]);
|
|
3495
3495
|
const l = {
|
|
3496
3496
|
"aria-label": Se.value,
|
|
3497
3497
|
"aria-disabled": R.value,
|
|
3498
3498
|
...t
|
|
3499
3499
|
};
|
|
3500
3500
|
return Object.fromEntries(
|
|
3501
|
-
Object.entries(l).filter(([
|
|
3501
|
+
Object.entries(l).filter(([s, i]) => i != null)
|
|
3502
3502
|
);
|
|
3503
3503
|
}), Nt = a(() => {
|
|
3504
3504
|
const t = ke.value === "dark" ? Ze.value : dt.value, l = ke.value === "dark" ? S.value : He.value;
|
|
@@ -3507,12 +3507,12 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3507
3507
|
const t = ke.value === "dark" ? Ue.value : ct.value, l = ke.value === "dark" ? S.value : He.value;
|
|
3508
3508
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
3509
3509
|
}), ht = a(() => {
|
|
3510
|
-
const t = W.value, l = r.value,
|
|
3510
|
+
const t = W.value, l = r.value, s = l ? t.lightTextColorLabelActive : t.lightTextColorLabel, i = l ? t.darkTextColorLabelActive : t.darkTextColorLabel;
|
|
3511
3511
|
return {
|
|
3512
3512
|
fontFamily: t.fontFamilyLabel,
|
|
3513
3513
|
fontSize: l ? t.fontSizeLabelActive : t.fontSizeLabel,
|
|
3514
3514
|
fontWeight: t.fontWeightLabel,
|
|
3515
|
-
color: t.theme === "dark" ?
|
|
3515
|
+
color: t.theme === "dark" ? i : s,
|
|
3516
3516
|
top: l ? `${t.labelActiveTop}px` : "50%",
|
|
3517
3517
|
left: l ? `${t.labelActiveLeft}px` : `${t.labelLeft}px`,
|
|
3518
3518
|
transform: l ? "translateY(0)" : "translateY(-50%)",
|
|
@@ -3555,19 +3555,19 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3555
3555
|
}));
|
|
3556
3556
|
}, la = (t) => {
|
|
3557
3557
|
t.relatedTarget && z.value && z.value.contains(t.relatedTarget) || setTimeout(() => {
|
|
3558
|
-
var
|
|
3558
|
+
var i;
|
|
3559
3559
|
const l = document.activeElement;
|
|
3560
3560
|
if (N.value) {
|
|
3561
3561
|
if (z.value && z.value.contains(l) || t.relatedTarget && z.value && z.value.contains(t.relatedTarget))
|
|
3562
3562
|
return;
|
|
3563
3563
|
if (l === document.body && z.value) {
|
|
3564
|
-
const
|
|
3565
|
-
if (Array.from(
|
|
3564
|
+
const f = z.value.querySelectorAll('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
3565
|
+
if (Array.from(f).some((v) => v === document.activeElement || v.contains(document.activeElement)))
|
|
3566
3566
|
return;
|
|
3567
3567
|
}
|
|
3568
3568
|
}
|
|
3569
|
-
const
|
|
3570
|
-
|
|
3569
|
+
const s = (i = $.value) == null ? void 0 : i.closest(".component");
|
|
3570
|
+
s && s.contains(l) || $.value !== l && (T.value = !1, N.value = !1, E("blurred"));
|
|
3571
3571
|
}, 200);
|
|
3572
3572
|
}, na = () => {
|
|
3573
3573
|
ae.value && (N.value, N.value = !1, requestAnimationFrame(() => {
|
|
@@ -3576,8 +3576,8 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3576
3576
|
}, $t = (t) => {
|
|
3577
3577
|
if (!t || !(t instanceof Date))
|
|
3578
3578
|
return null;
|
|
3579
|
-
const l = t.getFullYear(),
|
|
3580
|
-
return `${l}-${
|
|
3579
|
+
const l = t.getFullYear(), s = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0");
|
|
3580
|
+
return `${l}-${s}-${i}`;
|
|
3581
3581
|
}, oa = (t) => {
|
|
3582
3582
|
let l = "";
|
|
3583
3583
|
if (!t)
|
|
@@ -3586,19 +3586,19 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3586
3586
|
if (t.startDate === null && t.endDate === null)
|
|
3587
3587
|
l = "";
|
|
3588
3588
|
else if (t.startDate || t.endDate) {
|
|
3589
|
-
const
|
|
3589
|
+
const i = {
|
|
3590
3590
|
// Converter startDate para string ISO se existir
|
|
3591
3591
|
startDate: t.startDate ? $t(t.startDate) : null,
|
|
3592
3592
|
// Converter endDate para string ISO se existir
|
|
3593
3593
|
endDate: t.endDate ? $t(t.endDate) : null
|
|
3594
3594
|
};
|
|
3595
|
-
l = JSON.stringify(
|
|
3595
|
+
l = JSON.stringify(i);
|
|
3596
3596
|
}
|
|
3597
3597
|
} else
|
|
3598
3598
|
k.value === "date" ? t instanceof Date ? l = $t(t) : typeof t == "string" && (l = t) : (k.value === "month" || k.value === "time" || k.value === "datetime-local" || k.value === "week") && (l = typeof t == "string" ? t : "");
|
|
3599
3599
|
Qe = !0, h.value = l;
|
|
3600
|
-
const
|
|
3601
|
-
M.value =
|
|
3600
|
+
const s = l ? rt(l, k.value) : "";
|
|
3601
|
+
M.value = s, V.value = s;
|
|
3602
3602
|
}, ua = () => {
|
|
3603
3603
|
if (!ae.value) {
|
|
3604
3604
|
h.value = M.value;
|
|
@@ -3616,34 +3616,34 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3616
3616
|
return;
|
|
3617
3617
|
}
|
|
3618
3618
|
if (k.value === "date") {
|
|
3619
|
-
const
|
|
3619
|
+
const i = Ce.value ? /^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$|^\d{1,2}\/\d{1,2}\/\d{4}\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})?$/ : /^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/;
|
|
3620
3620
|
if (Ce.value) {
|
|
3621
|
-
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/), l.length > 23 && !
|
|
3621
|
+
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/), l.length > 23 && !i.test(l)) {
|
|
3622
3622
|
M.value = V.value, t && $.value && ya(() => {
|
|
3623
|
-
const
|
|
3624
|
-
$.value.setSelectionRange(
|
|
3623
|
+
const f = Math.min(t.start, V.value.length);
|
|
3624
|
+
$.value.setSelectionRange(f, f);
|
|
3625
3625
|
}), setTimeout(() => {
|
|
3626
3626
|
w = !1;
|
|
3627
3627
|
}, 50);
|
|
3628
3628
|
return;
|
|
3629
3629
|
}
|
|
3630
|
-
if (!
|
|
3630
|
+
if (!i.test(l) && l.length <= 23) {
|
|
3631
3631
|
setTimeout(() => {
|
|
3632
3632
|
w = !1;
|
|
3633
3633
|
}, 50);
|
|
3634
3634
|
return;
|
|
3635
3635
|
}
|
|
3636
3636
|
} else {
|
|
3637
|
-
if (l.length > 10 && !
|
|
3637
|
+
if (l.length > 10 && !i.test(l)) {
|
|
3638
3638
|
M.value = V.value, t && $.value && ya(() => {
|
|
3639
|
-
const
|
|
3640
|
-
$.value.setSelectionRange(
|
|
3639
|
+
const f = Math.min(t.start, V.value.length);
|
|
3640
|
+
$.value.setSelectionRange(f, f);
|
|
3641
3641
|
}), setTimeout(() => {
|
|
3642
3642
|
w = !1;
|
|
3643
3643
|
}, 50);
|
|
3644
3644
|
return;
|
|
3645
3645
|
}
|
|
3646
|
-
if (!
|
|
3646
|
+
if (!i.test(l) && l.length <= 10) {
|
|
3647
3647
|
setTimeout(() => {
|
|
3648
3648
|
w = !1;
|
|
3649
3649
|
}, 50);
|
|
@@ -3651,12 +3651,12 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3651
3651
|
}
|
|
3652
3652
|
}
|
|
3653
3653
|
}
|
|
3654
|
-
let
|
|
3654
|
+
let s = null;
|
|
3655
3655
|
if (k.value === "date")
|
|
3656
3656
|
if (Ce.value)
|
|
3657
3657
|
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/))
|
|
3658
|
-
if (
|
|
3659
|
-
Qe = !0, h.value =
|
|
3658
|
+
if (s = H(l, k.value), s && s !== h.value)
|
|
3659
|
+
Qe = !0, h.value = s, V.value = l;
|
|
3660
3660
|
else {
|
|
3661
3661
|
setTimeout(() => {
|
|
3662
3662
|
w = !1;
|
|
@@ -3664,11 +3664,11 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3664
3664
|
return;
|
|
3665
3665
|
}
|
|
3666
3666
|
else if (l.includes("-")) {
|
|
3667
|
-
const
|
|
3668
|
-
if (
|
|
3669
|
-
const c =
|
|
3670
|
-
if (
|
|
3671
|
-
const x = JSON.stringify({ startDate:
|
|
3667
|
+
const f = l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*$/);
|
|
3668
|
+
if (f) {
|
|
3669
|
+
const c = f[1], v = H(c, k.value);
|
|
3670
|
+
if (v) {
|
|
3671
|
+
const x = JSON.stringify({ startDate: v, endDate: null });
|
|
3672
3672
|
x !== h.value && (Qe = !0, h.value = x, V.value = l);
|
|
3673
3673
|
} else {
|
|
3674
3674
|
V.value = l, setTimeout(() => {
|
|
@@ -3683,8 +3683,8 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3683
3683
|
return;
|
|
3684
3684
|
}
|
|
3685
3685
|
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
3686
|
-
if (
|
|
3687
|
-
const c = JSON.stringify({ startDate:
|
|
3686
|
+
if (s = H(l, k.value), s) {
|
|
3687
|
+
const c = JSON.stringify({ startDate: s, endDate: null });
|
|
3688
3688
|
c !== h.value && (Qe = !0, h.value = c, V.value = l);
|
|
3689
3689
|
} else {
|
|
3690
3690
|
V.value = l, setTimeout(() => {
|
|
@@ -3699,7 +3699,7 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3699
3699
|
return;
|
|
3700
3700
|
}
|
|
3701
3701
|
else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
3702
|
-
|
|
3702
|
+
s = H(l, k.value), s && s !== h.value && (Qe = !0, h.value = s, V.value = l);
|
|
3703
3703
|
else {
|
|
3704
3704
|
setTimeout(() => {
|
|
3705
3705
|
w = !1;
|
|
@@ -3707,17 +3707,17 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3707
3707
|
return;
|
|
3708
3708
|
}
|
|
3709
3709
|
else
|
|
3710
|
-
|
|
3710
|
+
s = H(l, k.value), s && s !== h.value && (Qe = !0, h.value = s, V.value = l);
|
|
3711
3711
|
setTimeout(() => {
|
|
3712
3712
|
w = !1;
|
|
3713
3713
|
}, 50);
|
|
3714
3714
|
}, ra = (t) => {
|
|
3715
3715
|
}, Et = (t) => {
|
|
3716
|
-
var
|
|
3716
|
+
var f;
|
|
3717
3717
|
if (!N.value || !z.value || !$.value)
|
|
3718
3718
|
return;
|
|
3719
|
-
const l = t.target;
|
|
3720
|
-
if (
|
|
3719
|
+
const l = t.target, s = (f = $.value) == null ? void 0 : f.closest(".nb-wrapper");
|
|
3720
|
+
if (z.value && z.value.contains(l) || t.defaultPrevented || t.cancelBubble || z.value && z.value.contains(l))
|
|
3721
3721
|
return;
|
|
3722
3722
|
let i = l;
|
|
3723
3723
|
for (; i && i !== document.body; ) {
|
|
@@ -3735,7 +3735,8 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3735
3735
|
}
|
|
3736
3736
|
if (!document.body.contains(l))
|
|
3737
3737
|
return;
|
|
3738
|
-
$.value && (l === $.value || $.value.contains(l))
|
|
3738
|
+
const c = $.value && (l === $.value || $.value.contains(l)), v = s && (l === s || s.contains(l));
|
|
3739
|
+
!c && !v && (N.value = !1, (!M.value || M.value.trim().length === 0) && (T.value = !1));
|
|
3739
3740
|
}, 50);
|
|
3740
3741
|
}, Ft = () => {
|
|
3741
3742
|
N.value && ae.value && Ct();
|
|
@@ -3746,10 +3747,10 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3746
3747
|
const qt = () => {
|
|
3747
3748
|
if (!N.value || !ae.value || !$.value)
|
|
3748
3749
|
return;
|
|
3749
|
-
const t = 4, l = $.value.getBoundingClientRect(),
|
|
3750
|
-
(xt.top !==
|
|
3751
|
-
top:
|
|
3752
|
-
left:
|
|
3750
|
+
const t = 4, l = $.value.getBoundingClientRect(), s = `${l.bottom + t}px`, i = `${l.left}px`;
|
|
3751
|
+
(xt.top !== s || xt.left !== i) && (xt.top = s, xt.left = i, te.value = {
|
|
3752
|
+
top: s,
|
|
3753
|
+
left: i
|
|
3753
3754
|
}), Tt = requestAnimationFrame(qt);
|
|
3754
3755
|
}, o = () => {
|
|
3755
3756
|
if (!$.value || !ae.value)
|
|
@@ -3759,17 +3760,17 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3759
3760
|
}), bt.observe($.value);
|
|
3760
3761
|
const t = $.value.closest(".component");
|
|
3761
3762
|
t && bt.observe(t);
|
|
3762
|
-
},
|
|
3763
|
+
}, p = () => {
|
|
3763
3764
|
Tt !== null && (cancelAnimationFrame(Tt), Tt = null), bt && (bt.disconnect(), bt = null);
|
|
3764
3765
|
};
|
|
3765
3766
|
U(N, (t) => {
|
|
3766
3767
|
t && ae.value ? ya(() => {
|
|
3767
3768
|
o();
|
|
3768
|
-
}) :
|
|
3769
|
+
}) : p();
|
|
3769
3770
|
}), sa(() => {
|
|
3770
3771
|
h.value = _e.value, M.value = rt(_e.value, k.value), document.addEventListener("click", Et, !1), window.addEventListener("scroll", Ft, { capture: !0, passive: !0 }), window.addEventListener("resize", Ot);
|
|
3771
3772
|
}), ma(() => {
|
|
3772
|
-
Wt(),
|
|
3773
|
+
Wt(), p(), document.removeEventListener("click", Et), window.removeEventListener("scroll", Ft, { capture: !0, passive: !0 }), window.removeEventListener("resize", Ot);
|
|
3773
3774
|
}), U(k, (t) => {
|
|
3774
3775
|
Fe.value = t;
|
|
3775
3776
|
}, { immediate: !0 }), U(Xe, () => {
|
|
@@ -3799,16 +3800,16 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3799
3800
|
try {
|
|
3800
3801
|
const l = JSON.parse(t);
|
|
3801
3802
|
if (l && (l.startDate || l.endDate)) {
|
|
3802
|
-
const
|
|
3803
|
+
const s = (c) => {
|
|
3803
3804
|
if (!c)
|
|
3804
3805
|
return null;
|
|
3805
3806
|
if (/^\d{4}-\d{2}-\d{2}$/.test(c)) {
|
|
3806
|
-
const [
|
|
3807
|
-
return new Date(
|
|
3807
|
+
const [v, x, A] = c.split("-").map(Number);
|
|
3808
|
+
return new Date(v, x - 1, A);
|
|
3808
3809
|
}
|
|
3809
3810
|
return new Date(c);
|
|
3810
|
-
},
|
|
3811
|
-
E("changed", { startDate:
|
|
3811
|
+
}, i = l.startDate ? s(l.startDate) : null, f = l.endDate ? s(l.endDate) : null;
|
|
3812
|
+
E("changed", { startDate: i, endDate: f });
|
|
3812
3813
|
return;
|
|
3813
3814
|
}
|
|
3814
3815
|
} catch {
|
|
@@ -3840,11 +3841,11 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3840
3841
|
pa(fe("input", {
|
|
3841
3842
|
ref_key: "inputRef",
|
|
3842
3843
|
ref: $,
|
|
3843
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
3844
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => M.value = s),
|
|
3844
3845
|
onInput: ua,
|
|
3845
3846
|
onKeydown: [
|
|
3846
3847
|
Ye,
|
|
3847
|
-
l[1] || (l[1] = jt((
|
|
3848
|
+
l[1] || (l[1] = jt((s) => !n(R) && n(Te) && ea(), ["enter"]))
|
|
3848
3849
|
],
|
|
3849
3850
|
id: Lt.value,
|
|
3850
3851
|
name: Lt.value,
|
|
@@ -3887,8 +3888,8 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3887
3888
|
ref: z,
|
|
3888
3889
|
class: "datepicker__custom-calendar-wrapper",
|
|
3889
3890
|
style: We(ta.value),
|
|
3890
|
-
onClick: l[4] || (l[4] = ca((
|
|
3891
|
-
onMousedown: l[5] || (l[5] = ca((
|
|
3891
|
+
onClick: l[4] || (l[4] = ca((s) => ye.value = !0, ["stop"])),
|
|
3892
|
+
onMousedown: l[5] || (l[5] = ca((s) => ye.value = !0, ["stop"]))
|
|
3892
3893
|
}, [
|
|
3893
3894
|
rl(n(C), {
|
|
3894
3895
|
"nb-id": `${n(xe)}-calendar`,
|
|
@@ -3904,14 +3905,14 @@ const Pl = ["id"], El = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3904
3905
|
"allow-range": n(Ce),
|
|
3905
3906
|
onChanged: oa,
|
|
3906
3907
|
onDateSelected: ra,
|
|
3907
|
-
onMousedown: l[2] || (l[2] = (
|
|
3908
|
-
onClick: l[3] || (l[3] = (
|
|
3908
|
+
onMousedown: l[2] || (l[2] = (s) => ye.value = !0),
|
|
3909
|
+
onClick: l[3] || (l[3] = (s) => ye.value = !0)
|
|
3909
3910
|
}, null, 8, ["nb-id", "value", "input-type", "min", "max", "step", "disabled", "width", "locale", "theme", "allow-range"])
|
|
3910
3911
|
], 36)) : Le("", !0)
|
|
3911
3912
|
]))
|
|
3912
3913
|
], 16)) : Le("", !0);
|
|
3913
3914
|
}
|
|
3914
|
-
}), ql = /* @__PURE__ */ ba(Ol, [["__scopeId", "data-v-
|
|
3915
|
+
}), ql = /* @__PURE__ */ ba(Ol, [["__scopeId", "data-v-60143faf"]]), Oa = {
|
|
3915
3916
|
NbInputRadio: fl,
|
|
3916
3917
|
NbInputCheckbox: yl,
|
|
3917
3918
|
NbInput: Tl,
|