@vlalg-nimbus/nb-inputs 8.0.14 → 8.0.15
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 +1041 -1031
- 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,10 +1,10 @@
|
|
|
1
|
-
import { useCssVars as fa, onMounted as sa, ref as
|
|
1
|
+
import { useCssVars as fa, onMounted as sa, ref as Q, toRefs as va, computed as a, watch as H, openBlock as F, createElementBlock as q, normalizeClass as We, normalizeStyle as Ee, createElementVNode as ve, mergeProps as da, Fragment as qa, renderList as ja, unref as o, withDirectives as pa, vModelRadio as ll, withKeys as qt, withModifiers as ca, toDisplayString as xt, createCommentVNode as Be, vModelCheckbox as nl, onUnmounted as ma, renderSlot as ia, createTextVNode as ga, vModelDynamic as Ha, vModelText as Ua, defineAsyncComponent as ol, nextTick as ya, createBlock as ul, Teleport as rl, createVNode as il } from "vue";
|
|
2
2
|
const ba = (e, m) => {
|
|
3
3
|
const C = e.__vccOpts || e;
|
|
4
|
-
for (const [
|
|
5
|
-
C[
|
|
4
|
+
for (const [E, D] of m)
|
|
5
|
+
C[E] = D;
|
|
6
6
|
return C;
|
|
7
|
-
},
|
|
7
|
+
}, sl = ["id"], dl = ["id", "disabled", "value", "name"], cl = ["for", "tabindex"], fl = /* @__PURE__ */ Object.assign({
|
|
8
8
|
name: "NbInputRadio",
|
|
9
9
|
inheritAttrs: !1
|
|
10
10
|
}, {
|
|
@@ -58,8 +58,8 @@ const ba = (e, m) => {
|
|
|
58
58
|
return !1;
|
|
59
59
|
let m = !1;
|
|
60
60
|
for (const C of e) {
|
|
61
|
-
const
|
|
62
|
-
|
|
61
|
+
const E = Object.keys(C);
|
|
62
|
+
E.length !== 2 && (m = !0), E.every((Ve) => ["value", "text"].includes(Ve)) || (m = !0);
|
|
63
63
|
}
|
|
64
64
|
if (!m)
|
|
65
65
|
return e;
|
|
@@ -157,137 +157,137 @@ const ba = (e, m) => {
|
|
|
157
157
|
"50426c15": ct.value,
|
|
158
158
|
"5fa7628c": dt.value,
|
|
159
159
|
"5949c3d2": Te.value,
|
|
160
|
-
91322790:
|
|
161
|
-
"6750fc92":
|
|
160
|
+
91322790: Je.value,
|
|
161
|
+
"6750fc92": at.value,
|
|
162
162
|
"8c592938": gt.value,
|
|
163
163
|
c11d4680: st.value,
|
|
164
|
-
"35b74fa6":
|
|
164
|
+
"35b74fa6": lt.value,
|
|
165
165
|
"7dd5f889": Se.value,
|
|
166
166
|
"5cb21b36": yt.value
|
|
167
167
|
})), sa(() => {
|
|
168
|
-
|
|
168
|
+
Xe();
|
|
169
169
|
});
|
|
170
|
-
const C = m,
|
|
170
|
+
const C = m, E = e, D = Q(null), {
|
|
171
171
|
ariaLabel: Ve,
|
|
172
172
|
ariaAttrs: pe,
|
|
173
173
|
currentOption: Ae,
|
|
174
174
|
valueType: ke,
|
|
175
175
|
display: se,
|
|
176
|
-
options:
|
|
176
|
+
options: J,
|
|
177
177
|
theme: Pe,
|
|
178
178
|
lightTextColor: _e,
|
|
179
179
|
lightColor: ne,
|
|
180
|
-
lightColorHover:
|
|
181
|
-
darkTextColor:
|
|
180
|
+
lightColorHover: U,
|
|
181
|
+
darkTextColor: w,
|
|
182
182
|
darkColor: oe,
|
|
183
183
|
darkColorHover: de,
|
|
184
|
-
hoverEffect:
|
|
184
|
+
hoverEffect: G,
|
|
185
185
|
activeHoverEffect: Le,
|
|
186
186
|
itemGap: ce,
|
|
187
|
-
internalGap:
|
|
187
|
+
internalGap: P,
|
|
188
188
|
scale: be,
|
|
189
|
-
disabled:
|
|
189
|
+
disabled: X,
|
|
190
190
|
fontFamily: Ce,
|
|
191
191
|
fontSize: ge,
|
|
192
192
|
fontWeight: xe
|
|
193
|
-
} = va(
|
|
194
|
-
const y =
|
|
193
|
+
} = va(E), _ = a(() => {
|
|
194
|
+
const y = X.value ? "component-disabled" : "", V = se.value !== "b" ? "inline-block" : "block", ue = Ce.value ? Ce.value : "'Lato', sans-serif", Z = ge.value ? ge.value : "1.6em", me = xe.value !== 0 && !xe.value || xe.value < 0 ? 200 : xe.value, Re = [!1, !0].includes(G.value) ? G.value : !1, Ye = [!1, !0].includes(Le.value) ? Le.value : !1, re = ce.value !== 0 && !ce.value || ce.value < 0 ? 15 : ce.value, c = P.value !== 0 && !P.value || P.value < 0 ? 6 : P.value, b = be.value !== 0 && !be.value || be.value < 0 ? 1 : be.value;
|
|
195
195
|
return {
|
|
196
196
|
disabled: y,
|
|
197
197
|
display: V,
|
|
198
198
|
hoverEffect: Re,
|
|
199
|
-
activeHoverEffect:
|
|
199
|
+
activeHoverEffect: Ye,
|
|
200
200
|
itemGap: re,
|
|
201
|
-
internalGap:
|
|
201
|
+
internalGap: c,
|
|
202
202
|
scale: b,
|
|
203
203
|
font: ue,
|
|
204
|
-
fontSize:
|
|
204
|
+
fontSize: Z,
|
|
205
205
|
fontWeight: me
|
|
206
206
|
};
|
|
207
207
|
}), L = a(() => _.value.disabled), x = a(() => ({
|
|
208
208
|
display: _.value.display
|
|
209
|
-
})), $e = a(() => _.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"),
|
|
209
|
+
})), $e = a(() => _.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), He = a(() => {
|
|
210
210
|
const y = _.value;
|
|
211
211
|
return {
|
|
212
212
|
fontSize: y.fontSize,
|
|
213
213
|
fontWeight: y.fontWeight
|
|
214
214
|
};
|
|
215
|
-
}), we = a(() => Array.isArray(
|
|
215
|
+
}), we = a(() => Array.isArray(J.value) && J.value.constructor === Array && J.value.length > 0), tt = a(() => Pe.value === "dark" ? "component__theme--dark" : "component__theme--light"), ye = a(() => _.value.font), at = a(() => _e.value), gt = a(() => ne.value), Je = a(() => _.value.hoverEffect ? U.value : ne.value), Te = a(() => _.value.activeHoverEffect ? U.value : ne.value), Se = a(() => w.value), yt = a(() => oe.value), lt = a(() => _.value.hoverEffect ? de.value : oe.value), st = a(() => _.value.activeHoverEffect ? de.value : oe.value), dt = a(() => {
|
|
216
216
|
const V = _.value.internalGap;
|
|
217
217
|
return !V || V < 0 ? 0 : `${V}px`;
|
|
218
218
|
}), ct = a(() => {
|
|
219
219
|
const V = _.value.itemGap;
|
|
220
220
|
return !V || V < 0 ? 0 : `${V}px`;
|
|
221
|
-
}),
|
|
221
|
+
}), Ue = a(() => ({
|
|
222
222
|
zoom: _.value.scale
|
|
223
|
-
})),
|
|
223
|
+
})), Ge = a(() => {
|
|
224
224
|
const y = {};
|
|
225
|
-
pe.value && Object.keys(pe.value).forEach((
|
|
225
|
+
pe.value && Object.keys(pe.value).forEach((Z) => y[`aria-${Z}`] = pe.value[Z]);
|
|
226
226
|
const V = {
|
|
227
227
|
"aria-label": Ve.value,
|
|
228
|
-
"aria-disabled":
|
|
228
|
+
"aria-disabled": X.value,
|
|
229
229
|
...y
|
|
230
230
|
};
|
|
231
231
|
return Object.fromEntries(
|
|
232
|
-
Object.entries(V).filter(([ue,
|
|
232
|
+
Object.entries(V).filter(([ue, Z]) => Z != null)
|
|
233
233
|
);
|
|
234
|
-
}),
|
|
234
|
+
}), Xe = () => {
|
|
235
235
|
const y = Ae.value;
|
|
236
|
-
y && ["string"].includes(ke.value) ?
|
|
237
|
-
},
|
|
236
|
+
y && ["string"].includes(ke.value) ? D.value = y.toString().toLowerCase() : D.value = y;
|
|
237
|
+
}, Ke = () => {
|
|
238
238
|
C("clicked");
|
|
239
239
|
};
|
|
240
|
-
return
|
|
241
|
-
y !== V &&
|
|
242
|
-
}),
|
|
240
|
+
return H(Ae, (y, V) => {
|
|
241
|
+
y !== V && Xe();
|
|
242
|
+
}), H(D, (y, V) => {
|
|
243
243
|
y !== V && (C("current-value", y), C("changed", y));
|
|
244
|
-
}), (y, V) => e.nbId && we.value ? (
|
|
244
|
+
}), (y, V) => e.nbId && we.value ? (F(), q("div", {
|
|
245
245
|
key: 0,
|
|
246
246
|
class: We(["nb-wrapper", L.value]),
|
|
247
|
-
style: Ee([x.value,
|
|
247
|
+
style: Ee([x.value, Ue.value])
|
|
248
248
|
}, [
|
|
249
249
|
ve("div", da({
|
|
250
250
|
id: e.nbId,
|
|
251
251
|
role: "radiogroup"
|
|
252
|
-
},
|
|
253
|
-
class: ["nb-reset", "component", $e.value,
|
|
252
|
+
}, Ge.value, {
|
|
253
|
+
class: ["nb-reset", "component", $e.value, tt.value]
|
|
254
254
|
}), [
|
|
255
|
-
(
|
|
256
|
-
key:
|
|
255
|
+
(F(!0), q(qa, null, ja(o(J), (ue, Z) => (F(), q("div", {
|
|
256
|
+
key: Z,
|
|
257
257
|
class: "component-radio__item"
|
|
258
258
|
}, [
|
|
259
259
|
pa(ve("input", {
|
|
260
260
|
id: `${e.nbId}-${ue.value}`,
|
|
261
|
-
"onUpdate:modelValue": V[0] || (V[0] = (me) =>
|
|
261
|
+
"onUpdate:modelValue": V[0] || (V[0] = (me) => D.value = me),
|
|
262
262
|
type: "radio",
|
|
263
263
|
class: "component-radio__item--input",
|
|
264
|
-
disabled:
|
|
264
|
+
disabled: o(X),
|
|
265
265
|
value: ue.value,
|
|
266
266
|
name: e.groupName,
|
|
267
|
-
onClick:
|
|
268
|
-
}, null, 8,
|
|
269
|
-
[
|
|
267
|
+
onClick: Ke
|
|
268
|
+
}, null, 8, dl), [
|
|
269
|
+
[ll, D.value]
|
|
270
270
|
]),
|
|
271
271
|
ve("label", {
|
|
272
272
|
for: `${e.nbId}-${ue.value}`,
|
|
273
|
-
tabindex:
|
|
273
|
+
tabindex: o(X) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[Z] : e.tabIndex >= 0 ? e.tabIndex : Z + 1,
|
|
274
274
|
class: "component-radio__item--label",
|
|
275
275
|
onKeydown: [
|
|
276
|
-
V[1] || (V[1] =
|
|
277
|
-
V[2] || (V[2] =
|
|
276
|
+
V[1] || (V[1] = qt(ca((me) => !o(X) && e.hasTabIndexEnter && me.target.click(), ["prevent"]), ["enter"])),
|
|
277
|
+
V[2] || (V[2] = qt(ca((me) => !o(X) && e.hasTabIndexSpace && me.target.click(), ["prevent"]), ["space"]))
|
|
278
278
|
]
|
|
279
279
|
}, [
|
|
280
280
|
V[3] || (V[3] = ve("div", null, null, -1)),
|
|
281
281
|
ve("span", {
|
|
282
|
-
style: Ee([
|
|
283
|
-
},
|
|
284
|
-
], 40,
|
|
282
|
+
style: Ee([He.value])
|
|
283
|
+
}, xt(ue.text), 5)
|
|
284
|
+
], 40, cl)
|
|
285
285
|
]))), 128))
|
|
286
|
-
], 16,
|
|
286
|
+
], 16, sl)
|
|
287
287
|
], 6)) : Be("", !0);
|
|
288
288
|
}
|
|
289
|
-
}),
|
|
290
|
-
const
|
|
289
|
+
}), vl = /* @__PURE__ */ ba(fl, [["__scopeId", "data-v-a95f65ea"]]);
|
|
290
|
+
const pl = ["id"], bl = ["id", "disabled", "value", "name"], gl = ["for", "tabindex"], yl = /* @__PURE__ */ Object.assign({
|
|
291
291
|
name: "NbInputCheckbox",
|
|
292
292
|
inheritAttrs: !1
|
|
293
293
|
}, {
|
|
@@ -341,8 +341,8 @@ const vl = ["id"], pl = ["id", "disabled", "value", "name"], bl = ["for", "tabin
|
|
|
341
341
|
return !1;
|
|
342
342
|
let m = !1;
|
|
343
343
|
for (const C of e) {
|
|
344
|
-
const
|
|
345
|
-
|
|
344
|
+
const E = Object.keys(C);
|
|
345
|
+
E.length !== 2 && (m = !0), E.every((Ve) => ["value", "text"].includes(Ve)) || (m = !0);
|
|
346
346
|
}
|
|
347
347
|
if (!m)
|
|
348
348
|
return e;
|
|
@@ -448,166 +448,166 @@ const vl = ["id"], pl = ["id", "disabled", "value", "name"], bl = ["for", "tabin
|
|
|
448
448
|
},
|
|
449
449
|
emits: ["current-value", "changed", "clicked"],
|
|
450
450
|
setup(e, { emit: m }) {
|
|
451
|
-
fa((
|
|
451
|
+
fa((c) => ({
|
|
452
452
|
"49e2c63f": gt.value,
|
|
453
453
|
"107babaa": ue.value,
|
|
454
454
|
"3c7cc5ce": V.value,
|
|
455
455
|
"16d311d0": y.value,
|
|
456
456
|
"3f8b2f30": yt.value,
|
|
457
457
|
"53078d64": Se.value,
|
|
458
|
-
"537834e6":
|
|
458
|
+
"537834e6": lt.value,
|
|
459
459
|
fbc86ee4: Te.value,
|
|
460
|
-
"517939e1":
|
|
461
|
-
"3faff29d":
|
|
462
|
-
"302ecd6a":
|
|
460
|
+
"517939e1": Je.value,
|
|
461
|
+
"3faff29d": Ke.value,
|
|
462
|
+
"302ecd6a": Ue.value,
|
|
463
463
|
"8a4df060": ct.value,
|
|
464
|
-
"0a99dbe2":
|
|
464
|
+
"0a99dbe2": Ge.value,
|
|
465
465
|
d6971e68: dt.value,
|
|
466
466
|
ca30d9c2: st.value
|
|
467
467
|
})), sa(() => {
|
|
468
|
-
|
|
468
|
+
Ye();
|
|
469
469
|
});
|
|
470
|
-
const C = m,
|
|
470
|
+
const C = m, E = e, D = Q(null), {
|
|
471
471
|
ariaLabel: Ve,
|
|
472
472
|
ariaAttrs: pe,
|
|
473
473
|
currentOption: Ae,
|
|
474
474
|
display: ke,
|
|
475
475
|
options: se,
|
|
476
|
-
theme:
|
|
476
|
+
theme: J,
|
|
477
477
|
lightTextColor: Pe,
|
|
478
478
|
lightColor: _e,
|
|
479
479
|
lightColorHover: ne,
|
|
480
|
-
darkTextColor:
|
|
481
|
-
darkColor:
|
|
480
|
+
darkTextColor: U,
|
|
481
|
+
darkColor: w,
|
|
482
482
|
darkColorHover: oe,
|
|
483
483
|
boxRadius: de,
|
|
484
|
-
hoverEffect:
|
|
484
|
+
hoverEffect: G,
|
|
485
485
|
activeHoverEffect: Le,
|
|
486
486
|
itemGap: ce,
|
|
487
|
-
internalGap:
|
|
487
|
+
internalGap: P,
|
|
488
488
|
scale: be,
|
|
489
|
-
type:
|
|
489
|
+
type: X,
|
|
490
490
|
background: Ce,
|
|
491
491
|
disabled: ge,
|
|
492
492
|
fontFamily: xe,
|
|
493
493
|
fontSize: _,
|
|
494
494
|
fontWeight: L
|
|
495
|
-
} = va(
|
|
496
|
-
const
|
|
495
|
+
} = va(E), x = a(() => {
|
|
496
|
+
const c = ge.value ? "component-disabled" : "", b = ke.value !== "b" ? "inline-block" : "block", fe = xe.value ? xe.value : "'Lato', sans-serif", K = _.value ? _.value : "1.6em", ee = L.value !== 0 && !L.value || L.value < 0 ? 200 : L.value, Me = de.value !== 0 && !de.value || de.value < 0 ? 0 : de.value, ze = [!1, !0].includes(G.value) ? G.value : !1, Fe = [!1, !0].includes(Le.value) ? Le.value : !1, Qe = ce.value !== 0 && !ce.value || ce.value < 0 ? 15 : ce.value, Ze = P.value !== 0 && !P.value || P.value < 0 ? 6 : P.value, nt = ["box", "circle"].includes(X.value) ? X.value : "box", ot = be.value !== 0 && !be.value || be.value < 0 ? 1 : be.value, ft = [!1, !0].includes(Ce.value) ? Ce.value : !1;
|
|
497
497
|
return {
|
|
498
|
-
disabled:
|
|
498
|
+
disabled: c,
|
|
499
499
|
display: b,
|
|
500
500
|
boxRadius: Me,
|
|
501
501
|
hoverEffect: ze,
|
|
502
502
|
activeHoverEffect: Fe,
|
|
503
|
-
itemGap:
|
|
504
|
-
internalGap:
|
|
505
|
-
scale:
|
|
506
|
-
type:
|
|
503
|
+
itemGap: Qe,
|
|
504
|
+
internalGap: Ze,
|
|
505
|
+
scale: ot,
|
|
506
|
+
type: nt,
|
|
507
507
|
font: fe,
|
|
508
508
|
background: ft,
|
|
509
|
-
fontSize:
|
|
510
|
-
fontWeight:
|
|
509
|
+
fontSize: K,
|
|
510
|
+
fontWeight: ee
|
|
511
511
|
};
|
|
512
|
-
}), $e = a(() => x.value.disabled),
|
|
512
|
+
}), $e = a(() => x.value.disabled), He = a(() => ({
|
|
513
513
|
display: x.value.display
|
|
514
|
-
})), we = a(() => x.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"),
|
|
515
|
-
const
|
|
514
|
+
})), we = a(() => x.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), tt = a(() => {
|
|
515
|
+
const c = x.value;
|
|
516
516
|
return {
|
|
517
|
-
fontSize:
|
|
518
|
-
fontWeight:
|
|
517
|
+
fontSize: c.fontSize,
|
|
518
|
+
fontWeight: c.fontWeight
|
|
519
519
|
};
|
|
520
|
-
}), ye = a(() => Array.isArray(se.value) && se.value.constructor === Array && se.value.length > 0),
|
|
521
|
-
const
|
|
522
|
-
return
|
|
523
|
-
}), st = a(() =>
|
|
524
|
-
const
|
|
525
|
-
return
|
|
526
|
-
}),
|
|
527
|
-
const
|
|
528
|
-
return
|
|
520
|
+
}), ye = a(() => Array.isArray(se.value) && se.value.constructor === Array && se.value.length > 0), at = a(() => J.value === "dark" ? "component__theme--dark" : "component__theme--light"), gt = a(() => x.value.font), Je = a(() => Pe.value), Te = a(() => _e.value), Se = a(() => x.value.hoverEffect ? ne.value : _e.value), yt = a(() => x.value.activeHoverEffect ? ne.value : _e.value), lt = a(() => {
|
|
521
|
+
const c = x.value;
|
|
522
|
+
return c.activeHoverEffect && c.background ? `${ne.value}80` : ne.value;
|
|
523
|
+
}), st = a(() => U.value), dt = a(() => w.value), ct = a(() => x.value.hoverEffect ? oe.value : w.value), Ue = a(() => x.value.activeHoverEffect ? oe.value : w.value), Ge = a(() => {
|
|
524
|
+
const c = x.value;
|
|
525
|
+
return c.activeHoverEffect && c.background ? `${oe.value}80` : oe.value;
|
|
526
|
+
}), Xe = a(() => x.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), Ke = a(() => {
|
|
527
|
+
const c = x.value, b = J.value === "dark" ? U.value : Pe.value;
|
|
528
|
+
return c.background ? "#ffffff" : b;
|
|
529
529
|
});
|
|
530
530
|
a(() => x.value.background ? "19px" : "auto");
|
|
531
531
|
const y = a(() => {
|
|
532
532
|
const b = x.value.internalGap;
|
|
533
533
|
return !b || b < 0 ? 0 : `${b}px`;
|
|
534
534
|
}), V = a(() => {
|
|
535
|
-
const
|
|
536
|
-
return `${
|
|
535
|
+
const c = x.value;
|
|
536
|
+
return `${c.boxRadius > 7 ? 7 : c.boxRadius}px`;
|
|
537
537
|
}), ue = a(() => {
|
|
538
538
|
const b = x.value.itemGap;
|
|
539
539
|
return !b || b < 0 ? 0 : `${b}px`;
|
|
540
|
-
}),
|
|
540
|
+
}), Z = a(() => x.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), me = a(() => ({
|
|
541
541
|
zoom: x.value.scale
|
|
542
542
|
})), Re = a(() => {
|
|
543
|
-
const
|
|
544
|
-
pe.value && Object.keys(pe.value).forEach((
|
|
543
|
+
const c = {};
|
|
544
|
+
pe.value && Object.keys(pe.value).forEach((K) => c[`aria-${K}`] = pe.value[K]);
|
|
545
545
|
const b = {
|
|
546
546
|
"aria-label": Ve.value,
|
|
547
547
|
"aria-disabled": ge.value,
|
|
548
|
-
...
|
|
548
|
+
...c
|
|
549
549
|
};
|
|
550
550
|
return Object.fromEntries(
|
|
551
|
-
Object.entries(b).filter(([fe,
|
|
551
|
+
Object.entries(b).filter(([fe, K]) => K != null)
|
|
552
552
|
);
|
|
553
|
-
}),
|
|
554
|
-
|
|
553
|
+
}), Ye = () => {
|
|
554
|
+
D.value = Ae.value;
|
|
555
555
|
}, re = () => {
|
|
556
556
|
C("clicked");
|
|
557
557
|
};
|
|
558
|
-
return
|
|
559
|
-
|
|
560
|
-
}),
|
|
561
|
-
|
|
562
|
-
}), (
|
|
558
|
+
return H(Ae, (c, b) => {
|
|
559
|
+
c !== b && Ye();
|
|
560
|
+
}), H(D, (c, b) => {
|
|
561
|
+
c !== b && (C("current-value", c), C("changed", c));
|
|
562
|
+
}), (c, b) => e.nbId && ye.value ? (F(), q("div", {
|
|
563
563
|
key: 0,
|
|
564
564
|
class: We(["nb-wrapper", $e.value]),
|
|
565
|
-
style: Ee([
|
|
565
|
+
style: Ee([He.value, me.value])
|
|
566
566
|
}, [
|
|
567
567
|
ve("div", da({
|
|
568
568
|
id: e.nbId,
|
|
569
569
|
role: "group"
|
|
570
570
|
}, Re.value, {
|
|
571
|
-
class: ["nb-reset", "component", we.value,
|
|
571
|
+
class: ["nb-reset", "component", we.value, at.value]
|
|
572
572
|
}), [
|
|
573
|
-
(
|
|
574
|
-
key:
|
|
573
|
+
(F(!0), q(qa, null, ja(o(se), (fe, K) => (F(), q("div", {
|
|
574
|
+
key: K,
|
|
575
575
|
class: "component-checkbox__item"
|
|
576
576
|
}, [
|
|
577
577
|
pa(ve("input", {
|
|
578
578
|
id: `${e.nbId}-${fe.value}`,
|
|
579
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
579
|
+
"onUpdate:modelValue": b[0] || (b[0] = (ee) => D.value = ee),
|
|
580
580
|
type: "checkbox",
|
|
581
581
|
class: "component-checkbox__item--input",
|
|
582
|
-
disabled:
|
|
582
|
+
disabled: o(ge),
|
|
583
583
|
value: fe.value,
|
|
584
584
|
name: e.groupName,
|
|
585
585
|
onClick: re
|
|
586
|
-
}, null, 8,
|
|
587
|
-
[
|
|
586
|
+
}, null, 8, bl), [
|
|
587
|
+
[nl, D.value]
|
|
588
588
|
]),
|
|
589
589
|
ve("label", {
|
|
590
590
|
for: `${e.nbId}-${fe.value}`,
|
|
591
|
-
class: We([[
|
|
592
|
-
tabindex:
|
|
591
|
+
class: We([[Z.value], "component-checkbox__item--label"]),
|
|
592
|
+
tabindex: o(ge) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[K] : e.tabIndex >= 0 ? e.tabIndex : K + 1,
|
|
593
593
|
onKeydown: [
|
|
594
|
-
b[1] || (b[1] =
|
|
595
|
-
b[2] || (b[2] =
|
|
594
|
+
b[1] || (b[1] = qt(ca((ee) => !o(ge) && e.hasTabIndexEnter && ee.target.click(), ["prevent"]), ["enter"])),
|
|
595
|
+
b[2] || (b[2] = qt(ca((ee) => !o(ge) && e.hasTabIndexSpace && ee.target.click(), ["prevent"]), ["space"]))
|
|
596
596
|
]
|
|
597
597
|
}, [
|
|
598
598
|
ve("div", {
|
|
599
|
-
class: We([
|
|
599
|
+
class: We([Xe.value])
|
|
600
600
|
}, null, 2),
|
|
601
601
|
ve("span", {
|
|
602
|
-
style: Ee([
|
|
603
|
-
},
|
|
604
|
-
], 42,
|
|
602
|
+
style: Ee([tt.value])
|
|
603
|
+
}, xt(fe.text), 5)
|
|
604
|
+
], 42, gl)
|
|
605
605
|
]))), 128))
|
|
606
|
-
], 16,
|
|
606
|
+
], 16, pl)
|
|
607
607
|
], 6)) : Be("", !0);
|
|
608
608
|
}
|
|
609
|
-
}),
|
|
610
|
-
const
|
|
609
|
+
}), ml = /* @__PURE__ */ ba(yl, [["__scopeId", "data-v-1c6afddc"]]);
|
|
610
|
+
const hl = ["id"], Cl = ["for"], xl = ["for"], Sl = { key: 0 }, Vl = { key: 1 }, kl = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex"], Ll = ["for"], Tl = /* @__PURE__ */ Object.assign({
|
|
611
611
|
name: "NbInput",
|
|
612
612
|
inheritAttrs: !1
|
|
613
613
|
}, {
|
|
@@ -719,7 +719,7 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
719
719
|
},
|
|
720
720
|
inputText: {
|
|
721
721
|
type: [String, Number],
|
|
722
|
-
default:
|
|
722
|
+
default: null
|
|
723
723
|
},
|
|
724
724
|
inputType: {
|
|
725
725
|
type: String,
|
|
@@ -1029,70 +1029,70 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1029
1029
|
"entered"
|
|
1030
1030
|
],
|
|
1031
1031
|
setup(e, { emit: m }) {
|
|
1032
|
-
fa((
|
|
1033
|
-
"
|
|
1034
|
-
"
|
|
1035
|
-
"
|
|
1036
|
-
"
|
|
1037
|
-
"
|
|
1038
|
-
"
|
|
1039
|
-
"
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
"
|
|
1045
|
-
|
|
1046
|
-
"
|
|
1047
|
-
"
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
"
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
"
|
|
1054
|
-
|
|
1055
|
-
"
|
|
1056
|
-
|
|
1057
|
-
"
|
|
1058
|
-
"
|
|
1059
|
-
"
|
|
1060
|
-
"
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
"
|
|
1065
|
-
"
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
"
|
|
1069
|
-
"
|
|
1032
|
+
fa((n) => ({
|
|
1033
|
+
"3df7fbb0": Bt.value,
|
|
1034
|
+
"10b57060": Tt.value,
|
|
1035
|
+
"7a965be1": o(ct),
|
|
1036
|
+
"6acf3c30": Kt.value,
|
|
1037
|
+
"4aa02582": Yt.value,
|
|
1038
|
+
"8baa16cc": Qt.value,
|
|
1039
|
+
"289e311f": o(V),
|
|
1040
|
+
"7c16f9a6": o(ze),
|
|
1041
|
+
c7fe4d00: o(ue),
|
|
1042
|
+
"236b311c": o(ft),
|
|
1043
|
+
"511e602b": o(y),
|
|
1044
|
+
"6088d4e4": o(Xe),
|
|
1045
|
+
"153b050a": o(Ke),
|
|
1046
|
+
"2530ced5": ua.value,
|
|
1047
|
+
"1b52bf47": o(Ue),
|
|
1048
|
+
da79cc5e: o(Ge),
|
|
1049
|
+
d392b78c: o(Me),
|
|
1050
|
+
"2d3fa8fe": o(Z),
|
|
1051
|
+
"2d9cd306": o(ot),
|
|
1052
|
+
"2547f16d": o(dt),
|
|
1053
|
+
"4d960262": o(lt),
|
|
1054
|
+
"7378c7f0": o(st),
|
|
1055
|
+
"510a9aee": o(Se),
|
|
1056
|
+
"713adfcf": o(yt),
|
|
1057
|
+
"6119a83d": la.value,
|
|
1058
|
+
"0156f4c8": na.value,
|
|
1059
|
+
"9ebf4bd2": oa.value,
|
|
1060
|
+
"42be1d87": Et.value,
|
|
1061
|
+
"4c548aac": aa.value,
|
|
1062
|
+
fa4dc9d2: o(me),
|
|
1063
|
+
b9dbf970: Ct.value,
|
|
1064
|
+
"3c1a1637": At.value,
|
|
1065
|
+
"61cb62f6": zt.value,
|
|
1066
|
+
f4fa5ec2: Ht.value,
|
|
1067
|
+
de10300e: Gt.value,
|
|
1068
|
+
"25bd227e": n.styleButtonColor,
|
|
1069
|
+
"750af1a6": Ut.value
|
|
1070
1070
|
})), sa(() => {
|
|
1071
|
-
ye.value != null ? x.value === "number" && typeof ye.value == "number" ?
|
|
1071
|
+
ye.value != null ? x.value === "number" && typeof ye.value == "number" ? Y.value = ye.value : Y.value = String(ye.value) : Y.value = "";
|
|
1072
1072
|
}), ma(() => {
|
|
1073
1073
|
bt();
|
|
1074
1074
|
});
|
|
1075
|
-
const C = m,
|
|
1076
|
-
nbId:
|
|
1075
|
+
const C = m, E = e, {
|
|
1076
|
+
nbId: D,
|
|
1077
1077
|
display: Ve,
|
|
1078
1078
|
hasTabIndexEnter: pe,
|
|
1079
1079
|
ariaLabel: Ae,
|
|
1080
1080
|
ariaAttrs: ke,
|
|
1081
1081
|
textColor: se,
|
|
1082
|
-
caretColor:
|
|
1082
|
+
caretColor: J,
|
|
1083
1083
|
selectionBgColor: Pe,
|
|
1084
1084
|
selectionTextColor: _e,
|
|
1085
1085
|
hasBorderRadius: ne,
|
|
1086
|
-
borderRadius:
|
|
1087
|
-
disabled:
|
|
1086
|
+
borderRadius: U,
|
|
1087
|
+
disabled: w,
|
|
1088
1088
|
fontFamily: oe,
|
|
1089
1089
|
fontSize: de,
|
|
1090
|
-
fontWeight:
|
|
1090
|
+
fontWeight: G,
|
|
1091
1091
|
fontFamilyMsg: Le,
|
|
1092
1092
|
fontSizeMsg: ce,
|
|
1093
|
-
fontWeightMsg:
|
|
1093
|
+
fontWeightMsg: P,
|
|
1094
1094
|
textMessageColor: be,
|
|
1095
|
-
inputWidth:
|
|
1095
|
+
inputWidth: X,
|
|
1096
1096
|
inputStyle: Ce,
|
|
1097
1097
|
activeTextStyle: ge,
|
|
1098
1098
|
sizeMediaQuery: xe,
|
|
@@ -1100,128 +1100,128 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1100
1100
|
showInputEye: L,
|
|
1101
1101
|
inputType: x,
|
|
1102
1102
|
hasTrim: $e,
|
|
1103
|
-
inputUppercase:
|
|
1103
|
+
inputUppercase: He,
|
|
1104
1104
|
inputName: we,
|
|
1105
|
-
inputPlaceholder:
|
|
1105
|
+
inputPlaceholder: tt,
|
|
1106
1106
|
inputText: ye,
|
|
1107
|
-
theme:
|
|
1107
|
+
theme: at,
|
|
1108
1108
|
inputEyeIcon: gt,
|
|
1109
|
-
tabindex:
|
|
1109
|
+
tabindex: Je,
|
|
1110
1110
|
inputEyeIconHidden: Te,
|
|
1111
1111
|
lightBgColor: Se,
|
|
1112
1112
|
lightBgColorFocus: yt,
|
|
1113
|
-
lightEyeBgColor:
|
|
1113
|
+
lightEyeBgColor: lt,
|
|
1114
1114
|
lightEyeBgColorActive: st,
|
|
1115
1115
|
lightDisabledBgColor: dt,
|
|
1116
1116
|
lightTextColor: ct,
|
|
1117
|
-
darkBgColor:
|
|
1118
|
-
darkBgColorFocus:
|
|
1119
|
-
darkEyeBgColor:
|
|
1120
|
-
darkEyeBgColorActive:
|
|
1117
|
+
darkBgColor: Ue,
|
|
1118
|
+
darkBgColorFocus: Ge,
|
|
1119
|
+
darkEyeBgColor: Xe,
|
|
1120
|
+
darkEyeBgColorActive: Ke,
|
|
1121
1121
|
darkDisabledBgColor: y,
|
|
1122
1122
|
darkTextColor: V,
|
|
1123
1123
|
darkDisabledEyeBgColor: ue,
|
|
1124
|
-
lightDisabledEyeBgColor:
|
|
1124
|
+
lightDisabledEyeBgColor: Z,
|
|
1125
1125
|
textAlign: me,
|
|
1126
1126
|
showMsg: Re,
|
|
1127
|
-
hasMsg:
|
|
1127
|
+
hasMsg: Ye,
|
|
1128
1128
|
hasIcon: re,
|
|
1129
|
-
iconDirection:
|
|
1129
|
+
iconDirection: c,
|
|
1130
1130
|
iconPadding: b,
|
|
1131
1131
|
iconPaddingInput: fe,
|
|
1132
|
-
iconMargin:
|
|
1133
|
-
iconBorderRadius:
|
|
1132
|
+
iconMargin: K,
|
|
1133
|
+
iconBorderRadius: ee,
|
|
1134
1134
|
iconLightTextColor: Me,
|
|
1135
1135
|
iconDarkTextColor: ze,
|
|
1136
1136
|
iconLightBgColor: Fe,
|
|
1137
|
-
iconDarkBgColor:
|
|
1138
|
-
iconLightBgColorActive:
|
|
1139
|
-
iconDarkBgColorActive:
|
|
1140
|
-
iconLightDisabledBgColor:
|
|
1137
|
+
iconDarkBgColor: Qe,
|
|
1138
|
+
iconLightBgColorActive: Ze,
|
|
1139
|
+
iconDarkBgColorActive: nt,
|
|
1140
|
+
iconLightDisabledBgColor: ot,
|
|
1141
1141
|
iconDarkDisabledBgColor: ft,
|
|
1142
1142
|
iconWidth: h,
|
|
1143
|
-
iconSize:
|
|
1143
|
+
iconSize: R,
|
|
1144
1144
|
showLabel: k,
|
|
1145
1145
|
labelBackground: Oe,
|
|
1146
1146
|
labelPadding: T,
|
|
1147
1147
|
labelBorderRadius: he,
|
|
1148
|
-
labelLeft:
|
|
1149
|
-
inputLabelMarginActive:
|
|
1150
|
-
labelActiveTop:
|
|
1151
|
-
labelActiveLeft:
|
|
1152
|
-
fontFamilyLabel:
|
|
1153
|
-
fontSizeLabel:
|
|
1148
|
+
labelLeft: St,
|
|
1149
|
+
inputLabelMarginActive: Vt,
|
|
1150
|
+
labelActiveTop: ut,
|
|
1151
|
+
labelActiveLeft: j,
|
|
1152
|
+
fontFamilyLabel: N,
|
|
1153
|
+
fontSizeLabel: te,
|
|
1154
1154
|
fontSizeLabelActive: $,
|
|
1155
|
-
fontWeightLabel:
|
|
1156
|
-
lightTextColorLabel:
|
|
1157
|
-
lightTextColorLabelActive:
|
|
1158
|
-
darkTextColorLabel:
|
|
1159
|
-
darkTextColorLabelActive:
|
|
1160
|
-
} = va(
|
|
1161
|
-
const
|
|
1155
|
+
fontWeightLabel: M,
|
|
1156
|
+
lightTextColorLabel: ae,
|
|
1157
|
+
lightTextColorLabelActive: I,
|
|
1158
|
+
darkTextColorLabel: $t,
|
|
1159
|
+
darkTextColorLabelActive: wt
|
|
1160
|
+
} = va(E), Y = Q(""), vt = Q(""), rt = Q(!1), pt = Q(!1), B = a(() => {
|
|
1161
|
+
const n = w.value ? "component-disabled" : "", s = Ve.value !== "b" ? "inline-block" : "block", je = se ? se.value : "ffffff", le = J.value ? J.value : "", t = Pe.value ? Pe.value : "", l = _e.value ? _e.value : "", d = ne.value ? ne.value : !1, i = U.value !== 0 && !U.value || U.value < 0 ? 0 : U.value, v = oe.value ? oe.value : "'Lato', sans-serif", f = de.value ? de.value : null, p = G.value !== 0 && !G.value || G.value < 0 ? 100 : G.value, S = Le.value ? Le.value : "'Lato', sans-serif", A = ce.value ? ce.value : "1em", z = P.value !== 0 && !P.value || P.value < 0 ? 100 : P.value, O = be.value ? be.value : "#f15574", ie = X.value ? X.value : 200, De = ge.value ? ge.value : "normal", et = xe.value ? xe.value : "xs", Ne = _.value ? _.value : !1, Ie = L.value ? L.value : !1, ha = x.value ? x.value : "text", Ca = He.value ? He.value : !1, xa = at.value ? at.value : "normal", Sa = me.value ? me.value : "left", Va = Ce.value ? Ce.value : "background", ka = b.value ? b.value : "5px 10px", La = K.value ? K.value : "0", Ta = fe.value ? fe.value : 10, Ba = Me.value ? Me.value : "#000000", Aa = ze.value ? ze.value : "#000000", _a = Fe.value ? Fe.value : "transparent", $a = Qe.value ? Qe.value : "transparent", wa = ee.value !== 0 && !ee.value || ee.value < 0 ? 0 : ee.value, Ra = Ze.value ? Ze.value : "transparent", Ma = nt.value ? nt.value : "transparent", za = h.value ? h.value : 32, Da = R.value ? R.value : 1, Na = k.value ? k.value : !1, Ia = St.value !== 0 && !St.value || St.value < 0 ? 5 : St.value, Wa = Oe.value ? Oe.value : "transparent", Ea = Vt.value !== 0 && !Vt.value || Vt.value < 0 ? 15 : Vt.value, Pa = T.value ? T.value : "1px 5px", Fa = he.value !== 0 && !he.value || he.value < 0 ? 0 : he.value, Ga = ut.value === null || ut.value === void 0 ? -13 : ut.value, Ka = j.value === null || j.value === void 0 ? -10 : j.value, Ya = N.value ? N.value : "'Lato', sans-serif", Qa = te.value ? te.value : "1em", Ja = $.value ? $.value : "0.8em", Xa = M.value ? M.value : 400, Za = ae.value ? ae.value : "#ffffff", el = $t.value ? $t.value : "#000000", tl = I.value ? I.value : "#ffffff", al = wt.value ? wt.value : "#000000";
|
|
1162
1162
|
return {
|
|
1163
|
-
disabled:
|
|
1164
|
-
display:
|
|
1165
|
-
font:
|
|
1166
|
-
fontSize:
|
|
1167
|
-
fontWeight:
|
|
1168
|
-
fontFamilyMsg:
|
|
1169
|
-
fontSizeMsg:
|
|
1170
|
-
fontWeightMsg:
|
|
1171
|
-
textMessageColor:
|
|
1172
|
-
textColor:
|
|
1173
|
-
caretColor:
|
|
1174
|
-
selectionBgColor:
|
|
1175
|
-
selectionTextColor:
|
|
1176
|
-
hasBorderRadius:
|
|
1177
|
-
borderRadius:
|
|
1178
|
-
textAlign:
|
|
1179
|
-
inputWidth:
|
|
1180
|
-
activeTextStyle:
|
|
1181
|
-
sizeMediaQuery:
|
|
1182
|
-
inputReadonly:
|
|
1183
|
-
showInputEye:
|
|
1184
|
-
inputType:
|
|
1185
|
-
inputUppercase:
|
|
1186
|
-
theme:
|
|
1187
|
-
inputStyle:
|
|
1188
|
-
iconPadding:
|
|
1189
|
-
iconMargin:
|
|
1190
|
-
iconPaddingInput:
|
|
1191
|
-
iconLightTextColor:
|
|
1192
|
-
iconDarkTextColor:
|
|
1193
|
-
iconLightBgColor:
|
|
1194
|
-
iconDarkBgColor:
|
|
1195
|
-
iconBorderRadius:
|
|
1196
|
-
iconLightBgColorActive:
|
|
1197
|
-
iconDarkBgColorActive:
|
|
1198
|
-
iconWidth:
|
|
1199
|
-
iconSize:
|
|
1200
|
-
showLabel:
|
|
1201
|
-
labelBackground:
|
|
1202
|
-
labelPadding:
|
|
1203
|
-
labelBorderRadius:
|
|
1204
|
-
labelLeft:
|
|
1205
|
-
inputLabelMarginActive:
|
|
1206
|
-
labelActiveTop:
|
|
1207
|
-
labelActiveLeft:
|
|
1208
|
-
fontFamilyLabel:
|
|
1209
|
-
fontSizeLabel:
|
|
1210
|
-
fontSizeLabelActive:
|
|
1211
|
-
fontWeightLabel:
|
|
1212
|
-
lightTextColorLabel:
|
|
1213
|
-
darkTextColorLabel:
|
|
1214
|
-
lightTextColorLabelActive:
|
|
1215
|
-
darkTextColorLabelActive:
|
|
1163
|
+
disabled: n,
|
|
1164
|
+
display: s,
|
|
1165
|
+
font: v,
|
|
1166
|
+
fontSize: f,
|
|
1167
|
+
fontWeight: p,
|
|
1168
|
+
fontFamilyMsg: S,
|
|
1169
|
+
fontSizeMsg: A,
|
|
1170
|
+
fontWeightMsg: z,
|
|
1171
|
+
textMessageColor: O,
|
|
1172
|
+
textColor: je,
|
|
1173
|
+
caretColor: le,
|
|
1174
|
+
selectionBgColor: t,
|
|
1175
|
+
selectionTextColor: l,
|
|
1176
|
+
hasBorderRadius: d,
|
|
1177
|
+
borderRadius: i,
|
|
1178
|
+
textAlign: Sa,
|
|
1179
|
+
inputWidth: ie,
|
|
1180
|
+
activeTextStyle: De,
|
|
1181
|
+
sizeMediaQuery: et,
|
|
1182
|
+
inputReadonly: Ne,
|
|
1183
|
+
showInputEye: Ie,
|
|
1184
|
+
inputType: ha,
|
|
1185
|
+
inputUppercase: Ca,
|
|
1186
|
+
theme: xa,
|
|
1187
|
+
inputStyle: Va,
|
|
1188
|
+
iconPadding: ka,
|
|
1189
|
+
iconMargin: La,
|
|
1190
|
+
iconPaddingInput: Ta,
|
|
1191
|
+
iconLightTextColor: Ba,
|
|
1192
|
+
iconDarkTextColor: Aa,
|
|
1193
|
+
iconLightBgColor: _a,
|
|
1194
|
+
iconDarkBgColor: $a,
|
|
1195
|
+
iconBorderRadius: wa,
|
|
1196
|
+
iconLightBgColorActive: Ra,
|
|
1197
|
+
iconDarkBgColorActive: Ma,
|
|
1198
|
+
iconWidth: za,
|
|
1199
|
+
iconSize: Da,
|
|
1200
|
+
showLabel: Na,
|
|
1201
|
+
labelBackground: Wa,
|
|
1202
|
+
labelPadding: Pa,
|
|
1203
|
+
labelBorderRadius: Fa,
|
|
1204
|
+
labelLeft: Ia,
|
|
1205
|
+
inputLabelMarginActive: Ea,
|
|
1206
|
+
labelActiveTop: Ga,
|
|
1207
|
+
labelActiveLeft: Ka,
|
|
1208
|
+
fontFamilyLabel: Ya,
|
|
1209
|
+
fontSizeLabel: Qa,
|
|
1210
|
+
fontSizeLabelActive: Ja,
|
|
1211
|
+
fontWeightLabel: Xa,
|
|
1212
|
+
lightTextColorLabel: Za,
|
|
1213
|
+
darkTextColorLabel: el,
|
|
1214
|
+
lightTextColorLabelActive: tl,
|
|
1215
|
+
darkTextColorLabelActive: al
|
|
1216
1216
|
};
|
|
1217
|
-
}),
|
|
1217
|
+
}), Rt = a(() => B.value.disabled), Mt = a(() => ({
|
|
1218
1218
|
display: B.value.display
|
|
1219
|
-
})),
|
|
1220
|
-
const
|
|
1221
|
-
if (
|
|
1222
|
-
return
|
|
1223
|
-
let
|
|
1224
|
-
switch (
|
|
1219
|
+
})), Tt = a(() => {
|
|
1220
|
+
const n = B.value;
|
|
1221
|
+
if (n.fontSize)
|
|
1222
|
+
return n.fontSize;
|
|
1223
|
+
let s = "";
|
|
1224
|
+
switch (n.sizeMediaQuery) {
|
|
1225
1225
|
case "sm":
|
|
1226
1226
|
return "1.2em";
|
|
1227
1227
|
case "md":
|
|
@@ -1229,33 +1229,33 @@ 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
|
+
s = "1.2em";
|
|
1233
1233
|
}
|
|
1234
|
-
return
|
|
1235
|
-
}),
|
|
1236
|
-
const
|
|
1234
|
+
return s;
|
|
1235
|
+
}), jt = a(() => {
|
|
1236
|
+
const n = B.value, s = Wt.value;
|
|
1237
1237
|
return {
|
|
1238
|
-
fontWeight:
|
|
1239
|
-
marginTop:
|
|
1238
|
+
fontWeight: n.fontWeight,
|
|
1239
|
+
marginTop: s && k.value ? `${n.inputLabelMarginActive}px` : "0"
|
|
1240
1240
|
};
|
|
1241
1241
|
}), mt = a(() => {
|
|
1242
|
-
const
|
|
1243
|
-
return
|
|
1244
|
-
}),
|
|
1245
|
-
const
|
|
1246
|
-
return
|
|
1242
|
+
const n = B.value;
|
|
1243
|
+
return n.inputStyle !== "line" && n.hasBorderRadius ? { borderRadius: `${n.borderRadius}rem` } : {};
|
|
1244
|
+
}), Bt = a(() => B.value.font), At = a(() => B.value.fontFamilyMsg), zt = a(() => B.value.fontSizeMsg), Ht = a(() => B.value.fontWeightMsg), Ut = a(() => B.value.textColor), Gt = a(() => B.value.textMessageColor), Kt = a(() => {
|
|
1245
|
+
const n = B.value;
|
|
1246
|
+
return n.caretColor || (n.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1247
|
+
}), Yt = a(() => {
|
|
1248
|
+
const n = B.value;
|
|
1249
|
+
return n.selectionBgColor || (n.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1247
1250
|
}), Qt = a(() => {
|
|
1248
|
-
const
|
|
1249
|
-
return
|
|
1250
|
-
}),
|
|
1251
|
-
const
|
|
1252
|
-
return
|
|
1253
|
-
|
|
1254
|
-
const o = B.value;
|
|
1255
|
-
return o.display === "block" ? { width: "100%" } : {
|
|
1256
|
-
width: `${o.inputWidth}px`
|
|
1251
|
+
const n = B.value;
|
|
1252
|
+
return n.selectionTextColor || (n.theme === "dark" ? "#000000" : "#ffffff");
|
|
1253
|
+
}), kt = a(() => {
|
|
1254
|
+
const n = B.value;
|
|
1255
|
+
return n.display === "block" ? { width: "100%" } : {
|
|
1256
|
+
width: `${n.inputWidth}px`
|
|
1257
1257
|
};
|
|
1258
|
-
}),
|
|
1258
|
+
}), Dt = a(() => {
|
|
1259
1259
|
switch (Ce.value) {
|
|
1260
1260
|
case "line":
|
|
1261
1261
|
return "component__input--line";
|
|
@@ -1291,179 +1291,189 @@ const ml = ["id"], hl = ["for"], Cl = ["for"], xl = { key: 0 }, Sl = { key: 1 },
|
|
|
1291
1291
|
default:
|
|
1292
1292
|
return "component__theme--light";
|
|
1293
1293
|
}
|
|
1294
|
-
}),
|
|
1295
|
-
const
|
|
1296
|
-
return !!(
|
|
1297
|
-
}),
|
|
1298
|
-
const
|
|
1299
|
-
return pt.value ||
|
|
1300
|
-
}),
|
|
1301
|
-
const
|
|
1302
|
-
ke.value && Object.keys(ke.value).forEach((
|
|
1303
|
-
const
|
|
1294
|
+
}), W = a(() => B.value.inputReadonly ? "component__input--read-only" : ""), qe = a(() => B.value.inputUppercase ? "component__input--uppercase" : ""), Nt = a(() => {
|
|
1295
|
+
const n = B.value;
|
|
1296
|
+
return !!(n.showInputEye && n.inputType === "password");
|
|
1297
|
+
}), Jt = a(() => rt.value ? gt.value : Te.value), ht = a(() => we.value ? we.value : `${D.value}-name-label`), It = a(() => k.value ? pt.value ? tt.value : "" : tt.value), Wt = a(() => {
|
|
1298
|
+
const n = Y.value;
|
|
1299
|
+
return pt.value || n != null && String(n).trim().length > 0;
|
|
1300
|
+
}), Xt = a(() => B.value.inputType === "password" ? "component__input__eye-default--hidden" : ""), Zt = a(() => pt.value ? "component__input--active" : "component__input--no-active"), Ct = a(() => Nt.value ? "6px 50px 6px 10px" : "6px 10px"), ea = a(() => !!(Re.value && Ye.value)), ta = a(() => {
|
|
1301
|
+
const n = {};
|
|
1302
|
+
ke.value && Object.keys(ke.value).forEach((le) => n[`aria-${le}`] = ke.value[le]);
|
|
1303
|
+
const s = {
|
|
1304
1304
|
"aria-label": Ae.value,
|
|
1305
|
-
"aria-disabled":
|
|
1306
|
-
...
|
|
1305
|
+
"aria-disabled": w.value,
|
|
1306
|
+
...n
|
|
1307
1307
|
};
|
|
1308
1308
|
return Object.fromEntries(
|
|
1309
|
-
Object.entries(
|
|
1309
|
+
Object.entries(s).filter(([je, le]) => le != null)
|
|
1310
1310
|
);
|
|
1311
|
-
}),
|
|
1312
|
-
const
|
|
1313
|
-
return re.value ?
|
|
1311
|
+
}), aa = a(() => re.value ? `${R.value}rem` : "0"), la = a(() => re.value ? `${h.value}px` : "0"), _t = a(() => re.value ? `component__icon--${c.value}` : ""), na = a(() => {
|
|
1312
|
+
const n = B.value;
|
|
1313
|
+
return re.value ? n.iconPadding : "0";
|
|
1314
|
+
}), oa = a(() => {
|
|
1315
|
+
const n = B.value;
|
|
1316
|
+
return re.value ? n.iconMargin : "0";
|
|
1314
1317
|
}), ua = a(() => {
|
|
1315
|
-
const
|
|
1316
|
-
return re.value ?
|
|
1317
|
-
}),
|
|
1318
|
-
const
|
|
1319
|
-
return re.value ?
|
|
1318
|
+
const n = B.value;
|
|
1319
|
+
return re.value ? n.theme === "dark" ? n.iconDarkBgColor : n.iconLightBgColor : "transparent";
|
|
1320
|
+
}), Et = a(() => {
|
|
1321
|
+
const n = B.value;
|
|
1322
|
+
return re.value ? `${n.iconBorderRadius}rem` : "0";
|
|
1320
1323
|
}), Pt = a(() => {
|
|
1321
|
-
const
|
|
1322
|
-
return re.value ? `${
|
|
1324
|
+
const n = B.value;
|
|
1325
|
+
return re.value ? c.value === "left" ? { paddingLeft: `${n.iconPaddingInput}px` } : { paddingRight: `${n.iconPaddingInput}px` } : {};
|
|
1323
1326
|
}), Ft = a(() => {
|
|
1324
|
-
const
|
|
1325
|
-
return re.value ? d.value === "left" ? { paddingLeft: `${o.iconPaddingInput}px` } : { paddingRight: `${o.iconPaddingInput}px` } : {};
|
|
1326
|
-
}), Ot = a(() => {
|
|
1327
|
-
const o = B.value, f = Et.value, w = f ? o.lightTextColorLabelActive : o.lightTextColorLabel, Qe = f ? o.darkTextColorLabelActive : o.darkTextColorLabel;
|
|
1327
|
+
const n = B.value, s = Wt.value, je = s ? n.lightTextColorLabelActive : n.lightTextColorLabel, le = s ? n.darkTextColorLabelActive : n.darkTextColorLabel;
|
|
1328
1328
|
return {
|
|
1329
|
-
fontFamily:
|
|
1330
|
-
fontSize:
|
|
1331
|
-
fontWeight:
|
|
1332
|
-
color:
|
|
1333
|
-
top:
|
|
1334
|
-
left:
|
|
1335
|
-
transform:
|
|
1329
|
+
fontFamily: n.fontFamilyLabel,
|
|
1330
|
+
fontSize: s ? n.fontSizeLabelActive : n.fontSizeLabel,
|
|
1331
|
+
fontWeight: n.fontWeightLabel,
|
|
1332
|
+
color: n.theme === "dark" ? le : je,
|
|
1333
|
+
top: s ? `${n.labelActiveTop}px` : "50%",
|
|
1334
|
+
left: s ? `${n.labelActiveLeft}px` : `${n.labelLeft}px`,
|
|
1335
|
+
transform: s ? "translateY(0)" : "translateY(-50%)",
|
|
1336
1336
|
transition: "all 0.2s ease",
|
|
1337
|
-
backgroundColor:
|
|
1338
|
-
padding:
|
|
1339
|
-
borderRadius:
|
|
1337
|
+
backgroundColor: s ? n.labelBackground : "transparent",
|
|
1338
|
+
padding: s ? n.labelPadding : "0",
|
|
1339
|
+
borderRadius: s ? `${n.labelBorderRadius}rem` : "0"
|
|
1340
1340
|
};
|
|
1341
1341
|
});
|
|
1342
1342
|
a(() => {
|
|
1343
|
-
const
|
|
1344
|
-
return
|
|
1343
|
+
const n = B.value;
|
|
1344
|
+
return n.theme === "dark" ? n.darkTextColorLabelActive : n.lightTextColorLabelActive;
|
|
1345
1345
|
});
|
|
1346
1346
|
const bt = () => {
|
|
1347
|
-
ye.value != null ? x.value === "number" && typeof ye.value == "number" ?
|
|
1348
|
-
},
|
|
1349
|
-
const
|
|
1350
|
-
if (
|
|
1347
|
+
ye.value != null ? x.value === "number" && typeof ye.value == "number" ? Y.value = ye.value : Y.value = String(ye.value) : Y.value = "", vt.value = x.value;
|
|
1348
|
+
}, Lt = () => {
|
|
1349
|
+
const n = B.value;
|
|
1350
|
+
if (n.inputReadonly || n.disabled)
|
|
1351
1351
|
return;
|
|
1352
|
-
const
|
|
1353
|
-
|
|
1354
|
-
},
|
|
1352
|
+
const s = !rt.value;
|
|
1353
|
+
s ? vt.value = "text" : vt.value = x.value, rt.value = s;
|
|
1354
|
+
}, it = (n) => {
|
|
1355
|
+
if (x.value === "number") {
|
|
1356
|
+
if (n === "" || n === null || n === void 0)
|
|
1357
|
+
return "";
|
|
1358
|
+
{
|
|
1359
|
+
const s = typeof n == "number" ? n : Number(n);
|
|
1360
|
+
return isNaN(s) ? n : s;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
return n;
|
|
1364
|
+
}, Ot = () => {
|
|
1355
1365
|
C("clicked");
|
|
1356
|
-
},
|
|
1357
|
-
|
|
1366
|
+
}, ra = () => {
|
|
1367
|
+
w.value || B.value.inputReadonly || !pe.value || C("entered", it(Y.value));
|
|
1358
1368
|
};
|
|
1359
|
-
return
|
|
1360
|
-
vt.value =
|
|
1361
|
-
}, { immediate: !0 }),
|
|
1362
|
-
if (
|
|
1363
|
-
if (x.value === "number" && typeof
|
|
1364
|
-
|
|
1369
|
+
return H(x, (n) => {
|
|
1370
|
+
vt.value = n;
|
|
1371
|
+
}, { immediate: !0 }), H(ye, (n) => {
|
|
1372
|
+
if (n != null)
|
|
1373
|
+
if (x.value === "number" && typeof n == "number")
|
|
1374
|
+
n !== Y.value && (Y.value = n);
|
|
1365
1375
|
else {
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1376
|
+
const s = String(n);
|
|
1377
|
+
s !== Y.value && (Y.value = s);
|
|
1368
1378
|
}
|
|
1369
1379
|
else
|
|
1370
|
-
|
|
1371
|
-
}, { immediate: !0 }),
|
|
1372
|
-
$e.value && typeof
|
|
1373
|
-
}),
|
|
1374
|
-
C(
|
|
1375
|
-
}),
|
|
1376
|
-
C("show-input-eye",
|
|
1377
|
-
}, { immediate: !0 }),
|
|
1378
|
-
$e.value && typeof
|
|
1379
|
-
}),
|
|
1380
|
-
|
|
1381
|
-
const
|
|
1382
|
-
|
|
1380
|
+
Y.value !== "" && (Y.value = "");
|
|
1381
|
+
}, { immediate: !0 }), H(Y, (n) => {
|
|
1382
|
+
$e.value && typeof n == "string" && (n = n.trim()), C("changed", it(n));
|
|
1383
|
+
}), H(pt, (n) => {
|
|
1384
|
+
C(n ? "focused" : "blurred");
|
|
1385
|
+
}), H(rt, (n) => {
|
|
1386
|
+
C("show-input-eye", n);
|
|
1387
|
+
}, { immediate: !0 }), H(Y, (n) => {
|
|
1388
|
+
$e.value && typeof n == "string" && (n = n.trim()), C("current-value", it(n));
|
|
1389
|
+
}), H(x, (n) => {
|
|
1390
|
+
n === "password" && nextTick(() => {
|
|
1391
|
+
const s = document.getElementById(we.value);
|
|
1392
|
+
s && (s.type = "password", s.removeAttribute("autocomplete"));
|
|
1383
1393
|
});
|
|
1384
|
-
}), (
|
|
1394
|
+
}), (n, s) => o(D) ? (F(), q("div", da({
|
|
1385
1395
|
key: 0,
|
|
1386
|
-
class: ["nb-wrapper",
|
|
1387
|
-
style: [
|
|
1396
|
+
class: ["nb-wrapper", Rt.value],
|
|
1397
|
+
style: [Mt.value, kt.value, mt.value],
|
|
1388
1398
|
role: "input"
|
|
1389
|
-
},
|
|
1399
|
+
}, ta.value), [
|
|
1390
1400
|
ve("div", {
|
|
1391
|
-
id:
|
|
1392
|
-
class: We(["nb-reset", "component", u.value, g.value,
|
|
1393
|
-
style: Ee([
|
|
1394
|
-
onClick:
|
|
1401
|
+
id: o(D),
|
|
1402
|
+
class: We(["nb-reset", "component", u.value, g.value, W.value, Dt.value]),
|
|
1403
|
+
style: Ee([jt.value, kt.value, mt.value]),
|
|
1404
|
+
onClick: Ot
|
|
1395
1405
|
}, [
|
|
1396
|
-
|
|
1406
|
+
o(k) ? (F(), q("label", {
|
|
1397
1407
|
key: 0,
|
|
1398
1408
|
for: ht.value,
|
|
1399
1409
|
class: "component__label",
|
|
1400
|
-
style: Ee([
|
|
1401
|
-
},
|
|
1402
|
-
|
|
1410
|
+
style: Ee([Ft.value])
|
|
1411
|
+
}, xt(e.label), 13, Cl)) : Be("", !0),
|
|
1412
|
+
Nt.value ? (F(), q("div", {
|
|
1403
1413
|
key: 1,
|
|
1404
|
-
class: We(["component__eye",
|
|
1414
|
+
class: We(["component__eye", Zt.value]),
|
|
1405
1415
|
style: Ee([mt.value]),
|
|
1406
|
-
onClick:
|
|
1416
|
+
onClick: Lt
|
|
1407
1417
|
}, [
|
|
1408
1418
|
ve("label", {
|
|
1409
1419
|
for: ht.value,
|
|
1410
1420
|
class: We(["component__eye-icon", "fas"])
|
|
1411
1421
|
}, [
|
|
1412
|
-
e.inputEyeCustomIcon ? (
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
], !0) : ia(
|
|
1416
|
-
|
|
1422
|
+
e.inputEyeCustomIcon ? (F(), q("span", Vl, [
|
|
1423
|
+
rt.value ? ia(n.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
1424
|
+
s[4] || (s[4] = ga("show"))
|
|
1425
|
+
], !0) : ia(n.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1426
|
+
s[5] || (s[5] = ga("hidden"))
|
|
1417
1427
|
], !0)
|
|
1418
|
-
])) : (
|
|
1419
|
-
], 8,
|
|
1428
|
+
])) : (F(), q("span", Sl, xt(Jt.value), 1))
|
|
1429
|
+
], 8, xl)
|
|
1420
1430
|
], 6)) : Be("", !0),
|
|
1421
1431
|
pa(ve("input", {
|
|
1422
|
-
"onUpdate:modelValue":
|
|
1432
|
+
"onUpdate:modelValue": s[0] || (s[0] = (je) => Y.value = je),
|
|
1423
1433
|
id: ht.value,
|
|
1424
1434
|
name: ht.value,
|
|
1425
1435
|
type: vt.value,
|
|
1426
1436
|
class: We(["component__input", [
|
|
1427
1437
|
qe.value,
|
|
1428
|
-
|
|
1438
|
+
Xt.value,
|
|
1429
1439
|
r.value
|
|
1430
1440
|
]]),
|
|
1431
|
-
placeholder:
|
|
1432
|
-
disabled:
|
|
1441
|
+
placeholder: It.value,
|
|
1442
|
+
disabled: o(w) || o(_),
|
|
1433
1443
|
required: e.required,
|
|
1434
|
-
readonly:
|
|
1444
|
+
readonly: o(_),
|
|
1435
1445
|
autocomplete: e.inputAutocomplete,
|
|
1436
|
-
tabindex:
|
|
1446
|
+
tabindex: o(w) || o(_) ? -1 : o(Je),
|
|
1437
1447
|
role: "input",
|
|
1438
|
-
style: Ee([mt.value,
|
|
1439
|
-
onFocus:
|
|
1440
|
-
onBlur:
|
|
1441
|
-
onKeydown:
|
|
1442
|
-
}, null, 46,
|
|
1443
|
-
[Ha,
|
|
1448
|
+
style: Ee([mt.value, Pt.value]),
|
|
1449
|
+
onFocus: s[1] || (s[1] = (je) => pt.value = !0),
|
|
1450
|
+
onBlur: s[2] || (s[2] = (je) => pt.value = !1),
|
|
1451
|
+
onKeydown: s[3] || (s[3] = qt((je) => !o(w) && o(pe) && ra(), ["enter"]))
|
|
1452
|
+
}, null, 46, kl), [
|
|
1453
|
+
[Ha, Y.value]
|
|
1444
1454
|
]),
|
|
1445
|
-
|
|
1455
|
+
o(re) ? (F(), q("label", {
|
|
1446
1456
|
key: 2,
|
|
1447
1457
|
for: ht.value,
|
|
1448
|
-
class: We(["component__icon",
|
|
1458
|
+
class: We(["component__icon", _t.value])
|
|
1449
1459
|
}, [
|
|
1450
|
-
ia(
|
|
1451
|
-
|
|
1460
|
+
ia(n.$slots, "icon", {}, () => [
|
|
1461
|
+
s[6] || (s[6] = ve("span", null, "♥", -1))
|
|
1452
1462
|
], !0)
|
|
1453
|
-
], 10,
|
|
1454
|
-
], 14,
|
|
1455
|
-
|
|
1463
|
+
], 10, Ll)) : Be("", !0)
|
|
1464
|
+
], 14, hl),
|
|
1465
|
+
ea.value ? (F(), q("div", {
|
|
1456
1466
|
key: 0,
|
|
1457
1467
|
class: We(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
1458
1468
|
}, [
|
|
1459
|
-
ia(
|
|
1460
|
-
ga(
|
|
1469
|
+
ia(n.$slots, "message", {}, () => [
|
|
1470
|
+
ga(xt(e.message), 1)
|
|
1461
1471
|
], !0)
|
|
1462
1472
|
], 2)) : Be("", !0)
|
|
1463
1473
|
], 16)) : Be("", !0);
|
|
1464
1474
|
}
|
|
1465
|
-
}),
|
|
1466
|
-
const
|
|
1475
|
+
}), Bl = /* @__PURE__ */ ba(Tl, [["__scopeId", "data-v-8af30d23"]]);
|
|
1476
|
+
const Al = ["for"], _l = ["id"], $l = { class: "chip-text" }, wl = ["onClick"], Rl = ["id", "name", "placeholder", "readonly", "autocomplete", "required", "tabindex"], Ml = /* @__PURE__ */ Object.assign({
|
|
1467
1477
|
name: "NbInputChip",
|
|
1468
1478
|
inheritAttrs: !1
|
|
1469
1479
|
}, {
|
|
@@ -1788,56 +1798,56 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
1788
1798
|
emits: ["clicked", "changed", "removed", "added", "input-changed", "focused", "blurred"],
|
|
1789
1799
|
setup(e, { emit: m }) {
|
|
1790
1800
|
fa((u) => ({
|
|
1791
|
-
"376e4d80":
|
|
1792
|
-
d807475a:
|
|
1793
|
-
"2226ac9e":
|
|
1794
|
-
"19aa3459":
|
|
1795
|
-
"0af60f52":
|
|
1796
|
-
"4bbf74ed":
|
|
1797
|
-
"1e97d576":
|
|
1798
|
-
"7a6f588e":
|
|
1799
|
-
"2c5ee94f":
|
|
1800
|
-
"5743c377":
|
|
1801
|
-
96524120:
|
|
1802
|
-
"14bf75ea":
|
|
1803
|
-
b4bd543a:
|
|
1804
|
-
ade22ca8:
|
|
1805
|
-
f111ceb4:
|
|
1806
|
-
"2cc9ab48":
|
|
1807
|
-
14762890:
|
|
1801
|
+
"376e4d80": Y.value,
|
|
1802
|
+
d807475a: rt.value,
|
|
1803
|
+
"2226ac9e": o(gt),
|
|
1804
|
+
"19aa3459": o(He),
|
|
1805
|
+
"0af60f52": o(tt),
|
|
1806
|
+
"4bbf74ed": o(Je),
|
|
1807
|
+
"1e97d576": o(Te),
|
|
1808
|
+
"7a6f588e": o(Se),
|
|
1809
|
+
"2c5ee94f": o(Ge),
|
|
1810
|
+
"5743c377": o(lt),
|
|
1811
|
+
96524120: o(dt),
|
|
1812
|
+
"14bf75ea": o(Xe),
|
|
1813
|
+
b4bd543a: o(Ke),
|
|
1814
|
+
ade22ca8: o(y),
|
|
1815
|
+
f111ceb4: o(ye),
|
|
1816
|
+
"2cc9ab48": o(ct),
|
|
1817
|
+
14762890: ae.value,
|
|
1808
1818
|
fd7aaf40: B.value,
|
|
1809
|
-
ea04a49c:
|
|
1810
|
-
"594730ca":
|
|
1819
|
+
ea04a49c: Rt.value,
|
|
1820
|
+
"594730ca": Mt.value,
|
|
1811
1821
|
b5c8eede: u.styleButtonColor,
|
|
1812
1822
|
"2d3d8114": vt.value,
|
|
1813
|
-
"87feb986":
|
|
1814
|
-
a61b2794:
|
|
1815
|
-
"2abf974a":
|
|
1816
|
-
"71083e54":
|
|
1823
|
+
"87feb986": o(at),
|
|
1824
|
+
a61b2794: o(yt),
|
|
1825
|
+
"2abf974a": o(Ue),
|
|
1826
|
+
"71083e54": o(V)
|
|
1817
1827
|
})), sa(() => {
|
|
1818
|
-
|
|
1828
|
+
U.value.length > 0 && (j.value = U.value);
|
|
1819
1829
|
});
|
|
1820
|
-
const C = m,
|
|
1821
|
-
nbId:
|
|
1830
|
+
const C = m, E = e, {
|
|
1831
|
+
nbId: D,
|
|
1822
1832
|
display: Ve,
|
|
1823
1833
|
textColor: pe,
|
|
1824
1834
|
paddingX: Ae,
|
|
1825
1835
|
paddingY: ke,
|
|
1826
1836
|
borderRadius: se,
|
|
1827
|
-
disabled:
|
|
1837
|
+
disabled: J,
|
|
1828
1838
|
fontFamily: Pe,
|
|
1829
1839
|
fontSize: _e,
|
|
1830
1840
|
fontWeight: ne,
|
|
1831
|
-
currentList:
|
|
1832
|
-
allowDuplicates:
|
|
1841
|
+
currentList: U,
|
|
1842
|
+
allowDuplicates: w,
|
|
1833
1843
|
minChips: oe,
|
|
1834
1844
|
maxChips: de,
|
|
1835
|
-
inputPosition:
|
|
1845
|
+
inputPosition: G,
|
|
1836
1846
|
width: Le,
|
|
1837
1847
|
inputName: ce,
|
|
1838
|
-
inputPlaceholder:
|
|
1848
|
+
inputPlaceholder: P,
|
|
1839
1849
|
inputUppercase: be,
|
|
1840
|
-
inputReadonly:
|
|
1850
|
+
inputReadonly: X,
|
|
1841
1851
|
inputAutocomplete: Ce,
|
|
1842
1852
|
required: ge,
|
|
1843
1853
|
textAlign: xe,
|
|
@@ -1845,100 +1855,100 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
1845
1855
|
activeTextStyle: L,
|
|
1846
1856
|
theme: x,
|
|
1847
1857
|
inputStyle: $e,
|
|
1848
|
-
lightBgColor:
|
|
1858
|
+
lightBgColor: He,
|
|
1849
1859
|
lightBgColorFocus: we,
|
|
1850
|
-
lightBorderColor:
|
|
1860
|
+
lightBorderColor: tt,
|
|
1851
1861
|
lightBorderColorFocus: ye,
|
|
1852
|
-
lightDisabledBgColor:
|
|
1862
|
+
lightDisabledBgColor: at,
|
|
1853
1863
|
lightTextColor: gt,
|
|
1854
|
-
lightChipBgColor:
|
|
1864
|
+
lightChipBgColor: Je,
|
|
1855
1865
|
lightChipTextColor: Te,
|
|
1856
1866
|
lightChipRemoveColor: Se,
|
|
1857
1867
|
lightDisabledBorderColor: yt,
|
|
1858
|
-
darkBgColor:
|
|
1868
|
+
darkBgColor: lt,
|
|
1859
1869
|
darkBgColorFocus: st,
|
|
1860
1870
|
darkBorderColor: dt,
|
|
1861
1871
|
darkBorderColorFocus: ct,
|
|
1862
|
-
darkDisabledBgColor:
|
|
1863
|
-
darkTextColor:
|
|
1864
|
-
darkChipBgColor:
|
|
1865
|
-
darkChipTextColor:
|
|
1872
|
+
darkDisabledBgColor: Ue,
|
|
1873
|
+
darkTextColor: Ge,
|
|
1874
|
+
darkChipBgColor: Xe,
|
|
1875
|
+
darkChipTextColor: Ke,
|
|
1866
1876
|
darkChipRemoveColor: y,
|
|
1867
1877
|
darkDisabledBorderColor: V,
|
|
1868
1878
|
tabIndex: ue,
|
|
1869
|
-
hasTabIndexEnter:
|
|
1879
|
+
hasTabIndexEnter: Z,
|
|
1870
1880
|
ariaLabel: me,
|
|
1871
1881
|
ariaAttrs: Re,
|
|
1872
|
-
caretColor:
|
|
1882
|
+
caretColor: Ye,
|
|
1873
1883
|
selectionBgColor: re,
|
|
1874
|
-
selectionTextColor:
|
|
1884
|
+
selectionTextColor: c,
|
|
1875
1885
|
showLabel: b,
|
|
1876
1886
|
label: fe,
|
|
1877
|
-
labelBackground:
|
|
1878
|
-
labelPadding:
|
|
1887
|
+
labelBackground: K,
|
|
1888
|
+
labelPadding: ee,
|
|
1879
1889
|
labelBorderRadius: Me,
|
|
1880
1890
|
labelLeft: ze,
|
|
1881
1891
|
inputLabelMarginActive: Fe,
|
|
1882
|
-
labelActiveTop:
|
|
1883
|
-
labelActiveLeft:
|
|
1884
|
-
fontFamilyLabel:
|
|
1885
|
-
fontSizeLabel:
|
|
1892
|
+
labelActiveTop: Qe,
|
|
1893
|
+
labelActiveLeft: Ze,
|
|
1894
|
+
fontFamilyLabel: nt,
|
|
1895
|
+
fontSizeLabel: ot,
|
|
1886
1896
|
fontSizeLabelActive: ft,
|
|
1887
1897
|
fontWeightLabel: h,
|
|
1888
|
-
lightTextColorLabel:
|
|
1898
|
+
lightTextColorLabel: R,
|
|
1889
1899
|
lightTextColorLabelActive: k,
|
|
1890
1900
|
darkTextColorLabel: Oe,
|
|
1891
1901
|
darkTextColorLabelActive: T
|
|
1892
|
-
} = va(
|
|
1893
|
-
const u =
|
|
1902
|
+
} = va(E), he = Q(""), St = Q(null), Vt = Q(null), ut = Q(null), j = Q([]), N = Q(!1), te = a(() => {
|
|
1903
|
+
const u = J.value ? "component-disabled" : "", g = Ve.value !== "b" ? "inline-block" : "block", W = !Le.value || Le.value < 185 ? 185 : Le.value, qe = pe ? pe.value : "ffffff", Nt = Ye.value ? Ye.value : "", Jt = re.value ? re.value : "", ht = c.value ? c.value : "", It = Ae.value !== 0 && !Ae.value || Ae.value < 0 ? 1 : Ae.value, Wt = ke.value !== 0 && !ke.value || ke.value < 0 ? 0.2 : ke.value, Xt = se.value !== 0 && !se.value || se.value < 0 ? 0 : se.value, Zt = Pe.value ? Pe.value : "'Lato', sans-serif", Ct = _e.value ? _e.value : "1.4em", ea = ne.value !== 0 && !ne.value || ne.value < 0 ? 100 : ne.value, ta = oe.value !== 0 && !oe.value || oe.value < 0 ? 0 : oe.value, aa = de.value !== 0 && !de.value || de.value < 0 ? 10 : de.value, la = !G.value || !["top", "bottom"].includes(G.value) ? "bottom" : G.value, _t = !$e.value || !["background", "line", "border"].includes($e.value) ? "background" : $e.value, na = x.value ? x.value : "light", oa = b.value ? b.value : !1, ua = ze.value !== 0 && !ze.value || ze.value < 0 ? 5 : ze.value, Et = K.value ? K.value : "transparent", Pt = Fe.value !== 0 && !Fe.value || Fe.value < 0 ? 15 : Fe.value, Ft = ee.value ? ee.value : "1px 5px", bt = Me.value !== 0 && !Me.value || Me.value < 0 ? 0 : Me.value, Lt = Qe.value === null || Qe.value === void 0 ? 13 : Qe.value, it = Ze.value === null || Ze.value === void 0 ? 5 : Ze.value, Ot = nt.value ? nt.value : "'Lato', sans-serif", ra = ot.value ? ot.value : "1em", n = ft.value ? ft.value : "0.8em", s = h.value ? h.value : 400, je = R.value ? R.value : "#333333", le = Oe.value ? Oe.value : "#ffffff", t = k.value ? k.value : "#333333", l = T.value ? T.value : "#ffffff";
|
|
1894
1904
|
return {
|
|
1895
1905
|
disabled: u,
|
|
1896
1906
|
display: g,
|
|
1897
|
-
width:
|
|
1898
|
-
font:
|
|
1907
|
+
width: W,
|
|
1908
|
+
font: Zt,
|
|
1899
1909
|
fontSize: Ct,
|
|
1900
|
-
fontWeight:
|
|
1910
|
+
fontWeight: ea,
|
|
1901
1911
|
textColor: qe,
|
|
1902
|
-
caretColor:
|
|
1903
|
-
selectionBgColor:
|
|
1912
|
+
caretColor: Nt,
|
|
1913
|
+
selectionBgColor: Jt,
|
|
1904
1914
|
selectionTextColor: ht,
|
|
1905
|
-
paddingX:
|
|
1906
|
-
paddingY:
|
|
1907
|
-
borderRadius:
|
|
1908
|
-
minChips:
|
|
1909
|
-
maxChips:
|
|
1910
|
-
inputPosition:
|
|
1911
|
-
inputStyle:
|
|
1912
|
-
theme:
|
|
1913
|
-
showLabel:
|
|
1914
|
-
labelLeft:
|
|
1915
|
-
labelBackground:
|
|
1916
|
-
inputLabelMarginActive:
|
|
1917
|
-
labelPadding:
|
|
1915
|
+
paddingX: It,
|
|
1916
|
+
paddingY: Wt,
|
|
1917
|
+
borderRadius: Xt,
|
|
1918
|
+
minChips: ta,
|
|
1919
|
+
maxChips: aa,
|
|
1920
|
+
inputPosition: la,
|
|
1921
|
+
inputStyle: _t,
|
|
1922
|
+
theme: na,
|
|
1923
|
+
showLabel: oa,
|
|
1924
|
+
labelLeft: ua,
|
|
1925
|
+
labelBackground: Et,
|
|
1926
|
+
inputLabelMarginActive: Pt,
|
|
1927
|
+
labelPadding: Ft,
|
|
1918
1928
|
labelBorderRadius: bt,
|
|
1919
|
-
labelActiveTop:
|
|
1920
|
-
labelActiveLeft:
|
|
1921
|
-
fontFamilyLabel:
|
|
1922
|
-
fontSizeLabel:
|
|
1923
|
-
fontSizeLabelActive:
|
|
1924
|
-
fontWeightLabel:
|
|
1925
|
-
lightTextColorLabel:
|
|
1926
|
-
darkTextColorLabel:
|
|
1929
|
+
labelActiveTop: Lt,
|
|
1930
|
+
labelActiveLeft: it,
|
|
1931
|
+
fontFamilyLabel: Ot,
|
|
1932
|
+
fontSizeLabel: ra,
|
|
1933
|
+
fontSizeLabelActive: n,
|
|
1934
|
+
fontWeightLabel: s,
|
|
1935
|
+
lightTextColorLabel: je,
|
|
1936
|
+
darkTextColorLabel: le,
|
|
1927
1937
|
lightTextColorLabelActive: t,
|
|
1928
1938
|
darkTextColorLabelActive: l
|
|
1929
1939
|
};
|
|
1930
|
-
}), $ = a(() =>
|
|
1931
|
-
const u =
|
|
1940
|
+
}), $ = a(() => te.value.disabled), M = a(() => {
|
|
1941
|
+
const u = te.value, g = At.value;
|
|
1932
1942
|
return {
|
|
1933
1943
|
display: u.display,
|
|
1934
1944
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
1935
1945
|
paddingTop: g && b.value ? `${Math.abs(u.labelActiveTop)}px` : "0"
|
|
1936
1946
|
};
|
|
1937
|
-
}),
|
|
1938
|
-
const u =
|
|
1947
|
+
}), ae = a(() => {
|
|
1948
|
+
const u = te.value;
|
|
1939
1949
|
return u.fontSize ? u.fontSize : "1.4em";
|
|
1940
|
-
}),
|
|
1941
|
-
const u =
|
|
1950
|
+
}), I = a(() => {
|
|
1951
|
+
const u = te.value, g = At.value;
|
|
1942
1952
|
return {
|
|
1943
1953
|
color: u.textColor,
|
|
1944
1954
|
padding: `${u.paddingY}rem ${u.paddingX}rem`,
|
|
@@ -1946,7 +1956,7 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
1946
1956
|
textAlign: xe.value,
|
|
1947
1957
|
marginTop: g && b.value ? `${u.inputLabelMarginActive}px` : "0"
|
|
1948
1958
|
};
|
|
1949
|
-
}),
|
|
1959
|
+
}), $t = a(() => {
|
|
1950
1960
|
switch (L.value) {
|
|
1951
1961
|
case "italic":
|
|
1952
1962
|
return "component__text--italic";
|
|
@@ -1955,46 +1965,46 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
1955
1965
|
default:
|
|
1956
1966
|
return "component__text--normal";
|
|
1957
1967
|
}
|
|
1958
|
-
}),
|
|
1959
|
-
const u =
|
|
1968
|
+
}), wt = a(() => {
|
|
1969
|
+
const u = te.value;
|
|
1960
1970
|
return u.inputStyle !== "line" && _.value ? { borderRadius: `${u.borderRadius}rem` } : {};
|
|
1961
|
-
}),
|
|
1971
|
+
}), Y = a(() => te.value.font), vt = a(() => te.value.textColor), rt = a(() => te.value.inputPosition === "top" ? "column" : "column-reverse"), pt = a(() => {
|
|
1962
1972
|
const u = {};
|
|
1963
1973
|
Re.value && Object.keys(Re.value).forEach((qe) => u[`aria-${qe}`] = Re.value[qe]);
|
|
1964
1974
|
const g = {
|
|
1965
1975
|
"aria-label": me.value,
|
|
1966
|
-
"aria-disabled":
|
|
1976
|
+
"aria-disabled": J.value,
|
|
1967
1977
|
...u
|
|
1968
1978
|
};
|
|
1969
1979
|
return Object.fromEntries(
|
|
1970
|
-
Object.entries(g).filter(([
|
|
1980
|
+
Object.entries(g).filter(([W, qe]) => qe != null)
|
|
1971
1981
|
);
|
|
1972
1982
|
}), B = a(() => {
|
|
1973
|
-
const u =
|
|
1983
|
+
const u = te.value;
|
|
1974
1984
|
return u.caretColor || (u.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1975
|
-
}),
|
|
1976
|
-
const u =
|
|
1985
|
+
}), Rt = a(() => {
|
|
1986
|
+
const u = te.value;
|
|
1977
1987
|
return u.selectionBgColor || (u.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1978
|
-
}),
|
|
1979
|
-
const u =
|
|
1988
|
+
}), Mt = a(() => {
|
|
1989
|
+
const u = te.value;
|
|
1980
1990
|
return u.selectionTextColor || (u.theme === "dark" ? "#000000" : "#ffffff");
|
|
1981
|
-
}),
|
|
1991
|
+
}), Tt = a(() => ({
|
|
1982
1992
|
caretColor: B.value
|
|
1983
|
-
})),
|
|
1984
|
-
"--selection-bg-color":
|
|
1985
|
-
"--selection-text-color":
|
|
1993
|
+
})), jt = a(() => ({
|
|
1994
|
+
"--selection-bg-color": Rt.value,
|
|
1995
|
+
"--selection-text-color": Mt.value
|
|
1986
1996
|
})), mt = a(() => {
|
|
1987
|
-
const u =
|
|
1997
|
+
const u = te.value, g = {
|
|
1988
1998
|
width: `${u.width}px`
|
|
1989
1999
|
};
|
|
1990
2000
|
return u.display === "block" ? { width: "auto" } : g;
|
|
1991
|
-
}),
|
|
1992
|
-
const u =
|
|
2001
|
+
}), Bt = a(() => ce.value ? ce.value : `${D.value}-name-label`), At = a(() => N.value || j.value.length > 0 || he.value && he.value.trim().length > 0), zt = a(() => b.value ? N.value || j.value.length > 0 ? P.value : "" : P.value), Ht = a(() => {
|
|
2002
|
+
const u = te.value, g = At.value, W = g ? u.lightTextColorLabelActive : u.lightTextColorLabel, qe = g ? u.darkTextColorLabelActive : u.darkTextColorLabel;
|
|
1993
2003
|
return {
|
|
1994
2004
|
fontFamily: u.fontFamilyLabel,
|
|
1995
2005
|
fontSize: g ? u.fontSizeLabelActive : u.fontSizeLabel,
|
|
1996
2006
|
fontWeight: u.fontWeightLabel,
|
|
1997
|
-
color: u.theme === "dark" ? qe :
|
|
2007
|
+
color: u.theme === "dark" ? qe : W,
|
|
1998
2008
|
top: g ? `${u.labelActiveTop}px` : "50%",
|
|
1999
2009
|
left: g ? `${u.labelActiveLeft}px` : `${u.labelLeft}px`,
|
|
2000
2010
|
transform: g ? "translateY(0)" : "translateY(-50%)",
|
|
@@ -2003,14 +2013,14 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
2003
2013
|
padding: g ? u.labelPadding : "0",
|
|
2004
2014
|
borderRadius: g ? `${u.labelBorderRadius}rem` : "0"
|
|
2005
2015
|
};
|
|
2006
|
-
}),
|
|
2016
|
+
}), Ut = a(() => {
|
|
2007
2017
|
switch (x.value) {
|
|
2008
2018
|
case "dark":
|
|
2009
2019
|
return "component__theme--dark";
|
|
2010
2020
|
default:
|
|
2011
2021
|
return "component__theme--light";
|
|
2012
2022
|
}
|
|
2013
|
-
}),
|
|
2023
|
+
}), Gt = a(() => {
|
|
2014
2024
|
switch ($e.value) {
|
|
2015
2025
|
case "line":
|
|
2016
2026
|
return "component__input--line";
|
|
@@ -2019,95 +2029,95 @@ const Bl = ["for"], Al = ["id"], _l = { class: "chip-text" }, $l = ["onClick"],
|
|
|
2019
2029
|
default:
|
|
2020
2030
|
return "component__input--background";
|
|
2021
2031
|
}
|
|
2022
|
-
}),
|
|
2032
|
+
}), Kt = () => {
|
|
2023
2033
|
C("clicked");
|
|
2034
|
+
}, Yt = () => {
|
|
2035
|
+
N.value = !0, C("focused");
|
|
2024
2036
|
}, Qt = () => {
|
|
2025
|
-
|
|
2026
|
-
},
|
|
2027
|
-
|
|
2028
|
-
}, Lt = (u) => {
|
|
2029
|
-
if (!(X.value || Z.value) && u.key === "Enter" && he.value.trim() !== "") {
|
|
2037
|
+
N.value = !1, C("blurred");
|
|
2038
|
+
}, kt = (u) => {
|
|
2039
|
+
if (!(J.value || X.value) && u.key === "Enter" && he.value.trim() !== "") {
|
|
2030
2040
|
u.preventDefault();
|
|
2031
2041
|
let g = he.value.trim();
|
|
2032
|
-
be.value && (g = g.toUpperCase()), (
|
|
2042
|
+
be.value && (g = g.toUpperCase()), (w.value || !j.value.includes(g)) && Dt(g), he.value = "";
|
|
2033
2043
|
}
|
|
2034
|
-
},
|
|
2035
|
-
|
|
2044
|
+
}, Dt = (u) => {
|
|
2045
|
+
j.value.push(u), C("added", u);
|
|
2036
2046
|
}, r = (u) => {
|
|
2037
|
-
|
|
2047
|
+
j.value = j.value.filter((g) => g !== u), C("removed", u);
|
|
2038
2048
|
};
|
|
2039
|
-
return U
|
|
2040
|
-
|
|
2041
|
-
}),
|
|
2049
|
+
return H(U, (u) => {
|
|
2050
|
+
j.value = u, C("changed", u);
|
|
2051
|
+
}), H(he, (u) => {
|
|
2042
2052
|
C("input-changed", u);
|
|
2043
|
-
}), (u, g) =>
|
|
2053
|
+
}), (u, g) => o(D) ? (F(), q("div", da({
|
|
2044
2054
|
key: 0,
|
|
2045
2055
|
class: ["nb-wrapper", $.value],
|
|
2046
|
-
style: [
|
|
2056
|
+
style: [M.value],
|
|
2047
2057
|
role: "input"
|
|
2048
|
-
}, pt.value, { onClick:
|
|
2049
|
-
|
|
2058
|
+
}, pt.value, { onClick: Kt }), [
|
|
2059
|
+
o(b) ? (F(), q("label", {
|
|
2050
2060
|
key: 0,
|
|
2051
|
-
for:
|
|
2061
|
+
for: Bt.value,
|
|
2052
2062
|
class: "component__label",
|
|
2053
|
-
style: Ee([
|
|
2054
|
-
},
|
|
2063
|
+
style: Ee([Ht.value])
|
|
2064
|
+
}, xt(o(fe)), 13, Al)) : Be("", !0),
|
|
2055
2065
|
ve("div", {
|
|
2056
|
-
id:
|
|
2066
|
+
id: o(D),
|
|
2057
2067
|
ref_key: "chipsContainer",
|
|
2058
|
-
ref:
|
|
2059
|
-
class: We(["nb-reset", "component",
|
|
2060
|
-
style: Ee([
|
|
2068
|
+
ref: St,
|
|
2069
|
+
class: We(["nb-reset", "component", Ut.value, Gt.value]),
|
|
2070
|
+
style: Ee([I.value, mt.value, wt.value])
|
|
2061
2071
|
}, [
|
|
2062
|
-
|
|
2072
|
+
j.value.length > 0 ? (F(), q("div", {
|
|
2063
2073
|
key: 0,
|
|
2064
2074
|
ref_key: "chips",
|
|
2065
|
-
ref:
|
|
2075
|
+
ref: ut,
|
|
2066
2076
|
class: "chips"
|
|
2067
2077
|
}, [
|
|
2068
|
-
(
|
|
2069
|
-
key:
|
|
2078
|
+
(F(!0), q(qa, null, ja(j.value, (W) => (F(), q("div", {
|
|
2079
|
+
key: W,
|
|
2070
2080
|
class: "chip"
|
|
2071
2081
|
}, [
|
|
2072
2082
|
ia(u.$slots, "chip", {
|
|
2073
|
-
chips:
|
|
2074
|
-
chip:
|
|
2083
|
+
chips: j.value,
|
|
2084
|
+
chip: W,
|
|
2075
2085
|
removeChip: r
|
|
2076
2086
|
}, () => [
|
|
2077
|
-
ve("span",
|
|
2078
|
-
!
|
|
2087
|
+
ve("span", $l, xt(W), 1),
|
|
2088
|
+
!o(J) && !o(X) ? (F(), q("span", {
|
|
2079
2089
|
key: 0,
|
|
2080
2090
|
class: "chip-remove",
|
|
2081
|
-
onClick: (qe) => r(
|
|
2082
|
-
}, "×", 8,
|
|
2091
|
+
onClick: (qe) => r(W)
|
|
2092
|
+
}, "×", 8, wl)) : Be("", !0)
|
|
2083
2093
|
], !0)
|
|
2084
2094
|
]))), 128))
|
|
2085
2095
|
], 512)) : Be("", !0),
|
|
2086
2096
|
pa(ve("input", {
|
|
2087
2097
|
ref_key: "chipInput",
|
|
2088
|
-
ref:
|
|
2098
|
+
ref: Vt,
|
|
2089
2099
|
type: "text",
|
|
2090
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
2091
|
-
id:
|
|
2092
|
-
name:
|
|
2093
|
-
placeholder:
|
|
2094
|
-
readonly:
|
|
2095
|
-
autocomplete:
|
|
2096
|
-
required:
|
|
2097
|
-
tabindex:
|
|
2098
|
-
class: We(["chips-input",
|
|
2099
|
-
style: Ee([
|
|
2100
|
-
onKeydown: g[1] || (g[1] =
|
|
2101
|
-
onFocus:
|
|
2102
|
-
onBlur:
|
|
2103
|
-
}, null, 46,
|
|
2100
|
+
"onUpdate:modelValue": g[0] || (g[0] = (W) => he.value = W),
|
|
2101
|
+
id: Bt.value,
|
|
2102
|
+
name: Bt.value,
|
|
2103
|
+
placeholder: zt.value,
|
|
2104
|
+
readonly: o(X),
|
|
2105
|
+
autocomplete: o(Ce),
|
|
2106
|
+
required: o(ge),
|
|
2107
|
+
tabindex: o(J) || o(X) ? -1 : o(ue),
|
|
2108
|
+
class: We(["chips-input", $t.value]),
|
|
2109
|
+
style: Ee([Tt.value, jt.value]),
|
|
2110
|
+
onKeydown: g[1] || (g[1] = qt((W) => !o(J) && o(Z) && kt(W), ["enter"])),
|
|
2111
|
+
onFocus: Yt,
|
|
2112
|
+
onBlur: Qt
|
|
2113
|
+
}, null, 46, Rl), [
|
|
2104
2114
|
[Ua, he.value]
|
|
2105
2115
|
])
|
|
2106
|
-
], 14,
|
|
2116
|
+
], 14, _l)
|
|
2107
2117
|
], 16)) : Be("", !0);
|
|
2108
2118
|
}
|
|
2109
|
-
}),
|
|
2110
|
-
const
|
|
2119
|
+
}), zl = /* @__PURE__ */ ba(Ml, [["__scopeId", "data-v-3467aba9"]]);
|
|
2120
|
+
const Dl = ["id"], Nl = ["for"], Il = ["id", "name", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex"], Wl = /* @__PURE__ */ Object.assign({
|
|
2111
2121
|
name: "NbTextarea",
|
|
2112
2122
|
inheritAttrs: !1
|
|
2113
2123
|
}, {
|
|
@@ -2477,53 +2487,53 @@ const zl = ["id"], Dl = ["for"], Nl = ["id", "name", "placeholder", "disabled",
|
|
|
2477
2487
|
],
|
|
2478
2488
|
setup(e, { emit: m }) {
|
|
2479
2489
|
fa((r) => ({
|
|
2480
|
-
"047a55d8":
|
|
2481
|
-
ea886f76:
|
|
2482
|
-
"5f575c4c":
|
|
2483
|
-
"49bec09e":
|
|
2484
|
-
"6c0f38b6":
|
|
2485
|
-
"39a7a83b":
|
|
2486
|
-
f3bddb72:
|
|
2487
|
-
"57474d63":
|
|
2488
|
-
"2f3efd35":
|
|
2489
|
-
dec8fa5e:
|
|
2490
|
-
"1a17e7ed":
|
|
2491
|
-
"643b68eb":
|
|
2492
|
-
"21bee77c":
|
|
2493
|
-
"07928033":
|
|
2494
|
-
"34a18ea8":
|
|
2495
|
-
"780ea453":
|
|
2490
|
+
"047a55d8": N.value,
|
|
2491
|
+
ea886f76: o(Je),
|
|
2492
|
+
"5f575c4c": $t.value,
|
|
2493
|
+
"49bec09e": wt.value,
|
|
2494
|
+
"6c0f38b6": Y.value,
|
|
2495
|
+
"39a7a83b": o(lt),
|
|
2496
|
+
f3bddb72: o(yt),
|
|
2497
|
+
"57474d63": o(Te),
|
|
2498
|
+
"2f3efd35": o(Se),
|
|
2499
|
+
dec8fa5e: o(gt),
|
|
2500
|
+
"1a17e7ed": o(ye),
|
|
2501
|
+
"643b68eb": o(at),
|
|
2502
|
+
"21bee77c": Vt.value,
|
|
2503
|
+
"07928033": o(st),
|
|
2504
|
+
"34a18ea8": Bt.value,
|
|
2505
|
+
"780ea453": te.value,
|
|
2496
2506
|
56538312: $.value,
|
|
2497
|
-
"788359bb":
|
|
2498
|
-
dfd2f9d6:
|
|
2507
|
+
"788359bb": M.value,
|
|
2508
|
+
dfd2f9d6: I.value,
|
|
2499
2509
|
ecc55bb6: r.styleButtonColor,
|
|
2500
|
-
f59f43ec:
|
|
2510
|
+
f59f43ec: ae.value
|
|
2501
2511
|
})), sa(() => {
|
|
2502
|
-
k.value =
|
|
2512
|
+
k.value = He.value;
|
|
2503
2513
|
}), ma(() => {
|
|
2504
|
-
|
|
2514
|
+
Yt();
|
|
2505
2515
|
});
|
|
2506
|
-
const C = m,
|
|
2507
|
-
nbId:
|
|
2516
|
+
const C = m, E = e, {
|
|
2517
|
+
nbId: D,
|
|
2508
2518
|
display: Ve,
|
|
2509
2519
|
hasTabIndexEnter: pe,
|
|
2510
2520
|
ariaLabel: Ae,
|
|
2511
2521
|
ariaAttrs: ke,
|
|
2512
2522
|
textColor: se,
|
|
2513
|
-
caretColor:
|
|
2523
|
+
caretColor: J,
|
|
2514
2524
|
selectionBgColor: Pe,
|
|
2515
2525
|
selectionTextColor: _e,
|
|
2516
2526
|
hasBorderRadius: ne,
|
|
2517
|
-
borderRadius:
|
|
2518
|
-
disabled:
|
|
2527
|
+
borderRadius: U,
|
|
2528
|
+
disabled: w,
|
|
2519
2529
|
fontFamily: oe,
|
|
2520
2530
|
fontSize: de,
|
|
2521
|
-
fontWeight:
|
|
2531
|
+
fontWeight: G,
|
|
2522
2532
|
fontFamilyMsg: Le,
|
|
2523
2533
|
fontSizeMsg: ce,
|
|
2524
|
-
fontWeightMsg:
|
|
2534
|
+
fontWeightMsg: P,
|
|
2525
2535
|
textMessageColor: be,
|
|
2526
|
-
inputWidth:
|
|
2536
|
+
inputWidth: X,
|
|
2527
2537
|
inputStyle: Ce,
|
|
2528
2538
|
activeTextStyle: ge,
|
|
2529
2539
|
inputReadonly: xe,
|
|
@@ -2531,121 +2541,121 @@ const zl = ["id"], Dl = ["for"], Nl = ["id", "name", "placeholder", "disabled",
|
|
|
2531
2541
|
inputUppercase: L,
|
|
2532
2542
|
inputName: x,
|
|
2533
2543
|
inputPlaceholder: $e,
|
|
2534
|
-
inputText:
|
|
2544
|
+
inputText: He,
|
|
2535
2545
|
theme: we,
|
|
2536
|
-
tabindex:
|
|
2546
|
+
tabindex: tt,
|
|
2537
2547
|
lightBgColor: ye,
|
|
2538
|
-
lightBgColorFocus:
|
|
2548
|
+
lightBgColorFocus: at,
|
|
2539
2549
|
lightDisabledBgColor: gt,
|
|
2540
|
-
lightTextColor:
|
|
2550
|
+
lightTextColor: Je,
|
|
2541
2551
|
darkBgColor: Te,
|
|
2542
2552
|
darkBgColorFocus: Se,
|
|
2543
2553
|
darkDisabledBgColor: yt,
|
|
2544
|
-
darkTextColor:
|
|
2554
|
+
darkTextColor: lt,
|
|
2545
2555
|
textAlign: st,
|
|
2546
2556
|
showMsg: dt,
|
|
2547
2557
|
hasMsg: ct,
|
|
2548
|
-
showLabel:
|
|
2549
|
-
labelBackground:
|
|
2550
|
-
labelPadding:
|
|
2551
|
-
labelBorderRadius:
|
|
2558
|
+
showLabel: Ue,
|
|
2559
|
+
labelBackground: Ge,
|
|
2560
|
+
labelPadding: Xe,
|
|
2561
|
+
labelBorderRadius: Ke,
|
|
2552
2562
|
labelLeft: y,
|
|
2553
2563
|
inputLabelMarginActive: V,
|
|
2554
2564
|
labelActiveTop: ue,
|
|
2555
|
-
labelActiveLeft:
|
|
2565
|
+
labelActiveLeft: Z,
|
|
2556
2566
|
fontFamilyLabel: me,
|
|
2557
2567
|
fontSizeLabel: Re,
|
|
2558
|
-
fontSizeLabelActive:
|
|
2568
|
+
fontSizeLabelActive: Ye,
|
|
2559
2569
|
fontWeightLabel: re,
|
|
2560
|
-
lightTextColorLabel:
|
|
2570
|
+
lightTextColorLabel: c,
|
|
2561
2571
|
lightTextColorLabelActive: b,
|
|
2562
2572
|
darkTextColorLabel: fe,
|
|
2563
|
-
darkTextColorLabelActive:
|
|
2564
|
-
rows:
|
|
2573
|
+
darkTextColorLabelActive: K,
|
|
2574
|
+
rows: ee,
|
|
2565
2575
|
cols: Me,
|
|
2566
2576
|
maxlength: ze,
|
|
2567
2577
|
minlength: Fe,
|
|
2568
|
-
wrap:
|
|
2569
|
-
spellcheck:
|
|
2570
|
-
autofocus:
|
|
2571
|
-
resize:
|
|
2578
|
+
wrap: Qe,
|
|
2579
|
+
spellcheck: Ze,
|
|
2580
|
+
autofocus: nt,
|
|
2581
|
+
resize: ot,
|
|
2572
2582
|
autoResize: ft,
|
|
2573
2583
|
minRows: h,
|
|
2574
|
-
maxRows:
|
|
2575
|
-
} = va(
|
|
2576
|
-
const r =
|
|
2584
|
+
maxRows: R
|
|
2585
|
+
} = va(E), k = Q(""), Oe = Q(!1), T = a(() => {
|
|
2586
|
+
const r = w.value ? "component-disabled" : "", u = Ve.value !== "b" ? "inline-block" : "block", g = se ? se.value : "ffffff", W = J.value ? J.value : "", qe = Pe.value ? Pe.value : "", Nt = _e.value ? _e.value : "", Jt = ne.value ? ne.value : !1, ht = U.value !== 0 && !U.value || U.value < 0 ? 0 : U.value, It = oe.value ? oe.value : "'Lato', sans-serif", Wt = de.value ? de.value : "1.4em", Xt = G.value !== 0 && !G.value || G.value < 0 ? 100 : G.value, Zt = Le.value ? Le.value : "'Lato', sans-serif", Ct = ce.value ? ce.value : "1em", ea = P.value !== 0 && !P.value || P.value < 0 ? 100 : P.value, ta = be.value ? be.value : "#f15574", aa = X.value ? X.value : 200, la = ge.value ? ge.value : "normal", _t = xe.value ? xe.value : !1, na = L.value ? L.value : !1, oa = we.value ? we.value : "normal", ua = st.value ? st.value : "left", Et = Ce.value ? Ce.value : "background", Pt = Ue.value ? Ue.value : !1, Ft = y.value !== 0 && !y.value || y.value < 0 ? 5 : y.value, bt = Ge.value ? Ge.value : "transparent", Lt = V.value !== 0 && !V.value || V.value < 0 ? 15 : V.value, it = Xe.value ? Xe.value : "1px 5px", Ot = Ke.value !== 0 && !Ke.value || Ke.value < 0 ? 0 : Ke.value, ra = ue.value === null || ue.value === void 0 ? -13 : ue.value, n = Z.value === null || Z.value === void 0 ? -10 : Z.value, s = me.value ? me.value : "'Lato', sans-serif", je = Re.value ? Re.value : "1em", le = Ye.value ? Ye.value : "0.8em", t = re.value ? re.value : 400, l = c.value ? c.value : "#ffffff", d = fe.value ? fe.value : "#000000", i = b.value ? b.value : "#ffffff", v = K.value ? K.value : "#000000", f = ee.value && ee.value > 0 ? ee.value : 2, p = Me.value && Me.value > 0 ? Me.value : 20, S = ze.value !== null && ze.value >= 0 ? ze.value : null, A = Fe.value !== null && Fe.value >= 0 ? Fe.value : null, z = Qe.value && ["soft", "hard", "off"].includes(Qe.value) ? Qe.value : "soft", O = Ze.value !== void 0 ? Ze.value : "default", ie = nt.value !== void 0 ? nt.value : !1, De = ot.value && ["none", "both", "vertical", "horizontal"].includes(ot.value) ? ot.value : "vertical", et = ft.value !== void 0 ? ft.value : !1, Ne = h.value !== null && h.value > 0 ? h.value : null, Ie = R.value !== null && R.value > 0 ? R.value : null;
|
|
2577
2587
|
return {
|
|
2578
2588
|
disabled: r,
|
|
2579
2589
|
display: u,
|
|
2580
|
-
font:
|
|
2581
|
-
fontSize:
|
|
2582
|
-
fontWeight:
|
|
2583
|
-
fontFamilyMsg:
|
|
2590
|
+
font: It,
|
|
2591
|
+
fontSize: Wt,
|
|
2592
|
+
fontWeight: Xt,
|
|
2593
|
+
fontFamilyMsg: Zt,
|
|
2584
2594
|
fontSizeMsg: Ct,
|
|
2585
|
-
fontWeightMsg:
|
|
2586
|
-
textMessageColor:
|
|
2595
|
+
fontWeightMsg: ea,
|
|
2596
|
+
textMessageColor: ta,
|
|
2587
2597
|
textColor: g,
|
|
2588
|
-
caretColor:
|
|
2598
|
+
caretColor: W,
|
|
2589
2599
|
selectionBgColor: qe,
|
|
2590
|
-
selectionTextColor:
|
|
2591
|
-
hasBorderRadius:
|
|
2600
|
+
selectionTextColor: Nt,
|
|
2601
|
+
hasBorderRadius: Jt,
|
|
2592
2602
|
borderRadius: ht,
|
|
2593
|
-
textAlign:
|
|
2594
|
-
inputWidth:
|
|
2595
|
-
activeTextStyle:
|
|
2596
|
-
inputReadonly:
|
|
2597
|
-
inputUppercase:
|
|
2598
|
-
theme:
|
|
2599
|
-
inputStyle:
|
|
2600
|
-
showLabel:
|
|
2603
|
+
textAlign: ua,
|
|
2604
|
+
inputWidth: aa,
|
|
2605
|
+
activeTextStyle: la,
|
|
2606
|
+
inputReadonly: _t,
|
|
2607
|
+
inputUppercase: na,
|
|
2608
|
+
theme: oa,
|
|
2609
|
+
inputStyle: Et,
|
|
2610
|
+
showLabel: Pt,
|
|
2601
2611
|
labelBackground: bt,
|
|
2602
|
-
labelPadding:
|
|
2603
|
-
labelBorderRadius:
|
|
2604
|
-
labelLeft:
|
|
2605
|
-
inputLabelMarginActive:
|
|
2606
|
-
labelActiveTop:
|
|
2607
|
-
labelActiveLeft:
|
|
2608
|
-
fontFamilyLabel:
|
|
2609
|
-
fontSizeLabel:
|
|
2610
|
-
fontSizeLabelActive:
|
|
2612
|
+
labelPadding: it,
|
|
2613
|
+
labelBorderRadius: Ot,
|
|
2614
|
+
labelLeft: Ft,
|
|
2615
|
+
inputLabelMarginActive: Lt,
|
|
2616
|
+
labelActiveTop: ra,
|
|
2617
|
+
labelActiveLeft: n,
|
|
2618
|
+
fontFamilyLabel: s,
|
|
2619
|
+
fontSizeLabel: je,
|
|
2620
|
+
fontSizeLabelActive: le,
|
|
2611
2621
|
fontWeightLabel: t,
|
|
2612
2622
|
lightTextColorLabel: l,
|
|
2613
|
-
darkTextColorLabel:
|
|
2623
|
+
darkTextColorLabel: d,
|
|
2614
2624
|
lightTextColorLabelActive: i,
|
|
2615
2625
|
darkTextColorLabelActive: v,
|
|
2616
|
-
rows:
|
|
2626
|
+
rows: f,
|
|
2617
2627
|
cols: p,
|
|
2618
2628
|
maxlength: S,
|
|
2619
2629
|
minlength: A,
|
|
2620
|
-
wrap:
|
|
2621
|
-
spellcheck:
|
|
2630
|
+
wrap: z,
|
|
2631
|
+
spellcheck: O,
|
|
2622
2632
|
autofocus: ie,
|
|
2623
2633
|
resize: De,
|
|
2624
|
-
autoResize:
|
|
2634
|
+
autoResize: et,
|
|
2625
2635
|
minRows: Ne,
|
|
2626
2636
|
maxRows: Ie
|
|
2627
2637
|
};
|
|
2628
|
-
}), he = a(() => T.value.disabled),
|
|
2638
|
+
}), he = a(() => T.value.disabled), St = a(() => ({
|
|
2629
2639
|
display: T.value.display
|
|
2630
|
-
})),
|
|
2640
|
+
})), Vt = a(() => {
|
|
2631
2641
|
const r = T.value;
|
|
2632
2642
|
return r.fontSize ? r.fontSize : "1.4em";
|
|
2633
|
-
}),
|
|
2643
|
+
}), ut = a(() => {
|
|
2634
2644
|
const r = T.value, u = mt.value;
|
|
2635
2645
|
return {
|
|
2636
2646
|
fontWeight: r.fontWeight,
|
|
2637
|
-
marginTop: u &&
|
|
2647
|
+
marginTop: u && Ue.value ? `${r.inputLabelMarginActive}px` : "0"
|
|
2638
2648
|
};
|
|
2639
|
-
}),
|
|
2649
|
+
}), j = a(() => {
|
|
2640
2650
|
const r = T.value;
|
|
2641
2651
|
return r.inputStyle !== "line" && r.hasBorderRadius ? { borderRadius: `${r.borderRadius}rem` } : {};
|
|
2642
|
-
}),
|
|
2652
|
+
}), N = a(() => T.value.font), te = a(() => T.value.fontFamilyMsg), $ = a(() => T.value.fontSizeMsg), M = a(() => T.value.fontWeightMsg), ae = a(() => T.value.textColor), I = a(() => T.value.textMessageColor), $t = a(() => {
|
|
2643
2653
|
const r = T.value;
|
|
2644
2654
|
return r.caretColor || (r.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2645
|
-
}),
|
|
2655
|
+
}), wt = a(() => {
|
|
2646
2656
|
const r = T.value;
|
|
2647
2657
|
return r.selectionBgColor || (r.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2648
|
-
}),
|
|
2658
|
+
}), Y = a(() => {
|
|
2649
2659
|
const r = T.value;
|
|
2650
2660
|
return r.selectionTextColor || (r.theme === "dark" ? "#000000" : "#ffffff");
|
|
2651
2661
|
}), vt = a(() => {
|
|
@@ -2653,7 +2663,7 @@ const zl = ["id"], Dl = ["for"], Nl = ["id", "name", "placeholder", "disabled",
|
|
|
2653
2663
|
return r.display === "block" ? { width: "100%" } : {
|
|
2654
2664
|
width: `${r.inputWidth}px`
|
|
2655
2665
|
};
|
|
2656
|
-
}),
|
|
2666
|
+
}), rt = a(() => {
|
|
2657
2667
|
switch (Ce.value) {
|
|
2658
2668
|
case "line":
|
|
2659
2669
|
return "component__input--line";
|
|
@@ -2678,26 +2688,26 @@ const zl = ["id"], Dl = ["for"], Nl = ["id", "name", "placeholder", "disabled",
|
|
|
2678
2688
|
default:
|
|
2679
2689
|
return "component__theme--light";
|
|
2680
2690
|
}
|
|
2681
|
-
}),
|
|
2691
|
+
}), Rt = a(() => T.value.inputReadonly ? "component__input--read-only" : ""), Mt = a(() => T.value.inputUppercase ? "component__input--uppercase" : ""), Tt = a(() => x.value ? x.value : `${D.value}-name-label`), jt = a(() => Ue.value ? Oe.value ? $e.value : "" : $e.value), mt = a(() => Oe.value || k.value && k.value.trim().length > 0);
|
|
2682
2692
|
a(() => Oe.value ? "component__input--active" : "component__input--no-active");
|
|
2683
|
-
const
|
|
2693
|
+
const Bt = a(() => "6px 10px"), At = a(() => !!(dt.value && ct.value)), zt = a(() => {
|
|
2684
2694
|
const r = {};
|
|
2685
|
-
ke.value && Object.keys(ke.value).forEach((
|
|
2695
|
+
ke.value && Object.keys(ke.value).forEach((W) => r[`aria-${W}`] = ke.value[W]);
|
|
2686
2696
|
const u = {
|
|
2687
2697
|
"aria-label": Ae.value,
|
|
2688
|
-
"aria-disabled":
|
|
2698
|
+
"aria-disabled": w.value,
|
|
2689
2699
|
...r
|
|
2690
2700
|
};
|
|
2691
2701
|
return Object.fromEntries(
|
|
2692
|
-
Object.entries(u).filter(([g,
|
|
2702
|
+
Object.entries(u).filter(([g, W]) => W != null)
|
|
2693
2703
|
);
|
|
2694
|
-
}),
|
|
2695
|
-
const r = T.value, u = mt.value, g = u ? r.lightTextColorLabelActive : r.lightTextColorLabel,
|
|
2704
|
+
}), Ht = a(() => {
|
|
2705
|
+
const r = T.value, u = mt.value, g = u ? r.lightTextColorLabelActive : r.lightTextColorLabel, W = u ? r.darkTextColorLabelActive : r.darkTextColorLabel;
|
|
2696
2706
|
return {
|
|
2697
2707
|
fontFamily: r.fontFamilyLabel,
|
|
2698
2708
|
fontSize: u ? r.fontSizeLabelActive : r.fontSizeLabel,
|
|
2699
2709
|
fontWeight: r.fontWeightLabel,
|
|
2700
|
-
color: r.theme === "dark" ?
|
|
2710
|
+
color: r.theme === "dark" ? W : g,
|
|
2701
2711
|
top: u ? `${r.labelActiveTop}px` : "50%",
|
|
2702
2712
|
left: u ? `${r.labelActiveLeft}px` : `${r.labelLeft}px`,
|
|
2703
2713
|
transform: u ? "translateY(0)" : "translateY(-50%)",
|
|
@@ -2711,7 +2721,7 @@ const zl = ["id"], Dl = ["for"], Nl = ["id", "name", "placeholder", "disabled",
|
|
|
2711
2721
|
const r = T.value;
|
|
2712
2722
|
return r.theme === "dark" ? r.darkTextColorLabelActive : r.lightTextColorLabelActive;
|
|
2713
2723
|
});
|
|
2714
|
-
const
|
|
2724
|
+
const Ut = a(() => {
|
|
2715
2725
|
const r = T.value, u = {
|
|
2716
2726
|
rows: r.rows,
|
|
2717
2727
|
cols: r.cols,
|
|
@@ -2720,84 +2730,84 @@ const zl = ["id"], Dl = ["for"], Nl = ["id", "name", "placeholder", "disabled",
|
|
|
2720
2730
|
autofocus: r.autofocus || void 0
|
|
2721
2731
|
};
|
|
2722
2732
|
return r.maxlength !== null && (u.maxlength = r.maxlength), r.minlength !== null && (u.minlength = r.minlength), u;
|
|
2723
|
-
}),
|
|
2733
|
+
}), Gt = a(() => ({
|
|
2724
2734
|
resize: T.value.resize
|
|
2725
|
-
})),
|
|
2735
|
+
})), Kt = a(() => T.value.wrap === "off" ? {
|
|
2726
2736
|
whiteSpace: "nowrap",
|
|
2727
2737
|
overflowX: "auto"
|
|
2728
|
-
} : {}),
|
|
2729
|
-
k.value =
|
|
2730
|
-
},
|
|
2738
|
+
} : {}), Yt = () => {
|
|
2739
|
+
k.value = He.value;
|
|
2740
|
+
}, Qt = () => {
|
|
2731
2741
|
C("clicked");
|
|
2732
|
-
},
|
|
2733
|
-
|
|
2734
|
-
},
|
|
2742
|
+
}, kt = () => {
|
|
2743
|
+
w.value || T.value.inputReadonly || !pe.value || C("entered", k.value);
|
|
2744
|
+
}, Dt = () => {
|
|
2735
2745
|
let r = k.value;
|
|
2736
2746
|
_.value && (r = r.trim()), C("current-value", r);
|
|
2737
2747
|
};
|
|
2738
|
-
return
|
|
2748
|
+
return H(He, (r) => {
|
|
2739
2749
|
r !== k.value && (k.value = r);
|
|
2740
|
-
}, { immediate: !0 }),
|
|
2750
|
+
}, { immediate: !0 }), H(k, (r) => {
|
|
2741
2751
|
_.value && (r = r.trim()), C("changed", r);
|
|
2742
|
-
}),
|
|
2752
|
+
}), H(Oe, (r) => {
|
|
2743
2753
|
C(r ? "focused" : "blurred");
|
|
2744
|
-
}),
|
|
2745
|
-
|
|
2746
|
-
}, { immediate: !0 }), (r, u) =>
|
|
2754
|
+
}), H(k, () => {
|
|
2755
|
+
Dt();
|
|
2756
|
+
}, { immediate: !0 }), (r, u) => o(D) ? (F(), q("div", da({
|
|
2747
2757
|
key: 0,
|
|
2748
2758
|
class: ["nb-wrapper", he.value],
|
|
2749
|
-
style: [
|
|
2759
|
+
style: [St.value, vt.value, j.value],
|
|
2750
2760
|
role: "input"
|
|
2751
|
-
},
|
|
2761
|
+
}, zt.value), [
|
|
2752
2762
|
ve("div", {
|
|
2753
|
-
id:
|
|
2754
|
-
class: We(["nb-reset", "component", B.value,
|
|
2755
|
-
style: Ee([
|
|
2756
|
-
onClick:
|
|
2763
|
+
id: o(D),
|
|
2764
|
+
class: We(["nb-reset", "component", B.value, Rt.value, rt.value]),
|
|
2765
|
+
style: Ee([ut.value, vt.value, j.value]),
|
|
2766
|
+
onClick: Qt
|
|
2757
2767
|
}, [
|
|
2758
|
-
|
|
2768
|
+
o(Ue) ? (F(), q("label", {
|
|
2759
2769
|
key: 0,
|
|
2760
|
-
for:
|
|
2770
|
+
for: Tt.value,
|
|
2761
2771
|
class: "component__label",
|
|
2762
|
-
style: Ee([
|
|
2763
|
-
},
|
|
2772
|
+
style: Ee([Ht.value])
|
|
2773
|
+
}, xt(e.label), 13, Nl)) : Be("", !0),
|
|
2764
2774
|
pa(ve("textarea", da({
|
|
2765
2775
|
"onUpdate:modelValue": u[0] || (u[0] = (g) => k.value = g),
|
|
2766
|
-
id:
|
|
2767
|
-
name:
|
|
2768
|
-
},
|
|
2776
|
+
id: Tt.value,
|
|
2777
|
+
name: Tt.value
|
|
2778
|
+
}, Ut.value, {
|
|
2769
2779
|
class: ["component__input", [
|
|
2770
|
-
|
|
2780
|
+
Mt.value,
|
|
2771
2781
|
pt.value
|
|
2772
2782
|
]],
|
|
2773
|
-
placeholder:
|
|
2774
|
-
disabled:
|
|
2783
|
+
placeholder: jt.value,
|
|
2784
|
+
disabled: o(w) || o(xe),
|
|
2775
2785
|
required: e.required,
|
|
2776
|
-
readonly:
|
|
2786
|
+
readonly: o(xe),
|
|
2777
2787
|
autocomplete: e.inputAutocomplete,
|
|
2778
|
-
tabindex:
|
|
2788
|
+
tabindex: o(w) || o(xe) ? -1 : o(tt),
|
|
2779
2789
|
role: "textbox",
|
|
2780
|
-
style: [
|
|
2790
|
+
style: [j.value, Gt.value, Kt.value],
|
|
2781
2791
|
onFocus: u[1] || (u[1] = (g) => Oe.value = !0),
|
|
2782
2792
|
onBlur: u[2] || (u[2] = (g) => Oe.value = !1),
|
|
2783
|
-
onInput:
|
|
2784
|
-
onKeydown: u[3] || (u[3] =
|
|
2785
|
-
}), null, 16,
|
|
2793
|
+
onInput: Dt,
|
|
2794
|
+
onKeydown: u[3] || (u[3] = qt((g) => !o(w) && o(pe) && kt(), ["enter"]))
|
|
2795
|
+
}), null, 16, Il), [
|
|
2786
2796
|
[Ua, k.value]
|
|
2787
2797
|
])
|
|
2788
|
-
], 14,
|
|
2789
|
-
|
|
2798
|
+
], 14, Dl),
|
|
2799
|
+
At.value ? (F(), q("div", {
|
|
2790
2800
|
key: 0,
|
|
2791
2801
|
class: We(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
2792
2802
|
}, [
|
|
2793
2803
|
ia(r.$slots, "message", {}, () => [
|
|
2794
|
-
ga(
|
|
2804
|
+
ga(xt(e.message), 1)
|
|
2795
2805
|
], !0)
|
|
2796
2806
|
], 2)) : Be("", !0)
|
|
2797
2807
|
], 16)) : Be("", !0);
|
|
2798
2808
|
}
|
|
2799
|
-
}),
|
|
2800
|
-
const
|
|
2809
|
+
}), El = /* @__PURE__ */ ba(Wl, [["__scopeId", "data-v-c4b7eb6b"]]);
|
|
2810
|
+
const Pl = ["id"], Fl = ["for"], Ol = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "min", "max", "step", "tabindex"], ql = /* @__PURE__ */ Object.assign({
|
|
2801
2811
|
name: "NbDatePicker",
|
|
2802
2812
|
inheritAttrs: !1
|
|
2803
2813
|
}, {
|
|
@@ -3140,57 +3150,57 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3140
3150
|
setup(e, { emit: m }) {
|
|
3141
3151
|
fa((t) => ({
|
|
3142
3152
|
"61b2bd67": pt.value,
|
|
3143
|
-
"7d03ac89":
|
|
3144
|
-
cfe0b650:
|
|
3153
|
+
"7d03ac89": Y.value,
|
|
3154
|
+
cfe0b650: o(Ge),
|
|
3145
3155
|
"0701dbce": mt.value,
|
|
3146
|
-
"51e828ab":
|
|
3147
|
-
"0f7ed183":
|
|
3148
|
-
d6272570:
|
|
3149
|
-
"39af1994":
|
|
3150
|
-
"3723f1b0":
|
|
3151
|
-
"66d8e666":
|
|
3152
|
-
"370e0108":
|
|
3153
|
-
"26ed153e":
|
|
3154
|
-
"68d2e63a":
|
|
3155
|
-
"4ece6524":
|
|
3156
|
-
"35cfcd40":
|
|
3157
|
-
"564cdf78":
|
|
3158
|
-
"32f5d3c0":
|
|
3156
|
+
"51e828ab": Bt.value,
|
|
3157
|
+
"0f7ed183": At.value,
|
|
3158
|
+
d6272570: o(V),
|
|
3159
|
+
"39af1994": o(y),
|
|
3160
|
+
"3723f1b0": o(Xe),
|
|
3161
|
+
"66d8e666": Tt.value,
|
|
3162
|
+
"370e0108": o(Ke),
|
|
3163
|
+
"26ed153e": Nt.value,
|
|
3164
|
+
"68d2e63a": Jt.value,
|
|
3165
|
+
"4ece6524": o(Ue),
|
|
3166
|
+
"35cfcd40": o(dt),
|
|
3167
|
+
"564cdf78": o(ct),
|
|
3168
|
+
"32f5d3c0": o(ue),
|
|
3159
3169
|
"01671dff": g.value,
|
|
3160
3170
|
"57eb48a0": B.value,
|
|
3161
|
-
"19098e42":
|
|
3162
|
-
"6a94d048":
|
|
3163
|
-
cf8029bc:
|
|
3171
|
+
"19098e42": Rt.value,
|
|
3172
|
+
"6a94d048": Mt.value,
|
|
3173
|
+
cf8029bc: jt.value,
|
|
3164
3174
|
dd275410: t.styleButtonColor
|
|
3165
3175
|
}));
|
|
3166
|
-
const C =
|
|
3176
|
+
const C = ol(
|
|
3167
3177
|
() => import("@vlalg-nimbus/nb-calendar").then((t) => t.Calendar ? t.Calendar : t.default && t.default.Calendar ? t.default.Calendar : t.default)
|
|
3168
3178
|
);
|
|
3169
3179
|
sa(() => {
|
|
3170
3180
|
h.value = we.value;
|
|
3171
3181
|
}), ma(() => {
|
|
3172
|
-
|
|
3182
|
+
It();
|
|
3173
3183
|
});
|
|
3174
|
-
const
|
|
3184
|
+
const E = m, D = e, {
|
|
3175
3185
|
nbId: Ve,
|
|
3176
3186
|
display: pe,
|
|
3177
3187
|
hasTabIndexEnter: Ae,
|
|
3178
3188
|
ariaLabel: ke,
|
|
3179
3189
|
ariaAttrs: se,
|
|
3180
|
-
caretColor:
|
|
3190
|
+
caretColor: J,
|
|
3181
3191
|
selectionBgColor: Pe,
|
|
3182
3192
|
selectionTextColor: _e,
|
|
3183
3193
|
hasBorderRadius: ne,
|
|
3184
|
-
borderRadius:
|
|
3185
|
-
disabled:
|
|
3194
|
+
borderRadius: U,
|
|
3195
|
+
disabled: w,
|
|
3186
3196
|
fontFamily: oe,
|
|
3187
3197
|
fontSize: de,
|
|
3188
|
-
fontWeight:
|
|
3198
|
+
fontWeight: G,
|
|
3189
3199
|
fontFamilyMsg: Le,
|
|
3190
3200
|
fontSizeMsg: ce,
|
|
3191
|
-
fontWeightMsg:
|
|
3201
|
+
fontWeightMsg: P,
|
|
3192
3202
|
textMessageColor: be,
|
|
3193
|
-
inputWidth:
|
|
3203
|
+
inputWidth: X,
|
|
3194
3204
|
inputStyle: Ce,
|
|
3195
3205
|
activeTextStyle: ge,
|
|
3196
3206
|
sizeMediaQuery: xe,
|
|
@@ -3198,60 +3208,60 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3198
3208
|
inputType: L,
|
|
3199
3209
|
hasTrim: x,
|
|
3200
3210
|
inputUppercase: $e,
|
|
3201
|
-
inputName:
|
|
3211
|
+
inputName: He,
|
|
3202
3212
|
inputText: we,
|
|
3203
|
-
min:
|
|
3213
|
+
min: tt,
|
|
3204
3214
|
max: ye,
|
|
3205
|
-
step:
|
|
3215
|
+
step: at,
|
|
3206
3216
|
useCustomCalendar: gt,
|
|
3207
|
-
locale:
|
|
3217
|
+
locale: Je,
|
|
3208
3218
|
theme: Te,
|
|
3209
3219
|
allowRange: Se,
|
|
3210
3220
|
calendarZIndex: yt,
|
|
3211
|
-
calendarWidth:
|
|
3221
|
+
calendarWidth: lt,
|
|
3212
3222
|
tabindex: st,
|
|
3213
3223
|
lightBgColor: dt,
|
|
3214
3224
|
lightBgColorFocus: ct,
|
|
3215
|
-
lightDisabledBgColor:
|
|
3216
|
-
lightTextColor:
|
|
3217
|
-
darkBgColor:
|
|
3218
|
-
darkBgColorFocus:
|
|
3225
|
+
lightDisabledBgColor: Ue,
|
|
3226
|
+
lightTextColor: Ge,
|
|
3227
|
+
darkBgColor: Xe,
|
|
3228
|
+
darkBgColorFocus: Ke,
|
|
3219
3229
|
darkDisabledBgColor: y,
|
|
3220
3230
|
darkTextColor: V,
|
|
3221
3231
|
textAlign: ue,
|
|
3222
|
-
showMsg:
|
|
3232
|
+
showMsg: Z,
|
|
3223
3233
|
hasMsg: me,
|
|
3224
3234
|
showLabel: Re,
|
|
3225
|
-
labelBackground:
|
|
3235
|
+
labelBackground: Ye,
|
|
3226
3236
|
labelPadding: re,
|
|
3227
|
-
labelBorderRadius:
|
|
3237
|
+
labelBorderRadius: c,
|
|
3228
3238
|
labelLeft: b,
|
|
3229
3239
|
inputLabelMarginActive: fe,
|
|
3230
|
-
labelActiveTop:
|
|
3231
|
-
labelActiveLeft:
|
|
3240
|
+
labelActiveTop: K,
|
|
3241
|
+
labelActiveLeft: ee,
|
|
3232
3242
|
fontFamilyLabel: Me,
|
|
3233
3243
|
fontSizeLabel: ze,
|
|
3234
3244
|
fontSizeLabelActive: Fe,
|
|
3235
|
-
fontWeightLabel:
|
|
3236
|
-
lightTextColorLabel:
|
|
3237
|
-
lightTextColorLabelActive:
|
|
3238
|
-
darkTextColorLabel:
|
|
3245
|
+
fontWeightLabel: Qe,
|
|
3246
|
+
lightTextColorLabel: Ze,
|
|
3247
|
+
lightTextColorLabelActive: nt,
|
|
3248
|
+
darkTextColorLabel: ot,
|
|
3239
3249
|
darkTextColorLabelActive: ft
|
|
3240
|
-
} = va(
|
|
3250
|
+
} = va(D), h = Q(""), R = Q(""), k = Q(""), Oe = Q(""), T = Q(!1), he = Q(!1), St = a(() => !lt.value || lt.value < 280 ? 280 : parseInt(lt.value, 10)), Vt = a(() => {
|
|
3241
3251
|
if (!h.value)
|
|
3242
3252
|
return null;
|
|
3243
3253
|
if (Se.value && typeof h.value == "string" && h.value.startsWith("{"))
|
|
3244
3254
|
try {
|
|
3245
3255
|
const t = JSON.parse(h.value);
|
|
3246
3256
|
if (t && (t.startDate || t.endDate)) {
|
|
3247
|
-
const l = (
|
|
3248
|
-
if (!
|
|
3257
|
+
const l = (d) => {
|
|
3258
|
+
if (!d)
|
|
3249
3259
|
return null;
|
|
3250
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
3251
|
-
const [i, v,
|
|
3252
|
-
return new Date(i, v - 1,
|
|
3260
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(d)) {
|
|
3261
|
+
const [i, v, f] = d.split("-").map(Number);
|
|
3262
|
+
return new Date(i, v - 1, f);
|
|
3253
3263
|
}
|
|
3254
|
-
return new Date(
|
|
3264
|
+
return new Date(d);
|
|
3255
3265
|
};
|
|
3256
3266
|
return {
|
|
3257
3267
|
startDate: t.startDate ? l(t.startDate) : null,
|
|
@@ -3261,28 +3271,28 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3261
3271
|
} catch {
|
|
3262
3272
|
}
|
|
3263
3273
|
if (L.value === "date" && typeof h.value == "string" && /^\d{4}-\d{2}-\d{2}$/.test(h.value)) {
|
|
3264
|
-
const [t, l,
|
|
3265
|
-
return new Date(t, l - 1,
|
|
3274
|
+
const [t, l, d] = h.value.split("-").map(Number);
|
|
3275
|
+
return new Date(t, l - 1, d);
|
|
3266
3276
|
}
|
|
3267
3277
|
return h.value;
|
|
3268
|
-
}),
|
|
3278
|
+
}), ut = (t, l, d) => {
|
|
3269
3279
|
if (!t)
|
|
3270
3280
|
return "";
|
|
3271
|
-
const i =
|
|
3281
|
+
const i = d || Je.value;
|
|
3272
3282
|
if (l === "date") {
|
|
3273
3283
|
if (Se.value && typeof t == "string" && t.startsWith("{"))
|
|
3274
3284
|
try {
|
|
3275
3285
|
const v = JSON.parse(t);
|
|
3276
3286
|
if (v && (v.startDate || v.endDate)) {
|
|
3277
|
-
const
|
|
3287
|
+
const f = (A) => {
|
|
3278
3288
|
if (!A)
|
|
3279
3289
|
return "";
|
|
3280
3290
|
if (/^\d{4}-\d{2}-\d{2}$/.test(A)) {
|
|
3281
|
-
const [
|
|
3282
|
-
return i === "pt-BR" ? `${ie}/${
|
|
3291
|
+
const [z, O, ie] = A.split("-");
|
|
3292
|
+
return i === "pt-BR" ? `${ie}/${O}/${z}` : `${O}/${ie}/${z}`;
|
|
3283
3293
|
}
|
|
3284
3294
|
return A;
|
|
3285
|
-
}, p =
|
|
3295
|
+
}, p = f(v.startDate), S = f(v.endDate);
|
|
3286
3296
|
if (p && S)
|
|
3287
3297
|
return `${p} - ${S}`;
|
|
3288
3298
|
if (p)
|
|
@@ -3293,20 +3303,20 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3293
3303
|
} catch {
|
|
3294
3304
|
}
|
|
3295
3305
|
if (typeof t == "string" && /^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
3296
|
-
const [v,
|
|
3297
|
-
return i === "pt-BR" ? `${p}/${
|
|
3306
|
+
const [v, f, p] = t.split("-");
|
|
3307
|
+
return i === "pt-BR" ? `${p}/${f}/${v}` : `${f}/${p}/${v}`;
|
|
3298
3308
|
}
|
|
3299
3309
|
return t;
|
|
3300
3310
|
} else if (l === "datetime-local") {
|
|
3301
3311
|
if (typeof t == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/.test(t)) {
|
|
3302
|
-
const [v,
|
|
3303
|
-
return i === "pt-BR" ? `${A}/${S}/${p} ${
|
|
3312
|
+
const [v, f] = t.split("T"), [p, S, A] = v.split("-");
|
|
3313
|
+
return i === "pt-BR" ? `${A}/${S}/${p} ${f}` : `${S}/${A}/${p} ${f}`;
|
|
3304
3314
|
}
|
|
3305
3315
|
return t;
|
|
3306
3316
|
} else if (l === "month") {
|
|
3307
3317
|
if (typeof t == "string" && /^\d{4}-\d{2}$/.test(t)) {
|
|
3308
|
-
const [v,
|
|
3309
|
-
return `${
|
|
3318
|
+
const [v, f] = t.split("-");
|
|
3319
|
+
return `${f}/${v}`;
|
|
3310
3320
|
}
|
|
3311
3321
|
return t;
|
|
3312
3322
|
} else if (l === "week") {
|
|
@@ -3318,34 +3328,34 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3318
3328
|
return t;
|
|
3319
3329
|
}
|
|
3320
3330
|
return t;
|
|
3321
|
-
},
|
|
3331
|
+
}, j = (t, l, d) => {
|
|
3322
3332
|
if (!t || !t.trim())
|
|
3323
3333
|
return "";
|
|
3324
|
-
const i = t.trim(), v =
|
|
3334
|
+
const i = t.trim(), v = d || Je.value;
|
|
3325
3335
|
if (l === "date") {
|
|
3326
3336
|
if (Se.value && i.includes("-")) {
|
|
3327
|
-
const
|
|
3328
|
-
if (!
|
|
3337
|
+
const f = i.split(/\s*-\s*/).map((z) => z.trim()), p = (z) => {
|
|
3338
|
+
if (!z)
|
|
3329
3339
|
return null;
|
|
3330
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(
|
|
3331
|
-
const
|
|
3340
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(z)) {
|
|
3341
|
+
const O = z.split("/");
|
|
3332
3342
|
if (v === "pt-BR") {
|
|
3333
|
-
const [ie, De,
|
|
3334
|
-
return `${
|
|
3343
|
+
const [ie, De, et] = O, Ne = ie.padStart(2, "0"), Ie = De.padStart(2, "0");
|
|
3344
|
+
return `${et}-${Ie}-${Ne}`;
|
|
3335
3345
|
} else {
|
|
3336
|
-
const [ie, De,
|
|
3337
|
-
return `${
|
|
3346
|
+
const [ie, De, et] = O, Ne = De.padStart(2, "0"), Ie = ie.padStart(2, "0");
|
|
3347
|
+
return `${et}-${Ie}-${Ne}`;
|
|
3338
3348
|
}
|
|
3339
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
3340
|
-
const
|
|
3349
|
+
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(z)) {
|
|
3350
|
+
const O = z.split("-"), [ie, De, et] = O, Ne = et.padStart(2, "0"), Ie = De.padStart(2, "0");
|
|
3341
3351
|
return `${ie}-${Ie}-${Ne}`;
|
|
3342
3352
|
}
|
|
3343
3353
|
return null;
|
|
3344
3354
|
};
|
|
3345
|
-
let S = p(
|
|
3355
|
+
let S = p(f[0]), A = f[1] ? p(f[1]) : null;
|
|
3346
3356
|
if (S && A) {
|
|
3347
|
-
const
|
|
3348
|
-
if (new Date(A) <
|
|
3357
|
+
const z = new Date(S);
|
|
3358
|
+
if (new Date(A) < z) {
|
|
3349
3359
|
const ie = S;
|
|
3350
3360
|
S = A, A = ie;
|
|
3351
3361
|
}
|
|
@@ -3355,69 +3365,69 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3355
3365
|
return "";
|
|
3356
3366
|
}
|
|
3357
3367
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(i)) {
|
|
3358
|
-
const
|
|
3368
|
+
const f = i.split("/");
|
|
3359
3369
|
if (v === "pt-BR") {
|
|
3360
|
-
const [p, S, A] =
|
|
3361
|
-
return `${A}-${
|
|
3370
|
+
const [p, S, A] = f, z = p.padStart(2, "0"), O = S.padStart(2, "0");
|
|
3371
|
+
return `${A}-${O}-${z}`;
|
|
3362
3372
|
} else {
|
|
3363
|
-
const [p, S, A] =
|
|
3364
|
-
return `${A}-${
|
|
3373
|
+
const [p, S, A] = f, z = S.padStart(2, "0"), O = p.padStart(2, "0");
|
|
3374
|
+
return `${A}-${O}-${z}`;
|
|
3365
3375
|
}
|
|
3366
3376
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(i)) {
|
|
3367
|
-
const
|
|
3368
|
-
return `${p}-${
|
|
3377
|
+
const f = i.split("-"), [p, S, A] = f, z = A.padStart(2, "0"), O = S.padStart(2, "0");
|
|
3378
|
+
return `${p}-${O}-${z}`;
|
|
3369
3379
|
}
|
|
3370
3380
|
return "";
|
|
3371
3381
|
} else if (l === "datetime-local") {
|
|
3372
3382
|
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(i)) {
|
|
3373
|
-
const [
|
|
3383
|
+
const [f, p] = i.split(" "), S = f.split("/");
|
|
3374
3384
|
if (v === "pt-BR") {
|
|
3375
|
-
const [A,
|
|
3376
|
-
return `${
|
|
3385
|
+
const [A, z, O] = S, ie = A.padStart(2, "0"), De = z.padStart(2, "0"), Ne = p.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3386
|
+
return `${O}-${De}-${ie}T${Ne}`;
|
|
3377
3387
|
} else {
|
|
3378
|
-
const [A,
|
|
3379
|
-
return `${
|
|
3388
|
+
const [A, z, O] = S, ie = z.padStart(2, "0"), De = A.padStart(2, "0"), Ne = p.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3389
|
+
return `${O}-${De}-${ie}T${Ne}`;
|
|
3380
3390
|
}
|
|
3381
3391
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(i)) {
|
|
3382
|
-
const [
|
|
3392
|
+
const [f, p] = i.split("T"), S = f.split("-"), [A, z, O] = S, ie = O.padStart(2, "0"), De = z.padStart(2, "0"), Ne = p.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3383
3393
|
return `${A}-${De}-${ie}T${Ne}`;
|
|
3384
3394
|
}
|
|
3385
3395
|
return "";
|
|
3386
3396
|
} else if (l === "month") {
|
|
3387
3397
|
if (/^\d{1,2}\/\d{4}$/.test(i)) {
|
|
3388
|
-
const [
|
|
3398
|
+
const [f, p] = i.split("/"), S = f.padStart(2, "0");
|
|
3389
3399
|
return `${p}-${S}`;
|
|
3390
3400
|
} else if (/^\d{4}-\d{1,2}$/.test(i)) {
|
|
3391
|
-
const [
|
|
3392
|
-
return `${
|
|
3401
|
+
const [f, p] = i.split("-"), S = p.padStart(2, "0");
|
|
3402
|
+
return `${f}-${S}`;
|
|
3393
3403
|
}
|
|
3394
3404
|
return "";
|
|
3395
3405
|
} else if (l === "week") {
|
|
3396
3406
|
if (/^\d{4}-W\d{2}$/i.test(i))
|
|
3397
3407
|
return i.toUpperCase();
|
|
3398
|
-
const
|
|
3399
|
-
if (
|
|
3400
|
-
return `${
|
|
3408
|
+
const f = i.match(/semana\s+W?(\d{2})\s+de\s+(\d{4})/i);
|
|
3409
|
+
if (f)
|
|
3410
|
+
return `${f[2]}-W${f[1]}`;
|
|
3401
3411
|
const p = i.match(/week\s+W?(\d{2})\s+of\s+(\d{4})/i);
|
|
3402
3412
|
return p ? `${p[2]}-W${p[1]}` : "";
|
|
3403
3413
|
}
|
|
3404
3414
|
return i;
|
|
3405
|
-
},
|
|
3406
|
-
const t =
|
|
3415
|
+
}, N = Q(!1), te = Q({ top: 0, left: 0 }), $ = Q(null), M = Q(null), ae = a(() => gt.value === !0), I = a(() => {
|
|
3416
|
+
const t = w.value ? "component-disabled" : "", l = pe.value !== "b" ? "inline-block" : "block", d = J.value ? J.value : "", i = Pe.value ? Pe.value : "", v = _e.value ? _e.value : "", f = ne.value ? ne.value : !1, p = U.value !== 0 && !U.value || U.value < 0 ? 0 : U.value, S = oe.value ? oe.value : "'Lato', sans-serif", A = de.value ? de.value : "1.4em", z = G.value !== 0 && !G.value || G.value < 0 ? 100 : G.value, O = Le.value ? Le.value : "'Lato', sans-serif", ie = ce.value ? ce.value : "1em", De = P.value !== 0 && !P.value || P.value < 0 ? 100 : P.value, et = be.value ? be.value : "#f15574", Ne = X.value ? X.value : 200, Ie = ge.value ? ge.value : "normal", ha = "sm", Ca = _.value ? _.value : !1, xa = L.value ? L.value : "date", Sa = $e.value ? $e.value : !1, Va = Te.value ? Te.value : "normal", ka = ue.value ? ue.value : "left", La = Ce.value ? Ce.value : "background", Ta = Re.value ? Re.value : !1, Ba = b.value !== 0 && !b.value || b.value < 0 ? 5 : b.value, Aa = Ye.value ? Ye.value : "transparent", _a = fe.value !== 0 && !fe.value || fe.value < 0 ? 15 : fe.value, $a = re.value ? re.value : "1px 5px", wa = c.value !== 0 && !c.value || c.value < 0 ? 0 : c.value, Ra = K.value === null || K.value === void 0 ? -13 : K.value, Ma = ee.value === null || ee.value === void 0 ? -10 : ee.value, za = Me.value ? Me.value : "'Lato', sans-serif", Da = ze.value ? ze.value : "1em", Na = Fe.value ? Fe.value : "0.8em", Ia = Qe.value ? Qe.value : 400, Wa = Ze.value ? Ze.value : "#ffffff", Ea = ot.value ? ot.value : "#000000", Pa = nt.value ? nt.value : "#ffffff", Fa = ft.value ? ft.value : "#000000";
|
|
3407
3417
|
return {
|
|
3408
3418
|
disabled: t,
|
|
3409
3419
|
display: l,
|
|
3410
3420
|
font: S,
|
|
3411
3421
|
fontSize: A,
|
|
3412
|
-
fontWeight:
|
|
3413
|
-
fontFamilyMsg:
|
|
3422
|
+
fontWeight: z,
|
|
3423
|
+
fontFamilyMsg: O,
|
|
3414
3424
|
fontSizeMsg: ie,
|
|
3415
3425
|
fontWeightMsg: De,
|
|
3416
|
-
textMessageColor:
|
|
3417
|
-
caretColor:
|
|
3426
|
+
textMessageColor: et,
|
|
3427
|
+
caretColor: d,
|
|
3418
3428
|
selectionBgColor: i,
|
|
3419
3429
|
selectionTextColor: v,
|
|
3420
|
-
hasBorderRadius:
|
|
3430
|
+
hasBorderRadius: f,
|
|
3421
3431
|
borderRadius: p,
|
|
3422
3432
|
textAlign: ka,
|
|
3423
3433
|
inputWidth: Ne,
|
|
@@ -3445,35 +3455,35 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3445
3455
|
lightTextColorLabelActive: Pa,
|
|
3446
3456
|
darkTextColorLabelActive: Fa
|
|
3447
3457
|
};
|
|
3448
|
-
}),
|
|
3449
|
-
display:
|
|
3450
|
-
})),
|
|
3451
|
-
const t =
|
|
3458
|
+
}), $t = a(() => I.value.disabled), wt = a(() => ({
|
|
3459
|
+
display: I.value.display
|
|
3460
|
+
})), Y = a(() => {
|
|
3461
|
+
const t = I.value;
|
|
3452
3462
|
return t.fontSize ? t.fontSize : "1.4em";
|
|
3453
3463
|
}), vt = a(() => {
|
|
3454
|
-
const t =
|
|
3464
|
+
const t = I.value, l = r.value;
|
|
3455
3465
|
return {
|
|
3456
3466
|
fontWeight: t.fontWeight,
|
|
3457
3467
|
marginTop: l && Re.value ? `${t.inputLabelMarginActive}px` : "0"
|
|
3458
3468
|
};
|
|
3459
|
-
}),
|
|
3460
|
-
const t =
|
|
3469
|
+
}), rt = a(() => {
|
|
3470
|
+
const t = I.value;
|
|
3461
3471
|
return t.inputStyle !== "line" && t.hasBorderRadius ? { borderRadius: `${t.borderRadius}rem` } : {};
|
|
3462
|
-
}), pt = a(() =>
|
|
3463
|
-
const t =
|
|
3472
|
+
}), pt = a(() => I.value.font), B = a(() => I.value.fontFamilyMsg), Rt = a(() => I.value.fontSizeMsg), Mt = a(() => I.value.fontWeightMsg), Tt = a(() => Te.value === "dark" ? V.value : Ge.value), jt = a(() => I.value.textMessageColor), mt = a(() => {
|
|
3473
|
+
const t = I.value;
|
|
3464
3474
|
return t.caretColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
3465
|
-
}),
|
|
3466
|
-
const t =
|
|
3475
|
+
}), Bt = a(() => {
|
|
3476
|
+
const t = I.value;
|
|
3467
3477
|
return t.selectionBgColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
3468
|
-
}),
|
|
3469
|
-
const t =
|
|
3478
|
+
}), At = a(() => {
|
|
3479
|
+
const t = I.value;
|
|
3470
3480
|
return t.selectionTextColor || (t.theme === "dark" ? "#000000" : "#ffffff");
|
|
3471
|
-
}),
|
|
3472
|
-
const t =
|
|
3481
|
+
}), zt = a(() => {
|
|
3482
|
+
const t = I.value;
|
|
3473
3483
|
return t.display === "block" ? { width: "100%" } : {
|
|
3474
3484
|
width: `${t.inputWidth}px`
|
|
3475
3485
|
};
|
|
3476
|
-
}),
|
|
3486
|
+
}), Ht = a(() => {
|
|
3477
3487
|
switch (Ce.value) {
|
|
3478
3488
|
case "line":
|
|
3479
3489
|
return "component__input--line";
|
|
@@ -3482,8 +3492,8 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3482
3492
|
default:
|
|
3483
3493
|
return "component__input--background";
|
|
3484
3494
|
}
|
|
3485
|
-
}),
|
|
3486
|
-
switch (
|
|
3495
|
+
}), Ut = a(() => {
|
|
3496
|
+
switch (I.value.activeTextStyle) {
|
|
3487
3497
|
case "italic":
|
|
3488
3498
|
return "component__input--active--italic";
|
|
3489
3499
|
case "oblique":
|
|
@@ -3491,39 +3501,39 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3491
3501
|
default:
|
|
3492
3502
|
return "component__input--active--normal";
|
|
3493
3503
|
}
|
|
3494
|
-
}),
|
|
3495
|
-
switch (
|
|
3504
|
+
}), Gt = a(() => "component__sm"), Kt = a(() => {
|
|
3505
|
+
switch (I.value.theme) {
|
|
3496
3506
|
case "dark":
|
|
3497
3507
|
return "component__theme--dark";
|
|
3498
3508
|
default:
|
|
3499
3509
|
return "component__theme--light";
|
|
3500
3510
|
}
|
|
3501
|
-
}),
|
|
3511
|
+
}), Yt = a(() => I.value.inputReadonly ? "component__input--read-only" : ""), Qt = a(() => I.value.inputUppercase ? "component__input--uppercase" : ""), kt = a(() => He.value ? He.value : `${Ve.value}-name-label`), Dt = a(() => ""), r = a(() => T.value || R.value && R.value.trim().length > 0), u = a(() => !R.value || R.value.trim().length === 0 ? "component__input--empty" : "");
|
|
3502
3512
|
a(() => T.value ? "component__input--active" : "component__input--no-active");
|
|
3503
|
-
const g = a(() => "6px 10px"),
|
|
3513
|
+
const g = a(() => "6px 10px"), W = a(() => !!(Z.value && me.value)), qe = a(() => {
|
|
3504
3514
|
const t = {};
|
|
3505
3515
|
se.value && Object.keys(se.value).forEach((i) => t[`aria-${i}`] = se.value[i]);
|
|
3506
3516
|
const l = {
|
|
3507
3517
|
"aria-label": ke.value,
|
|
3508
|
-
"aria-disabled":
|
|
3518
|
+
"aria-disabled": w.value,
|
|
3509
3519
|
...t
|
|
3510
3520
|
};
|
|
3511
3521
|
return Object.fromEntries(
|
|
3512
|
-
Object.entries(l).filter(([
|
|
3522
|
+
Object.entries(l).filter(([d, i]) => i != null)
|
|
3513
3523
|
);
|
|
3514
|
-
}),
|
|
3515
|
-
const t = Te.value === "dark" ?
|
|
3524
|
+
}), Nt = a(() => {
|
|
3525
|
+
const t = Te.value === "dark" ? Xe.value : dt.value, l = Te.value === "dark" ? V.value : Ge.value;
|
|
3516
3526
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
3517
|
-
}),
|
|
3518
|
-
const t = Te.value === "dark" ?
|
|
3527
|
+
}), Jt = a(() => {
|
|
3528
|
+
const t = Te.value === "dark" ? Ke.value : ct.value, l = Te.value === "dark" ? V.value : Ge.value;
|
|
3519
3529
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
3520
3530
|
}), ht = a(() => {
|
|
3521
|
-
const t =
|
|
3531
|
+
const t = I.value, l = r.value, d = l ? t.lightTextColorLabelActive : t.lightTextColorLabel, i = l ? t.darkTextColorLabelActive : t.darkTextColorLabel;
|
|
3522
3532
|
return {
|
|
3523
3533
|
fontFamily: t.fontFamilyLabel,
|
|
3524
3534
|
fontSize: l ? t.fontSizeLabelActive : t.fontSizeLabel,
|
|
3525
3535
|
fontWeight: t.fontWeightLabel,
|
|
3526
|
-
color: t.theme === "dark" ? i :
|
|
3536
|
+
color: t.theme === "dark" ? i : d,
|
|
3527
3537
|
top: l ? `${t.labelActiveTop}px` : "50%",
|
|
3528
3538
|
left: l ? `${t.labelActiveLeft}px` : `${t.labelLeft}px`,
|
|
3529
3539
|
transform: l ? "translateY(0)" : "translateY(-50%)",
|
|
@@ -3534,62 +3544,62 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3534
3544
|
};
|
|
3535
3545
|
});
|
|
3536
3546
|
a(() => {
|
|
3537
|
-
const t =
|
|
3547
|
+
const t = I.value;
|
|
3538
3548
|
return t.theme === "dark" ? t.darkTextColorLabelActive : t.lightTextColorLabelActive;
|
|
3539
3549
|
});
|
|
3540
|
-
const
|
|
3550
|
+
const It = () => {
|
|
3541
3551
|
h.value = we.value, Oe.value = L.value;
|
|
3542
|
-
},
|
|
3543
|
-
|
|
3544
|
-
},
|
|
3545
|
-
t.stopPropagation(), !(
|
|
3546
|
-
Ct(),
|
|
3552
|
+
}, Wt = () => {
|
|
3553
|
+
E("clicked");
|
|
3554
|
+
}, Xt = (t) => {
|
|
3555
|
+
t.stopPropagation(), !(w.value || I.value.inputReadonly) && $.value && ($.value.focus(), ae.value && (N.value = !1, requestAnimationFrame(() => {
|
|
3556
|
+
Ct(), N.value = !0;
|
|
3547
3557
|
})));
|
|
3548
|
-
},
|
|
3549
|
-
|
|
3558
|
+
}, Zt = () => {
|
|
3559
|
+
w.value || I.value.inputReadonly || !Ae.value || E("entered", h.value);
|
|
3550
3560
|
}, Ct = () => {
|
|
3551
3561
|
$.value && ya(() => {
|
|
3552
3562
|
const t = $.value.getBoundingClientRect(), l = 4;
|
|
3553
|
-
|
|
3563
|
+
te.value = {
|
|
3554
3564
|
top: `${t.bottom + l}px`,
|
|
3555
3565
|
left: `${t.left}px`
|
|
3556
3566
|
};
|
|
3557
3567
|
});
|
|
3558
|
-
},
|
|
3568
|
+
}, ea = a(() => ({
|
|
3559
3569
|
position: "fixed",
|
|
3560
|
-
top:
|
|
3561
|
-
left:
|
|
3570
|
+
top: te.value.top,
|
|
3571
|
+
left: te.value.left,
|
|
3562
3572
|
zIndex: yt.value
|
|
3563
|
-
})),
|
|
3564
|
-
T.value = !0,
|
|
3565
|
-
Ct(),
|
|
3573
|
+
})), ta = () => {
|
|
3574
|
+
T.value = !0, E("focused"), ae.value && (N.value = !1, requestAnimationFrame(() => {
|
|
3575
|
+
Ct(), N.value = !0;
|
|
3566
3576
|
}));
|
|
3567
|
-
},
|
|
3568
|
-
t.relatedTarget &&
|
|
3577
|
+
}, aa = (t) => {
|
|
3578
|
+
t.relatedTarget && M.value && M.value.contains(t.relatedTarget) || setTimeout(() => {
|
|
3569
3579
|
var i;
|
|
3570
3580
|
const l = document.activeElement;
|
|
3571
|
-
if (
|
|
3572
|
-
if (
|
|
3581
|
+
if (N.value) {
|
|
3582
|
+
if (M.value && M.value.contains(l) || t.relatedTarget && M.value && M.value.contains(t.relatedTarget))
|
|
3573
3583
|
return;
|
|
3574
|
-
if (l === document.body &&
|
|
3575
|
-
const v =
|
|
3584
|
+
if (l === document.body && M.value) {
|
|
3585
|
+
const v = M.value.querySelectorAll('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
3576
3586
|
if (Array.from(v).some((p) => p === document.activeElement || p.contains(document.activeElement)))
|
|
3577
3587
|
return;
|
|
3578
3588
|
}
|
|
3579
3589
|
}
|
|
3580
|
-
const
|
|
3581
|
-
|
|
3590
|
+
const d = (i = $.value) == null ? void 0 : i.closest(".component");
|
|
3591
|
+
d && d.contains(l) || $.value !== l && (T.value = !1, N.value = !1, E("blurred"));
|
|
3582
3592
|
}, 200);
|
|
3583
|
-
},
|
|
3584
|
-
|
|
3585
|
-
Ct(),
|
|
3593
|
+
}, la = () => {
|
|
3594
|
+
ae.value && (N.value, N.value = !1, requestAnimationFrame(() => {
|
|
3595
|
+
Ct(), N.value = !0;
|
|
3586
3596
|
}));
|
|
3587
|
-
},
|
|
3597
|
+
}, _t = (t) => {
|
|
3588
3598
|
if (!t || !(t instanceof Date))
|
|
3589
3599
|
return null;
|
|
3590
|
-
const l = t.getFullYear(),
|
|
3591
|
-
return `${l}-${
|
|
3592
|
-
},
|
|
3600
|
+
const l = t.getFullYear(), d = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0");
|
|
3601
|
+
return `${l}-${d}-${i}`;
|
|
3602
|
+
}, na = (t) => {
|
|
3593
3603
|
let l = "";
|
|
3594
3604
|
if (!t)
|
|
3595
3605
|
l = "";
|
|
@@ -3599,30 +3609,30 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3599
3609
|
else if (t.startDate || t.endDate) {
|
|
3600
3610
|
const i = {
|
|
3601
3611
|
// Converter startDate para string ISO se existir
|
|
3602
|
-
startDate: t.startDate ?
|
|
3612
|
+
startDate: t.startDate ? _t(t.startDate) : null,
|
|
3603
3613
|
// Converter endDate para string ISO se existir
|
|
3604
|
-
endDate: t.endDate ?
|
|
3614
|
+
endDate: t.endDate ? _t(t.endDate) : null
|
|
3605
3615
|
};
|
|
3606
3616
|
l = JSON.stringify(i);
|
|
3607
3617
|
}
|
|
3608
3618
|
} else
|
|
3609
|
-
L.value === "date" ? t instanceof Date ? l =
|
|
3610
|
-
|
|
3611
|
-
const
|
|
3612
|
-
|
|
3613
|
-
},
|
|
3614
|
-
if (!
|
|
3615
|
-
h.value =
|
|
3619
|
+
L.value === "date" ? t instanceof Date ? l = _t(t) : typeof t == "string" && (l = t) : (L.value === "month" || L.value === "time" || L.value === "datetime-local" || L.value === "week") && (l = typeof t == "string" ? t : "");
|
|
3620
|
+
le = !0, h.value = l;
|
|
3621
|
+
const d = l ? ut(l, L.value) : "";
|
|
3622
|
+
R.value = d, k.value = d;
|
|
3623
|
+
}, oa = () => {
|
|
3624
|
+
if (!ae.value) {
|
|
3625
|
+
h.value = R.value;
|
|
3616
3626
|
return;
|
|
3617
3627
|
}
|
|
3618
|
-
|
|
3628
|
+
s = !0;
|
|
3619
3629
|
const t = $.value ? {
|
|
3620
3630
|
start: $.value.selectionStart,
|
|
3621
3631
|
end: $.value.selectionEnd
|
|
3622
|
-
} : null, l =
|
|
3632
|
+
} : null, l = R.value.trim();
|
|
3623
3633
|
if (!l || l.length === 0) {
|
|
3624
|
-
|
|
3625
|
-
|
|
3634
|
+
le = !0, h.value = "", R.value = "", k.value = "", setTimeout(() => {
|
|
3635
|
+
s = !1;
|
|
3626
3636
|
}, 50);
|
|
3627
3637
|
return;
|
|
3628
3638
|
}
|
|
@@ -3630,307 +3640,307 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3630
3640
|
const i = Se.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}$/;
|
|
3631
3641
|
if (Se.value) {
|
|
3632
3642
|
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)) {
|
|
3633
|
-
|
|
3643
|
+
R.value = k.value, t && $.value && ya(() => {
|
|
3634
3644
|
const v = Math.min(t.start, k.value.length);
|
|
3635
3645
|
$.value.setSelectionRange(v, v);
|
|
3636
3646
|
}), setTimeout(() => {
|
|
3637
|
-
|
|
3647
|
+
s = !1;
|
|
3638
3648
|
}, 50);
|
|
3639
3649
|
return;
|
|
3640
3650
|
}
|
|
3641
3651
|
if (!i.test(l) && l.length <= 23) {
|
|
3642
3652
|
setTimeout(() => {
|
|
3643
|
-
|
|
3653
|
+
s = !1;
|
|
3644
3654
|
}, 50);
|
|
3645
3655
|
return;
|
|
3646
3656
|
}
|
|
3647
3657
|
} else {
|
|
3648
3658
|
if (l.length > 10 && !i.test(l)) {
|
|
3649
|
-
|
|
3659
|
+
R.value = k.value, t && $.value && ya(() => {
|
|
3650
3660
|
const v = Math.min(t.start, k.value.length);
|
|
3651
3661
|
$.value.setSelectionRange(v, v);
|
|
3652
3662
|
}), setTimeout(() => {
|
|
3653
|
-
|
|
3663
|
+
s = !1;
|
|
3654
3664
|
}, 50);
|
|
3655
3665
|
return;
|
|
3656
3666
|
}
|
|
3657
3667
|
if (!i.test(l) && l.length <= 10) {
|
|
3658
3668
|
setTimeout(() => {
|
|
3659
|
-
|
|
3669
|
+
s = !1;
|
|
3660
3670
|
}, 50);
|
|
3661
3671
|
return;
|
|
3662
3672
|
}
|
|
3663
3673
|
}
|
|
3664
3674
|
}
|
|
3665
|
-
let
|
|
3675
|
+
let d = null;
|
|
3666
3676
|
if (L.value === "date")
|
|
3667
3677
|
if (Se.value)
|
|
3668
3678
|
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/))
|
|
3669
|
-
if (
|
|
3670
|
-
|
|
3679
|
+
if (d = j(l, L.value), d && d !== h.value)
|
|
3680
|
+
le = !0, h.value = d, k.value = l;
|
|
3671
3681
|
else {
|
|
3672
3682
|
setTimeout(() => {
|
|
3673
|
-
|
|
3683
|
+
s = !1;
|
|
3674
3684
|
}, 50);
|
|
3675
3685
|
return;
|
|
3676
3686
|
}
|
|
3677
3687
|
else if (l.includes("-")) {
|
|
3678
3688
|
const v = l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*$/);
|
|
3679
3689
|
if (v) {
|
|
3680
|
-
const
|
|
3690
|
+
const f = v[1], p = j(f, L.value);
|
|
3681
3691
|
if (p) {
|
|
3682
3692
|
const S = JSON.stringify({ startDate: p, endDate: null });
|
|
3683
|
-
S !== h.value && (
|
|
3693
|
+
S !== h.value && (le = !0, h.value = S, k.value = l);
|
|
3684
3694
|
} else {
|
|
3685
3695
|
k.value = l, setTimeout(() => {
|
|
3686
|
-
|
|
3696
|
+
s = !1;
|
|
3687
3697
|
}, 50);
|
|
3688
3698
|
return;
|
|
3689
3699
|
}
|
|
3690
3700
|
} else {
|
|
3691
3701
|
k.value = l, setTimeout(() => {
|
|
3692
|
-
|
|
3702
|
+
s = !1;
|
|
3693
3703
|
}, 50);
|
|
3694
3704
|
return;
|
|
3695
3705
|
}
|
|
3696
3706
|
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
3697
|
-
if (
|
|
3698
|
-
const
|
|
3699
|
-
|
|
3707
|
+
if (d = j(l, L.value), d) {
|
|
3708
|
+
const f = JSON.stringify({ startDate: d, endDate: null });
|
|
3709
|
+
f !== h.value && (le = !0, h.value = f, k.value = l);
|
|
3700
3710
|
} else {
|
|
3701
3711
|
k.value = l, setTimeout(() => {
|
|
3702
|
-
|
|
3712
|
+
s = !1;
|
|
3703
3713
|
}, 50);
|
|
3704
3714
|
return;
|
|
3705
3715
|
}
|
|
3706
3716
|
else {
|
|
3707
3717
|
k.value = l, setTimeout(() => {
|
|
3708
|
-
|
|
3718
|
+
s = !1;
|
|
3709
3719
|
}, 50);
|
|
3710
3720
|
return;
|
|
3711
3721
|
}
|
|
3712
3722
|
else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
3713
|
-
|
|
3723
|
+
d = j(l, L.value), d && d !== h.value && (le = !0, h.value = d, k.value = l);
|
|
3714
3724
|
else {
|
|
3715
3725
|
setTimeout(() => {
|
|
3716
|
-
|
|
3726
|
+
s = !1;
|
|
3717
3727
|
}, 50);
|
|
3718
3728
|
return;
|
|
3719
3729
|
}
|
|
3720
3730
|
else
|
|
3721
|
-
|
|
3731
|
+
d = j(l, L.value), d && d !== h.value && (le = !0, h.value = d, k.value = l);
|
|
3722
3732
|
setTimeout(() => {
|
|
3723
|
-
|
|
3733
|
+
s = !1;
|
|
3724
3734
|
}, 50);
|
|
3725
|
-
},
|
|
3726
|
-
},
|
|
3735
|
+
}, ua = (t) => {
|
|
3736
|
+
}, Et = (t) => {
|
|
3727
3737
|
var v;
|
|
3728
|
-
if (!
|
|
3738
|
+
if (!N.value || !M.value || !$.value)
|
|
3729
3739
|
return;
|
|
3730
|
-
const l = t.target,
|
|
3731
|
-
if (
|
|
3740
|
+
const l = t.target, d = (v = $.value) == null ? void 0 : v.closest(".nb-wrapper");
|
|
3741
|
+
if (M.value && M.value.contains(l) || d && (l === d || d.contains(l)) || M.value && M.value.contains(l))
|
|
3732
3742
|
return;
|
|
3733
3743
|
let i = l;
|
|
3734
3744
|
for (; i && i !== document.body; ) {
|
|
3735
|
-
if (i ===
|
|
3745
|
+
if (i === M.value || M.value && M.value.contains(i))
|
|
3736
3746
|
return;
|
|
3737
3747
|
i = i.parentElement;
|
|
3738
3748
|
}
|
|
3739
3749
|
setTimeout(() => {
|
|
3740
|
-
if (!
|
|
3750
|
+
if (!N.value || !M.value || M.value && M.value.contains(l))
|
|
3741
3751
|
return;
|
|
3742
3752
|
for (i = l; i && i !== document.body; ) {
|
|
3743
|
-
if (i ===
|
|
3753
|
+
if (i === M.value || M.value && M.value.contains(i))
|
|
3744
3754
|
return;
|
|
3745
3755
|
i = i.parentElement;
|
|
3746
3756
|
}
|
|
3747
3757
|
if (!document.body.contains(l))
|
|
3748
3758
|
return;
|
|
3749
|
-
const
|
|
3750
|
-
!
|
|
3759
|
+
const f = $.value && (l === $.value || $.value.contains(l)), p = d && (l === d || d.contains(l));
|
|
3760
|
+
!f && !p && (N.value = !1, (!R.value || R.value.trim().length === 0) && (T.value = !1));
|
|
3751
3761
|
}, 50);
|
|
3762
|
+
}, Pt = () => {
|
|
3763
|
+
N.value && ae.value && Ct();
|
|
3752
3764
|
}, Ft = () => {
|
|
3753
|
-
|
|
3754
|
-
}, Ot = () => {
|
|
3755
|
-
I.value && le.value && (I.value = !1);
|
|
3765
|
+
N.value && ae.value && (N.value = !1);
|
|
3756
3766
|
};
|
|
3757
|
-
let bt = null,
|
|
3758
|
-
const
|
|
3759
|
-
if (!
|
|
3767
|
+
let bt = null, Lt = null, it = { top: 0, left: 0 };
|
|
3768
|
+
const Ot = () => {
|
|
3769
|
+
if (!N.value || !ae.value || !$.value)
|
|
3760
3770
|
return;
|
|
3761
|
-
const t = 4, l = $.value.getBoundingClientRect(),
|
|
3762
|
-
(
|
|
3763
|
-
top:
|
|
3771
|
+
const t = 4, l = $.value.getBoundingClientRect(), d = `${l.bottom + t}px`, i = `${l.left}px`;
|
|
3772
|
+
(it.top !== d || it.left !== i) && (it.top = d, it.left = i, te.value = {
|
|
3773
|
+
top: d,
|
|
3764
3774
|
left: i
|
|
3765
|
-
}),
|
|
3766
|
-
},
|
|
3767
|
-
if (!$.value || !
|
|
3775
|
+
}), Lt = requestAnimationFrame(Ot);
|
|
3776
|
+
}, ra = () => {
|
|
3777
|
+
if (!$.value || !ae.value)
|
|
3768
3778
|
return;
|
|
3769
|
-
|
|
3770
|
-
|
|
3779
|
+
it = { top: 0, left: 0 }, Ot(), bt = new ResizeObserver(() => {
|
|
3780
|
+
N.value && Ct();
|
|
3771
3781
|
}), bt.observe($.value);
|
|
3772
3782
|
const t = $.value.closest(".component");
|
|
3773
3783
|
t && bt.observe(t);
|
|
3774
|
-
},
|
|
3775
|
-
|
|
3784
|
+
}, n = () => {
|
|
3785
|
+
Lt !== null && (cancelAnimationFrame(Lt), Lt = null), bt && (bt.disconnect(), bt = null);
|
|
3776
3786
|
};
|
|
3777
|
-
|
|
3778
|
-
t &&
|
|
3779
|
-
|
|
3780
|
-
}) :
|
|
3787
|
+
H(N, (t) => {
|
|
3788
|
+
t && ae.value ? ya(() => {
|
|
3789
|
+
ra();
|
|
3790
|
+
}) : n();
|
|
3781
3791
|
}), sa(() => {
|
|
3782
|
-
h.value = we.value,
|
|
3792
|
+
h.value = we.value, R.value = ut(we.value, L.value), document.addEventListener("click", Et, !1), window.addEventListener("scroll", Pt, { capture: !0, passive: !0 }), window.addEventListener("resize", Ft);
|
|
3783
3793
|
}), ma(() => {
|
|
3784
|
-
|
|
3785
|
-
}),
|
|
3794
|
+
It(), n(), document.removeEventListener("click", Et), window.removeEventListener("scroll", Pt, { capture: !0, passive: !0 }), window.removeEventListener("resize", Ft);
|
|
3795
|
+
}), H(L, (t) => {
|
|
3786
3796
|
Oe.value = t;
|
|
3787
|
-
}, { immediate: !0 }),
|
|
3788
|
-
h.value &&
|
|
3789
|
-
}),
|
|
3797
|
+
}, { immediate: !0 }), H(Je, () => {
|
|
3798
|
+
h.value && ae.value && (R.value = ut(h.value, L.value));
|
|
3799
|
+
}), H(we, (t) => {
|
|
3790
3800
|
if (t !== h.value) {
|
|
3791
3801
|
h.value = t;
|
|
3792
|
-
const l =
|
|
3793
|
-
|
|
3802
|
+
const l = ut(t, L.value);
|
|
3803
|
+
R.value = l, k.value = l;
|
|
3794
3804
|
}
|
|
3795
3805
|
}, { immediate: !0 });
|
|
3796
|
-
let
|
|
3797
|
-
const
|
|
3798
|
-
|
|
3799
|
-
|
|
3806
|
+
let s = !1;
|
|
3807
|
+
const je = () => {
|
|
3808
|
+
s = !0, setTimeout(() => {
|
|
3809
|
+
s = !1;
|
|
3800
3810
|
}, 100);
|
|
3801
3811
|
};
|
|
3802
|
-
let
|
|
3803
|
-
return
|
|
3804
|
-
if (
|
|
3805
|
-
const l =
|
|
3806
|
-
l !==
|
|
3812
|
+
let le = !1;
|
|
3813
|
+
return H(() => h.value, (t) => {
|
|
3814
|
+
if (ae.value && !le && !s) {
|
|
3815
|
+
const l = ut(t, L.value);
|
|
3816
|
+
l !== R.value && (R.value = l, k.value = l);
|
|
3807
3817
|
}
|
|
3808
|
-
|
|
3809
|
-
}),
|
|
3818
|
+
le = !1;
|
|
3819
|
+
}), H(h, (t) => {
|
|
3810
3820
|
if (x.value && (t = t.trim()), Se.value && typeof t == "string" && t.startsWith("{"))
|
|
3811
3821
|
try {
|
|
3812
3822
|
const l = JSON.parse(t);
|
|
3813
3823
|
if (l && (l.startDate || l.endDate)) {
|
|
3814
|
-
const
|
|
3815
|
-
if (!
|
|
3824
|
+
const d = (f) => {
|
|
3825
|
+
if (!f)
|
|
3816
3826
|
return null;
|
|
3817
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
3818
|
-
const [p, S, A] =
|
|
3827
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(f)) {
|
|
3828
|
+
const [p, S, A] = f.split("-").map(Number);
|
|
3819
3829
|
return new Date(p, S - 1, A);
|
|
3820
3830
|
}
|
|
3821
|
-
return new Date(
|
|
3822
|
-
}, i = l.startDate ?
|
|
3823
|
-
|
|
3831
|
+
return new Date(f);
|
|
3832
|
+
}, i = l.startDate ? d(l.startDate) : null, v = l.endDate ? d(l.endDate) : null;
|
|
3833
|
+
E("changed", { startDate: i, endDate: v });
|
|
3824
3834
|
return;
|
|
3825
3835
|
}
|
|
3826
3836
|
} catch {
|
|
3827
3837
|
}
|
|
3828
|
-
|
|
3829
|
-
}),
|
|
3830
|
-
|
|
3831
|
-
}),
|
|
3832
|
-
x.value && (t = t.trim()),
|
|
3833
|
-
}), (t, l) =>
|
|
3838
|
+
E("changed", t);
|
|
3839
|
+
}), H(T, (t) => {
|
|
3840
|
+
E(t ? "focused" : "blurred");
|
|
3841
|
+
}), H(h, (t) => {
|
|
3842
|
+
x.value && (t = t.trim()), E("current-value", t);
|
|
3843
|
+
}), (t, l) => o(Ve) ? (F(), q("div", da({
|
|
3834
3844
|
key: 0,
|
|
3835
|
-
class: ["nb-wrapper",
|
|
3836
|
-
style: [
|
|
3845
|
+
class: ["nb-wrapper", $t.value],
|
|
3846
|
+
style: [wt.value, zt.value, rt.value],
|
|
3837
3847
|
role: "input"
|
|
3838
3848
|
}, qe.value), [
|
|
3839
3849
|
ve("div", {
|
|
3840
|
-
id:
|
|
3841
|
-
class: We(["nb-reset", "component",
|
|
3842
|
-
style: Ee([vt.value,
|
|
3843
|
-
onClick:
|
|
3850
|
+
id: o(Ve),
|
|
3851
|
+
class: We(["nb-reset", "component", Gt.value, Kt.value, Yt.value, Ht.value]),
|
|
3852
|
+
style: Ee([vt.value, zt.value, rt.value]),
|
|
3853
|
+
onClick: Wt
|
|
3844
3854
|
}, [
|
|
3845
|
-
|
|
3855
|
+
o(Re) ? (F(), q("label", {
|
|
3846
3856
|
key: 0,
|
|
3847
|
-
for:
|
|
3857
|
+
for: kt.value,
|
|
3848
3858
|
class: "component__label",
|
|
3849
3859
|
style: Ee([ht.value]),
|
|
3850
|
-
onClick:
|
|
3851
|
-
},
|
|
3860
|
+
onClick: Xt
|
|
3861
|
+
}, xt(e.label), 13, Fl)) : Be("", !0),
|
|
3852
3862
|
pa(ve("input", {
|
|
3853
3863
|
ref_key: "inputRef",
|
|
3854
3864
|
ref: $,
|
|
3855
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
3856
|
-
onInput:
|
|
3865
|
+
"onUpdate:modelValue": l[0] || (l[0] = (d) => R.value = d),
|
|
3866
|
+
onInput: oa,
|
|
3857
3867
|
onKeydown: [
|
|
3858
|
-
|
|
3859
|
-
l[1] || (l[1] =
|
|
3868
|
+
je,
|
|
3869
|
+
l[1] || (l[1] = qt((d) => !o(w) && o(Ae) && Zt(), ["enter"]))
|
|
3860
3870
|
],
|
|
3861
|
-
id:
|
|
3862
|
-
name:
|
|
3863
|
-
type:
|
|
3871
|
+
id: kt.value,
|
|
3872
|
+
name: kt.value,
|
|
3873
|
+
type: ae.value ? "text" : Oe.value,
|
|
3864
3874
|
class: We(["component__input", [
|
|
3865
|
-
|
|
3866
|
-
|
|
3875
|
+
Qt.value,
|
|
3876
|
+
Ut.value,
|
|
3867
3877
|
u.value
|
|
3868
3878
|
]]),
|
|
3869
|
-
placeholder:
|
|
3870
|
-
disabled:
|
|
3879
|
+
placeholder: Dt.value,
|
|
3880
|
+
disabled: o(w) || o(_),
|
|
3871
3881
|
required: e.required,
|
|
3872
|
-
readonly:
|
|
3882
|
+
readonly: o(_),
|
|
3873
3883
|
autocomplete: e.inputAutocomplete,
|
|
3874
|
-
min:
|
|
3875
|
-
max:
|
|
3876
|
-
step:
|
|
3877
|
-
tabindex:
|
|
3884
|
+
min: ae.value ? void 0 : o(tt),
|
|
3885
|
+
max: ae.value ? void 0 : o(ye),
|
|
3886
|
+
step: ae.value ? void 0 : o(at),
|
|
3887
|
+
tabindex: o(w) || o(_) ? -1 : o(st),
|
|
3878
3888
|
role: "input",
|
|
3879
|
-
style: Ee([
|
|
3880
|
-
onFocus:
|
|
3881
|
-
onBlur:
|
|
3882
|
-
onClick:
|
|
3883
|
-
}, null, 46,
|
|
3884
|
-
[Ha,
|
|
3889
|
+
style: Ee([rt.value]),
|
|
3890
|
+
onFocus: ta,
|
|
3891
|
+
onBlur: aa,
|
|
3892
|
+
onClick: la
|
|
3893
|
+
}, null, 46, Ol), [
|
|
3894
|
+
[Ha, R.value]
|
|
3885
3895
|
])
|
|
3886
|
-
], 14,
|
|
3887
|
-
|
|
3896
|
+
], 14, Pl),
|
|
3897
|
+
W.value ? (F(), q("div", {
|
|
3888
3898
|
key: 0,
|
|
3889
3899
|
class: We(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
3890
3900
|
}, [
|
|
3891
3901
|
ia(t.$slots, "message", {}, () => [
|
|
3892
|
-
ga(
|
|
3902
|
+
ga(xt(e.message), 1)
|
|
3893
3903
|
], !0)
|
|
3894
3904
|
], 2)) : Be("", !0),
|
|
3895
|
-
(
|
|
3896
|
-
|
|
3905
|
+
(F(), ul(rl, { to: "body" }, [
|
|
3906
|
+
ae.value && N.value ? (F(), q("div", {
|
|
3897
3907
|
key: 0,
|
|
3898
3908
|
ref_key: "calendarRef",
|
|
3899
|
-
ref:
|
|
3909
|
+
ref: M,
|
|
3900
3910
|
class: "datepicker__custom-calendar-wrapper",
|
|
3901
|
-
style: Ee(
|
|
3902
|
-
onClick: l[4] || (l[4] = ca((
|
|
3903
|
-
onMousedown: l[5] || (l[5] = ca((
|
|
3911
|
+
style: Ee(ea.value),
|
|
3912
|
+
onClick: l[4] || (l[4] = ca((d) => he.value = !0, ["stop"])),
|
|
3913
|
+
onMousedown: l[5] || (l[5] = ca((d) => he.value = !0, ["stop"]))
|
|
3904
3914
|
}, [
|
|
3905
|
-
|
|
3906
|
-
"nb-id": `${
|
|
3907
|
-
value:
|
|
3908
|
-
"input-type":
|
|
3909
|
-
min:
|
|
3910
|
-
max:
|
|
3911
|
-
step:
|
|
3912
|
-
disabled:
|
|
3913
|
-
width:
|
|
3914
|
-
locale:
|
|
3915
|
-
theme:
|
|
3916
|
-
"allow-range":
|
|
3917
|
-
onChanged:
|
|
3918
|
-
onDateSelected:
|
|
3919
|
-
onMousedown: l[2] || (l[2] = (
|
|
3920
|
-
onClick: l[3] || (l[3] = (
|
|
3915
|
+
il(o(C), {
|
|
3916
|
+
"nb-id": `${o(Ve)}-calendar`,
|
|
3917
|
+
value: Vt.value,
|
|
3918
|
+
"input-type": o(L),
|
|
3919
|
+
min: o(tt),
|
|
3920
|
+
max: o(ye),
|
|
3921
|
+
step: o(at),
|
|
3922
|
+
disabled: o(w),
|
|
3923
|
+
width: St.value,
|
|
3924
|
+
locale: o(Je),
|
|
3925
|
+
theme: o(Te),
|
|
3926
|
+
"allow-range": o(Se),
|
|
3927
|
+
onChanged: na,
|
|
3928
|
+
onDateSelected: ua,
|
|
3929
|
+
onMousedown: l[2] || (l[2] = (d) => he.value = !0),
|
|
3930
|
+
onClick: l[3] || (l[3] = (d) => he.value = !0)
|
|
3921
3931
|
}, null, 8, ["nb-id", "value", "input-type", "min", "max", "step", "disabled", "width", "locale", "theme", "allow-range"])
|
|
3922
3932
|
], 36)) : Be("", !0)
|
|
3923
3933
|
]))
|
|
3924
3934
|
], 16)) : Be("", !0);
|
|
3925
3935
|
}
|
|
3926
|
-
}),
|
|
3927
|
-
NbInputRadio:
|
|
3928
|
-
NbInputCheckbox:
|
|
3929
|
-
NbInput:
|
|
3930
|
-
NbInputChip:
|
|
3931
|
-
NbTextarea:
|
|
3932
|
-
NbDatePicker:
|
|
3933
|
-
},
|
|
3936
|
+
}), jl = /* @__PURE__ */ ba(ql, [["__scopeId", "data-v-35736538"]]), Oa = {
|
|
3937
|
+
NbInputRadio: vl,
|
|
3938
|
+
NbInputCheckbox: ml,
|
|
3939
|
+
NbInput: Bl,
|
|
3940
|
+
NbInputChip: zl,
|
|
3941
|
+
NbTextarea: El,
|
|
3942
|
+
NbDatePicker: jl
|
|
3943
|
+
}, Ul = {
|
|
3934
3944
|
install(e) {
|
|
3935
3945
|
for (const m in Oa)
|
|
3936
3946
|
if (Object.prototype.hasOwnProperty.call(Oa, m)) {
|
|
@@ -3940,5 +3950,5 @@ const El = ["id"], Pl = ["for"], Fl = ["id", "name", "type", "placeholder", "dis
|
|
|
3940
3950
|
}
|
|
3941
3951
|
};
|
|
3942
3952
|
export {
|
|
3943
|
-
|
|
3953
|
+
Ul as default
|
|
3944
3954
|
};
|