@vlalg-nimbus/nb-inputs 9.3.0 → 9.5.0
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 +915 -883
- 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 Wa, onMounted as Aa, ref as oe, toRefs as Ea, computed as a, watch as re, openBlock as O, createElementBlock as K, normalizeClass as Ye, normalizeStyle as Ne, createElementVNode as
|
|
2
|
-
const Oa = (e,
|
|
1
|
+
import { useCssVars as Wa, onMounted as Aa, ref as oe, toRefs as Ea, computed as a, watch as re, openBlock as O, createElementBlock as K, normalizeClass as Ye, normalizeStyle as Ne, createElementVNode as Ve, mergeProps as $a, Fragment as gl, renderList as yl, unref as u, withDirectives as Pa, vModelRadio as Tl, withKeys as na, withModifiers as Ia, toDisplayString as Rt, createCommentVNode as me, vModelCheckbox as kl, onUnmounted as Ya, createTextVNode as jt, renderSlot as La, vModelDynamic as ml, vModelText as hl, defineAsyncComponent as Bl, nextTick as la, createBlock as Ll, Teleport as Al, createVNode as $l } from "vue";
|
|
2
|
+
const Oa = (e, b) => {
|
|
3
3
|
const g = e.__vccOpts || e;
|
|
4
|
-
for (const [h, F] of
|
|
4
|
+
for (const [h, F] of b)
|
|
5
5
|
g[h] = F;
|
|
6
6
|
return g;
|
|
7
|
-
}, wl = ["
|
|
7
|
+
}, wl = ["title"], Dl = ["id"], Rl = ["id", "disabled", "value", "name"], Ml = ["for", "tabindex"], Nl = /* @__PURE__ */ Object.assign({
|
|
8
8
|
name: "NbInputRadio",
|
|
9
9
|
inheritAttrs: !1
|
|
10
10
|
}, {
|
|
@@ -18,14 +18,14 @@ const Oa = (e, y) => {
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: "b",
|
|
20
20
|
validator: (e = "b") => {
|
|
21
|
-
const
|
|
22
|
-
return ["b", "ib"].includes(
|
|
21
|
+
const b = e ? e.toLowerCase() : "";
|
|
22
|
+
return ["b", "ib"].includes(b);
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
tabIndex: {
|
|
26
26
|
type: [Number, Array],
|
|
27
27
|
default: 0,
|
|
28
|
-
validator: (e,
|
|
28
|
+
validator: (e, b) => Array.isArray(e) ? e.length === b.options.length : !0
|
|
29
29
|
},
|
|
30
30
|
hasTabIndexEnter: {
|
|
31
31
|
type: Boolean,
|
|
@@ -43,6 +43,10 @@ const Oa = (e, y) => {
|
|
|
43
43
|
type: Object,
|
|
44
44
|
default: () => ({})
|
|
45
45
|
},
|
|
46
|
+
title: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
46
50
|
groupName: {
|
|
47
51
|
type: String,
|
|
48
52
|
default: "",
|
|
@@ -56,12 +60,12 @@ const Oa = (e, y) => {
|
|
|
56
60
|
validator: (e) => {
|
|
57
61
|
if (!e.length)
|
|
58
62
|
return !1;
|
|
59
|
-
let
|
|
63
|
+
let b = !1;
|
|
60
64
|
for (const g of e) {
|
|
61
65
|
const h = Object.keys(g);
|
|
62
|
-
h.length !== 2 && (
|
|
66
|
+
h.length !== 2 && (b = !0), h.every((Q) => ["value", "text"].includes(Q)) || (b = !0);
|
|
63
67
|
}
|
|
64
|
-
if (!
|
|
68
|
+
if (!b)
|
|
65
69
|
return e;
|
|
66
70
|
}
|
|
67
71
|
},
|
|
@@ -78,8 +82,8 @@ const Oa = (e, y) => {
|
|
|
78
82
|
type: String,
|
|
79
83
|
default: "light",
|
|
80
84
|
validator: (e) => {
|
|
81
|
-
const
|
|
82
|
-
return ["light", "dark"].includes(
|
|
85
|
+
const b = e ? e.toLowerCase() : "";
|
|
86
|
+
return ["light", "dark"].includes(b);
|
|
83
87
|
}
|
|
84
88
|
},
|
|
85
89
|
// Cores do tema light
|
|
@@ -151,143 +155,144 @@ const Oa = (e, y) => {
|
|
|
151
155
|
}
|
|
152
156
|
},
|
|
153
157
|
emits: ["current-value", "changed", "clicked"],
|
|
154
|
-
setup(e, { emit:
|
|
155
|
-
Wa((
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
"
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
|
|
158
|
+
setup(e, { emit: b }) {
|
|
159
|
+
Wa((V) => ({
|
|
160
|
+
"32db2fe1": Ue.value,
|
|
161
|
+
"7548f2cd": xt.value,
|
|
162
|
+
"6ca0b972": St.value,
|
|
163
|
+
eb1de6ec: ot.value,
|
|
164
|
+
f1fdc220: ht.value,
|
|
165
|
+
"285fd002": pe.value,
|
|
166
|
+
ed3b34a8: vt.value,
|
|
167
|
+
"0c621d08": pt.value,
|
|
168
|
+
"552fe5ee": Lt.value,
|
|
169
|
+
"4d4d7941": ze.value,
|
|
170
|
+
a4929024: Le.value
|
|
167
171
|
})), Aa(() => {
|
|
168
172
|
gt();
|
|
169
173
|
});
|
|
170
|
-
const g =
|
|
174
|
+
const g = b, h = e, F = oe(null), {
|
|
171
175
|
ariaLabel: Q,
|
|
172
|
-
ariaAttrs:
|
|
173
|
-
currentOption:
|
|
174
|
-
valueType:
|
|
175
|
-
display:
|
|
176
|
+
ariaAttrs: fe,
|
|
177
|
+
currentOption: R,
|
|
178
|
+
valueType: B,
|
|
179
|
+
display: C,
|
|
176
180
|
options: I,
|
|
177
181
|
theme: ae,
|
|
178
182
|
lightTextColor: le,
|
|
179
183
|
lightColor: X,
|
|
180
184
|
lightColorHover: _,
|
|
181
|
-
darkTextColor:
|
|
185
|
+
darkTextColor: w,
|
|
182
186
|
darkColor: H,
|
|
183
|
-
darkColorHover:
|
|
187
|
+
darkColorHover: se,
|
|
184
188
|
hoverEffect: q,
|
|
185
189
|
activeHoverEffect: Fe,
|
|
186
|
-
itemGap:
|
|
190
|
+
itemGap: he,
|
|
187
191
|
internalGap: ee,
|
|
188
|
-
scale:
|
|
189
|
-
disabled:
|
|
190
|
-
fontFamily:
|
|
191
|
-
fontSize:
|
|
192
|
-
fontWeight:
|
|
192
|
+
scale: Te,
|
|
193
|
+
disabled: ve,
|
|
194
|
+
fontFamily: we,
|
|
195
|
+
fontSize: ke,
|
|
196
|
+
fontWeight: Be
|
|
193
197
|
} = Ea(h), j = a(() => {
|
|
194
|
-
const
|
|
198
|
+
const V = ve.value ? "component-disabled" : "", D = C.value !== "b" ? "inline-block" : "block", Se = we.value ? we.value : "'Lato', sans-serif", te = ke.value ? ke.value : "1.6em", ge = Be.value !== 0 && !Be.value || Be.value < 0 ? 200 : Be.value, tt = [!1, !0].includes(q.value) ? q.value : !1, Ge = [!1, !0].includes(Fe.value) ? Fe.value : !1, Ie = he.value !== 0 && !he.value || he.value < 0 ? 15 : he.value, y = ee.value !== 0 && !ee.value || ee.value < 0 ? 6 : ee.value, k = Te.value !== 0 && !Te.value || Te.value < 0 ? 1 : Te.value;
|
|
195
199
|
return {
|
|
196
|
-
disabled:
|
|
197
|
-
display:
|
|
200
|
+
disabled: V,
|
|
201
|
+
display: D,
|
|
198
202
|
hoverEffect: tt,
|
|
199
203
|
activeHoverEffect: Ge,
|
|
200
204
|
itemGap: Ie,
|
|
201
|
-
internalGap:
|
|
202
|
-
scale:
|
|
203
|
-
font:
|
|
205
|
+
internalGap: y,
|
|
206
|
+
scale: k,
|
|
207
|
+
font: Se,
|
|
204
208
|
fontSize: te,
|
|
205
|
-
fontWeight:
|
|
209
|
+
fontWeight: ge
|
|
206
210
|
};
|
|
207
211
|
}), Qe = a(() => j.value.disabled), v = a(() => ({
|
|
208
212
|
display: j.value.display
|
|
209
|
-
})),
|
|
210
|
-
const
|
|
213
|
+
})), de = a(() => j.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), Oe = a(() => {
|
|
214
|
+
const V = j.value;
|
|
211
215
|
return {
|
|
212
|
-
fontSize:
|
|
213
|
-
fontWeight:
|
|
216
|
+
fontSize: V.fontSize,
|
|
217
|
+
fontWeight: V.fontWeight
|
|
214
218
|
};
|
|
215
|
-
}), Xe = a(() => Array.isArray(I.value) && I.value.constructor === Array && I.value.length > 0), S = a(() => ae.value === "dark" ? "component__theme--dark" : "component__theme--light"), Ue = a(() => j.value.font),
|
|
216
|
-
const
|
|
217
|
-
return !
|
|
219
|
+
}), Xe = a(() => Array.isArray(I.value) && I.value.constructor === Array && I.value.length > 0), S = a(() => ae.value === "dark" ? "component__theme--dark" : "component__theme--light"), Ue = a(() => j.value.font), pe = a(() => le.value), vt = a(() => X.value), ht = a(() => j.value.hoverEffect ? _.value : X.value), ot = a(() => j.value.activeHoverEffect ? _.value : X.value), ze = a(() => w.value), Le = a(() => H.value), Lt = a(() => j.value.hoverEffect ? se.value : H.value), pt = a(() => j.value.activeHoverEffect ? se.value : H.value), St = a(() => {
|
|
220
|
+
const D = j.value.internalGap;
|
|
221
|
+
return !D || D < 0 ? 0 : `${D}px`;
|
|
218
222
|
}), xt = a(() => {
|
|
219
|
-
const
|
|
220
|
-
return !
|
|
223
|
+
const D = j.value.itemGap;
|
|
224
|
+
return !D || D < 0 ? 0 : `${D}px`;
|
|
221
225
|
}), Ct = a(() => ({
|
|
222
226
|
zoom: j.value.scale
|
|
223
|
-
})),
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
const
|
|
227
|
+
})), Ae = a(() => {
|
|
228
|
+
const V = {};
|
|
229
|
+
fe.value && Object.keys(fe.value).forEach((te) => V[`aria-${te}`] = fe.value[te]);
|
|
230
|
+
const D = {
|
|
227
231
|
"aria-label": Q.value,
|
|
228
|
-
"aria-disabled":
|
|
229
|
-
...
|
|
232
|
+
"aria-disabled": ve.value,
|
|
233
|
+
...V
|
|
230
234
|
};
|
|
231
235
|
return Object.fromEntries(
|
|
232
|
-
Object.entries(
|
|
236
|
+
Object.entries(D).filter(([Se, te]) => te != null)
|
|
233
237
|
);
|
|
234
238
|
}), gt = () => {
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
}, et = () => {
|
|
238
|
-
g("clicked");
|
|
239
|
+
const V = R.value;
|
|
240
|
+
V && ["string"].includes(B.value) ? F.value = V.toString().toLowerCase() : F.value = V;
|
|
241
|
+
}, et = (V) => {
|
|
242
|
+
g("clicked", V);
|
|
239
243
|
};
|
|
240
|
-
return re(
|
|
241
|
-
|
|
242
|
-
}), re(F, (
|
|
243
|
-
|
|
244
|
-
}), (
|
|
244
|
+
return re(R, (V, D) => {
|
|
245
|
+
V !== D && gt();
|
|
246
|
+
}), re(F, (V, D) => {
|
|
247
|
+
V !== D && (g("current-value", V), g("changed", V));
|
|
248
|
+
}), (V, D) => e.nbId && Xe.value ? (O(), K("div", {
|
|
245
249
|
key: 0,
|
|
246
250
|
class: Ye(["nb-wrapper", Qe.value]),
|
|
247
|
-
style: Ne([v.value, Ct.value])
|
|
251
|
+
style: Ne([v.value, Ct.value]),
|
|
252
|
+
title: e.title
|
|
248
253
|
}, [
|
|
249
|
-
|
|
254
|
+
Ve("div", $a({
|
|
250
255
|
id: e.nbId,
|
|
251
256
|
role: "radiogroup"
|
|
252
|
-
},
|
|
253
|
-
class: ["nb-reset", "component",
|
|
257
|
+
}, Ae.value, {
|
|
258
|
+
class: ["nb-reset", "component", de.value, S.value]
|
|
254
259
|
}), [
|
|
255
|
-
(O(!0), K(gl, null, yl(u(I), (
|
|
260
|
+
(O(!0), K(gl, null, yl(u(I), (Se, te) => (O(), K("div", {
|
|
256
261
|
key: te,
|
|
257
262
|
class: "component-radio__item"
|
|
258
263
|
}, [
|
|
259
|
-
Pa(
|
|
260
|
-
id: `${e.nbId}-${
|
|
261
|
-
"onUpdate:modelValue":
|
|
264
|
+
Pa(Ve("input", {
|
|
265
|
+
id: `${e.nbId}-${Se.value}`,
|
|
266
|
+
"onUpdate:modelValue": D[0] || (D[0] = (ge) => F.value = ge),
|
|
262
267
|
type: "radio",
|
|
263
268
|
class: "component-radio__item--input",
|
|
264
|
-
disabled: u(
|
|
265
|
-
value:
|
|
269
|
+
disabled: u(ve),
|
|
270
|
+
value: Se.value,
|
|
266
271
|
name: e.groupName,
|
|
267
|
-
onClick: et
|
|
268
|
-
}, null, 8,
|
|
272
|
+
onClick: D[1] || (D[1] = (ge) => et(ge))
|
|
273
|
+
}, null, 8, Rl), [
|
|
269
274
|
[Tl, F.value]
|
|
270
275
|
]),
|
|
271
|
-
|
|
272
|
-
for: `${e.nbId}-${
|
|
273
|
-
tabindex: u(
|
|
276
|
+
Ve("label", {
|
|
277
|
+
for: `${e.nbId}-${Se.value}`,
|
|
278
|
+
tabindex: u(ve) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[te] : e.tabIndex >= 0 ? e.tabIndex : te + 1,
|
|
274
279
|
class: "component-radio__item--label",
|
|
275
280
|
onKeydown: [
|
|
276
|
-
|
|
277
|
-
|
|
281
|
+
D[2] || (D[2] = na(Ia((ge) => !u(ve) && e.hasTabIndexEnter && ge.target.click(), ["prevent"]), ["enter"])),
|
|
282
|
+
D[3] || (D[3] = na(Ia((ge) => !u(ve) && e.hasTabIndexSpace && ge.target.click(), ["prevent"]), ["space"]))
|
|
278
283
|
]
|
|
279
284
|
}, [
|
|
280
|
-
|
|
281
|
-
|
|
285
|
+
D[4] || (D[4] = Ve("div", null, null, -1)),
|
|
286
|
+
Ve("span", {
|
|
282
287
|
style: Ne([Oe.value])
|
|
283
|
-
}, Rt(
|
|
284
|
-
], 40,
|
|
288
|
+
}, Rt(Se.text), 5)
|
|
289
|
+
], 40, Ml)
|
|
285
290
|
]))), 128))
|
|
286
|
-
], 16,
|
|
287
|
-
],
|
|
291
|
+
], 16, Dl)
|
|
292
|
+
], 14, wl)) : me("", !0);
|
|
288
293
|
}
|
|
289
|
-
}),
|
|
290
|
-
const
|
|
294
|
+
}), Fl = /* @__PURE__ */ Oa(Nl, [["__scopeId", "data-v-e2deea1c"]]);
|
|
295
|
+
const zl = ["title"], Il = ["id"], Wl = ["id", "disabled", "value", "name"], El = ["for", "tabindex"], Pl = /* @__PURE__ */ Object.assign({
|
|
291
296
|
name: "NbInputCheckbox",
|
|
292
297
|
inheritAttrs: !1
|
|
293
298
|
}, {
|
|
@@ -301,14 +306,14 @@ const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabin
|
|
|
301
306
|
type: String,
|
|
302
307
|
default: "b",
|
|
303
308
|
validator: (e = "b") => {
|
|
304
|
-
const
|
|
305
|
-
return ["b", "ib"].includes(
|
|
309
|
+
const b = e ? e.toLowerCase() : "";
|
|
310
|
+
return ["b", "ib"].includes(b);
|
|
306
311
|
}
|
|
307
312
|
},
|
|
308
313
|
tabIndex: {
|
|
309
314
|
type: [Number, Array],
|
|
310
315
|
default: 0,
|
|
311
|
-
validator: (e,
|
|
316
|
+
validator: (e, b) => Array.isArray(e) ? e.length === b.options.length : !0
|
|
312
317
|
},
|
|
313
318
|
hasTabIndexEnter: {
|
|
314
319
|
type: Boolean,
|
|
@@ -326,6 +331,10 @@ const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabin
|
|
|
326
331
|
type: Object,
|
|
327
332
|
default: () => ({})
|
|
328
333
|
},
|
|
334
|
+
title: {
|
|
335
|
+
type: String,
|
|
336
|
+
default: ""
|
|
337
|
+
},
|
|
329
338
|
groupName: {
|
|
330
339
|
type: String,
|
|
331
340
|
default: "",
|
|
@@ -339,12 +348,12 @@ const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabin
|
|
|
339
348
|
validator: (e) => {
|
|
340
349
|
if (!e.length)
|
|
341
350
|
return !1;
|
|
342
|
-
let
|
|
351
|
+
let b = !1;
|
|
343
352
|
for (const g of e) {
|
|
344
353
|
const h = Object.keys(g);
|
|
345
|
-
h.length !== 2 && (
|
|
354
|
+
h.length !== 2 && (b = !0), h.every((Q) => ["value", "text"].includes(Q)) || (b = !0);
|
|
346
355
|
}
|
|
347
|
-
if (!
|
|
356
|
+
if (!b)
|
|
348
357
|
return e;
|
|
349
358
|
}
|
|
350
359
|
},
|
|
@@ -356,8 +365,8 @@ const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabin
|
|
|
356
365
|
type: String,
|
|
357
366
|
default: "light",
|
|
358
367
|
validator: (e) => {
|
|
359
|
-
const
|
|
360
|
-
return ["light", "dark"].includes(
|
|
368
|
+
const b = e ? e.toLowerCase() : "";
|
|
369
|
+
return ["light", "dark"].includes(b);
|
|
361
370
|
}
|
|
362
371
|
},
|
|
363
372
|
// Cores do tema light
|
|
@@ -447,56 +456,56 @@ const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabin
|
|
|
447
456
|
}
|
|
448
457
|
},
|
|
449
458
|
emits: ["current-value", "changed", "clicked"],
|
|
450
|
-
setup(e, { emit:
|
|
451
|
-
Wa((
|
|
452
|
-
"
|
|
453
|
-
"
|
|
454
|
-
"
|
|
455
|
-
"
|
|
456
|
-
"
|
|
457
|
-
"
|
|
458
|
-
"
|
|
459
|
-
|
|
460
|
-
"
|
|
461
|
-
"
|
|
462
|
-
"
|
|
463
|
-
"
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
459
|
+
setup(e, { emit: b }) {
|
|
460
|
+
Wa((y) => ({
|
|
461
|
+
"22f8e774": vt.value,
|
|
462
|
+
"29caa8e0": Se.value,
|
|
463
|
+
"240ce203": D.value,
|
|
464
|
+
"0339a3f6": V.value,
|
|
465
|
+
"3452f846": Le.value,
|
|
466
|
+
"5c5b5083": ze.value,
|
|
467
|
+
"3572107c": Lt.value,
|
|
468
|
+
"8543778e": ot.value,
|
|
469
|
+
"2b202fe8": ht.value,
|
|
470
|
+
"74e1ec5c": et.value,
|
|
471
|
+
"1796ef55": Ct.value,
|
|
472
|
+
"53cfb5fb": xt.value,
|
|
473
|
+
aecb358c: Ae.value,
|
|
474
|
+
"4ea3587e": St.value,
|
|
475
|
+
"8ec618d8": pt.value
|
|
467
476
|
})), Aa(() => {
|
|
468
477
|
Ge();
|
|
469
478
|
});
|
|
470
|
-
const g =
|
|
479
|
+
const g = b, h = e, F = oe(null), {
|
|
471
480
|
ariaLabel: Q,
|
|
472
|
-
ariaAttrs:
|
|
473
|
-
currentOption:
|
|
474
|
-
display:
|
|
475
|
-
options:
|
|
481
|
+
ariaAttrs: fe,
|
|
482
|
+
currentOption: R,
|
|
483
|
+
display: B,
|
|
484
|
+
options: C,
|
|
476
485
|
theme: I,
|
|
477
486
|
lightTextColor: ae,
|
|
478
487
|
lightColor: le,
|
|
479
488
|
lightColorHover: X,
|
|
480
489
|
darkTextColor: _,
|
|
481
|
-
darkColor:
|
|
490
|
+
darkColor: w,
|
|
482
491
|
darkColorHover: H,
|
|
483
|
-
boxRadius:
|
|
492
|
+
boxRadius: se,
|
|
484
493
|
hoverEffect: q,
|
|
485
494
|
activeHoverEffect: Fe,
|
|
486
|
-
itemGap:
|
|
495
|
+
itemGap: he,
|
|
487
496
|
internalGap: ee,
|
|
488
|
-
scale:
|
|
489
|
-
type:
|
|
490
|
-
background:
|
|
491
|
-
disabled:
|
|
492
|
-
fontFamily:
|
|
497
|
+
scale: Te,
|
|
498
|
+
type: ve,
|
|
499
|
+
background: we,
|
|
500
|
+
disabled: ke,
|
|
501
|
+
fontFamily: Be,
|
|
493
502
|
fontSize: j,
|
|
494
503
|
fontWeight: Qe
|
|
495
504
|
} = Ea(h), v = a(() => {
|
|
496
|
-
const
|
|
505
|
+
const y = ke.value ? "component-disabled" : "", k = B.value !== "b" ? "inline-block" : "block", ce = Be.value ? Be.value : "'Lato', sans-serif", be = j.value ? j.value : "1.6em", ye = Qe.value !== 0 && !Qe.value || Qe.value < 0 ? 200 : Qe.value, _e = se.value !== 0 && !se.value || se.value < 0 ? 0 : se.value, We = [!1, !0].includes(q.value) ? q.value : !1, Ee = [!1, !0].includes(Fe.value) ? Fe.value : !1, He = he.value !== 0 && !he.value || he.value < 0 ? 15 : he.value, qe = ee.value !== 0 && !ee.value || ee.value < 0 ? 6 : ee.value, Ke = ["box", "circle"].includes(ve.value) ? ve.value : "box", at = Te.value !== 0 && !Te.value || Te.value < 0 ? 1 : Te.value, yt = [!1, !0].includes(we.value) ? we.value : !1;
|
|
497
506
|
return {
|
|
498
|
-
disabled:
|
|
499
|
-
display:
|
|
507
|
+
disabled: y,
|
|
508
|
+
display: k,
|
|
500
509
|
boxRadius: _e,
|
|
501
510
|
hoverEffect: We,
|
|
502
511
|
activeHoverEffect: Ee,
|
|
@@ -504,113 +513,114 @@ const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabin
|
|
|
504
513
|
internalGap: qe,
|
|
505
514
|
scale: at,
|
|
506
515
|
type: Ke,
|
|
507
|
-
font:
|
|
516
|
+
font: ce,
|
|
508
517
|
background: yt,
|
|
509
|
-
fontSize:
|
|
510
|
-
fontWeight:
|
|
518
|
+
fontSize: be,
|
|
519
|
+
fontWeight: ye
|
|
511
520
|
};
|
|
512
|
-
}),
|
|
521
|
+
}), de = a(() => v.value.disabled), Oe = a(() => ({
|
|
513
522
|
display: v.value.display
|
|
514
523
|
})), Xe = a(() => v.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), S = a(() => {
|
|
515
|
-
const
|
|
524
|
+
const y = v.value;
|
|
516
525
|
return {
|
|
517
|
-
fontSize:
|
|
518
|
-
fontWeight:
|
|
526
|
+
fontSize: y.fontSize,
|
|
527
|
+
fontWeight: y.fontWeight
|
|
519
528
|
};
|
|
520
|
-
}), Ue = a(() => Array.isArray(
|
|
521
|
-
const
|
|
522
|
-
return
|
|
523
|
-
}), pt = a(() => _.value), St = a(() =>
|
|
524
|
-
const
|
|
525
|
-
return
|
|
529
|
+
}), Ue = a(() => Array.isArray(C.value) && C.value.constructor === Array && C.value.length > 0), pe = a(() => I.value === "dark" ? "component__theme--dark" : "component__theme--light"), vt = a(() => v.value.font), ht = a(() => ae.value), ot = a(() => le.value), ze = a(() => v.value.hoverEffect ? X.value : le.value), Le = a(() => v.value.activeHoverEffect ? X.value : le.value), Lt = a(() => {
|
|
530
|
+
const y = v.value;
|
|
531
|
+
return y.activeHoverEffect && y.background ? `${X.value}80` : X.value;
|
|
532
|
+
}), pt = a(() => _.value), St = a(() => w.value), xt = a(() => v.value.hoverEffect ? H.value : w.value), Ct = a(() => v.value.activeHoverEffect ? H.value : w.value), Ae = a(() => {
|
|
533
|
+
const y = v.value;
|
|
534
|
+
return y.activeHoverEffect && y.background ? `${H.value}80` : H.value;
|
|
526
535
|
}), gt = a(() => v.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), et = a(() => {
|
|
527
|
-
const
|
|
528
|
-
return
|
|
536
|
+
const y = v.value, k = I.value === "dark" ? _.value : ae.value;
|
|
537
|
+
return y.background ? "#ffffff" : k;
|
|
529
538
|
});
|
|
530
539
|
a(() => v.value.background ? "19px" : "auto");
|
|
531
|
-
const
|
|
532
|
-
const
|
|
533
|
-
return !
|
|
534
|
-
}),
|
|
535
|
-
const
|
|
536
|
-
return `${
|
|
537
|
-
}),
|
|
538
|
-
const
|
|
539
|
-
return !
|
|
540
|
-
}), te = a(() => v.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""),
|
|
540
|
+
const V = a(() => {
|
|
541
|
+
const k = v.value.internalGap;
|
|
542
|
+
return !k || k < 0 ? 0 : `${k}px`;
|
|
543
|
+
}), D = a(() => {
|
|
544
|
+
const y = v.value;
|
|
545
|
+
return `${y.boxRadius > 7 ? 7 : y.boxRadius}px`;
|
|
546
|
+
}), Se = a(() => {
|
|
547
|
+
const k = v.value.itemGap;
|
|
548
|
+
return !k || k < 0 ? 0 : `${k}px`;
|
|
549
|
+
}), te = a(() => v.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), ge = a(() => ({
|
|
541
550
|
zoom: v.value.scale
|
|
542
551
|
})), tt = a(() => {
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
const
|
|
552
|
+
const y = {};
|
|
553
|
+
fe.value && Object.keys(fe.value).forEach((be) => y[`aria-${be}`] = fe.value[be]);
|
|
554
|
+
const k = {
|
|
546
555
|
"aria-label": Q.value,
|
|
547
|
-
"aria-disabled":
|
|
548
|
-
...
|
|
556
|
+
"aria-disabled": ke.value,
|
|
557
|
+
...y
|
|
549
558
|
};
|
|
550
559
|
return Object.fromEntries(
|
|
551
|
-
Object.entries(
|
|
560
|
+
Object.entries(k).filter(([ce, be]) => be != null)
|
|
552
561
|
);
|
|
553
562
|
}), Ge = () => {
|
|
554
|
-
F.value =
|
|
555
|
-
}, Ie = () => {
|
|
556
|
-
g("clicked");
|
|
563
|
+
F.value = R.value;
|
|
564
|
+
}, Ie = (y) => {
|
|
565
|
+
g("clicked", y);
|
|
557
566
|
};
|
|
558
|
-
return re(
|
|
559
|
-
|
|
560
|
-
}), re(F, (
|
|
561
|
-
|
|
562
|
-
}), (
|
|
567
|
+
return re(R, (y, k) => {
|
|
568
|
+
y !== k && Ge();
|
|
569
|
+
}), re(F, (y, k) => {
|
|
570
|
+
y !== k && (g("current-value", y), g("changed", y));
|
|
571
|
+
}), (y, k) => e.nbId && Ue.value ? (O(), K("div", {
|
|
563
572
|
key: 0,
|
|
564
|
-
class: Ye(["nb-wrapper",
|
|
565
|
-
style: Ne([Oe.value,
|
|
573
|
+
class: Ye(["nb-wrapper", de.value]),
|
|
574
|
+
style: Ne([Oe.value, ge.value]),
|
|
575
|
+
title: e.title
|
|
566
576
|
}, [
|
|
567
|
-
|
|
577
|
+
Ve("div", $a({
|
|
568
578
|
id: e.nbId,
|
|
569
579
|
role: "group"
|
|
570
580
|
}, tt.value, {
|
|
571
|
-
class: ["nb-reset", "component", Xe.value,
|
|
581
|
+
class: ["nb-reset", "component", Xe.value, pe.value]
|
|
572
582
|
}), [
|
|
573
|
-
(O(!0), K(gl, null, yl(u(
|
|
574
|
-
key:
|
|
583
|
+
(O(!0), K(gl, null, yl(u(C), (ce, be) => (O(), K("div", {
|
|
584
|
+
key: be,
|
|
575
585
|
class: "component-checkbox__item"
|
|
576
586
|
}, [
|
|
577
|
-
Pa(
|
|
578
|
-
id: `${e.nbId}-${
|
|
579
|
-
"onUpdate:modelValue":
|
|
587
|
+
Pa(Ve("input", {
|
|
588
|
+
id: `${e.nbId}-${ce.value}`,
|
|
589
|
+
"onUpdate:modelValue": k[0] || (k[0] = (ye) => F.value = ye),
|
|
580
590
|
type: "checkbox",
|
|
581
591
|
class: "component-checkbox__item--input",
|
|
582
|
-
disabled: u(
|
|
583
|
-
value:
|
|
592
|
+
disabled: u(ke),
|
|
593
|
+
value: ce.value,
|
|
584
594
|
name: e.groupName,
|
|
585
|
-
onClick: Ie
|
|
586
|
-
}, null, 8,
|
|
595
|
+
onClick: k[1] || (k[1] = (ye) => Ie(ye))
|
|
596
|
+
}, null, 8, Wl), [
|
|
587
597
|
[kl, F.value]
|
|
588
598
|
]),
|
|
589
|
-
|
|
590
|
-
for: `${e.nbId}-${
|
|
599
|
+
Ve("label", {
|
|
600
|
+
for: `${e.nbId}-${ce.value}`,
|
|
591
601
|
class: Ye([[te.value], "component-checkbox__item--label"]),
|
|
592
|
-
tabindex: u(
|
|
602
|
+
tabindex: u(ke) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[be] : e.tabIndex >= 0 ? e.tabIndex : be + 1,
|
|
593
603
|
onKeydown: [
|
|
594
|
-
|
|
595
|
-
|
|
604
|
+
k[2] || (k[2] = na(Ia((ye) => !u(ke) && e.hasTabIndexEnter && ye.target.click(), ["prevent"]), ["enter"])),
|
|
605
|
+
k[3] || (k[3] = na(Ia((ye) => !u(ke) && e.hasTabIndexSpace && ye.target.click(), ["prevent"]), ["space"]))
|
|
596
606
|
]
|
|
597
607
|
}, [
|
|
598
|
-
|
|
608
|
+
Ve("div", {
|
|
599
609
|
class: Ye([gt.value])
|
|
600
610
|
}, null, 2),
|
|
601
|
-
|
|
611
|
+
Ve("span", {
|
|
602
612
|
style: Ne([S.value])
|
|
603
|
-
}, Rt(
|
|
604
|
-
], 42,
|
|
613
|
+
}, Rt(ce.text), 5)
|
|
614
|
+
], 42, El)
|
|
605
615
|
]))), 128))
|
|
606
|
-
], 16,
|
|
607
|
-
],
|
|
616
|
+
], 16, Il)
|
|
617
|
+
], 14, zl)) : me("", !0);
|
|
608
618
|
}
|
|
609
|
-
}),
|
|
610
|
-
const
|
|
619
|
+
}), Ol = /* @__PURE__ */ Oa(Pl, [["__scopeId", "data-v-adc48894"]]);
|
|
620
|
+
const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
611
621
|
key: 0,
|
|
612
622
|
class: "component__label--required"
|
|
613
|
-
},
|
|
623
|
+
}, Yl = ["for"], Ul = { key: 0 }, Gl = { key: 1 }, Kl = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex", "min", "max", "step"], Zl = ["for"], Jl = /* @__PURE__ */ Object.assign({
|
|
614
624
|
name: "NbInput",
|
|
615
625
|
inheritAttrs: !1
|
|
616
626
|
}, {
|
|
@@ -624,8 +634,8 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
624
634
|
type: String,
|
|
625
635
|
default: "b",
|
|
626
636
|
validator: (e = "b") => {
|
|
627
|
-
const
|
|
628
|
-
return ["b", "ib"].includes(
|
|
637
|
+
const b = e.toLowerCase();
|
|
638
|
+
return ["b", "ib"].includes(b);
|
|
629
639
|
}
|
|
630
640
|
},
|
|
631
641
|
tabIndex: {
|
|
@@ -644,6 +654,10 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
644
654
|
type: Object,
|
|
645
655
|
default: () => ({})
|
|
646
656
|
},
|
|
657
|
+
title: {
|
|
658
|
+
type: String,
|
|
659
|
+
default: ""
|
|
660
|
+
},
|
|
647
661
|
textColor: {
|
|
648
662
|
// TESTAR AINDA
|
|
649
663
|
type: String,
|
|
@@ -1062,109 +1076,109 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1062
1076
|
"entered",
|
|
1063
1077
|
"paste"
|
|
1064
1078
|
],
|
|
1065
|
-
setup(e, { emit:
|
|
1079
|
+
setup(e, { emit: b }) {
|
|
1066
1080
|
Wa((o) => ({
|
|
1067
|
-
"
|
|
1068
|
-
"
|
|
1069
|
-
"
|
|
1070
|
-
|
|
1071
|
-
"
|
|
1072
|
-
"
|
|
1073
|
-
|
|
1074
|
-
"
|
|
1075
|
-
|
|
1076
|
-
"
|
|
1077
|
-
"
|
|
1078
|
-
"
|
|
1079
|
-
"
|
|
1080
|
-
"
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
"
|
|
1084
|
-
"
|
|
1085
|
-
"
|
|
1086
|
-
"
|
|
1087
|
-
|
|
1088
|
-
"
|
|
1089
|
-
"
|
|
1090
|
-
"
|
|
1091
|
-
"
|
|
1092
|
-
"
|
|
1093
|
-
|
|
1094
|
-
"
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
"
|
|
1098
|
-
"
|
|
1099
|
-
"
|
|
1100
|
-
|
|
1101
|
-
"
|
|
1102
|
-
|
|
1103
|
-
"
|
|
1081
|
+
"34fbb86a": Et.value,
|
|
1082
|
+
"8cfd3634": ra.value,
|
|
1083
|
+
"296e0fca": u(Ct),
|
|
1084
|
+
10702736: ca.value,
|
|
1085
|
+
"63eb97f0": fa.value,
|
|
1086
|
+
"0b4b79a0": va.value,
|
|
1087
|
+
"5d2bb4b6": u(Se),
|
|
1088
|
+
"3d293b2c": u(Ee),
|
|
1089
|
+
f44ec88c: u(te),
|
|
1090
|
+
"3f6aec78": u(Mt),
|
|
1091
|
+
"16a65831": u(D),
|
|
1092
|
+
"5d891dc4": u(et),
|
|
1093
|
+
"00b20dc4": u(V),
|
|
1094
|
+
"33ad448f": dt.value,
|
|
1095
|
+
bd03c566: u(Ae),
|
|
1096
|
+
bd80e0ea: u(gt),
|
|
1097
|
+
"1126d918": u(We),
|
|
1098
|
+
"7e602e04": u(ge),
|
|
1099
|
+
"008ceec0": u(yt),
|
|
1100
|
+
"10befa27": u(xt),
|
|
1101
|
+
19922530: u(pt),
|
|
1102
|
+
"49adaa8e": u(St),
|
|
1103
|
+
"16bb1543": u(Le),
|
|
1104
|
+
"324d2155": u(Lt),
|
|
1105
|
+
"5c677712": ha.value,
|
|
1106
|
+
"0fd36a82": xa.value,
|
|
1107
|
+
"5641451d": Ca.value,
|
|
1108
|
+
"73afa7e6": _t.value,
|
|
1109
|
+
fabca1a0: Dt.value,
|
|
1110
|
+
fb9f7ac6: u(tt),
|
|
1111
|
+
"3b5b33fc": ya.value,
|
|
1112
|
+
"7b751786": Pt.value,
|
|
1113
|
+
"076c4dfc": ia.value,
|
|
1114
|
+
46951225: Ut.value,
|
|
1115
|
+
"1461f67f": da.value,
|
|
1116
|
+
"08c4370a": Gt.value,
|
|
1117
|
+
"3484e440": sa.value
|
|
1104
1118
|
})), Aa(() => {
|
|
1105
|
-
|
|
1119
|
+
pe.value != null ? de.value === "number" && typeof pe.value == "number" ? z.value = pe.value : z.value = String(pe.value) : z.value = "";
|
|
1106
1120
|
}), Ya(() => {
|
|
1107
1121
|
Ht();
|
|
1108
1122
|
});
|
|
1109
|
-
const g =
|
|
1123
|
+
const g = b, h = e, {
|
|
1110
1124
|
nbId: F,
|
|
1111
1125
|
display: Q,
|
|
1112
|
-
hasTabIndexEnter:
|
|
1113
|
-
ariaLabel:
|
|
1114
|
-
ariaAttrs:
|
|
1115
|
-
textColor:
|
|
1126
|
+
hasTabIndexEnter: fe,
|
|
1127
|
+
ariaLabel: R,
|
|
1128
|
+
ariaAttrs: B,
|
|
1129
|
+
textColor: C,
|
|
1116
1130
|
caretColor: I,
|
|
1117
1131
|
selectionBgColor: ae,
|
|
1118
1132
|
selectionTextColor: le,
|
|
1119
1133
|
hasBorderRadius: X,
|
|
1120
1134
|
borderRadius: _,
|
|
1121
|
-
disabled:
|
|
1135
|
+
disabled: w,
|
|
1122
1136
|
fontFamily: H,
|
|
1123
|
-
fontSize:
|
|
1137
|
+
fontSize: se,
|
|
1124
1138
|
fontWeight: q,
|
|
1125
1139
|
fontFamilyMsg: Fe,
|
|
1126
|
-
fontSizeMsg:
|
|
1140
|
+
fontSizeMsg: he,
|
|
1127
1141
|
fontWeightMsg: ee,
|
|
1128
|
-
textMessageColor:
|
|
1129
|
-
inputWidth:
|
|
1130
|
-
inputStyle:
|
|
1131
|
-
activeTextStyle:
|
|
1132
|
-
sizeMediaQuery:
|
|
1142
|
+
textMessageColor: Te,
|
|
1143
|
+
inputWidth: ve,
|
|
1144
|
+
inputStyle: we,
|
|
1145
|
+
activeTextStyle: ke,
|
|
1146
|
+
sizeMediaQuery: Be,
|
|
1133
1147
|
inputReadonly: j,
|
|
1134
1148
|
blockPaste: Qe,
|
|
1135
1149
|
showInputEye: v,
|
|
1136
|
-
inputType:
|
|
1150
|
+
inputType: de,
|
|
1137
1151
|
hasTrim: Oe,
|
|
1138
1152
|
inputUppercase: Xe,
|
|
1139
1153
|
inputName: S,
|
|
1140
1154
|
inputPlaceholder: Ue,
|
|
1141
|
-
inputText:
|
|
1155
|
+
inputText: pe,
|
|
1142
1156
|
theme: vt,
|
|
1143
1157
|
inputEyeIcon: ht,
|
|
1144
1158
|
tabindex: ot,
|
|
1145
1159
|
inputEyeIconHidden: ze,
|
|
1146
|
-
lightBgColor:
|
|
1160
|
+
lightBgColor: Le,
|
|
1147
1161
|
lightBgColorFocus: Lt,
|
|
1148
1162
|
lightEyeBgColor: pt,
|
|
1149
1163
|
lightEyeBgColorActive: St,
|
|
1150
1164
|
lightDisabledBgColor: xt,
|
|
1151
1165
|
lightTextColor: Ct,
|
|
1152
|
-
darkBgColor:
|
|
1166
|
+
darkBgColor: Ae,
|
|
1153
1167
|
darkBgColorFocus: gt,
|
|
1154
1168
|
darkEyeBgColor: et,
|
|
1155
|
-
darkEyeBgColorActive:
|
|
1156
|
-
darkDisabledBgColor:
|
|
1157
|
-
darkTextColor:
|
|
1169
|
+
darkEyeBgColorActive: V,
|
|
1170
|
+
darkDisabledBgColor: D,
|
|
1171
|
+
darkTextColor: Se,
|
|
1158
1172
|
darkDisabledEyeBgColor: te,
|
|
1159
|
-
lightDisabledEyeBgColor:
|
|
1173
|
+
lightDisabledEyeBgColor: ge,
|
|
1160
1174
|
textAlign: tt,
|
|
1161
1175
|
showMsg: Ge,
|
|
1162
1176
|
hasMsg: Ie,
|
|
1163
|
-
hasIcon:
|
|
1164
|
-
iconDirection:
|
|
1165
|
-
iconPadding:
|
|
1166
|
-
iconPaddingInput:
|
|
1167
|
-
iconMargin:
|
|
1177
|
+
hasIcon: y,
|
|
1178
|
+
iconDirection: k,
|
|
1179
|
+
iconPadding: ce,
|
|
1180
|
+
iconPaddingInput: be,
|
|
1181
|
+
iconMargin: ye,
|
|
1168
1182
|
iconBorderRadius: _e,
|
|
1169
1183
|
iconLightTextColor: We,
|
|
1170
1184
|
iconDarkTextColor: Ee,
|
|
@@ -1180,14 +1194,14 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1180
1194
|
label: Nt,
|
|
1181
1195
|
labelBreakOnActive: rt,
|
|
1182
1196
|
labelBackground: Tt,
|
|
1183
|
-
labelPadding:
|
|
1197
|
+
labelPadding: L,
|
|
1184
1198
|
labelBorderRadius: E,
|
|
1185
1199
|
labelLeft: Z,
|
|
1186
1200
|
inputLabelMarginActive: Y,
|
|
1187
|
-
labelActiveTop:
|
|
1201
|
+
labelActiveTop: De,
|
|
1188
1202
|
labelActiveLeft: M,
|
|
1189
1203
|
labelRight: Wt,
|
|
1190
|
-
labelActiveRight:
|
|
1204
|
+
labelActiveRight: Re,
|
|
1191
1205
|
fontFamilyLabel: At,
|
|
1192
1206
|
fontSizeLabel: ue,
|
|
1193
1207
|
fontSizeLabelActive: ut,
|
|
@@ -1197,7 +1211,7 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1197
1211
|
darkTextColorLabel: U,
|
|
1198
1212
|
darkTextColorLabelActive: Yt
|
|
1199
1213
|
} = Ea(h), z = oe(""), G = oe(null), kt = oe(""), wt = oe(!1), it = oe(!1), N = a(() => {
|
|
1200
|
-
const o =
|
|
1214
|
+
const o = w.value ? "component-disabled" : "", m = Q.value !== "b" ? "inline-block" : "block", Ce = C ? C.value : "#ffffff", nt = I.value ? I.value : "", Ba = ae.value ? ae.value : "", ta = le.value ? le.value : "", wa = X.value ? X.value : !1, Da = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, It = H.value ? H.value : "'Lato', sans-serif", aa = se.value ? se.value : null, qt = q.value !== 0 && !q.value || q.value < 0 ? 100 : q.value, Ra = Fe.value ? Fe.value : "'Lato', sans-serif", _a = he.value ? he.value : "1em", Ma = ee.value !== 0 && !ee.value || ee.value < 0 ? 100 : ee.value, Ha = Te.value ? Te.value : "#f15574", $e = ve.value ? ve.value : 200, qa = ke.value ? ke.value : "normal", mt = Be.value ? Be.value : "xs", t = j.value ? j.value : !1, l = v.value ? v.value : !1, n = de.value ? de.value : "text", r = Xe.value ? Xe.value : !1, s = vt.value ? vt.value : "normal", d = tt.value ? tt.value : "left", f = we.value ? we.value : "background", p = ce.value ? ce.value : "5px 10px", T = ye.value ? ye.value : "0", $ = be.value ? be.value : 10, W = We.value ? We.value : "#000000", J = Ee.value ? Ee.value : "#000000", Me = He.value ? He.value : "transparent", ft = qe.value ? qe.value : "transparent", Pe = _e.value !== 0 && !_e.value || _e.value < 0 ? 0 : _e.value, Je = Ke.value ? Ke.value : "transparent", Ua = at.value ? at.value : "transparent", Ga = Vt.value ? Vt.value : 32, Ka = bt.value ? bt.value : 1, Za = lt.value ? lt.value : !1, Ja = Z.value !== 0 && !Z.value || Z.value < 0 ? 5 : Z.value, Qa = Tt.value ? Tt.value : "transparent", Xa = Y.value !== 0 && !Y.value || Y.value < 0 ? 15 : Y.value, el = L.value ? L.value : "1px 5px", tl = E.value !== 0 && !E.value || E.value < 0 ? 0 : E.value, al = De.value === null || De.value === void 0 ? -13 : De.value, ll = M.value === null || M.value === void 0 ? 5 : M.value, nl = Wt.value === null || Wt.value === void 0 ? 0 : Wt.value, ol = Re.value === null || Re.value === void 0 ? 0 : Re.value, rl = At.value ? At.value : "'Lato', sans-serif", ul = ue.value ? ue.value : "1em", il = ut.value ? ut.value : "0.8em", sl = ne.value ? ne.value : 400, dl = $t.value ? $t.value : "#ffffff", cl = U.value ? U.value : "#000000", fl = P.value ? P.value : "#ffffff", vl = Yt.value ? Yt.value : "#000000";
|
|
1201
1215
|
return {
|
|
1202
1216
|
disabled: o,
|
|
1203
1217
|
display: m,
|
|
@@ -1208,14 +1222,14 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1208
1222
|
fontSizeMsg: _a,
|
|
1209
1223
|
fontWeightMsg: Ma,
|
|
1210
1224
|
textMessageColor: Ha,
|
|
1211
|
-
textColor:
|
|
1225
|
+
textColor: Ce,
|
|
1212
1226
|
caretColor: nt,
|
|
1213
1227
|
selectionBgColor: Ba,
|
|
1214
1228
|
selectionTextColor: ta,
|
|
1215
1229
|
hasBorderRadius: wa,
|
|
1216
1230
|
borderRadius: Da,
|
|
1217
1231
|
textAlign: d,
|
|
1218
|
-
inputWidth:
|
|
1232
|
+
inputWidth: $e,
|
|
1219
1233
|
activeTextStyle: qa,
|
|
1220
1234
|
sizeMediaQuery: mt,
|
|
1221
1235
|
inputReadonly: t,
|
|
@@ -1225,8 +1239,8 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1225
1239
|
theme: s,
|
|
1226
1240
|
inputStyle: f,
|
|
1227
1241
|
iconPadding: p,
|
|
1228
|
-
iconMargin:
|
|
1229
|
-
iconPaddingInput:
|
|
1242
|
+
iconMargin: T,
|
|
1243
|
+
iconPaddingInput: $,
|
|
1230
1244
|
iconLightTextColor: W,
|
|
1231
1245
|
iconDarkTextColor: J,
|
|
1232
1246
|
iconLightBgColor: Me,
|
|
@@ -1290,7 +1304,7 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1290
1304
|
}), st = a(() => {
|
|
1291
1305
|
const o = N.value;
|
|
1292
1306
|
return o.inputStyle !== "line" && o.hasBorderRadius ? { borderRadius: `${o.borderRadius}rem` } : {};
|
|
1293
|
-
}), Et = a(() => N.value.font), Pt = a(() => N.value.fontFamilyMsg), ia = a(() => N.value.fontSizeMsg), Ut = a(() => N.value.fontWeightMsg), sa = a(() => N.value.textColor), Gt = a(() => N.value.theme === "dark" ?
|
|
1307
|
+
}), Et = a(() => N.value.font), Pt = a(() => N.value.fontFamilyMsg), ia = a(() => N.value.fontSizeMsg), Ut = a(() => N.value.fontWeightMsg), sa = a(() => N.value.textColor), Gt = a(() => N.value.theme === "dark" ? D.value : xt.value), da = a(() => N.value.textMessageColor), ca = a(() => {
|
|
1294
1308
|
const o = N.value;
|
|
1295
1309
|
return o.caretColor || (o.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1296
1310
|
}), fa = a(() => {
|
|
@@ -1305,7 +1319,7 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1305
1319
|
width: `${o.inputWidth}px`
|
|
1306
1320
|
};
|
|
1307
1321
|
}), pa = a(() => {
|
|
1308
|
-
switch (
|
|
1322
|
+
switch (we.value) {
|
|
1309
1323
|
case "line":
|
|
1310
1324
|
return "component__input--line";
|
|
1311
1325
|
case "border":
|
|
@@ -1333,52 +1347,52 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1333
1347
|
default:
|
|
1334
1348
|
return "";
|
|
1335
1349
|
}
|
|
1336
|
-
}),
|
|
1350
|
+
}), A = a(() => {
|
|
1337
1351
|
switch (N.value.theme) {
|
|
1338
1352
|
case "dark":
|
|
1339
1353
|
return "component__theme--dark";
|
|
1340
1354
|
default:
|
|
1341
1355
|
return "component__theme--light";
|
|
1342
1356
|
}
|
|
1343
|
-
}),
|
|
1357
|
+
}), ie = a(() => N.value.inputReadonly ? "component__input--read-only" : ""), Ze = a(() => N.value.inputUppercase ? "component__input--uppercase" : ""), Ot = a(() => {
|
|
1344
1358
|
const o = N.value;
|
|
1345
1359
|
return !!(o.showInputEye && o.inputType === "password");
|
|
1346
|
-
}), i = a(() => wt.value ? ht.value : ze.value),
|
|
1360
|
+
}), i = a(() => wt.value ? ht.value : ze.value), x = a(() => S.value ? S.value : `${F.value}-name-label`), xe = a(() => lt.value ? it.value ? Ue.value : "" : Ue.value), je = a(() => {
|
|
1347
1361
|
const o = z.value;
|
|
1348
1362
|
return it.value || o != null && String(o).trim().length > 0;
|
|
1349
1363
|
}), Zt = a(() => N.value.inputType === "password" ? "component__input__eye-default--hidden" : ""), ga = a(() => it.value ? "component__input--active" : "component__input--no-active"), ya = a(() => Ot.value ? "6px 50px 6px 10px" : "6px 10px"), ba = a(() => !!(Ge.value && Ie.value)), ma = a(() => {
|
|
1350
1364
|
const o = {};
|
|
1351
|
-
|
|
1365
|
+
B.value && Object.keys(B.value).forEach((nt) => o[`aria-${nt}`] = B.value[nt]);
|
|
1352
1366
|
const m = {
|
|
1353
|
-
"aria-label":
|
|
1354
|
-
"aria-disabled":
|
|
1367
|
+
"aria-label": R.value,
|
|
1368
|
+
"aria-disabled": w.value,
|
|
1355
1369
|
...o
|
|
1356
1370
|
};
|
|
1357
1371
|
return Object.fromEntries(
|
|
1358
|
-
Object.entries(m).filter(([
|
|
1372
|
+
Object.entries(m).filter(([Ce, nt]) => nt != null)
|
|
1359
1373
|
);
|
|
1360
|
-
}), Dt = a(() =>
|
|
1374
|
+
}), Dt = a(() => y.value ? `${bt.value}rem` : "0"), ha = a(() => y.value ? `${Vt.value}px` : "0"), Sa = a(() => y.value ? `component__icon--${k.value}` : ""), xa = a(() => {
|
|
1361
1375
|
const o = N.value;
|
|
1362
|
-
return
|
|
1376
|
+
return y.value ? o.iconPadding : "0";
|
|
1363
1377
|
}), Ca = a(() => {
|
|
1364
1378
|
const o = N.value;
|
|
1365
|
-
return
|
|
1379
|
+
return y.value ? o.iconMargin : "0";
|
|
1366
1380
|
}), dt = a(() => {
|
|
1367
1381
|
const o = N.value;
|
|
1368
|
-
return
|
|
1382
|
+
return y.value ? o.theme === "dark" ? o.iconDarkBgColor : o.iconLightBgColor : "transparent";
|
|
1369
1383
|
}), _t = a(() => {
|
|
1370
1384
|
const o = N.value;
|
|
1371
|
-
return
|
|
1385
|
+
return y.value ? `${o.iconBorderRadius}rem` : "0";
|
|
1372
1386
|
}), Jt = a(() => {
|
|
1373
1387
|
const o = N.value;
|
|
1374
|
-
return
|
|
1388
|
+
return y.value ? k.value === "left" ? { paddingLeft: `${o.iconPaddingInput}px` } : { paddingRight: `${o.iconPaddingInput}px` } : {};
|
|
1375
1389
|
}), Qt = a(() => {
|
|
1376
|
-
const o = N.value, m = je.value,
|
|
1390
|
+
const o = N.value, m = je.value, Ce = m ? o.lightTextColorLabelActive : o.lightTextColorLabel, nt = m ? o.darkTextColorLabelActive : o.darkTextColorLabel;
|
|
1377
1391
|
return {
|
|
1378
1392
|
fontFamily: o.fontFamilyLabel,
|
|
1379
1393
|
fontSize: m ? o.fontSizeLabelActive : o.fontSizeLabel,
|
|
1380
1394
|
fontWeight: o.fontWeightLabel,
|
|
1381
|
-
color: o.theme === "dark" ? nt :
|
|
1395
|
+
color: o.theme === "dark" ? nt : Ce,
|
|
1382
1396
|
top: m ? `${o.labelActiveTop}px` : "50%",
|
|
1383
1397
|
left: m ? `${o.labelActiveLeft}px` : `${o.labelLeft}px`,
|
|
1384
1398
|
right: m ? `${o.labelActiveRight}px` : `${o.labelRight}px`,
|
|
@@ -1403,15 +1417,15 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1403
1417
|
return o.theme === "dark" ? o.darkTextColorLabelActive : o.lightTextColorLabelActive;
|
|
1404
1418
|
});
|
|
1405
1419
|
const Ht = () => {
|
|
1406
|
-
|
|
1420
|
+
pe.value != null ? de.value === "number" && typeof pe.value == "number" ? z.value = pe.value : z.value = String(pe.value) : z.value = "", kt.value = de.value;
|
|
1407
1421
|
}, Xt = () => {
|
|
1408
1422
|
const o = N.value;
|
|
1409
1423
|
if (o.inputReadonly || o.disabled)
|
|
1410
1424
|
return;
|
|
1411
1425
|
const m = !wt.value;
|
|
1412
|
-
m ? kt.value = "text" : kt.value =
|
|
1426
|
+
m ? kt.value = "text" : kt.value = de.value, wt.value = m;
|
|
1413
1427
|
}, ct = a(() => kt.value === "number"), Bt = (o) => {
|
|
1414
|
-
if (
|
|
1428
|
+
if (de.value === "number") {
|
|
1415
1429
|
if (o === "" || o === null || o === void 0)
|
|
1416
1430
|
return "";
|
|
1417
1431
|
{
|
|
@@ -1420,22 +1434,22 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1420
1434
|
}
|
|
1421
1435
|
}
|
|
1422
1436
|
return o;
|
|
1423
|
-
}, Va = () => {
|
|
1424
|
-
g("clicked");
|
|
1437
|
+
}, Va = (o) => {
|
|
1438
|
+
g("clicked", o);
|
|
1425
1439
|
}, Ta = (o) => {
|
|
1426
|
-
o.stopPropagation(), !(
|
|
1440
|
+
o.stopPropagation(), !(w.value || N.value.inputReadonly) && G.value && G.value.focus();
|
|
1427
1441
|
}, ea = () => {
|
|
1428
|
-
|
|
1442
|
+
w.value || N.value.inputReadonly || !fe.value || g("entered", Bt(z.value));
|
|
1429
1443
|
}, ka = async (o) => {
|
|
1430
|
-
var
|
|
1431
|
-
const m = ((
|
|
1444
|
+
var Ce;
|
|
1445
|
+
const m = ((Ce = o.clipboardData) == null ? void 0 : Ce.getData("text")) || "";
|
|
1432
1446
|
g("paste", m), Qe.value && o.preventDefault();
|
|
1433
1447
|
};
|
|
1434
|
-
return re(
|
|
1448
|
+
return re(de, (o) => {
|
|
1435
1449
|
kt.value = o;
|
|
1436
|
-
}, { immediate: !0 }), re(
|
|
1450
|
+
}, { immediate: !0 }), re(pe, (o) => {
|
|
1437
1451
|
if (o != null)
|
|
1438
|
-
if (
|
|
1452
|
+
if (de.value === "number" && typeof o == "number")
|
|
1439
1453
|
o !== z.value && (z.value = o);
|
|
1440
1454
|
else {
|
|
1441
1455
|
const m = String(o);
|
|
@@ -1451,7 +1465,7 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1451
1465
|
g("show-input-eye", o);
|
|
1452
1466
|
}, { immediate: !0 }), re(z, (o) => {
|
|
1453
1467
|
Oe.value && typeof o == "string" && (o = o.trim()), g("current-value", Bt(o));
|
|
1454
|
-
}), re(
|
|
1468
|
+
}), re(de, (o) => {
|
|
1455
1469
|
o === "password" && nextTick(() => {
|
|
1456
1470
|
const m = document.getElementById(S.value);
|
|
1457
1471
|
m && (m.type = "password", m.removeAttribute("autocomplete"));
|
|
@@ -1460,83 +1474,84 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1460
1474
|
key: 0,
|
|
1461
1475
|
class: ["nb-wrapper", Ft.value],
|
|
1462
1476
|
style: [oa.value, Kt.value, st.value],
|
|
1463
|
-
role: "input"
|
|
1477
|
+
role: "input",
|
|
1478
|
+
title: e.title
|
|
1464
1479
|
}, ma.value), [
|
|
1465
|
-
|
|
1480
|
+
Ve("div", {
|
|
1466
1481
|
id: u(F),
|
|
1467
|
-
class: Ye(["nb-reset", "component", c.value,
|
|
1482
|
+
class: Ye(["nb-reset", "component", c.value, A.value, ie.value, pa.value]),
|
|
1468
1483
|
style: Ne([ua.value, Kt.value, st.value]),
|
|
1469
|
-
onClick: Va
|
|
1484
|
+
onClick: m[4] || (m[4] = (Ce) => Va(Ce))
|
|
1470
1485
|
}, [
|
|
1471
1486
|
u(lt) ? (O(), K("label", {
|
|
1472
1487
|
key: 0,
|
|
1473
|
-
for:
|
|
1488
|
+
for: x.value,
|
|
1474
1489
|
class: "component__label",
|
|
1475
1490
|
style: Ne([Qt.value]),
|
|
1476
1491
|
onClick: Ta
|
|
1477
1492
|
}, [
|
|
1478
1493
|
jt(Rt(u(Nt)), 1),
|
|
1479
|
-
e.required ? (O(), K("span",
|
|
1480
|
-
], 12,
|
|
1494
|
+
e.required ? (O(), K("span", jl, "*")) : me("", !0)
|
|
1495
|
+
], 12, ql)) : me("", !0),
|
|
1481
1496
|
Ot.value ? (O(), K("div", {
|
|
1482
1497
|
key: 1,
|
|
1483
1498
|
class: Ye(["component__eye", ga.value]),
|
|
1484
1499
|
style: Ne([st.value]),
|
|
1485
1500
|
onClick: Xt
|
|
1486
1501
|
}, [
|
|
1487
|
-
|
|
1488
|
-
for:
|
|
1502
|
+
Ve("label", {
|
|
1503
|
+
for: x.value,
|
|
1489
1504
|
class: Ye(["component__eye-icon", "fas"])
|
|
1490
1505
|
}, [
|
|
1491
|
-
e.inputEyeCustomIcon ? (O(), K("span",
|
|
1506
|
+
e.inputEyeCustomIcon ? (O(), K("span", Gl, [
|
|
1492
1507
|
wt.value ? La(o.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
1493
|
-
m[
|
|
1508
|
+
m[5] || (m[5] = jt("show"))
|
|
1494
1509
|
], !0) : La(o.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1495
|
-
m[
|
|
1510
|
+
m[6] || (m[6] = jt("hidden"))
|
|
1496
1511
|
], !0)
|
|
1497
|
-
])) : (O(), K("span",
|
|
1498
|
-
], 8,
|
|
1499
|
-
], 6)) :
|
|
1500
|
-
Pa(
|
|
1512
|
+
])) : (O(), K("span", Ul, Rt(i.value), 1))
|
|
1513
|
+
], 8, Yl)
|
|
1514
|
+
], 6)) : me("", !0),
|
|
1515
|
+
Pa(Ve("input", {
|
|
1501
1516
|
ref_key: "inputRef",
|
|
1502
1517
|
ref: G,
|
|
1503
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
1504
|
-
id:
|
|
1505
|
-
name:
|
|
1518
|
+
"onUpdate:modelValue": m[0] || (m[0] = (Ce) => z.value = Ce),
|
|
1519
|
+
id: x.value,
|
|
1520
|
+
name: x.value,
|
|
1506
1521
|
type: kt.value,
|
|
1507
1522
|
class: Ye(["component__input", [
|
|
1508
1523
|
Ze.value,
|
|
1509
1524
|
Zt.value,
|
|
1510
1525
|
zt.value
|
|
1511
1526
|
]]),
|
|
1512
|
-
placeholder:
|
|
1513
|
-
disabled: u(
|
|
1527
|
+
placeholder: xe.value,
|
|
1528
|
+
disabled: u(w) || u(j),
|
|
1514
1529
|
required: e.required,
|
|
1515
1530
|
readonly: u(j),
|
|
1516
1531
|
autocomplete: e.inputAutocomplete,
|
|
1517
|
-
tabindex: u(
|
|
1532
|
+
tabindex: u(w) || u(j) ? -1 : u(ot),
|
|
1518
1533
|
min: ct.value ? e.min : void 0,
|
|
1519
1534
|
max: ct.value ? e.max : void 0,
|
|
1520
1535
|
step: ct.value ? e.step : void 0,
|
|
1521
1536
|
role: "input",
|
|
1522
1537
|
style: Ne([st.value, Jt.value]),
|
|
1523
|
-
onFocus: m[1] || (m[1] = (
|
|
1524
|
-
onBlur: m[2] || (m[2] = (
|
|
1525
|
-
onKeydown: m[3] || (m[3] = na((
|
|
1538
|
+
onFocus: m[1] || (m[1] = (Ce) => it.value = !0),
|
|
1539
|
+
onBlur: m[2] || (m[2] = (Ce) => it.value = !1),
|
|
1540
|
+
onKeydown: m[3] || (m[3] = na((Ce) => !u(w) && u(fe) && ea(), ["enter"])),
|
|
1526
1541
|
onPaste: ka
|
|
1527
|
-
}, null, 46,
|
|
1542
|
+
}, null, 46, Kl), [
|
|
1528
1543
|
[ml, z.value]
|
|
1529
1544
|
]),
|
|
1530
|
-
u(
|
|
1545
|
+
u(y) ? (O(), K("label", {
|
|
1531
1546
|
key: 2,
|
|
1532
|
-
for:
|
|
1547
|
+
for: x.value,
|
|
1533
1548
|
class: Ye(["component__icon", Sa.value])
|
|
1534
1549
|
}, [
|
|
1535
1550
|
La(o.$slots, "icon", {}, () => [
|
|
1536
|
-
m[
|
|
1551
|
+
m[7] || (m[7] = Ve("span", null, "♥", -1))
|
|
1537
1552
|
], !0)
|
|
1538
|
-
], 10,
|
|
1539
|
-
], 14,
|
|
1553
|
+
], 10, Zl)) : me("", !0)
|
|
1554
|
+
], 14, Hl),
|
|
1540
1555
|
ba.value ? (O(), K("div", {
|
|
1541
1556
|
key: 0,
|
|
1542
1557
|
class: Ye(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
@@ -1544,14 +1559,14 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1544
1559
|
La(o.$slots, "message", {}, () => [
|
|
1545
1560
|
jt(Rt(e.message), 1)
|
|
1546
1561
|
], !0)
|
|
1547
|
-
], 2)) :
|
|
1548
|
-
], 16)) :
|
|
1562
|
+
], 2)) : me("", !0)
|
|
1563
|
+
], 16, _l)) : me("", !0);
|
|
1549
1564
|
}
|
|
1550
|
-
}),
|
|
1551
|
-
const
|
|
1565
|
+
}), Ql = /* @__PURE__ */ Oa(Jl, [["__scopeId", "data-v-cbd5f858"]]);
|
|
1566
|
+
const Xl = ["title"], en = ["for"], tn = {
|
|
1552
1567
|
key: 0,
|
|
1553
1568
|
class: "component__label--required"
|
|
1554
|
-
},
|
|
1569
|
+
}, an = ["id"], ln = ["onClick"], nn = ["id", "name", "placeholder", "readonly", "autocomplete", "required", "tabindex"], on = /* @__PURE__ */ Object.assign({
|
|
1555
1570
|
name: "NbInputChip",
|
|
1556
1571
|
inheritAttrs: !1
|
|
1557
1572
|
}, {
|
|
@@ -1565,8 +1580,8 @@ const Zl = ["for"], Jl = {
|
|
|
1565
1580
|
type: String,
|
|
1566
1581
|
default: "b",
|
|
1567
1582
|
validator: (e = "b") => {
|
|
1568
|
-
const
|
|
1569
|
-
return ["b", "ib"].includes(
|
|
1583
|
+
const b = e.toLowerCase();
|
|
1584
|
+
return ["b", "ib"].includes(b);
|
|
1570
1585
|
}
|
|
1571
1586
|
},
|
|
1572
1587
|
tabIndex: {
|
|
@@ -1585,6 +1600,10 @@ const Zl = ["for"], Jl = {
|
|
|
1585
1600
|
type: Object,
|
|
1586
1601
|
default: () => ({})
|
|
1587
1602
|
},
|
|
1603
|
+
title: {
|
|
1604
|
+
type: String,
|
|
1605
|
+
default: ""
|
|
1606
|
+
},
|
|
1588
1607
|
caretColor: {
|
|
1589
1608
|
type: String,
|
|
1590
1609
|
default: "",
|
|
@@ -1897,96 +1916,96 @@ const Zl = ["for"], Jl = {
|
|
|
1897
1916
|
}
|
|
1898
1917
|
},
|
|
1899
1918
|
emits: ["clicked", "changed", "removed", "added", "input-changed", "focused", "blurred", "paste"],
|
|
1900
|
-
setup(e, { emit:
|
|
1919
|
+
setup(e, { emit: b }) {
|
|
1901
1920
|
Wa((c) => ({
|
|
1902
|
-
|
|
1903
|
-
"
|
|
1904
|
-
|
|
1905
|
-
"
|
|
1906
|
-
"
|
|
1907
|
-
|
|
1908
|
-
"
|
|
1909
|
-
|
|
1910
|
-
"
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
"
|
|
1914
|
-
"
|
|
1915
|
-
"
|
|
1916
|
-
|
|
1917
|
-
"
|
|
1918
|
-
"
|
|
1919
|
-
"
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
"
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1921
|
+
86796416: z.value,
|
|
1922
|
+
"9c4e27f0": kt.value,
|
|
1923
|
+
caf14834: u(ht),
|
|
1924
|
+
"3d45efce": u(Xe),
|
|
1925
|
+
"3aad0847": u(Ue),
|
|
1926
|
+
"7b766de2": u(ot),
|
|
1927
|
+
"0e90a4fa": u(ze),
|
|
1928
|
+
d93261fa: u(Le),
|
|
1929
|
+
"7c3a9c7a": u(gt),
|
|
1930
|
+
db8f753c: u(pt),
|
|
1931
|
+
"7c9273db": u(xt),
|
|
1932
|
+
"85484d14": u(et),
|
|
1933
|
+
"6cc97b8e": u(V),
|
|
1934
|
+
"46c45097": u(D),
|
|
1935
|
+
e5231e5e: u(pe),
|
|
1936
|
+
"45c121bd": u(Ct),
|
|
1937
|
+
"6451dbbb": $t.value,
|
|
1938
|
+
"48fe3ccb": it.value,
|
|
1939
|
+
de15f446: N.value,
|
|
1940
|
+
"826dab96": Ft.value,
|
|
1941
|
+
"565afcf4": c.styleButtonColor,
|
|
1942
|
+
d6081caa: G.value,
|
|
1943
|
+
"560fcc9c": u(vt),
|
|
1944
|
+
"10a0bfaa": u(Lt),
|
|
1945
|
+
ef54c974: u(Ae),
|
|
1946
|
+
"52eb9082": u(Se)
|
|
1928
1947
|
})), Aa(() => {
|
|
1929
|
-
_.value.length > 0 && (
|
|
1948
|
+
_.value.length > 0 && (Re.value = _.value);
|
|
1930
1949
|
});
|
|
1931
|
-
const g =
|
|
1950
|
+
const g = b, h = e, {
|
|
1932
1951
|
nbId: F,
|
|
1933
1952
|
display: Q,
|
|
1934
|
-
textColor:
|
|
1935
|
-
paddingX:
|
|
1936
|
-
paddingY:
|
|
1937
|
-
borderRadius:
|
|
1953
|
+
textColor: fe,
|
|
1954
|
+
paddingX: R,
|
|
1955
|
+
paddingY: B,
|
|
1956
|
+
borderRadius: C,
|
|
1938
1957
|
disabled: I,
|
|
1939
1958
|
fontFamily: ae,
|
|
1940
1959
|
fontSize: le,
|
|
1941
1960
|
fontWeight: X,
|
|
1942
1961
|
currentList: _,
|
|
1943
|
-
allowDuplicates:
|
|
1962
|
+
allowDuplicates: w,
|
|
1944
1963
|
minChips: H,
|
|
1945
|
-
maxChips:
|
|
1964
|
+
maxChips: se,
|
|
1946
1965
|
inputPosition: q,
|
|
1947
1966
|
width: Fe,
|
|
1948
|
-
inputName:
|
|
1967
|
+
inputName: he,
|
|
1949
1968
|
inputPlaceholder: ee,
|
|
1950
|
-
inputUppercase:
|
|
1951
|
-
inputReadonly:
|
|
1952
|
-
blockPaste:
|
|
1953
|
-
inputAutocomplete:
|
|
1954
|
-
required:
|
|
1969
|
+
inputUppercase: Te,
|
|
1970
|
+
inputReadonly: ve,
|
|
1971
|
+
blockPaste: we,
|
|
1972
|
+
inputAutocomplete: ke,
|
|
1973
|
+
required: Be,
|
|
1955
1974
|
textAlign: j,
|
|
1956
1975
|
hasBorderRadius: Qe,
|
|
1957
1976
|
activeTextStyle: v,
|
|
1958
|
-
theme:
|
|
1977
|
+
theme: de,
|
|
1959
1978
|
inputStyle: Oe,
|
|
1960
1979
|
lightBgColor: Xe,
|
|
1961
1980
|
lightBgColorFocus: S,
|
|
1962
1981
|
lightBorderColor: Ue,
|
|
1963
|
-
lightBorderColorFocus:
|
|
1982
|
+
lightBorderColorFocus: pe,
|
|
1964
1983
|
lightDisabledBgColor: vt,
|
|
1965
1984
|
lightTextColor: ht,
|
|
1966
1985
|
lightChipBgColor: ot,
|
|
1967
1986
|
lightChipTextColor: ze,
|
|
1968
|
-
lightChipRemoveColor:
|
|
1987
|
+
lightChipRemoveColor: Le,
|
|
1969
1988
|
lightDisabledBorderColor: Lt,
|
|
1970
1989
|
darkBgColor: pt,
|
|
1971
1990
|
darkBgColorFocus: St,
|
|
1972
1991
|
darkBorderColor: xt,
|
|
1973
1992
|
darkBorderColorFocus: Ct,
|
|
1974
|
-
darkDisabledBgColor:
|
|
1993
|
+
darkDisabledBgColor: Ae,
|
|
1975
1994
|
darkTextColor: gt,
|
|
1976
1995
|
darkChipBgColor: et,
|
|
1977
|
-
darkChipTextColor:
|
|
1978
|
-
darkChipRemoveColor:
|
|
1979
|
-
darkDisabledBorderColor:
|
|
1996
|
+
darkChipTextColor: V,
|
|
1997
|
+
darkChipRemoveColor: D,
|
|
1998
|
+
darkDisabledBorderColor: Se,
|
|
1980
1999
|
tabIndex: te,
|
|
1981
|
-
hasTabIndexEnter:
|
|
2000
|
+
hasTabIndexEnter: ge,
|
|
1982
2001
|
ariaLabel: tt,
|
|
1983
2002
|
ariaAttrs: Ge,
|
|
1984
2003
|
caretColor: Ie,
|
|
1985
|
-
selectionBgColor:
|
|
1986
|
-
selectionTextColor:
|
|
1987
|
-
showLabel:
|
|
1988
|
-
label:
|
|
1989
|
-
labelBackground:
|
|
2004
|
+
selectionBgColor: y,
|
|
2005
|
+
selectionTextColor: k,
|
|
2006
|
+
showLabel: ce,
|
|
2007
|
+
label: be,
|
|
2008
|
+
labelBackground: ye,
|
|
1990
2009
|
labelPadding: _e,
|
|
1991
2010
|
labelBorderRadius: We,
|
|
1992
2011
|
labelBreakOnActive: Ee,
|
|
@@ -2002,23 +2021,23 @@ const Zl = ["for"], Jl = {
|
|
|
2002
2021
|
lightTextColorLabelActive: Nt,
|
|
2003
2022
|
darkTextColorLabel: rt,
|
|
2004
2023
|
darkTextColorLabelActive: Tt,
|
|
2005
|
-
fontFamilyChip:
|
|
2024
|
+
fontFamilyChip: L,
|
|
2006
2025
|
fontSizeChip: E,
|
|
2007
2026
|
fontWeightChip: Z
|
|
2008
|
-
} = Ea(h), Y = oe(""),
|
|
2009
|
-
const c = I.value ? "component-disabled" : "",
|
|
2027
|
+
} = Ea(h), Y = oe(""), De = oe(null), M = oe(null), Wt = oe(null), Re = oe([]), At = oe(!1), ue = a(() => {
|
|
2028
|
+
const c = I.value ? "component-disabled" : "", A = Q.value !== "b" ? "inline-block" : "block", ie = !Fe.value || Fe.value < 185 ? 185 : Fe.value, Ze = fe ? fe.value : "ffffff", Ot = Ie.value ? Ie.value : "", i = y.value ? y.value : "", x = k.value ? k.value : "", xe = R.value !== 0 && !R.value || R.value < 0 ? 1 : R.value, je = B.value !== 0 && !B.value || B.value < 0 ? 0.2 : B.value, Zt = C.value !== 0 && !C.value || C.value < 0 ? 0 : C.value, ga = ae.value ? ae.value : "'Lato', sans-serif", ya = le.value ? le.value : "1.2em", ba = X.value !== 0 && !X.value || X.value < 0 ? 100 : X.value, ma = H.value !== 0 && !H.value || H.value < 0 ? 0 : H.value, Dt = se.value !== 0 && !se.value || se.value < 0 ? 10 : se.value, ha = !q.value || !["top", "bottom"].includes(q.value) ? "bottom" : q.value, Sa = !Oe.value || !["background", "line", "border"].includes(Oe.value) ? "background" : Oe.value, xa = de.value ? de.value : "light", Ca = ce.value ? ce.value : !1, dt = He.value !== 0 && !He.value || He.value < 0 ? 5 : He.value, _t = ye.value ? ye.value : "transparent", Jt = qe.value !== 0 && !qe.value || qe.value < 0 ? 15 : qe.value, Qt = _e.value ? _e.value : "1px 5px", Ht = We.value !== 0 && !We.value || We.value < 0 ? 0 : We.value, Xt = Ke.value === null || Ke.value === void 0 ? -13 : Ke.value, ct = at.value === null || at.value === void 0 ? 5 : at.value, Bt = yt.value ? yt.value : "'Lato', sans-serif", Va = Mt.value ? Mt.value : "1em", Ta = Vt.value ? Vt.value : "0.8em", ea = bt.value ? bt.value : 400, ka = lt.value ? lt.value : "#333333", o = rt.value ? rt.value : "#ffffff", m = Nt.value ? Nt.value : "#333333", Ce = Tt.value ? Tt.value : "#ffffff", nt = L.value ? L.value : "'Lato', sans-serif", Ba = E.value ? E.value : "1.2em", ta = Z.value ? Z.value : 400;
|
|
2010
2029
|
return {
|
|
2011
2030
|
disabled: c,
|
|
2012
|
-
display:
|
|
2013
|
-
width:
|
|
2031
|
+
display: A,
|
|
2032
|
+
width: ie,
|
|
2014
2033
|
font: ga,
|
|
2015
2034
|
fontSize: ya,
|
|
2016
2035
|
fontWeight: ba,
|
|
2017
2036
|
textColor: Ze,
|
|
2018
2037
|
caretColor: Ot,
|
|
2019
2038
|
selectionBgColor: i,
|
|
2020
|
-
selectionTextColor:
|
|
2021
|
-
paddingX:
|
|
2039
|
+
selectionTextColor: x,
|
|
2040
|
+
paddingX: xe,
|
|
2022
2041
|
paddingY: je,
|
|
2023
2042
|
borderRadius: Zt,
|
|
2024
2043
|
minChips: ma,
|
|
@@ -2041,32 +2060,32 @@ const Zl = ["for"], Jl = {
|
|
|
2041
2060
|
lightTextColorLabel: ka,
|
|
2042
2061
|
darkTextColorLabel: o,
|
|
2043
2062
|
lightTextColorLabelActive: m,
|
|
2044
|
-
darkTextColorLabelActive:
|
|
2063
|
+
darkTextColorLabelActive: Ce,
|
|
2045
2064
|
fontFamilyChip: nt,
|
|
2046
2065
|
fontSizeChip: Ba,
|
|
2047
2066
|
fontWeightChip: ta
|
|
2048
2067
|
};
|
|
2049
2068
|
}), ut = a(() => ue.value.disabled), ne = a(() => {
|
|
2050
|
-
const c = ue.value,
|
|
2069
|
+
const c = ue.value, A = Et.value;
|
|
2051
2070
|
return {
|
|
2052
2071
|
display: c.display,
|
|
2053
2072
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
2054
2073
|
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
2055
2074
|
paddingTop: "0px",
|
|
2056
2075
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
2057
|
-
overflow:
|
|
2076
|
+
overflow: A && ce.value ? "visible" : "hidden"
|
|
2058
2077
|
};
|
|
2059
2078
|
}), $t = a(() => {
|
|
2060
2079
|
const c = ue.value;
|
|
2061
2080
|
return c.fontSize ? c.fontSize : "1.2em";
|
|
2062
2081
|
}), P = a(() => {
|
|
2063
|
-
const c = ue.value,
|
|
2082
|
+
const c = ue.value, A = Et.value;
|
|
2064
2083
|
return {
|
|
2065
2084
|
color: c.textColor,
|
|
2066
2085
|
padding: `${c.paddingY}rem ${c.paddingX}rem`,
|
|
2067
2086
|
fontWeight: c.fontWeight,
|
|
2068
2087
|
textAlign: j.value,
|
|
2069
|
-
marginTop:
|
|
2088
|
+
marginTop: A && ce.value ? `${c.inputLabelMarginActive}px` : "0"
|
|
2070
2089
|
};
|
|
2071
2090
|
}), U = a(() => {
|
|
2072
2091
|
switch (v.value) {
|
|
@@ -2083,13 +2102,13 @@ const Zl = ["for"], Jl = {
|
|
|
2083
2102
|
}), z = a(() => ue.value.font), G = a(() => ue.value.textColor), kt = a(() => ue.value.inputPosition === "top" ? "column" : "column-reverse"), wt = a(() => {
|
|
2084
2103
|
const c = {};
|
|
2085
2104
|
Ge.value && Object.keys(Ge.value).forEach((Ze) => c[`aria-${Ze}`] = Ge.value[Ze]);
|
|
2086
|
-
const
|
|
2105
|
+
const A = {
|
|
2087
2106
|
"aria-label": tt.value,
|
|
2088
2107
|
"aria-disabled": I.value,
|
|
2089
2108
|
...c
|
|
2090
2109
|
};
|
|
2091
2110
|
return Object.fromEntries(
|
|
2092
|
-
Object.entries(
|
|
2111
|
+
Object.entries(A).filter(([ie, Ze]) => Ze != null)
|
|
2093
2112
|
);
|
|
2094
2113
|
}), it = a(() => {
|
|
2095
2114
|
const c = ue.value;
|
|
@@ -2106,26 +2125,26 @@ const Zl = ["for"], Jl = {
|
|
|
2106
2125
|
"--selection-bg-color": N.value,
|
|
2107
2126
|
"--selection-text-color": Ft.value
|
|
2108
2127
|
})), ua = a(() => {
|
|
2109
|
-
const c = ue.value,
|
|
2128
|
+
const c = ue.value, A = {
|
|
2110
2129
|
width: `${c.width}px`
|
|
2111
2130
|
};
|
|
2112
|
-
return c.display === "block" ? { width: "auto" } :
|
|
2113
|
-
}), st = a(() =>
|
|
2114
|
-
const c = ue.value,
|
|
2131
|
+
return c.display === "block" ? { width: "auto" } : A;
|
|
2132
|
+
}), st = a(() => he.value ? he.value : `${F.value}-name-label`), Et = a(() => At.value || Re.value.length > 0 || Y.value && Y.value.trim().length > 0), Pt = a(() => ce.value ? At.value || Re.value.length > 0 ? ee.value : "" : ee.value), ia = a(() => {
|
|
2133
|
+
const c = ue.value, A = Et.value, ie = A ? c.lightTextColorLabelActive : c.lightTextColorLabel, Ze = A ? c.darkTextColorLabelActive : c.darkTextColorLabel;
|
|
2115
2134
|
return {
|
|
2116
2135
|
fontFamily: c.fontFamilyLabel,
|
|
2117
|
-
fontSize:
|
|
2136
|
+
fontSize: A ? c.fontSizeLabelActive : c.fontSizeLabel,
|
|
2118
2137
|
fontWeight: c.fontWeightLabel,
|
|
2119
|
-
color: c.theme === "dark" ? Ze :
|
|
2120
|
-
top:
|
|
2121
|
-
left:
|
|
2122
|
-
transform:
|
|
2138
|
+
color: c.theme === "dark" ? Ze : ie,
|
|
2139
|
+
top: A ? `${c.labelActiveTop}px` : "50%",
|
|
2140
|
+
left: A ? `${c.labelActiveLeft}px` : `${c.labelLeft}px`,
|
|
2141
|
+
transform: A ? "translateY(0)" : "translateY(-50%)",
|
|
2123
2142
|
transition: "all 0.2s ease",
|
|
2124
|
-
backgroundColor:
|
|
2125
|
-
padding:
|
|
2126
|
-
borderRadius:
|
|
2143
|
+
backgroundColor: A ? c.labelBackground : "transparent",
|
|
2144
|
+
padding: A ? c.labelPadding : "0",
|
|
2145
|
+
borderRadius: A ? `${c.labelBorderRadius}rem` : "0",
|
|
2127
2146
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
2128
|
-
...
|
|
2147
|
+
...A ? {
|
|
2129
2148
|
whiteSpace: Ee.value ? "nowrap" : "normal",
|
|
2130
2149
|
wordWrap: Ee.value ? "normal" : "break-word",
|
|
2131
2150
|
overflowWrap: Ee.value ? "normal" : "break-word",
|
|
@@ -2142,7 +2161,7 @@ const Zl = ["for"], Jl = {
|
|
|
2142
2161
|
fontFamily: c.fontFamilyChip
|
|
2143
2162
|
};
|
|
2144
2163
|
}), sa = a(() => {
|
|
2145
|
-
switch (
|
|
2164
|
+
switch (de.value) {
|
|
2146
2165
|
case "dark":
|
|
2147
2166
|
return "component__theme--dark";
|
|
2148
2167
|
default:
|
|
@@ -2157,110 +2176,113 @@ const Zl = ["for"], Jl = {
|
|
|
2157
2176
|
default:
|
|
2158
2177
|
return "component__input--background";
|
|
2159
2178
|
}
|
|
2160
|
-
}), da = () => {
|
|
2161
|
-
g("clicked");
|
|
2179
|
+
}), da = (c) => {
|
|
2180
|
+
g("clicked", c);
|
|
2162
2181
|
}, ca = () => {
|
|
2163
2182
|
At.value = !0, g("focused");
|
|
2164
2183
|
}, fa = () => {
|
|
2165
2184
|
At.value = !1, g("blurred");
|
|
2166
2185
|
}, va = async (c) => {
|
|
2167
|
-
var
|
|
2168
|
-
const
|
|
2169
|
-
g("paste",
|
|
2186
|
+
var ie;
|
|
2187
|
+
const A = ((ie = c.clipboardData) == null ? void 0 : ie.getData("text")) || "";
|
|
2188
|
+
g("paste", A), we.value && c.preventDefault();
|
|
2170
2189
|
}, Kt = (c) => {
|
|
2171
|
-
if (!(I.value ||
|
|
2190
|
+
if (!(I.value || ve.value) && c.key === "Enter" && Y.value.trim() !== "") {
|
|
2172
2191
|
c.preventDefault();
|
|
2173
|
-
let
|
|
2174
|
-
|
|
2192
|
+
let A = Y.value.trim();
|
|
2193
|
+
Te.value && (A = A.toUpperCase()), (w.value || !Re.value.includes(A)) && pa(A), Y.value = "";
|
|
2175
2194
|
}
|
|
2176
2195
|
}, pa = (c) => {
|
|
2177
|
-
|
|
2196
|
+
Re.value.push(c), g("added", c);
|
|
2178
2197
|
}, zt = (c) => {
|
|
2179
|
-
|
|
2198
|
+
Re.value = Re.value.filter((A) => A !== c), g("removed", c);
|
|
2180
2199
|
};
|
|
2181
2200
|
return re(_, (c) => {
|
|
2182
|
-
|
|
2201
|
+
Re.value = c, g("changed", c);
|
|
2183
2202
|
}), re(Y, (c) => {
|
|
2184
2203
|
g("input-changed", c);
|
|
2185
|
-
}), (c,
|
|
2204
|
+
}), (c, A) => u(F) ? (O(), K("div", $a({
|
|
2186
2205
|
key: 0,
|
|
2187
2206
|
class: ["nb-wrapper", ut.value],
|
|
2188
2207
|
style: [ne.value],
|
|
2189
|
-
role: "input"
|
|
2190
|
-
|
|
2191
|
-
|
|
2208
|
+
role: "input",
|
|
2209
|
+
title: e.title
|
|
2210
|
+
}, wt.value, {
|
|
2211
|
+
onClick: A[2] || (A[2] = (ie) => da(ie))
|
|
2212
|
+
}), [
|
|
2213
|
+
u(ce) ? (O(), K("label", {
|
|
2192
2214
|
key: 0,
|
|
2193
2215
|
for: st.value,
|
|
2194
2216
|
class: "component__label",
|
|
2195
2217
|
style: Ne([ia.value])
|
|
2196
2218
|
}, [
|
|
2197
|
-
jt(Rt(u(
|
|
2198
|
-
u(
|
|
2199
|
-
], 12,
|
|
2200
|
-
|
|
2219
|
+
jt(Rt(u(be)), 1),
|
|
2220
|
+
u(Be) ? (O(), K("span", tn, "*")) : me("", !0)
|
|
2221
|
+
], 12, en)) : me("", !0),
|
|
2222
|
+
Ve("div", {
|
|
2201
2223
|
id: u(F),
|
|
2202
2224
|
ref_key: "chipsContainer",
|
|
2203
|
-
ref:
|
|
2225
|
+
ref: De,
|
|
2204
2226
|
class: Ye(["nb-reset", "component", sa.value, Gt.value]),
|
|
2205
2227
|
style: Ne([P.value, ua.value, Yt.value])
|
|
2206
2228
|
}, [
|
|
2207
|
-
|
|
2229
|
+
Re.value.length > 0 ? (O(), K("div", {
|
|
2208
2230
|
key: 0,
|
|
2209
2231
|
ref_key: "chips",
|
|
2210
2232
|
ref: Wt,
|
|
2211
2233
|
class: "chips"
|
|
2212
2234
|
}, [
|
|
2213
|
-
(O(!0), K(gl, null, yl(
|
|
2214
|
-
key:
|
|
2235
|
+
(O(!0), K(gl, null, yl(Re.value, (ie) => (O(), K("div", {
|
|
2236
|
+
key: ie,
|
|
2215
2237
|
class: "chip"
|
|
2216
2238
|
}, [
|
|
2217
2239
|
La(c.$slots, "chip", {
|
|
2218
|
-
chips:
|
|
2219
|
-
chip:
|
|
2240
|
+
chips: Re.value,
|
|
2241
|
+
chip: ie,
|
|
2220
2242
|
removeChip: zt
|
|
2221
2243
|
}, () => [
|
|
2222
|
-
|
|
2244
|
+
Ve("span", {
|
|
2223
2245
|
class: "chip-text",
|
|
2224
2246
|
style: Ne([Ut.value])
|
|
2225
|
-
}, Rt(
|
|
2226
|
-
!u(I) && !u(
|
|
2247
|
+
}, Rt(ie), 5),
|
|
2248
|
+
!u(I) && !u(ve) ? (O(), K("span", {
|
|
2227
2249
|
key: 0,
|
|
2228
2250
|
class: "chip-remove",
|
|
2229
2251
|
style: Ne([Ut.value]),
|
|
2230
|
-
onClick: (Ze) => zt(
|
|
2231
|
-
}, "×", 12,
|
|
2252
|
+
onClick: (Ze) => zt(ie)
|
|
2253
|
+
}, "×", 12, ln)) : me("", !0)
|
|
2232
2254
|
], !0)
|
|
2233
2255
|
]))), 128))
|
|
2234
|
-
], 512)) :
|
|
2235
|
-
Pa(
|
|
2256
|
+
], 512)) : me("", !0),
|
|
2257
|
+
Pa(Ve("input", {
|
|
2236
2258
|
ref_key: "chipInput",
|
|
2237
2259
|
ref: M,
|
|
2238
2260
|
type: "text",
|
|
2239
|
-
"onUpdate:modelValue":
|
|
2261
|
+
"onUpdate:modelValue": A[0] || (A[0] = (ie) => Y.value = ie),
|
|
2240
2262
|
id: st.value,
|
|
2241
2263
|
name: st.value,
|
|
2242
2264
|
placeholder: Pt.value,
|
|
2243
|
-
readonly: u(
|
|
2244
|
-
autocomplete: u(
|
|
2245
|
-
required: u(
|
|
2246
|
-
tabindex: u(I) || u(
|
|
2265
|
+
readonly: u(ve),
|
|
2266
|
+
autocomplete: u(ke),
|
|
2267
|
+
required: u(Be),
|
|
2268
|
+
tabindex: u(I) || u(ve) ? -1 : u(te),
|
|
2247
2269
|
class: Ye(["chips-input", U.value]),
|
|
2248
2270
|
style: Ne([oa.value, ra.value]),
|
|
2249
|
-
onKeydown:
|
|
2271
|
+
onKeydown: A[1] || (A[1] = na((ie) => !u(I) && u(ge) && Kt(ie), ["enter"])),
|
|
2250
2272
|
onFocus: ca,
|
|
2251
2273
|
onBlur: fa,
|
|
2252
2274
|
onPaste: va
|
|
2253
|
-
}, null, 46,
|
|
2275
|
+
}, null, 46, nn), [
|
|
2254
2276
|
[hl, Y.value]
|
|
2255
2277
|
])
|
|
2256
|
-
], 14,
|
|
2257
|
-
], 16)) :
|
|
2278
|
+
], 14, an)
|
|
2279
|
+
], 16, Xl)) : me("", !0);
|
|
2258
2280
|
}
|
|
2259
|
-
}),
|
|
2260
|
-
const
|
|
2281
|
+
}), rn = /* @__PURE__ */ Oa(on, [["__scopeId", "data-v-31b94065"]]);
|
|
2282
|
+
const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
2261
2283
|
key: 0,
|
|
2262
2284
|
class: "component__label--required"
|
|
2263
|
-
},
|
|
2285
|
+
}, fn = ["id", "name", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex"], vn = /* @__PURE__ */ Object.assign({
|
|
2264
2286
|
name: "NbTextarea",
|
|
2265
2287
|
inheritAttrs: !1
|
|
2266
2288
|
}, {
|
|
@@ -2274,8 +2296,8 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2274
2296
|
type: String,
|
|
2275
2297
|
default: "b",
|
|
2276
2298
|
validator: (e = "b") => {
|
|
2277
|
-
const
|
|
2278
|
-
return ["b", "ib"].includes(
|
|
2299
|
+
const b = e.toLowerCase();
|
|
2300
|
+
return ["b", "ib"].includes(b);
|
|
2279
2301
|
}
|
|
2280
2302
|
},
|
|
2281
2303
|
tabIndex: {
|
|
@@ -2294,6 +2316,10 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2294
2316
|
type: Object,
|
|
2295
2317
|
default: () => ({})
|
|
2296
2318
|
},
|
|
2319
|
+
title: {
|
|
2320
|
+
type: String,
|
|
2321
|
+
default: ""
|
|
2322
|
+
},
|
|
2297
2323
|
textColor: {
|
|
2298
2324
|
// TESTAR AINDA
|
|
2299
2325
|
type: String,
|
|
@@ -2666,93 +2692,93 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2666
2692
|
"entered",
|
|
2667
2693
|
"paste"
|
|
2668
2694
|
],
|
|
2669
|
-
setup(e, { emit:
|
|
2695
|
+
setup(e, { emit: b }) {
|
|
2670
2696
|
Wa((i) => ({
|
|
2671
|
-
"
|
|
2672
|
-
"
|
|
2673
|
-
"
|
|
2674
|
-
"
|
|
2675
|
-
|
|
2676
|
-
"
|
|
2677
|
-
"
|
|
2678
|
-
"
|
|
2679
|
-
"
|
|
2680
|
-
"
|
|
2681
|
-
|
|
2682
|
-
"
|
|
2683
|
-
"
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
"
|
|
2688
|
-
"
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2697
|
+
"12e3f4be": ne.value,
|
|
2698
|
+
"25416c92": u(ot),
|
|
2699
|
+
"1586419f": G.value,
|
|
2700
|
+
"3f131bb1": kt.value,
|
|
2701
|
+
"5db91b09": wt.value,
|
|
2702
|
+
"46e5c64e": u(pt),
|
|
2703
|
+
"14e7161a": u(Lt),
|
|
2704
|
+
"638bd436": u(ze),
|
|
2705
|
+
"3eecc242": u(Le),
|
|
2706
|
+
"4ad40d44": u(ht),
|
|
2707
|
+
d337890c: u(pe),
|
|
2708
|
+
"4a46457e": u(vt),
|
|
2709
|
+
"2efd058f": At.value,
|
|
2710
|
+
a23ec074: u(St),
|
|
2711
|
+
"61fb8c39": ia.value,
|
|
2712
|
+
f759a9b4: $t.value,
|
|
2713
|
+
"0c826865": P.value,
|
|
2714
|
+
"5e8e364e": U.value,
|
|
2715
|
+
f52a43b0: z.value,
|
|
2716
|
+
cd69d19c: i.styleButtonColor,
|
|
2717
|
+
"1fb60257": Yt.value
|
|
2692
2718
|
})), Aa(() => {
|
|
2693
2719
|
Y.value = Xe.value;
|
|
2694
2720
|
}), Ya(() => {
|
|
2695
2721
|
c();
|
|
2696
2722
|
});
|
|
2697
|
-
const g =
|
|
2723
|
+
const g = b, h = e, {
|
|
2698
2724
|
nbId: F,
|
|
2699
2725
|
display: Q,
|
|
2700
|
-
hasTabIndexEnter:
|
|
2701
|
-
ariaLabel:
|
|
2702
|
-
ariaAttrs:
|
|
2703
|
-
textColor:
|
|
2726
|
+
hasTabIndexEnter: fe,
|
|
2727
|
+
ariaLabel: R,
|
|
2728
|
+
ariaAttrs: B,
|
|
2729
|
+
textColor: C,
|
|
2704
2730
|
caretColor: I,
|
|
2705
2731
|
selectionBgColor: ae,
|
|
2706
2732
|
selectionTextColor: le,
|
|
2707
2733
|
hasBorderRadius: X,
|
|
2708
2734
|
borderRadius: _,
|
|
2709
|
-
disabled:
|
|
2735
|
+
disabled: w,
|
|
2710
2736
|
fontFamily: H,
|
|
2711
|
-
fontSize:
|
|
2737
|
+
fontSize: se,
|
|
2712
2738
|
fontWeight: q,
|
|
2713
2739
|
fontFamilyMsg: Fe,
|
|
2714
|
-
fontSizeMsg:
|
|
2740
|
+
fontSizeMsg: he,
|
|
2715
2741
|
fontWeightMsg: ee,
|
|
2716
|
-
textMessageColor:
|
|
2717
|
-
inputWidth:
|
|
2718
|
-
inputStyle:
|
|
2719
|
-
activeTextStyle:
|
|
2720
|
-
inputReadonly:
|
|
2742
|
+
textMessageColor: Te,
|
|
2743
|
+
inputWidth: ve,
|
|
2744
|
+
inputStyle: we,
|
|
2745
|
+
activeTextStyle: ke,
|
|
2746
|
+
inputReadonly: Be,
|
|
2721
2747
|
blockPaste: j,
|
|
2722
2748
|
hasTrim: Qe,
|
|
2723
2749
|
inputUppercase: v,
|
|
2724
|
-
inputName:
|
|
2750
|
+
inputName: de,
|
|
2725
2751
|
inputPlaceholder: Oe,
|
|
2726
2752
|
inputText: Xe,
|
|
2727
2753
|
theme: S,
|
|
2728
2754
|
tabindex: Ue,
|
|
2729
|
-
lightBgColor:
|
|
2755
|
+
lightBgColor: pe,
|
|
2730
2756
|
lightBgColorFocus: vt,
|
|
2731
2757
|
lightDisabledBgColor: ht,
|
|
2732
2758
|
lightTextColor: ot,
|
|
2733
2759
|
darkBgColor: ze,
|
|
2734
|
-
darkBgColorFocus:
|
|
2760
|
+
darkBgColorFocus: Le,
|
|
2735
2761
|
darkDisabledBgColor: Lt,
|
|
2736
2762
|
darkTextColor: pt,
|
|
2737
2763
|
textAlign: St,
|
|
2738
2764
|
showMsg: xt,
|
|
2739
2765
|
hasMsg: Ct,
|
|
2740
|
-
showLabel:
|
|
2766
|
+
showLabel: Ae,
|
|
2741
2767
|
labelBackground: gt,
|
|
2742
2768
|
labelPadding: et,
|
|
2743
|
-
labelBorderRadius:
|
|
2744
|
-
labelBreakOnActive:
|
|
2745
|
-
labelLeft:
|
|
2769
|
+
labelBorderRadius: V,
|
|
2770
|
+
labelBreakOnActive: D,
|
|
2771
|
+
labelLeft: Se,
|
|
2746
2772
|
inputLabelMarginActive: te,
|
|
2747
|
-
labelActiveTop:
|
|
2773
|
+
labelActiveTop: ge,
|
|
2748
2774
|
labelActiveLeft: tt,
|
|
2749
2775
|
labelRight: Ge,
|
|
2750
2776
|
labelActiveRight: Ie,
|
|
2751
|
-
fontFamilyLabel:
|
|
2752
|
-
fontSizeLabel:
|
|
2753
|
-
fontSizeLabelActive:
|
|
2754
|
-
fontWeightLabel:
|
|
2755
|
-
lightTextColorLabel:
|
|
2777
|
+
fontFamilyLabel: y,
|
|
2778
|
+
fontSizeLabel: k,
|
|
2779
|
+
fontSizeLabelActive: ce,
|
|
2780
|
+
fontWeightLabel: be,
|
|
2781
|
+
lightTextColorLabel: ye,
|
|
2756
2782
|
lightTextColorLabelActive: _e,
|
|
2757
2783
|
darkTextColorLabel: We,
|
|
2758
2784
|
darkTextColorLabelActive: Ee,
|
|
@@ -2768,14 +2794,14 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2768
2794
|
maxWidth: Nt,
|
|
2769
2795
|
minHeight: rt,
|
|
2770
2796
|
maxHeight: Tt,
|
|
2771
|
-
autoResize:
|
|
2797
|
+
autoResize: L,
|
|
2772
2798
|
minRows: E,
|
|
2773
2799
|
maxRows: Z
|
|
2774
|
-
} = Ea(h), Y = oe(""),
|
|
2775
|
-
const i =
|
|
2800
|
+
} = Ea(h), Y = oe(""), De = oe(!1), M = a(() => {
|
|
2801
|
+
const i = w.value ? "component-disabled" : "", x = Q.value !== "b" ? "inline-block" : "block", xe = C ? C.value : "ffffff", je = I.value ? I.value : "", Zt = ae.value ? ae.value : "", ga = le.value ? le.value : "", ya = X.value ? X.value : !1, ba = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, ma = H.value ? H.value : "'Lato', sans-serif", Dt = se.value ? se.value : "1.4em", ha = q.value !== 0 && !q.value || q.value < 0 ? 100 : q.value, Sa = Fe.value ? Fe.value : "'Lato', sans-serif", xa = he.value ? he.value : "1em", Ca = ee.value !== 0 && !ee.value || ee.value < 0 ? 100 : ee.value, dt = Te.value ? Te.value : "#f15574", _t = ve.value ? ve.value : 200, Jt = ke.value ? ke.value : "normal", Qt = Be.value ? Be.value : !1, Ht = v.value ? v.value : !1, Xt = S.value ? S.value : "normal", ct = St.value ? St.value : "left", Bt = we.value ? we.value : "background", Va = Ae.value ? Ae.value : !1, Ta = Se.value !== 0 && !Se.value || Se.value < 0 ? 5 : Se.value, ea = gt.value ? gt.value : "transparent", ka = te.value !== 0 && !te.value || te.value < 0 ? 15 : te.value, o = et.value ? et.value : "1px 5px", m = V.value !== 0 && !V.value || V.value < 0 ? 0 : V.value, Ce = ge.value === null || ge.value === void 0 ? -13 : ge.value, nt = tt.value === null || tt.value === void 0 ? 5 : tt.value, Ba = Ge.value === null || Ge.value === void 0 ? 0 : Ge.value, ta = Ie.value === null || Ie.value === void 0 ? 0 : Ie.value, wa = y.value ? y.value : "'Lato', sans-serif", Da = k.value ? k.value : "1em", It = ce.value ? ce.value : "0.8em", aa = be.value ? be.value : 400, qt = ye.value ? ye.value : "#ffffff", Ra = We.value ? We.value : "#000000", _a = _e.value ? _e.value : "#ffffff", Ma = Ee.value ? Ee.value : "#000000", Ha = He.value && He.value > 0 ? He.value : 2, $e = qe.value && qe.value > 0 ? qe.value : 20, qa = Ke.value !== null && Ke.value >= 0 ? Ke.value : null, mt = at.value !== null && at.value >= 0 ? at.value : null, t = yt.value && ["soft", "hard", "off"].includes(yt.value) ? yt.value : "soft", l = Mt.value !== void 0 ? Mt.value : "default", n = Vt.value !== void 0 ? Vt.value : !1, r = bt.value && ["none", "both", "vertical", "horizontal"].includes(bt.value) ? bt.value : "vertical", s = lt.value ? lt.value : "auto", d = Nt.value ? Nt.value : "auto", f = rt.value ? rt.value : "auto", p = Tt.value ? Tt.value : "auto", T = L.value !== void 0 ? L.value : !1, $ = E.value !== null && E.value > 0 ? E.value : null, W = Z.value !== null && Z.value > 0 ? Z.value : null;
|
|
2776
2802
|
return {
|
|
2777
2803
|
disabled: i,
|
|
2778
|
-
display:
|
|
2804
|
+
display: x,
|
|
2779
2805
|
font: ma,
|
|
2780
2806
|
fontSize: Dt,
|
|
2781
2807
|
fontWeight: ha,
|
|
@@ -2783,7 +2809,7 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2783
2809
|
fontSizeMsg: xa,
|
|
2784
2810
|
fontWeightMsg: Ca,
|
|
2785
2811
|
textMessageColor: dt,
|
|
2786
|
-
textColor:
|
|
2812
|
+
textColor: xe,
|
|
2787
2813
|
caretColor: je,
|
|
2788
2814
|
selectionBgColor: Zt,
|
|
2789
2815
|
selectionTextColor: ga,
|
|
@@ -2802,7 +2828,7 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2802
2828
|
labelBorderRadius: m,
|
|
2803
2829
|
labelLeft: Ta,
|
|
2804
2830
|
inputLabelMarginActive: ka,
|
|
2805
|
-
labelActiveTop:
|
|
2831
|
+
labelActiveTop: Ce,
|
|
2806
2832
|
labelActiveLeft: nt,
|
|
2807
2833
|
labelRight: Ba,
|
|
2808
2834
|
labelActiveRight: ta,
|
|
@@ -2815,7 +2841,7 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2815
2841
|
lightTextColorLabelActive: _a,
|
|
2816
2842
|
darkTextColorLabelActive: Ma,
|
|
2817
2843
|
rows: Ha,
|
|
2818
|
-
cols:
|
|
2844
|
+
cols: $e,
|
|
2819
2845
|
maxlength: qa,
|
|
2820
2846
|
minlength: mt,
|
|
2821
2847
|
wrap: t,
|
|
@@ -2826,33 +2852,33 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2826
2852
|
maxWidth: d,
|
|
2827
2853
|
minHeight: f,
|
|
2828
2854
|
maxHeight: p,
|
|
2829
|
-
autoResize:
|
|
2830
|
-
minRows:
|
|
2855
|
+
autoResize: T,
|
|
2856
|
+
minRows: $,
|
|
2831
2857
|
maxRows: W
|
|
2832
2858
|
};
|
|
2833
|
-
}), Wt = a(() => M.value.disabled),
|
|
2834
|
-
const i = M.value,
|
|
2859
|
+
}), Wt = a(() => M.value.disabled), Re = a(() => {
|
|
2860
|
+
const i = M.value, x = Pt.value;
|
|
2835
2861
|
return {
|
|
2836
2862
|
display: i.display,
|
|
2837
2863
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
2838
2864
|
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
2839
2865
|
paddingTop: "0px",
|
|
2840
2866
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
2841
|
-
overflow:
|
|
2867
|
+
overflow: x && Ae.value ? "visible" : "hidden"
|
|
2842
2868
|
};
|
|
2843
2869
|
}), At = a(() => {
|
|
2844
2870
|
const i = M.value;
|
|
2845
2871
|
return i.fontSize ? i.fontSize : "1.4em";
|
|
2846
2872
|
}), ue = a(() => {
|
|
2847
|
-
const i = M.value,
|
|
2873
|
+
const i = M.value, x = Pt.value;
|
|
2848
2874
|
return {
|
|
2849
2875
|
fontWeight: i.fontWeight,
|
|
2850
|
-
marginTop:
|
|
2876
|
+
marginTop: x && Ae.value ? `${i.inputLabelMarginActive}px` : "0",
|
|
2851
2877
|
// Quando o label está ativo, define altura mínima igual ao input para alinhar baseline
|
|
2852
2878
|
// Mas permite que o textarea cresça quando há conteúdo
|
|
2853
|
-
minHeight: (
|
|
2854
|
-
height:
|
|
2855
|
-
maxHeight:
|
|
2879
|
+
minHeight: (x && Ae.value, "28px"),
|
|
2880
|
+
height: x && Ae.value ? "auto" : "28px",
|
|
2881
|
+
maxHeight: x && Ae.value ? void 0 : "28px"
|
|
2856
2882
|
};
|
|
2857
2883
|
}), ut = a(() => {
|
|
2858
2884
|
const i = M.value;
|
|
@@ -2872,7 +2898,7 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2872
2898
|
width: `${i.inputWidth}px`
|
|
2873
2899
|
};
|
|
2874
2900
|
}), N = a(() => {
|
|
2875
|
-
switch (
|
|
2901
|
+
switch (we.value) {
|
|
2876
2902
|
case "line":
|
|
2877
2903
|
return "component__input--line";
|
|
2878
2904
|
case "border":
|
|
@@ -2896,42 +2922,42 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2896
2922
|
default:
|
|
2897
2923
|
return "component__theme--light";
|
|
2898
2924
|
}
|
|
2899
|
-
}), ra = a(() => M.value.inputReadonly ? "component__input--read-only" : ""), ua = a(() => M.value.inputUppercase ? "component__input--uppercase" : ""), st = a(() =>
|
|
2900
|
-
a(() =>
|
|
2925
|
+
}), ra = a(() => M.value.inputReadonly ? "component__input--read-only" : ""), ua = a(() => M.value.inputUppercase ? "component__input--uppercase" : ""), st = a(() => de.value ? de.value : `${F.value}-name-label`), Et = a(() => Ae.value ? De.value ? Oe.value : "" : Oe.value), Pt = a(() => De.value || Y.value && Y.value.trim().length > 0);
|
|
2926
|
+
a(() => De.value ? "component__input--active" : "component__input--no-active");
|
|
2901
2927
|
const ia = a(() => "6px 10px"), Ut = a(() => !!(xt.value && Ct.value)), sa = a(() => {
|
|
2902
2928
|
const i = {};
|
|
2903
|
-
|
|
2904
|
-
const
|
|
2905
|
-
"aria-label":
|
|
2906
|
-
"aria-disabled":
|
|
2929
|
+
B.value && Object.keys(B.value).forEach((je) => i[`aria-${je}`] = B.value[je]);
|
|
2930
|
+
const x = {
|
|
2931
|
+
"aria-label": R.value,
|
|
2932
|
+
"aria-disabled": w.value,
|
|
2907
2933
|
...i
|
|
2908
2934
|
};
|
|
2909
2935
|
return Object.fromEntries(
|
|
2910
|
-
Object.entries(
|
|
2936
|
+
Object.entries(x).filter(([xe, je]) => je != null)
|
|
2911
2937
|
);
|
|
2912
2938
|
}), Gt = a(() => {
|
|
2913
|
-
const i = M.value,
|
|
2939
|
+
const i = M.value, x = Pt.value, xe = x ? i.lightTextColorLabelActive : i.lightTextColorLabel, je = x ? i.darkTextColorLabelActive : i.darkTextColorLabel;
|
|
2914
2940
|
return {
|
|
2915
2941
|
fontFamily: i.fontFamilyLabel,
|
|
2916
|
-
fontSize:
|
|
2942
|
+
fontSize: x ? i.fontSizeLabelActive : i.fontSizeLabel,
|
|
2917
2943
|
fontWeight: i.fontWeightLabel,
|
|
2918
|
-
color: i.theme === "dark" ? je :
|
|
2919
|
-
top:
|
|
2920
|
-
transform:
|
|
2921
|
-
left:
|
|
2922
|
-
right:
|
|
2944
|
+
color: i.theme === "dark" ? je : xe,
|
|
2945
|
+
top: x ? `${i.labelActiveTop}px` : "50%",
|
|
2946
|
+
transform: x ? "translateY(0)" : "translateY(-50%)",
|
|
2947
|
+
left: x ? `${i.labelActiveLeft}px` : `${i.labelLeft}px`,
|
|
2948
|
+
right: x ? `${i.labelActiveRight}px` : `${i.labelRight}px`,
|
|
2923
2949
|
transition: "all 0.2s ease",
|
|
2924
|
-
backgroundColor:
|
|
2925
|
-
padding:
|
|
2926
|
-
borderRadius:
|
|
2950
|
+
backgroundColor: x ? i.labelBackground : "transparent",
|
|
2951
|
+
padding: x ? i.labelPadding : "0",
|
|
2952
|
+
borderRadius: x ? `${i.labelBorderRadius}rem` : "0",
|
|
2927
2953
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
2928
|
-
...
|
|
2929
|
-
whiteSpace:
|
|
2930
|
-
wordWrap:
|
|
2931
|
-
overflowWrap:
|
|
2954
|
+
...x ? {
|
|
2955
|
+
whiteSpace: D.value ? "nowrap" : "normal",
|
|
2956
|
+
wordWrap: D.value ? "normal" : "break-word",
|
|
2957
|
+
overflowWrap: D.value ? "normal" : "break-word",
|
|
2932
2958
|
maxWidth: "100%",
|
|
2933
|
-
textOverflow:
|
|
2934
|
-
overflow:
|
|
2959
|
+
textOverflow: D.value ? "ellipsis" : "clip",
|
|
2960
|
+
overflow: D.value ? "hidden" : "visible"
|
|
2935
2961
|
} : {}
|
|
2936
2962
|
};
|
|
2937
2963
|
});
|
|
@@ -2940,14 +2966,14 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2940
2966
|
return i.theme === "dark" ? i.darkTextColorLabelActive : i.lightTextColorLabelActive;
|
|
2941
2967
|
});
|
|
2942
2968
|
const da = a(() => {
|
|
2943
|
-
const i = M.value,
|
|
2969
|
+
const i = M.value, x = {
|
|
2944
2970
|
rows: i.rows,
|
|
2945
2971
|
cols: i.cols,
|
|
2946
2972
|
wrap: i.wrap,
|
|
2947
2973
|
spellcheck: i.spellcheck === "default" ? void 0 : i.spellcheck,
|
|
2948
2974
|
autofocus: i.autofocus || void 0
|
|
2949
2975
|
};
|
|
2950
|
-
return i.maxlength !== null && (
|
|
2976
|
+
return i.maxlength !== null && (x.maxlength = i.maxlength), i.minlength !== null && (x.minlength = i.minlength), x;
|
|
2951
2977
|
}), ca = a(() => ({
|
|
2952
2978
|
resize: M.value.resize
|
|
2953
2979
|
})), fa = a(() => M.value.wrap === "off" ? {
|
|
@@ -2975,14 +3001,14 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2975
3001
|
};
|
|
2976
3002
|
}), c = () => {
|
|
2977
3003
|
Y.value = Xe.value;
|
|
2978
|
-
},
|
|
2979
|
-
g("clicked");
|
|
2980
|
-
},
|
|
2981
|
-
|
|
3004
|
+
}, A = (i) => {
|
|
3005
|
+
g("clicked", i);
|
|
3006
|
+
}, ie = () => {
|
|
3007
|
+
w.value || M.value.inputReadonly || !fe.value || g("entered", Y.value);
|
|
2982
3008
|
}, Ze = async (i) => {
|
|
2983
|
-
var
|
|
2984
|
-
const
|
|
2985
|
-
g("paste",
|
|
3009
|
+
var xe;
|
|
3010
|
+
const x = ((xe = i.clipboardData) == null ? void 0 : xe.getData("text")) || "";
|
|
3011
|
+
g("paste", x), j.value && i.preventDefault();
|
|
2986
3012
|
}, Ot = () => {
|
|
2987
3013
|
let i = Y.value;
|
|
2988
3014
|
Qe.value && (i = i.trim()), g("current-value", i);
|
|
@@ -2991,33 +3017,34 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2991
3017
|
i !== Y.value && (Y.value = i);
|
|
2992
3018
|
}, { immediate: !0 }), re(Y, (i) => {
|
|
2993
3019
|
Qe.value && (i = i.trim()), g("changed", i);
|
|
2994
|
-
}), re(
|
|
3020
|
+
}), re(De, (i) => {
|
|
2995
3021
|
g(i ? "focused" : "blurred");
|
|
2996
3022
|
}), re(Y, () => {
|
|
2997
3023
|
Ot();
|
|
2998
|
-
}, { immediate: !0 }), (i,
|
|
3024
|
+
}, { immediate: !0 }), (i, x) => u(F) ? (O(), K("div", $a({
|
|
2999
3025
|
key: 0,
|
|
3000
3026
|
class: ["nb-wrapper", Wt.value],
|
|
3001
|
-
style: [
|
|
3002
|
-
role: "input"
|
|
3027
|
+
style: [Re.value, it.value, ut.value],
|
|
3028
|
+
role: "input",
|
|
3029
|
+
title: e.title
|
|
3003
3030
|
}, sa.value), [
|
|
3004
|
-
|
|
3031
|
+
Ve("div", {
|
|
3005
3032
|
id: u(F),
|
|
3006
3033
|
class: Ye(["nb-reset", "component", oa.value, ra.value, N.value]),
|
|
3007
3034
|
style: Ne([ue.value, it.value, ut.value]),
|
|
3008
|
-
onClick:
|
|
3035
|
+
onClick: x[4] || (x[4] = (xe) => A(xe))
|
|
3009
3036
|
}, [
|
|
3010
|
-
u(
|
|
3037
|
+
u(Ae) ? (O(), K("label", {
|
|
3011
3038
|
key: 0,
|
|
3012
3039
|
for: st.value,
|
|
3013
3040
|
class: "component__label",
|
|
3014
3041
|
style: Ne([Gt.value])
|
|
3015
3042
|
}, [
|
|
3016
3043
|
jt(Rt(e.label), 1),
|
|
3017
|
-
e.required ? (O(), K("span",
|
|
3018
|
-
], 12,
|
|
3019
|
-
Pa(
|
|
3020
|
-
"onUpdate:modelValue":
|
|
3044
|
+
e.required ? (O(), K("span", cn, "*")) : me("", !0)
|
|
3045
|
+
], 12, dn)) : me("", !0),
|
|
3046
|
+
Pa(Ve("textarea", $a({
|
|
3047
|
+
"onUpdate:modelValue": x[0] || (x[0] = (xe) => Y.value = xe),
|
|
3021
3048
|
id: st.value,
|
|
3022
3049
|
name: st.value
|
|
3023
3050
|
}, da.value, {
|
|
@@ -3026,22 +3053,22 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
3026
3053
|
Ft.value
|
|
3027
3054
|
]],
|
|
3028
3055
|
placeholder: Et.value,
|
|
3029
|
-
disabled: u(
|
|
3056
|
+
disabled: u(w) || u(Be),
|
|
3030
3057
|
required: e.required,
|
|
3031
|
-
readonly: u(
|
|
3058
|
+
readonly: u(Be),
|
|
3032
3059
|
autocomplete: e.inputAutocomplete,
|
|
3033
|
-
tabindex: u(
|
|
3060
|
+
tabindex: u(w) || u(Be) ? -1 : u(Ue),
|
|
3034
3061
|
role: "textbox",
|
|
3035
3062
|
style: [ut.value, ca.value, fa.value, va.value, Kt.value, pa.value, zt.value],
|
|
3036
|
-
onFocus:
|
|
3037
|
-
onBlur:
|
|
3063
|
+
onFocus: x[1] || (x[1] = (xe) => De.value = !0),
|
|
3064
|
+
onBlur: x[2] || (x[2] = (xe) => De.value = !1),
|
|
3038
3065
|
onInput: Ot,
|
|
3039
|
-
onKeydown:
|
|
3066
|
+
onKeydown: x[3] || (x[3] = na((xe) => !u(w) && u(fe) && ie(), ["enter"])),
|
|
3040
3067
|
onPaste: Ze
|
|
3041
|
-
}), null, 16,
|
|
3068
|
+
}), null, 16, fn), [
|
|
3042
3069
|
[hl, Y.value]
|
|
3043
3070
|
])
|
|
3044
|
-
], 14,
|
|
3071
|
+
], 14, sn),
|
|
3045
3072
|
Ut.value ? (O(), K("div", {
|
|
3046
3073
|
key: 0,
|
|
3047
3074
|
class: Ye(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
@@ -3049,58 +3076,58 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
3049
3076
|
La(i.$slots, "message", {}, () => [
|
|
3050
3077
|
jt(Rt(e.message), 1)
|
|
3051
3078
|
], !0)
|
|
3052
|
-
], 2)) :
|
|
3053
|
-
], 16)) :
|
|
3079
|
+
], 2)) : me("", !0)
|
|
3080
|
+
], 16, un)) : me("", !0);
|
|
3054
3081
|
}
|
|
3055
|
-
}),
|
|
3082
|
+
}), pn = /* @__PURE__ */ Oa(vn, [["__scopeId", "data-v-c5558a12"]]), za = (e) => String(e).padStart(2, "0"), Na = (e) => {
|
|
3056
3083
|
if (!e || !(e instanceof Date))
|
|
3057
3084
|
return null;
|
|
3058
|
-
const
|
|
3059
|
-
return `${
|
|
3060
|
-
}, Fa = (e,
|
|
3085
|
+
const b = e.getFullYear(), g = za(e.getMonth() + 1), h = za(e.getDate()), F = za(e.getHours()), Q = za(e.getMinutes()), fe = za(e.getSeconds());
|
|
3086
|
+
return `${b}-${g}-${h}T${F}:${Q}:${fe}`;
|
|
3087
|
+
}, Fa = (e, b = "Z") => {
|
|
3061
3088
|
if (!e || !(e instanceof Date))
|
|
3062
3089
|
return null;
|
|
3063
3090
|
const g = e.toISOString();
|
|
3064
|
-
return
|
|
3065
|
-
}, bl = (e,
|
|
3066
|
-
e.getMonth() ===
|
|
3067
|
-
e.getDate() ===
|
|
3091
|
+
return b === "+00:00" ? g.replace("Z", "+00:00") : g;
|
|
3092
|
+
}, bl = (e, b) => !e || !b ? !1 : e.getFullYear() === b.getFullYear() && // Verificar se o ano é o mesmo
|
|
3093
|
+
e.getMonth() === b.getMonth() && // Verificar se o mês é o mesmo
|
|
3094
|
+
e.getDate() === b.getDate(), ja = (e) => {
|
|
3068
3095
|
if (!e)
|
|
3069
3096
|
return null;
|
|
3070
3097
|
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
3071
3098
|
const [g, h, F] = e.split("-").map(Number);
|
|
3072
3099
|
return new Date(g, h - 1, F);
|
|
3073
3100
|
}
|
|
3074
|
-
const
|
|
3075
|
-
return isNaN(
|
|
3076
|
-
},
|
|
3101
|
+
const b = new Date(e);
|
|
3102
|
+
return isNaN(b.getTime()) ? null : b;
|
|
3103
|
+
}, gn = (e, b = {}) => {
|
|
3077
3104
|
const {
|
|
3078
3105
|
inputType: g,
|
|
3079
3106
|
hasSeconds: h = !1,
|
|
3080
3107
|
allowRange: F = !1,
|
|
3081
3108
|
timezoneFormat: Q = "Z",
|
|
3082
|
-
locale:
|
|
3083
|
-
} =
|
|
3109
|
+
locale: fe = "en-US"
|
|
3110
|
+
} = b;
|
|
3084
3111
|
if (!e || e === "" || e === null || e === void 0)
|
|
3085
3112
|
return g === "date" ? { date: null, dateString: null, isoString: null, isoStringLocal: null, day: null } : g === "time" ? { hour: 0, minute: 0, second: void 0, timeString: "" } : g === "datetime-local" ? { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null } : g === "week" ? { weekString: null, weekStartDate: null, weekEndDate: null, weekNumber: null, weekYear: null, isoString: null, isoStringLocal: null } : g === "month" ? { date: null, dateString: null, month: null, year: null, monthName: null, isoString: null, isoStringLocal: null } : F ? { startDate: null, endDate: null, isRange: !0, isoString: null, isoStringLocal: null } : null;
|
|
3086
3113
|
try {
|
|
3087
3114
|
if (g === "date") {
|
|
3088
|
-
const
|
|
3089
|
-
if (!
|
|
3115
|
+
const R = ja(e);
|
|
3116
|
+
if (!R)
|
|
3090
3117
|
return { date: null, dateString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3091
|
-
const
|
|
3092
|
-
|
|
3093
|
-
const
|
|
3094
|
-
return
|
|
3095
|
-
date:
|
|
3118
|
+
const B = /* @__PURE__ */ new Date();
|
|
3119
|
+
B.setHours(0, 0, 0, 0);
|
|
3120
|
+
const C = new Date(R.getTime());
|
|
3121
|
+
return C.setHours(0, 0, 0, 0), {
|
|
3122
|
+
date: C,
|
|
3096
3123
|
dateString: e,
|
|
3097
|
-
isoString: Fa(
|
|
3098
|
-
isoStringLocal: Na(
|
|
3124
|
+
isoString: Fa(C, Q),
|
|
3125
|
+
isoStringLocal: Na(C),
|
|
3099
3126
|
day: {
|
|
3100
|
-
date:
|
|
3101
|
-
fullDate:
|
|
3127
|
+
date: C.getDate(),
|
|
3128
|
+
fullDate: C,
|
|
3102
3129
|
isOtherMonth: !1,
|
|
3103
|
-
isToday: bl(
|
|
3130
|
+
isToday: bl(C, B),
|
|
3104
3131
|
isSelected: !0,
|
|
3105
3132
|
isInRange: !1,
|
|
3106
3133
|
isRangeStart: !1,
|
|
@@ -3110,36 +3137,36 @@ e.getDate() === y.getDate(), ja = (e) => {
|
|
|
3110
3137
|
}
|
|
3111
3138
|
};
|
|
3112
3139
|
} else if (g === "time") {
|
|
3113
|
-
const
|
|
3114
|
-
if (!
|
|
3140
|
+
const R = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, B = e.match(R);
|
|
3141
|
+
if (!B)
|
|
3115
3142
|
return { hour: 0, minute: 0, second: void 0, timeString: "" };
|
|
3116
|
-
const
|
|
3143
|
+
const C = parseInt(B[1], 10), I = parseInt(B[2], 10), ae = B[3] ? parseInt(B[3], 10) : void 0;
|
|
3117
3144
|
return {
|
|
3118
|
-
hour:
|
|
3145
|
+
hour: C,
|
|
3119
3146
|
minute: I,
|
|
3120
3147
|
second: h ? ae : void 0,
|
|
3121
3148
|
timeString: e
|
|
3122
3149
|
};
|
|
3123
3150
|
} else if (g === "datetime-local") {
|
|
3124
|
-
const
|
|
3125
|
-
if (
|
|
3151
|
+
const R = e.split("T");
|
|
3152
|
+
if (R.length !== 2)
|
|
3126
3153
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3127
|
-
const
|
|
3154
|
+
const B = R[0], C = R[1], I = ja(B);
|
|
3128
3155
|
if (!I)
|
|
3129
3156
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3130
|
-
const ae = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, le =
|
|
3157
|
+
const ae = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, le = C.match(ae);
|
|
3131
3158
|
if (!le)
|
|
3132
3159
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3133
|
-
const X = parseInt(le[1], 10), _ = parseInt(le[2], 10),
|
|
3134
|
-
H.setHours(X, _,
|
|
3135
|
-
const
|
|
3136
|
-
|
|
3160
|
+
const X = parseInt(le[1], 10), _ = parseInt(le[2], 10), w = le[3] ? parseInt(le[3], 10) : void 0, H = new Date(I.getTime());
|
|
3161
|
+
H.setHours(X, _, w || 0, 0);
|
|
3162
|
+
const se = /* @__PURE__ */ new Date();
|
|
3163
|
+
se.setHours(0, 0, 0, 0);
|
|
3137
3164
|
const q = new Date(I.getTime());
|
|
3138
3165
|
return q.setHours(0, 0, 0, 0), {
|
|
3139
3166
|
date: q,
|
|
3140
3167
|
hour: X,
|
|
3141
3168
|
minute: _,
|
|
3142
|
-
second: h ?
|
|
3169
|
+
second: h ? w : void 0,
|
|
3143
3170
|
datetimeString: e,
|
|
3144
3171
|
isoString: Fa(H, Q),
|
|
3145
3172
|
isoStringLocal: Na(H),
|
|
@@ -3147,7 +3174,7 @@ e.getDate() === y.getDate(), ja = (e) => {
|
|
|
3147
3174
|
date: q.getDate(),
|
|
3148
3175
|
fullDate: q,
|
|
3149
3176
|
isOtherMonth: !1,
|
|
3150
|
-
isToday: bl(q,
|
|
3177
|
+
isToday: bl(q, se),
|
|
3151
3178
|
isSelected: !0,
|
|
3152
3179
|
isInRange: !1,
|
|
3153
3180
|
isRangeStart: !1,
|
|
@@ -3157,57 +3184,57 @@ e.getDate() === y.getDate(), ja = (e) => {
|
|
|
3157
3184
|
}
|
|
3158
3185
|
};
|
|
3159
3186
|
} else if (g === "week") {
|
|
3160
|
-
const
|
|
3161
|
-
if (!
|
|
3187
|
+
const R = /^(\d{4})-W(\d{2})$/, B = e.match(R);
|
|
3188
|
+
if (!B)
|
|
3162
3189
|
return { weekString: null, weekStartDate: null, weekEndDate: null, weekNumber: null, weekYear: null, isoString: null, isoStringLocal: null };
|
|
3163
|
-
const
|
|
3164
|
-
|
|
3165
|
-
const H = new Date(
|
|
3166
|
-
return H.setDate(
|
|
3190
|
+
const C = parseInt(B[1], 10), I = parseInt(B[2], 10), X = (8 - (new Date(C, 0, 4).getDay() || 7)) % 7, _ = new Date(C, 0, 4 + X), w = new Date(_.getTime());
|
|
3191
|
+
w.setDate(_.getDate() + (I - 1) * 7), w.setHours(0, 0, 0, 0);
|
|
3192
|
+
const H = new Date(w.getTime());
|
|
3193
|
+
return H.setDate(w.getDate() + 6), H.setHours(23, 59, 59, 999), {
|
|
3167
3194
|
weekString: e,
|
|
3168
|
-
weekStartDate:
|
|
3195
|
+
weekStartDate: w,
|
|
3169
3196
|
weekEndDate: H,
|
|
3170
3197
|
weekNumber: I,
|
|
3171
|
-
weekYear:
|
|
3172
|
-
isoString: Fa(
|
|
3173
|
-
isoStringLocal: Na(
|
|
3198
|
+
weekYear: C,
|
|
3199
|
+
isoString: Fa(w, Q),
|
|
3200
|
+
isoStringLocal: Na(w)
|
|
3174
3201
|
};
|
|
3175
3202
|
} else if (g === "month") {
|
|
3176
|
-
const
|
|
3177
|
-
if (!
|
|
3203
|
+
const R = /^(\d{4})-(\d{2})$/, B = e.match(R);
|
|
3204
|
+
if (!B)
|
|
3178
3205
|
return { date: null, dateString: null, month: null, year: null, monthName: null, isoString: null, isoStringLocal: null };
|
|
3179
|
-
const
|
|
3206
|
+
const C = parseInt(B[1], 10), I = parseInt(B[2], 10) - 1, ae = new Date(C, I, 1);
|
|
3180
3207
|
ae.setHours(0, 0, 0, 0);
|
|
3181
3208
|
const le = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
3182
3209
|
return {
|
|
3183
3210
|
date: ae,
|
|
3184
|
-
dateString: `${
|
|
3211
|
+
dateString: `${C}-${za(I + 1)}-01`,
|
|
3185
3212
|
month: I,
|
|
3186
|
-
year:
|
|
3213
|
+
year: C,
|
|
3187
3214
|
monthName: le[I],
|
|
3188
3215
|
isoString: Fa(ae, Q),
|
|
3189
3216
|
isoStringLocal: Na(ae)
|
|
3190
3217
|
};
|
|
3191
3218
|
} else if (F && typeof e == "string" && e.startsWith("{"))
|
|
3192
3219
|
try {
|
|
3193
|
-
const
|
|
3194
|
-
if (
|
|
3195
|
-
const
|
|
3196
|
-
return
|
|
3197
|
-
startDate:
|
|
3198
|
-
endDate:
|
|
3220
|
+
const R = JSON.parse(e);
|
|
3221
|
+
if (R && (R.startDate || R.endDate)) {
|
|
3222
|
+
const B = R.startDate ? ja(R.startDate) : null, C = R.endDate ? ja(R.endDate) : null;
|
|
3223
|
+
return B && C ? (B.setHours(0, 0, 0, 0), C.setHours(0, 0, 0, 0), {
|
|
3224
|
+
startDate: B,
|
|
3225
|
+
endDate: C,
|
|
3199
3226
|
isRange: !0,
|
|
3200
3227
|
isoString: {
|
|
3201
|
-
start: Fa(
|
|
3202
|
-
end: Fa(
|
|
3228
|
+
start: Fa(B, Q),
|
|
3229
|
+
end: Fa(C, Q)
|
|
3203
3230
|
},
|
|
3204
3231
|
isoStringLocal: {
|
|
3205
|
-
start: Na(
|
|
3206
|
-
end: Na(
|
|
3232
|
+
start: Na(B),
|
|
3233
|
+
end: Na(C)
|
|
3207
3234
|
}
|
|
3208
3235
|
}) : {
|
|
3209
|
-
startDate:
|
|
3210
|
-
endDate:
|
|
3236
|
+
startDate: B,
|
|
3237
|
+
endDate: C,
|
|
3211
3238
|
isRange: !0,
|
|
3212
3239
|
isoString: null,
|
|
3213
3240
|
isoStringLocal: null
|
|
@@ -3216,15 +3243,15 @@ e.getDate() === y.getDate(), ja = (e) => {
|
|
|
3216
3243
|
} catch {
|
|
3217
3244
|
return { startDate: null, endDate: null, isRange: !0, isoString: null, isoStringLocal: null };
|
|
3218
3245
|
}
|
|
3219
|
-
} catch (
|
|
3220
|
-
console.error("Error building complete data from inputText:",
|
|
3246
|
+
} catch (R) {
|
|
3247
|
+
console.error("Error building complete data from inputText:", R);
|
|
3221
3248
|
}
|
|
3222
3249
|
return null;
|
|
3223
3250
|
};
|
|
3224
|
-
const
|
|
3251
|
+
const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
3225
3252
|
key: 0,
|
|
3226
3253
|
class: "component__label--required"
|
|
3227
|
-
},
|
|
3254
|
+
}, Sn = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "min", "max", "step", "tabindex"], xn = /* @__PURE__ */ Object.assign({
|
|
3228
3255
|
name: "NbDatePicker",
|
|
3229
3256
|
inheritAttrs: !1
|
|
3230
3257
|
}, {
|
|
@@ -3238,8 +3265,8 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3238
3265
|
type: String,
|
|
3239
3266
|
default: "b",
|
|
3240
3267
|
validator: (e = "b") => {
|
|
3241
|
-
const
|
|
3242
|
-
return ["b", "ib"].includes(
|
|
3268
|
+
const b = e.toLowerCase();
|
|
3269
|
+
return ["b", "ib"].includes(b);
|
|
3243
3270
|
}
|
|
3244
3271
|
},
|
|
3245
3272
|
tabIndex: {
|
|
@@ -3258,6 +3285,10 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3258
3285
|
type: Object,
|
|
3259
3286
|
default: () => ({})
|
|
3260
3287
|
},
|
|
3288
|
+
title: {
|
|
3289
|
+
type: String,
|
|
3290
|
+
default: ""
|
|
3291
|
+
},
|
|
3261
3292
|
caretColor: {
|
|
3262
3293
|
type: String,
|
|
3263
3294
|
default: "",
|
|
@@ -3630,7 +3661,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3630
3661
|
calendarEvents: {
|
|
3631
3662
|
type: Array,
|
|
3632
3663
|
default: () => [],
|
|
3633
|
-
validator: (e) => Array.isArray(e) && e.every((
|
|
3664
|
+
validator: (e) => Array.isArray(e) && e.every((b) => b && b.date && (b.color || !0))
|
|
3634
3665
|
},
|
|
3635
3666
|
// Calendar props - Text
|
|
3636
3667
|
calendarSelectMonthText: {
|
|
@@ -3874,98 +3905,98 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3874
3905
|
"date-selected",
|
|
3875
3906
|
"month-changed"
|
|
3876
3907
|
],
|
|
3877
|
-
setup(e, { emit:
|
|
3908
|
+
setup(e, { emit: b }) {
|
|
3878
3909
|
Wa((t) => ({
|
|
3879
|
-
|
|
3880
|
-
"
|
|
3881
|
-
"
|
|
3882
|
-
"
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
"
|
|
3886
|
-
|
|
3887
|
-
"
|
|
3888
|
-
"
|
|
3889
|
-
"
|
|
3890
|
-
|
|
3891
|
-
"
|
|
3892
|
-
"
|
|
3893
|
-
|
|
3894
|
-
"
|
|
3895
|
-
"
|
|
3896
|
-
"
|
|
3897
|
-
|
|
3898
|
-
"
|
|
3899
|
-
|
|
3900
|
-
"
|
|
3901
|
-
"
|
|
3910
|
+
"0bb6b508": oa.value,
|
|
3911
|
+
"36948bf0": it.value,
|
|
3912
|
+
"269f4739": u(et),
|
|
3913
|
+
"3fe3bbd8": ia.value,
|
|
3914
|
+
"219f71ac": Ut.value,
|
|
3915
|
+
"7b394c42": sa.value,
|
|
3916
|
+
"06c30a72": u(te),
|
|
3917
|
+
f9ca685a: u(Se),
|
|
3918
|
+
"6aa952ef": u(V),
|
|
3919
|
+
"9f76ceb6": Et.value,
|
|
3920
|
+
"603e8f29": u(D),
|
|
3921
|
+
"501da35f": x.value,
|
|
3922
|
+
"061b04b9": xe.value,
|
|
3923
|
+
"32d8fac5": u(gt),
|
|
3924
|
+
"72f693e1": u(Ct),
|
|
3925
|
+
"532e1577": u(Ae),
|
|
3926
|
+
"3adf0e82": u(ge),
|
|
3927
|
+
"3e8de4a0": Ze.value,
|
|
3928
|
+
e91eac42: ra.value,
|
|
3929
|
+
"36dfe29e": ua.value,
|
|
3930
|
+
67760647: st.value,
|
|
3931
|
+
"358809a1": Pt.value,
|
|
3932
|
+
"8ac637ce": t.styleButtonColor
|
|
3902
3933
|
}));
|
|
3903
3934
|
const g = Bl(
|
|
3904
3935
|
() => import("@vlalg-nimbus/nb-calendar").then((t) => t.Calendar ? t.Calendar : t.default && t.default.Calendar ? t.default.Calendar : t.default)
|
|
3905
3936
|
);
|
|
3906
3937
|
Aa(() => {
|
|
3907
|
-
|
|
3938
|
+
L.value = S.value;
|
|
3908
3939
|
}), Ya(() => {
|
|
3909
3940
|
Zt();
|
|
3910
3941
|
});
|
|
3911
|
-
const h =
|
|
3942
|
+
const h = b, F = e, {
|
|
3912
3943
|
nbId: Q,
|
|
3913
|
-
display:
|
|
3914
|
-
hasTabIndexEnter:
|
|
3915
|
-
ariaLabel:
|
|
3916
|
-
ariaAttrs:
|
|
3944
|
+
display: fe,
|
|
3945
|
+
hasTabIndexEnter: R,
|
|
3946
|
+
ariaLabel: B,
|
|
3947
|
+
ariaAttrs: C,
|
|
3917
3948
|
caretColor: I,
|
|
3918
3949
|
selectionBgColor: ae,
|
|
3919
3950
|
selectionTextColor: le,
|
|
3920
3951
|
hasBorderRadius: X,
|
|
3921
3952
|
borderRadius: _,
|
|
3922
|
-
disabled:
|
|
3953
|
+
disabled: w,
|
|
3923
3954
|
fontFamily: H,
|
|
3924
|
-
fontSize:
|
|
3955
|
+
fontSize: se,
|
|
3925
3956
|
fontWeight: q,
|
|
3926
3957
|
fontFamilyMsg: Fe,
|
|
3927
|
-
fontSizeMsg:
|
|
3958
|
+
fontSizeMsg: he,
|
|
3928
3959
|
fontWeightMsg: ee,
|
|
3929
|
-
textMessageColor:
|
|
3930
|
-
inputWidth:
|
|
3931
|
-
inputStyle:
|
|
3932
|
-
activeTextStyle:
|
|
3933
|
-
sizeMediaQuery:
|
|
3960
|
+
textMessageColor: Te,
|
|
3961
|
+
inputWidth: ve,
|
|
3962
|
+
inputStyle: we,
|
|
3963
|
+
activeTextStyle: ke,
|
|
3964
|
+
sizeMediaQuery: Be,
|
|
3934
3965
|
inputReadonly: j,
|
|
3935
3966
|
blockPaste: Qe,
|
|
3936
3967
|
inputType: v,
|
|
3937
|
-
hasTrim:
|
|
3968
|
+
hasTrim: de,
|
|
3938
3969
|
inputUppercase: Oe,
|
|
3939
3970
|
inputName: Xe,
|
|
3940
3971
|
inputText: S,
|
|
3941
3972
|
min: Ue,
|
|
3942
|
-
max:
|
|
3973
|
+
max: pe,
|
|
3943
3974
|
step: vt,
|
|
3944
3975
|
hasSeconds: ht,
|
|
3945
3976
|
locale: ot,
|
|
3946
3977
|
theme: ze,
|
|
3947
|
-
allowRange:
|
|
3978
|
+
allowRange: Le,
|
|
3948
3979
|
calendarZIndex: Lt,
|
|
3949
3980
|
calendarWidth: pt,
|
|
3950
3981
|
blockClicksWithoutEvents: St,
|
|
3951
3982
|
tabindex: xt,
|
|
3952
3983
|
lightBgColor: Ct,
|
|
3953
|
-
lightBgColorFocus:
|
|
3984
|
+
lightBgColorFocus: Ae,
|
|
3954
3985
|
lightDisabledBgColor: gt,
|
|
3955
3986
|
lightTextColor: et,
|
|
3956
|
-
darkBgColor:
|
|
3957
|
-
darkBgColorFocus:
|
|
3958
|
-
darkDisabledBgColor:
|
|
3987
|
+
darkBgColor: V,
|
|
3988
|
+
darkBgColorFocus: D,
|
|
3989
|
+
darkDisabledBgColor: Se,
|
|
3959
3990
|
darkTextColor: te,
|
|
3960
|
-
textAlign:
|
|
3991
|
+
textAlign: ge,
|
|
3961
3992
|
showMsg: tt,
|
|
3962
3993
|
hasMsg: Ge,
|
|
3963
3994
|
showLabel: Ie,
|
|
3964
|
-
label:
|
|
3965
|
-
labelBreakOnActive:
|
|
3966
|
-
labelBackground:
|
|
3967
|
-
labelPadding:
|
|
3968
|
-
labelBorderRadius:
|
|
3995
|
+
label: y,
|
|
3996
|
+
labelBreakOnActive: k,
|
|
3997
|
+
labelBackground: ce,
|
|
3998
|
+
labelPadding: be,
|
|
3999
|
+
labelBorderRadius: ye,
|
|
3969
4000
|
labelLeft: _e,
|
|
3970
4001
|
inputLabelMarginActive: We,
|
|
3971
4002
|
labelActiveTop: Ee,
|
|
@@ -3981,7 +4012,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3981
4012
|
darkTextColorLabel: Nt,
|
|
3982
4013
|
darkTextColorLabelActive: rt,
|
|
3983
4014
|
required: Tt
|
|
3984
|
-
} = Ea(F),
|
|
4015
|
+
} = Ea(F), L = oe(""), E = oe(""), Z = oe(""), Y = oe(""), De = oe(!1), M = oe(!1), Wt = a(() => !pt.value || pt.value < 280 ? 280 : parseInt(pt.value, 10)), Re = a(() => {
|
|
3985
4016
|
if (ht.value !== null)
|
|
3986
4017
|
return ht.value;
|
|
3987
4018
|
if (v.value === "time" || v.value === "datetime-local") {
|
|
@@ -3991,16 +4022,16 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3991
4022
|
let n = l;
|
|
3992
4023
|
return v.value === "datetime-local" && (n = l.split("T")[1] || "", n = n.split(/[Z+-]/)[0] || ""), n.split(":").length >= 3;
|
|
3993
4024
|
};
|
|
3994
|
-
if (t(
|
|
4025
|
+
if (t(L.value) || t(S.value))
|
|
3995
4026
|
return !0;
|
|
3996
4027
|
}
|
|
3997
4028
|
return !1;
|
|
3998
4029
|
}), At = a(() => {
|
|
3999
|
-
if (!
|
|
4030
|
+
if (!L.value)
|
|
4000
4031
|
return null;
|
|
4001
|
-
if (
|
|
4032
|
+
if (Le.value && typeof L.value == "string" && L.value.startsWith("{"))
|
|
4002
4033
|
try {
|
|
4003
|
-
const t = JSON.parse(
|
|
4034
|
+
const t = JSON.parse(L.value);
|
|
4004
4035
|
if (t && (t.startDate || t.endDate)) {
|
|
4005
4036
|
const l = (n) => {
|
|
4006
4037
|
if (!n)
|
|
@@ -4018,28 +4049,28 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4018
4049
|
}
|
|
4019
4050
|
} catch {
|
|
4020
4051
|
}
|
|
4021
|
-
if (v.value === "date" && typeof
|
|
4022
|
-
const [t, l, n] =
|
|
4052
|
+
if (v.value === "date" && typeof L.value == "string" && /^\d{4}-\d{2}-\d{2}$/.test(L.value)) {
|
|
4053
|
+
const [t, l, n] = L.value.split("-").map(Number);
|
|
4023
4054
|
return new Date(t, l - 1, n);
|
|
4024
4055
|
}
|
|
4025
|
-
return
|
|
4056
|
+
return L.value;
|
|
4026
4057
|
}), ue = (t, l, n) => {
|
|
4027
4058
|
if (!t)
|
|
4028
4059
|
return "";
|
|
4029
4060
|
const r = n || ot.value;
|
|
4030
4061
|
if (l === "date") {
|
|
4031
|
-
if (
|
|
4062
|
+
if (Le.value && typeof t == "string" && t.startsWith("{"))
|
|
4032
4063
|
try {
|
|
4033
4064
|
const s = JSON.parse(t);
|
|
4034
4065
|
if (s && (s.startDate || s.endDate)) {
|
|
4035
|
-
const d = (
|
|
4036
|
-
if (!
|
|
4066
|
+
const d = (T) => {
|
|
4067
|
+
if (!T)
|
|
4037
4068
|
return "";
|
|
4038
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
4039
|
-
const [
|
|
4040
|
-
return r === "pt-BR" ? `${J}/${W}/${
|
|
4069
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(T)) {
|
|
4070
|
+
const [$, W, J] = T.split("-");
|
|
4071
|
+
return r === "pt-BR" ? `${J}/${W}/${$}` : `${W}/${J}/${$}`;
|
|
4041
4072
|
}
|
|
4042
|
-
return
|
|
4073
|
+
return T;
|
|
4043
4074
|
}, f = d(s.startDate), p = d(s.endDate);
|
|
4044
4075
|
if (f && p)
|
|
4045
4076
|
return `${f} - ${p}`;
|
|
@@ -4058,8 +4089,8 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4058
4089
|
if (/^(\d{4}-\d{2}-\d{2})(T\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})?)?$/.test(t) && t.includes("T")) {
|
|
4059
4090
|
const d = new Date(t);
|
|
4060
4091
|
if (!isNaN(d.getTime())) {
|
|
4061
|
-
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"),
|
|
4062
|
-
return r === "pt-BR" ? `${
|
|
4092
|
+
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"), T = String(d.getDate()).padStart(2, "0");
|
|
4093
|
+
return r === "pt-BR" ? `${T}/${p}/${f}` : `${p}/${T}/${f}`;
|
|
4063
4094
|
}
|
|
4064
4095
|
}
|
|
4065
4096
|
} else if (t instanceof Date && !isNaN(t.getTime())) {
|
|
@@ -4070,14 +4101,14 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4070
4101
|
} else if (l === "datetime-local") {
|
|
4071
4102
|
if (typeof t == "string") {
|
|
4072
4103
|
if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/.test(t)) {
|
|
4073
|
-
const [d, f] = t.split("T"), [p,
|
|
4074
|
-
return r === "pt-BR" ? `${
|
|
4104
|
+
const [d, f] = t.split("T"), [p, T, $] = d.split("-");
|
|
4105
|
+
return r === "pt-BR" ? `${$}/${T}/${p} ${f}` : `${T}/${$}/${p} ${f}`;
|
|
4075
4106
|
}
|
|
4076
4107
|
if (/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)(?:Z|[+-]\d{2}:\d{2})?$/.test(t)) {
|
|
4077
4108
|
const d = new Date(t);
|
|
4078
4109
|
if (!isNaN(d.getTime())) {
|
|
4079
|
-
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"),
|
|
4080
|
-
return r === "pt-BR" ? `${
|
|
4110
|
+
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"), T = String(d.getDate()).padStart(2, "0"), $ = String(d.getHours()).padStart(2, "0"), W = String(d.getMinutes()).padStart(2, "0"), J = String(d.getSeconds()).padStart(2, "0");
|
|
4111
|
+
return r === "pt-BR" ? `${T}/${p}/${f} ${$}:${W}:${J}` : `${p}/${T}/${f} ${$}:${W}:${J}`;
|
|
4081
4112
|
}
|
|
4082
4113
|
}
|
|
4083
4114
|
}
|
|
@@ -4102,12 +4133,12 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4102
4133
|
return "";
|
|
4103
4134
|
const r = t.trim(), s = n || ot.value;
|
|
4104
4135
|
if (l === "date") {
|
|
4105
|
-
if (
|
|
4106
|
-
const d = r.split(/\s*-\s*/).map((
|
|
4107
|
-
if (
|
|
4136
|
+
if (Le.value && r.includes("-")) {
|
|
4137
|
+
const d = r.split(/\s*-\s*/).map(($) => $.trim()), f = ($) => {
|
|
4138
|
+
if (!$)
|
|
4108
4139
|
return null;
|
|
4109
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(
|
|
4110
|
-
const W =
|
|
4140
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test($)) {
|
|
4141
|
+
const W = $.split("/");
|
|
4111
4142
|
if (s === "pt-BR") {
|
|
4112
4143
|
const [J, Me, ft] = W, Pe = J.padStart(2, "0"), Je = Me.padStart(2, "0");
|
|
4113
4144
|
return `${ft}-${Je}-${Pe}`;
|
|
@@ -4115,20 +4146,20 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4115
4146
|
const [J, Me, ft] = W, Pe = Me.padStart(2, "0"), Je = J.padStart(2, "0");
|
|
4116
4147
|
return `${ft}-${Je}-${Pe}`;
|
|
4117
4148
|
}
|
|
4118
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
4119
|
-
const W =
|
|
4149
|
+
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test($)) {
|
|
4150
|
+
const W = $.split("-"), [J, Me, ft] = W, Pe = ft.padStart(2, "0"), Je = Me.padStart(2, "0");
|
|
4120
4151
|
return `${J}-${Je}-${Pe}`;
|
|
4121
4152
|
}
|
|
4122
4153
|
return null;
|
|
4123
4154
|
};
|
|
4124
|
-
let p = f(d[0]),
|
|
4125
|
-
if (p &&
|
|
4126
|
-
const
|
|
4127
|
-
if (new Date(
|
|
4155
|
+
let p = f(d[0]), T = d[1] ? f(d[1]) : null;
|
|
4156
|
+
if (p && T) {
|
|
4157
|
+
const $ = new Date(p);
|
|
4158
|
+
if (new Date(T) < $) {
|
|
4128
4159
|
const J = p;
|
|
4129
|
-
p =
|
|
4160
|
+
p = T, T = J;
|
|
4130
4161
|
}
|
|
4131
|
-
return JSON.stringify({ startDate: p, endDate:
|
|
4162
|
+
return JSON.stringify({ startDate: p, endDate: T });
|
|
4132
4163
|
} else if (p)
|
|
4133
4164
|
return JSON.stringify({ startDate: p, endDate: null });
|
|
4134
4165
|
return "";
|
|
@@ -4136,30 +4167,30 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4136
4167
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(r)) {
|
|
4137
4168
|
const d = r.split("/");
|
|
4138
4169
|
if (s === "pt-BR") {
|
|
4139
|
-
const [f, p,
|
|
4140
|
-
return `${
|
|
4170
|
+
const [f, p, T] = d, $ = f.padStart(2, "0"), W = p.padStart(2, "0");
|
|
4171
|
+
return `${T}-${W}-${$}`;
|
|
4141
4172
|
} else {
|
|
4142
|
-
const [f, p,
|
|
4143
|
-
return `${
|
|
4173
|
+
const [f, p, T] = d, $ = p.padStart(2, "0"), W = f.padStart(2, "0");
|
|
4174
|
+
return `${T}-${W}-${$}`;
|
|
4144
4175
|
}
|
|
4145
4176
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)) {
|
|
4146
|
-
const d = r.split("-"), [f, p,
|
|
4147
|
-
return `${f}-${W}-${
|
|
4177
|
+
const d = r.split("-"), [f, p, T] = d, $ = T.padStart(2, "0"), W = p.padStart(2, "0");
|
|
4178
|
+
return `${f}-${W}-${$}`;
|
|
4148
4179
|
}
|
|
4149
4180
|
return "";
|
|
4150
4181
|
} else if (l === "datetime-local") {
|
|
4151
4182
|
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(r)) {
|
|
4152
4183
|
const [d, f] = r.split(" "), p = d.split("/");
|
|
4153
4184
|
if (s === "pt-BR") {
|
|
4154
|
-
const [
|
|
4185
|
+
const [T, $, W] = p, J = T.padStart(2, "0"), Me = $.padStart(2, "0"), Pe = f.split(":").map((Je) => Je.padStart(2, "0")).join(":");
|
|
4155
4186
|
return `${W}-${Me}-${J}T${Pe}`;
|
|
4156
4187
|
} else {
|
|
4157
|
-
const [
|
|
4188
|
+
const [T, $, W] = p, J = $.padStart(2, "0"), Me = T.padStart(2, "0"), Pe = f.split(":").map((Je) => Je.padStart(2, "0")).join(":");
|
|
4158
4189
|
return `${W}-${Me}-${J}T${Pe}`;
|
|
4159
4190
|
}
|
|
4160
4191
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(r)) {
|
|
4161
|
-
const [d, f] = r.split("T"), p = d.split("-"), [
|
|
4162
|
-
return `${
|
|
4192
|
+
const [d, f] = r.split("T"), p = d.split("-"), [T, $, W] = p, J = W.padStart(2, "0"), Me = $.padStart(2, "0"), Pe = f.split(":").map((Je) => Je.padStart(2, "0")).join(":");
|
|
4193
|
+
return `${T}-${Me}-${J}T${Pe}`;
|
|
4163
4194
|
}
|
|
4164
4195
|
return "";
|
|
4165
4196
|
} else if (l === "month") {
|
|
@@ -4182,13 +4213,13 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4182
4213
|
}
|
|
4183
4214
|
return r;
|
|
4184
4215
|
}, ne = oe(!1), $t = oe({ top: 0, left: 0 }), P = oe(null), U = oe(null), Yt = oe(!0), z = a(() => Yt.value === !0), G = a(() => {
|
|
4185
|
-
const t =
|
|
4216
|
+
const t = w.value ? "component-disabled" : "", l = fe.value !== "b" ? "inline-block" : "block", n = I.value ? I.value : "", r = ae.value ? ae.value : "", s = le.value ? le.value : "", d = X.value ? X.value : !1, f = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, p = H.value ? H.value : "'Lato', sans-serif", T = se.value ? se.value : "1.4em", $ = q.value !== 0 && !q.value || q.value < 0 ? 100 : q.value, W = Fe.value ? Fe.value : "'Lato', sans-serif", J = he.value ? he.value : "1em", Me = ee.value !== 0 && !ee.value || ee.value < 0 ? 100 : ee.value, ft = Te.value ? Te.value : "#f15574", Pe = ve.value ? ve.value : 200, Je = ke.value ? ke.value : "normal", Ua = "sm", Ga = j.value ? j.value : !1, Ka = v.value ? v.value : "date", Za = Oe.value ? Oe.value : !1, Ja = ze.value ? ze.value : "normal", Qa = ge.value ? ge.value : "left", Xa = we.value ? we.value : "background", el = Ie.value ? Ie.value : !1, tl = _e.value !== 0 && !_e.value || _e.value < 0 ? 5 : _e.value, al = ce.value ? ce.value : "transparent", ll = We.value !== 0 && !We.value || We.value < 0 ? 15 : We.value, nl = be.value ? be.value : "1px 5px", ol = ye.value !== 0 && !ye.value || ye.value < 0 ? 0 : ye.value, rl = Ee.value === null || Ee.value === void 0 ? -13 : Ee.value, ul = He.value === null || He.value === void 0 ? 5 : He.value, il = qe.value === null || qe.value === void 0 ? 0 : qe.value, sl = Ke.value === null || Ke.value === void 0 ? 0 : Ke.value, dl = at.value ? at.value : "'Lato', sans-serif", cl = yt.value ? yt.value : "1em", fl = Mt.value ? Mt.value : "0.8em", vl = Vt.value ? Vt.value : 400, Sl = bt.value ? bt.value : "#ffffff", xl = Nt.value ? Nt.value : "#000000", Cl = lt.value ? lt.value : "#ffffff", Vl = rt.value ? rt.value : "#000000";
|
|
4186
4217
|
return {
|
|
4187
4218
|
disabled: t,
|
|
4188
4219
|
display: l,
|
|
4189
4220
|
font: p,
|
|
4190
|
-
fontSize:
|
|
4191
|
-
fontWeight:
|
|
4221
|
+
fontSize: T,
|
|
4222
|
+
fontWeight: $,
|
|
4192
4223
|
fontFamilyMsg: W,
|
|
4193
4224
|
fontSizeMsg: J,
|
|
4194
4225
|
fontWeightMsg: Me,
|
|
@@ -4227,7 +4258,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4227
4258
|
darkTextColorLabelActive: Vl
|
|
4228
4259
|
};
|
|
4229
4260
|
}), kt = a(() => G.value.disabled), wt = a(() => {
|
|
4230
|
-
const t = G.value, l =
|
|
4261
|
+
const t = G.value, l = A.value;
|
|
4231
4262
|
return {
|
|
4232
4263
|
display: t.display,
|
|
4233
4264
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
@@ -4240,7 +4271,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4240
4271
|
const t = G.value;
|
|
4241
4272
|
return t.fontSize ? t.fontSize : "1.4em";
|
|
4242
4273
|
}), N = a(() => {
|
|
4243
|
-
const t = G.value, l =
|
|
4274
|
+
const t = G.value, l = A.value;
|
|
4244
4275
|
return {
|
|
4245
4276
|
fontWeight: t.fontWeight,
|
|
4246
4277
|
marginTop: l && Ie.value ? `${t.inputLabelMarginActive}px` : "0"
|
|
@@ -4263,7 +4294,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4263
4294
|
width: `${t.inputWidth}px`
|
|
4264
4295
|
};
|
|
4265
4296
|
}), da = a(() => {
|
|
4266
|
-
switch (
|
|
4297
|
+
switch (we.value) {
|
|
4267
4298
|
case "line":
|
|
4268
4299
|
return "component__input--line";
|
|
4269
4300
|
case "border":
|
|
@@ -4287,27 +4318,27 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4287
4318
|
default:
|
|
4288
4319
|
return "component__theme--light";
|
|
4289
4320
|
}
|
|
4290
|
-
}), Kt = a(() => G.value.inputReadonly ? "component__input--read-only" : ""), pa = a(() => G.value.inputUppercase ? "component__input--uppercase" : ""), zt = a(() => Xe.value ? Xe.value : `${Q.value}-name-label`), c = a(() => ""),
|
|
4291
|
-
a(() =>
|
|
4321
|
+
}), Kt = a(() => G.value.inputReadonly ? "component__input--read-only" : ""), pa = a(() => G.value.inputUppercase ? "component__input--uppercase" : ""), zt = a(() => Xe.value ? Xe.value : `${Q.value}-name-label`), c = a(() => ""), A = a(() => De.value || E.value && E.value.trim().length > 0), ie = a(() => !E.value || E.value.trim().length === 0 ? "component__input--empty" : "");
|
|
4322
|
+
a(() => De.value ? "component__input--active" : "component__input--no-active");
|
|
4292
4323
|
const Ze = a(() => "6px 10px"), Ot = a(() => !!(tt.value && Ge.value)), i = a(() => {
|
|
4293
4324
|
const t = {};
|
|
4294
|
-
|
|
4325
|
+
C.value && Object.keys(C.value).forEach((r) => t[`aria-${r}`] = C.value[r]);
|
|
4295
4326
|
const l = {
|
|
4296
|
-
"aria-label":
|
|
4297
|
-
"aria-disabled":
|
|
4327
|
+
"aria-label": B.value,
|
|
4328
|
+
"aria-disabled": w.value,
|
|
4298
4329
|
...t
|
|
4299
4330
|
};
|
|
4300
4331
|
return Object.fromEntries(
|
|
4301
4332
|
Object.entries(l).filter(([n, r]) => r != null)
|
|
4302
4333
|
);
|
|
4303
|
-
}),
|
|
4304
|
-
const t = ze.value === "dark" ?
|
|
4334
|
+
}), x = a(() => {
|
|
4335
|
+
const t = ze.value === "dark" ? V.value : Ct.value, l = ze.value === "dark" ? te.value : et.value;
|
|
4305
4336
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
4306
|
-
}),
|
|
4307
|
-
const t = ze.value === "dark" ?
|
|
4337
|
+
}), xe = a(() => {
|
|
4338
|
+
const t = ze.value === "dark" ? D.value : Ae.value, l = ze.value === "dark" ? te.value : et.value;
|
|
4308
4339
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
4309
4340
|
}), je = a(() => {
|
|
4310
|
-
const t = G.value, l =
|
|
4341
|
+
const t = G.value, l = A.value, n = l ? t.lightTextColorLabelActive : t.lightTextColorLabel, r = l ? t.darkTextColorLabelActive : t.darkTextColorLabel;
|
|
4311
4342
|
return {
|
|
4312
4343
|
fontFamily: t.fontFamilyLabel,
|
|
4313
4344
|
fontSize: l ? t.fontSizeLabelActive : t.fontSizeLabel,
|
|
@@ -4324,12 +4355,12 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4324
4355
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
4325
4356
|
...l ? {
|
|
4326
4357
|
width: "fit-content",
|
|
4327
|
-
whiteSpace:
|
|
4328
|
-
wordWrap:
|
|
4329
|
-
overflowWrap:
|
|
4358
|
+
whiteSpace: k.value ? "nowrap" : "normal",
|
|
4359
|
+
wordWrap: k.value ? "normal" : "break-word",
|
|
4360
|
+
overflowWrap: k.value ? "normal" : "break-word",
|
|
4330
4361
|
maxWidth: "100%",
|
|
4331
|
-
textOverflow:
|
|
4332
|
-
overflow:
|
|
4362
|
+
textOverflow: k.value ? "ellipsis" : "clip",
|
|
4363
|
+
overflow: k.value ? "hidden" : "visible"
|
|
4333
4364
|
} : {}
|
|
4334
4365
|
};
|
|
4335
4366
|
});
|
|
@@ -4338,15 +4369,15 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4338
4369
|
return t.theme === "dark" ? t.darkTextColorLabelActive : t.lightTextColorLabelActive;
|
|
4339
4370
|
});
|
|
4340
4371
|
const Zt = () => {
|
|
4341
|
-
|
|
4342
|
-
}, ga = () => {
|
|
4343
|
-
h("clicked");
|
|
4372
|
+
L.value = S.value, Y.value = v.value;
|
|
4373
|
+
}, ga = (t) => {
|
|
4374
|
+
h("clicked", t);
|
|
4344
4375
|
}, ya = (t) => {
|
|
4345
|
-
t.stopPropagation(), !(
|
|
4376
|
+
t.stopPropagation(), !(w.value || G.value.inputReadonly) && P.value && (P.value.focus(), z.value && (ne.value = !1, requestAnimationFrame(() => {
|
|
4346
4377
|
Dt(), ne.value = !0;
|
|
4347
4378
|
})));
|
|
4348
4379
|
}, ba = () => {
|
|
4349
|
-
|
|
4380
|
+
w.value || G.value.inputReadonly || !R.value || h("entered", L.value);
|
|
4350
4381
|
}, ma = async (t) => {
|
|
4351
4382
|
var n;
|
|
4352
4383
|
const l = ((n = t.clipboardData) == null ? void 0 : n.getData("text")) || "";
|
|
@@ -4365,7 +4396,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4365
4396
|
left: $t.value.left,
|
|
4366
4397
|
zIndex: Lt.value
|
|
4367
4398
|
})), Sa = () => {
|
|
4368
|
-
|
|
4399
|
+
De.value = !0, h("focused"), z.value && (ne.value = !1, requestAnimationFrame(() => {
|
|
4369
4400
|
Dt(), ne.value = !0;
|
|
4370
4401
|
}));
|
|
4371
4402
|
}, xa = (t) => {
|
|
@@ -4382,7 +4413,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4382
4413
|
}
|
|
4383
4414
|
}
|
|
4384
4415
|
const n = (r = P.value) == null ? void 0 : r.closest(".component");
|
|
4385
|
-
n && n.contains(l) || P.value !== l && (
|
|
4416
|
+
n && n.contains(l) || P.value !== l && (De.value = !1, ne.value = !1, h("blurred"));
|
|
4386
4417
|
}, 200);
|
|
4387
4418
|
}, Ca = () => {
|
|
4388
4419
|
z.value && (ne.value, ne.value = !1, requestAnimationFrame(() => {
|
|
@@ -4470,7 +4501,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4470
4501
|
if (s.setHours(0, 0, 0, 0), l < s)
|
|
4471
4502
|
return !0;
|
|
4472
4503
|
}
|
|
4473
|
-
const r = Jt(
|
|
4504
|
+
const r = Jt(pe.value);
|
|
4474
4505
|
if (r) {
|
|
4475
4506
|
const s = new Date(r.getTime());
|
|
4476
4507
|
if (s.setHours(0, 0, 0, 0), l > s)
|
|
@@ -4484,7 +4515,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4484
4515
|
if (r < f)
|
|
4485
4516
|
return !0;
|
|
4486
4517
|
}
|
|
4487
|
-
const d = Qt(
|
|
4518
|
+
const d = Qt(pe.value);
|
|
4488
4519
|
if (d) {
|
|
4489
4520
|
const f = d.hour * 3600 + d.minute * 60 + (d.second || 0);
|
|
4490
4521
|
if (r > f)
|
|
@@ -4572,14 +4603,14 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4572
4603
|
h("valid", !1);
|
|
4573
4604
|
return;
|
|
4574
4605
|
}
|
|
4575
|
-
if (
|
|
4576
|
-
const n =
|
|
4606
|
+
if (L.value) {
|
|
4607
|
+
const n = L.value.split("T");
|
|
4577
4608
|
if (n.length === 2) {
|
|
4578
4609
|
const r = n[0], s = n[1], d = !Ht(r), f = s.split(":");
|
|
4579
4610
|
let p = !0;
|
|
4580
4611
|
if (f.length >= 2) {
|
|
4581
|
-
const
|
|
4582
|
-
p = !Xt(
|
|
4612
|
+
const T = parseInt(f[0], 10) || 0, $ = parseInt(f[1], 10) || 0, W = f[2] ? parseInt(f[2], 10) : 0;
|
|
4613
|
+
p = !Xt(T, $, W);
|
|
4583
4614
|
}
|
|
4584
4615
|
t = d && p;
|
|
4585
4616
|
}
|
|
@@ -4624,12 +4655,12 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4624
4655
|
return ea(Ue.value, v.value);
|
|
4625
4656
|
}), o = a(() => {
|
|
4626
4657
|
if (!z.value)
|
|
4627
|
-
return ea(
|
|
4628
|
-
}), m = a(() => !0),
|
|
4658
|
+
return ea(pe.value, v.value);
|
|
4659
|
+
}), m = a(() => !0), Ce = (t) => {
|
|
4629
4660
|
let l = "";
|
|
4630
4661
|
if (!t)
|
|
4631
4662
|
l = "";
|
|
4632
|
-
else if (
|
|
4663
|
+
else if (Le.value && typeof t == "object" && !(t instanceof Date)) {
|
|
4633
4664
|
if (t.startDate === null && t.endDate === null)
|
|
4634
4665
|
l = "";
|
|
4635
4666
|
else if (t.startDate || t.endDate) {
|
|
@@ -4643,40 +4674,40 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4643
4674
|
}
|
|
4644
4675
|
} else
|
|
4645
4676
|
v.value === "date" ? t instanceof Date ? l = dt(t) : typeof t == "string" && (l = t) : (v.value === "month" || v.value === "time" || v.value === "datetime-local" || v.value === "week") && (l = typeof t == "string" ? t : "");
|
|
4646
|
-
mt = !0,
|
|
4677
|
+
mt = !0, L.value = l;
|
|
4647
4678
|
const n = l ? ue(l, v.value) : "";
|
|
4648
4679
|
E.value = n, Z.value = n;
|
|
4649
4680
|
}, nt = () => {
|
|
4650
4681
|
if (!z.value) {
|
|
4651
|
-
|
|
4682
|
+
L.value = E.value;
|
|
4652
4683
|
return;
|
|
4653
4684
|
}
|
|
4654
|
-
|
|
4685
|
+
$e = !0;
|
|
4655
4686
|
const t = P.value ? {
|
|
4656
4687
|
start: P.value.selectionStart,
|
|
4657
4688
|
end: P.value.selectionEnd
|
|
4658
4689
|
} : null, l = E.value.trim();
|
|
4659
4690
|
if (!l || l.length === 0) {
|
|
4660
|
-
mt = !0,
|
|
4661
|
-
|
|
4691
|
+
mt = !0, L.value = "", E.value = "", Z.value = "", setTimeout(() => {
|
|
4692
|
+
$e = !1;
|
|
4662
4693
|
}, 50);
|
|
4663
4694
|
return;
|
|
4664
4695
|
}
|
|
4665
4696
|
if (v.value === "date") {
|
|
4666
|
-
const r =
|
|
4667
|
-
if (
|
|
4697
|
+
const r = Le.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}$/;
|
|
4698
|
+
if (Le.value) {
|
|
4668
4699
|
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/), l.length > 23 && !r.test(l)) {
|
|
4669
4700
|
E.value = Z.value, t && P.value && la(() => {
|
|
4670
4701
|
const s = Math.min(t.start, Z.value.length);
|
|
4671
4702
|
P.value.setSelectionRange(s, s);
|
|
4672
4703
|
}), setTimeout(() => {
|
|
4673
|
-
|
|
4704
|
+
$e = !1;
|
|
4674
4705
|
}, 50);
|
|
4675
4706
|
return;
|
|
4676
4707
|
}
|
|
4677
4708
|
if (!r.test(l) && l.length <= 23) {
|
|
4678
4709
|
setTimeout(() => {
|
|
4679
|
-
|
|
4710
|
+
$e = !1;
|
|
4680
4711
|
}, 50);
|
|
4681
4712
|
return;
|
|
4682
4713
|
}
|
|
@@ -4686,13 +4717,13 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4686
4717
|
const s = Math.min(t.start, Z.value.length);
|
|
4687
4718
|
P.value.setSelectionRange(s, s);
|
|
4688
4719
|
}), setTimeout(() => {
|
|
4689
|
-
|
|
4720
|
+
$e = !1;
|
|
4690
4721
|
}, 50);
|
|
4691
4722
|
return;
|
|
4692
4723
|
}
|
|
4693
4724
|
if (!r.test(l) && l.length <= 10) {
|
|
4694
4725
|
setTimeout(() => {
|
|
4695
|
-
|
|
4726
|
+
$e = !1;
|
|
4696
4727
|
}, 50);
|
|
4697
4728
|
return;
|
|
4698
4729
|
}
|
|
@@ -4700,13 +4731,13 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4700
4731
|
}
|
|
4701
4732
|
let n = null;
|
|
4702
4733
|
if (v.value === "date")
|
|
4703
|
-
if (
|
|
4734
|
+
if (Le.value)
|
|
4704
4735
|
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/))
|
|
4705
|
-
if (n = ut(l, v.value), n && n !==
|
|
4706
|
-
mt = !0,
|
|
4736
|
+
if (n = ut(l, v.value), n && n !== L.value)
|
|
4737
|
+
mt = !0, L.value = n, Z.value = l;
|
|
4707
4738
|
else {
|
|
4708
4739
|
setTimeout(() => {
|
|
4709
|
-
|
|
4740
|
+
$e = !1;
|
|
4710
4741
|
}, 50);
|
|
4711
4742
|
return;
|
|
4712
4743
|
}
|
|
@@ -4716,47 +4747,47 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4716
4747
|
const d = s[1], f = ut(d, v.value);
|
|
4717
4748
|
if (f) {
|
|
4718
4749
|
const p = JSON.stringify({ startDate: f, endDate: null });
|
|
4719
|
-
p !==
|
|
4750
|
+
p !== L.value && (mt = !0, L.value = p, Z.value = l);
|
|
4720
4751
|
} else {
|
|
4721
4752
|
Z.value = l, setTimeout(() => {
|
|
4722
|
-
|
|
4753
|
+
$e = !1;
|
|
4723
4754
|
}, 50);
|
|
4724
4755
|
return;
|
|
4725
4756
|
}
|
|
4726
4757
|
} else {
|
|
4727
4758
|
Z.value = l, setTimeout(() => {
|
|
4728
|
-
|
|
4759
|
+
$e = !1;
|
|
4729
4760
|
}, 50);
|
|
4730
4761
|
return;
|
|
4731
4762
|
}
|
|
4732
4763
|
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
4733
4764
|
if (n = ut(l, v.value), n) {
|
|
4734
4765
|
const d = JSON.stringify({ startDate: n, endDate: null });
|
|
4735
|
-
d !==
|
|
4766
|
+
d !== L.value && (mt = !0, L.value = d, Z.value = l);
|
|
4736
4767
|
} else {
|
|
4737
4768
|
Z.value = l, setTimeout(() => {
|
|
4738
|
-
|
|
4769
|
+
$e = !1;
|
|
4739
4770
|
}, 50);
|
|
4740
4771
|
return;
|
|
4741
4772
|
}
|
|
4742
4773
|
else {
|
|
4743
4774
|
Z.value = l, setTimeout(() => {
|
|
4744
|
-
|
|
4775
|
+
$e = !1;
|
|
4745
4776
|
}, 50);
|
|
4746
4777
|
return;
|
|
4747
4778
|
}
|
|
4748
4779
|
else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
4749
|
-
n = ut(l, v.value), n && n !==
|
|
4780
|
+
n = ut(l, v.value), n && n !== L.value && (mt = !0, L.value = n, Z.value = l);
|
|
4750
4781
|
else {
|
|
4751
4782
|
setTimeout(() => {
|
|
4752
|
-
|
|
4783
|
+
$e = !1;
|
|
4753
4784
|
}, 50);
|
|
4754
4785
|
return;
|
|
4755
4786
|
}
|
|
4756
4787
|
else
|
|
4757
|
-
n = ut(l, v.value), n && n !==
|
|
4788
|
+
n = ut(l, v.value), n && n !== L.value && (mt = !0, L.value = n, Z.value = l);
|
|
4758
4789
|
setTimeout(() => {
|
|
4759
|
-
|
|
4790
|
+
$e = !1;
|
|
4760
4791
|
}, 50);
|
|
4761
4792
|
}, Ba = (t) => {
|
|
4762
4793
|
h("changed-complete", t), h("current-value-complete", t);
|
|
@@ -4784,7 +4815,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4784
4815
|
if (!document.body.contains(l))
|
|
4785
4816
|
return;
|
|
4786
4817
|
const d = P.value && (l === P.value || P.value.contains(l)), f = n && (l === n || n.contains(l));
|
|
4787
|
-
!d && !f && (ne.value = !1, (!E.value || E.value.trim().length === 0) && (
|
|
4818
|
+
!d && !f && (ne.value = !1, (!E.value || E.value.trim().length === 0) && (De.value = !1));
|
|
4788
4819
|
}, 50);
|
|
4789
4820
|
}, wa = () => {
|
|
4790
4821
|
ne.value && z.value && Dt();
|
|
@@ -4832,14 +4863,14 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4832
4863
|
if (isNaN(s.getTime()))
|
|
4833
4864
|
t = "";
|
|
4834
4865
|
else {
|
|
4835
|
-
const d = s.getFullYear(), f = String(s.getMonth() + 1).padStart(2, "0"), p = String(s.getDate()).padStart(2, "0"),
|
|
4836
|
-
t = J.includes(":") && J.split(":").length >= 3 ? `${d}-${f}-${p}T${
|
|
4866
|
+
const d = s.getFullYear(), f = String(s.getMonth() + 1).padStart(2, "0"), p = String(s.getDate()).padStart(2, "0"), T = String(s.getHours()).padStart(2, "0"), $ = String(s.getMinutes()).padStart(2, "0"), W = String(s.getSeconds()).padStart(2, "0"), J = ((l = S.value.split("T")[1]) == null ? void 0 : l.split(/[Z+-]/)[0]) || "";
|
|
4867
|
+
t = J.includes(":") && J.split(":").length >= 3 ? `${d}-${f}-${p}T${T}:${$}:${W}` : `${d}-${f}-${p}T${T}:${$}`;
|
|
4837
4868
|
}
|
|
4838
4869
|
} else
|
|
4839
4870
|
t = "";
|
|
4840
4871
|
} else
|
|
4841
4872
|
t = "";
|
|
4842
|
-
|
|
4873
|
+
L.value = t, E.value = ue(S.value, v.value), document.addEventListener("click", ta, !1), window.addEventListener("scroll", wa, { capture: !0, passive: !0 }), window.addEventListener("resize", Da), la(() => {
|
|
4843
4874
|
Bt();
|
|
4844
4875
|
});
|
|
4845
4876
|
}), Ya(() => {
|
|
@@ -4847,18 +4878,18 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4847
4878
|
}), re(v, (t) => {
|
|
4848
4879
|
Y.value = t;
|
|
4849
4880
|
}, { immediate: !0 }), re(ot, () => {
|
|
4850
|
-
|
|
4881
|
+
L.value && z.value && (E.value = ue(L.value, v.value));
|
|
4851
4882
|
});
|
|
4852
|
-
const Ha = (t) =>
|
|
4883
|
+
const Ha = (t) => gn(t, {
|
|
4853
4884
|
inputType: v.value,
|
|
4854
4885
|
hasSeconds: F.hasSeconds,
|
|
4855
|
-
allowRange:
|
|
4886
|
+
allowRange: Le.value,
|
|
4856
4887
|
timezoneFormat: F.calendarIsoStringTimezoneFormat,
|
|
4857
4888
|
locale: F.calendarLocale
|
|
4858
4889
|
});
|
|
4859
4890
|
re(S, (t) => {
|
|
4860
4891
|
var l;
|
|
4861
|
-
if (t !==
|
|
4892
|
+
if (t !== L.value) {
|
|
4862
4893
|
let n = t;
|
|
4863
4894
|
if (v.value === "date")
|
|
4864
4895
|
n = _t(t);
|
|
@@ -4874,14 +4905,14 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4874
4905
|
if (isNaN(p.getTime()))
|
|
4875
4906
|
n = "";
|
|
4876
4907
|
else {
|
|
4877
|
-
const
|
|
4878
|
-
n = Pe.includes(":") && Pe.split(":").length >= 3 ? `${
|
|
4908
|
+
const T = p.getFullYear(), $ = String(p.getMonth() + 1).padStart(2, "0"), W = String(p.getDate()).padStart(2, "0"), J = String(p.getHours()).padStart(2, "0"), Me = String(p.getMinutes()).padStart(2, "0"), ft = String(p.getSeconds()).padStart(2, "0"), Pe = ((l = t.split("T")[1]) == null ? void 0 : l.split(/[Z+-]/)[0]) || "";
|
|
4909
|
+
n = Pe.includes(":") && Pe.split(":").length >= 3 ? `${T}-${$}-${W}T${J}:${Me}:${ft}` : `${T}-${$}-${W}T${J}:${Me}`;
|
|
4879
4910
|
}
|
|
4880
4911
|
} else
|
|
4881
4912
|
n = "";
|
|
4882
4913
|
} else
|
|
4883
4914
|
n = "";
|
|
4884
|
-
|
|
4915
|
+
L.value = n;
|
|
4885
4916
|
const r = ue(t, v.value);
|
|
4886
4917
|
E.value = r, la(() => {
|
|
4887
4918
|
Bt();
|
|
@@ -4890,21 +4921,21 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4890
4921
|
s && (h("changed-complete", s), h("current-value-complete", s));
|
|
4891
4922
|
}
|
|
4892
4923
|
}, { immediate: !0 });
|
|
4893
|
-
let
|
|
4924
|
+
let $e = !1;
|
|
4894
4925
|
const qa = () => {
|
|
4895
|
-
|
|
4896
|
-
|
|
4926
|
+
$e = !0, setTimeout(() => {
|
|
4927
|
+
$e = !1;
|
|
4897
4928
|
}, 100);
|
|
4898
4929
|
};
|
|
4899
4930
|
let mt = !1;
|
|
4900
|
-
return re(() =>
|
|
4901
|
-
if (z.value && !mt &&
|
|
4931
|
+
return re(() => L.value, (t) => {
|
|
4932
|
+
if (z.value && !mt && !$e) {
|
|
4902
4933
|
const l = ue(t, v.value);
|
|
4903
4934
|
l !== E.value && (E.value = l, Z.value = l);
|
|
4904
4935
|
}
|
|
4905
4936
|
mt = !1;
|
|
4906
|
-
}), re(
|
|
4907
|
-
if (
|
|
4937
|
+
}), re(L, (t) => {
|
|
4938
|
+
if (de.value && (t = t.trim()), Le.value && typeof t == "string" && t.startsWith("{"))
|
|
4908
4939
|
try {
|
|
4909
4940
|
const l = JSON.parse(t);
|
|
4910
4941
|
if (l && (l.startDate || l.endDate)) {
|
|
@@ -4912,8 +4943,8 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4912
4943
|
if (!d)
|
|
4913
4944
|
return null;
|
|
4914
4945
|
if (/^\d{4}-\d{2}-\d{2}$/.test(d)) {
|
|
4915
|
-
const [f, p,
|
|
4916
|
-
return new Date(f, p - 1,
|
|
4946
|
+
const [f, p, T] = d.split("-").map(Number);
|
|
4947
|
+
return new Date(f, p - 1, T);
|
|
4917
4948
|
}
|
|
4918
4949
|
return new Date(d);
|
|
4919
4950
|
}, r = l.startDate ? n(l.startDate) : null, s = l.endDate ? n(l.endDate) : null;
|
|
@@ -4923,13 +4954,13 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4923
4954
|
} catch {
|
|
4924
4955
|
}
|
|
4925
4956
|
h("changed", t);
|
|
4926
|
-
}), re(
|
|
4957
|
+
}), re(De, (t) => {
|
|
4927
4958
|
h(t ? "focused" : "blurred");
|
|
4928
|
-
}), re(
|
|
4929
|
-
|
|
4959
|
+
}), re(L, (t) => {
|
|
4960
|
+
de.value && (t = t.trim()), h("current-value", t), la(() => {
|
|
4930
4961
|
Bt();
|
|
4931
4962
|
});
|
|
4932
|
-
}), re([Ue,
|
|
4963
|
+
}), re([Ue, pe], () => {
|
|
4933
4964
|
la(() => {
|
|
4934
4965
|
Bt();
|
|
4935
4966
|
});
|
|
@@ -4937,13 +4968,14 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4937
4968
|
key: 0,
|
|
4938
4969
|
class: ["nb-wrapper", kt.value],
|
|
4939
4970
|
style: [wt.value, Gt.value, Ft.value],
|
|
4940
|
-
role: "input"
|
|
4971
|
+
role: "input",
|
|
4972
|
+
title: e.title
|
|
4941
4973
|
}, i.value), [
|
|
4942
|
-
|
|
4974
|
+
Ve("div", {
|
|
4943
4975
|
id: u(Q),
|
|
4944
4976
|
class: Ye(["nb-reset", "component", fa.value, va.value, Kt.value, da.value]),
|
|
4945
4977
|
style: Ne([N.value, Gt.value, Ft.value]),
|
|
4946
|
-
onClick: ga
|
|
4978
|
+
onClick: l[2] || (l[2] = (n) => ga(n))
|
|
4947
4979
|
}, [
|
|
4948
4980
|
u(Ie) ? (O(), K("label", {
|
|
4949
4981
|
key: 0,
|
|
@@ -4952,17 +4984,17 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4952
4984
|
style: Ne([je.value]),
|
|
4953
4985
|
onClick: ya
|
|
4954
4986
|
}, [
|
|
4955
|
-
jt(Rt(u(
|
|
4956
|
-
u(Tt) ? (O(), K("span",
|
|
4957
|
-
], 12,
|
|
4958
|
-
Pa(
|
|
4987
|
+
jt(Rt(u(y)), 1),
|
|
4988
|
+
u(Tt) ? (O(), K("span", hn, "*")) : me("", !0)
|
|
4989
|
+
], 12, mn)) : me("", !0),
|
|
4990
|
+
Pa(Ve("input", {
|
|
4959
4991
|
ref_key: "inputRef",
|
|
4960
4992
|
ref: P,
|
|
4961
4993
|
"onUpdate:modelValue": l[0] || (l[0] = (n) => E.value = n),
|
|
4962
4994
|
onInput: nt,
|
|
4963
4995
|
onKeydown: [
|
|
4964
4996
|
qa,
|
|
4965
|
-
l[1] || (l[1] = na((n) => !u(
|
|
4997
|
+
l[1] || (l[1] = na((n) => !u(w) && u(R) && ba(), ["enter"]))
|
|
4966
4998
|
],
|
|
4967
4999
|
id: zt.value,
|
|
4968
5000
|
name: zt.value,
|
|
@@ -4970,27 +5002,27 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4970
5002
|
class: Ye(["component__input", [
|
|
4971
5003
|
pa.value,
|
|
4972
5004
|
ca.value,
|
|
4973
|
-
|
|
5005
|
+
ie.value
|
|
4974
5006
|
]]),
|
|
4975
5007
|
placeholder: c.value,
|
|
4976
|
-
disabled: u(
|
|
5008
|
+
disabled: u(w) || u(j),
|
|
4977
5009
|
required: u(Tt),
|
|
4978
5010
|
readonly: m.value,
|
|
4979
5011
|
autocomplete: e.inputAutocomplete,
|
|
4980
5012
|
min: ka.value,
|
|
4981
5013
|
max: o.value,
|
|
4982
5014
|
step: z.value ? void 0 : u(vt),
|
|
4983
|
-
tabindex: u(
|
|
5015
|
+
tabindex: u(w) || u(j) ? -1 : u(xt),
|
|
4984
5016
|
role: "input",
|
|
4985
5017
|
style: Ne([Ft.value]),
|
|
4986
5018
|
onFocus: Sa,
|
|
4987
5019
|
onBlur: xa,
|
|
4988
5020
|
onClick: Ca,
|
|
4989
5021
|
onPaste: ma
|
|
4990
|
-
}, null, 46,
|
|
5022
|
+
}, null, 46, Sn), [
|
|
4991
5023
|
[ml, E.value]
|
|
4992
5024
|
])
|
|
4993
|
-
], 14,
|
|
5025
|
+
], 14, bn),
|
|
4994
5026
|
Ot.value ? (O(), K("div", {
|
|
4995
5027
|
key: 0,
|
|
4996
5028
|
class: Ye(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
@@ -4998,7 +5030,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4998
5030
|
La(t.$slots, "message", {}, () => [
|
|
4999
5031
|
jt(Rt(e.message), 1)
|
|
5000
5032
|
], !0)
|
|
5001
|
-
], 2)) :
|
|
5033
|
+
], 2)) : me("", !0),
|
|
5002
5034
|
(O(), Ll(Al, { to: "body" }, [
|
|
5003
5035
|
z.value && ne.value ? (O(), K("div", {
|
|
5004
5036
|
key: 0,
|
|
@@ -5006,22 +5038,22 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
5006
5038
|
ref: U,
|
|
5007
5039
|
class: "datepicker__custom-calendar-wrapper",
|
|
5008
5040
|
style: Ne(ha.value),
|
|
5009
|
-
onClick: l[
|
|
5010
|
-
onMousedown: l[
|
|
5041
|
+
onClick: l[5] || (l[5] = Ia((n) => M.value = !0, ["stop"])),
|
|
5042
|
+
onMousedown: l[6] || (l[6] = Ia((n) => M.value = !0, ["stop"]))
|
|
5011
5043
|
}, [
|
|
5012
5044
|
$l(u(g), {
|
|
5013
5045
|
"nb-id": `${u(Q)}-calendar`,
|
|
5014
5046
|
value: At.value,
|
|
5015
5047
|
"input-type": u(v),
|
|
5016
|
-
"has-seconds":
|
|
5048
|
+
"has-seconds": Re.value,
|
|
5017
5049
|
min: u(Ue),
|
|
5018
|
-
max: u(
|
|
5050
|
+
max: u(pe),
|
|
5019
5051
|
step: u(vt),
|
|
5020
|
-
disabled: u(
|
|
5052
|
+
disabled: u(w),
|
|
5021
5053
|
width: Wt.value,
|
|
5022
5054
|
locale: u(ot),
|
|
5023
5055
|
theme: u(ze),
|
|
5024
|
-
"allow-range": u(
|
|
5056
|
+
"allow-range": u(Le),
|
|
5025
5057
|
"block-clicks-without-events": u(St),
|
|
5026
5058
|
"font-family": e.calendarFontFamily,
|
|
5027
5059
|
"font-size": e.calendarFontSize,
|
|
@@ -5081,33 +5113,33 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
5081
5113
|
"clear-button-title": e.calendarClearButtonTitle,
|
|
5082
5114
|
"clear-button-symbol": e.calendarClearButtonSymbol,
|
|
5083
5115
|
"iso-string-timezone-format": e.calendarIsoStringTimezoneFormat,
|
|
5084
|
-
onChanged:
|
|
5116
|
+
onChanged: Ce,
|
|
5085
5117
|
onDateSelected: Ba,
|
|
5086
5118
|
onMonthChanged: Ta,
|
|
5087
5119
|
onValid: Va,
|
|
5088
|
-
onMousedown: l[
|
|
5089
|
-
onClick: l[
|
|
5120
|
+
onMousedown: l[3] || (l[3] = (n) => M.value = !0),
|
|
5121
|
+
onClick: l[4] || (l[4] = (n) => M.value = !0)
|
|
5090
5122
|
}, null, 8, ["nb-id", "value", "input-type", "has-seconds", "min", "max", "step", "disabled", "width", "locale", "theme", "allow-range", "block-clicks-without-events", "font-family", "font-size", "font-weight", "primary-color", "selection-color", "event-color", "today-color", "hover-text-color", "normal-text-color", "month-year-item-bg", "month-year-item-bg-hover", "day-hover-bg", "day-hover-text-color", "time-display-text-color", "time-edit-button-bg", "time-edit-button-text-color", "time-edit-button-bg-hover", "time-edit-button-text-color-hover", "time-edit-button-font-family", "time-edit-button-font-size", "time-edit-button-padding", "time-edit-button-border-radius", "time-edit-button-font-weight", "time-edit-button-border", "time-edit-button-text", "today-button-bg", "today-button-text-color", "today-button-bg-hover", "today-button-text-color-hover", "today-button-font-family", "today-button-font-size", "today-button-padding", "today-button-border-radius", "today-button-font-weight", "today-button-border", "today-button-text", "now-button-text", "show-clear-button", "show-today-button", "clear-button-keep-current-month", "start-week-on-monday", "edit-range", "max-range-days", "min-year", "max-year", "go-to-date", "is-required", "width-full", "border-radius", "scroll-class", "events", "select-month-text", "select-year-text", "select-time-text", "time-display-label-text", "clear-button-title", "clear-button-symbol", "iso-string-timezone-format"])
|
|
5091
|
-
], 36)) :
|
|
5123
|
+
], 36)) : me("", !0)
|
|
5092
5124
|
]))
|
|
5093
|
-
], 16)) :
|
|
5125
|
+
], 16, yn)) : me("", !0);
|
|
5094
5126
|
}
|
|
5095
|
-
}),
|
|
5096
|
-
NbInputRadio:
|
|
5097
|
-
NbInputCheckbox:
|
|
5098
|
-
NbInput:
|
|
5099
|
-
NbInputChip:
|
|
5100
|
-
NbTextarea:
|
|
5101
|
-
NbDatePicker:
|
|
5102
|
-
},
|
|
5127
|
+
}), Cn = /* @__PURE__ */ Oa(xn, [["__scopeId", "data-v-6e07f6da"]]), pl = {
|
|
5128
|
+
NbInputRadio: Fl,
|
|
5129
|
+
NbInputCheckbox: Ol,
|
|
5130
|
+
NbInput: Ql,
|
|
5131
|
+
NbInputChip: rn,
|
|
5132
|
+
NbTextarea: pn,
|
|
5133
|
+
NbDatePicker: Cn
|
|
5134
|
+
}, Tn = {
|
|
5103
5135
|
install(e) {
|
|
5104
|
-
for (const
|
|
5105
|
-
if (Object.prototype.hasOwnProperty.call(pl,
|
|
5106
|
-
const g = pl[
|
|
5136
|
+
for (const b in pl)
|
|
5137
|
+
if (Object.prototype.hasOwnProperty.call(pl, b)) {
|
|
5138
|
+
const g = pl[b];
|
|
5107
5139
|
e.component(g.name, g);
|
|
5108
5140
|
}
|
|
5109
5141
|
}
|
|
5110
5142
|
};
|
|
5111
5143
|
export {
|
|
5112
|
-
|
|
5144
|
+
Tn as default
|
|
5113
5145
|
};
|