@vlalg-nimbus/nb-inputs 9.5.0 → 9.6.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 +1509 -1507
- 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,9 +1,9 @@
|
|
|
1
|
-
import { useCssVars as Wa, onMounted as Aa, ref as
|
|
2
|
-
const Oa = (e,
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
1
|
+
import { useCssVars as Wa, onMounted as Aa, ref as le, toRefs as Ea, computed as a, watch as ne, openBlock as H, createElementBlock as K, normalizeClass as Ue, normalizeStyle as Fe, createElementVNode as ke, mergeProps as $a, Fragment as gl, renderList as yl, unref as r, withDirectives as Pa, vModelRadio as Tl, withKeys as na, withModifiers as Ia, toDisplayString as Mt, createCommentVNode as xe, 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, m) => {
|
|
3
|
+
const b = e.__vccOpts || e;
|
|
4
|
+
for (const [T, I] of m)
|
|
5
|
+
b[T] = I;
|
|
6
|
+
return b;
|
|
7
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
|
|
@@ -18,14 +18,14 @@ const Oa = (e, b) => {
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: "b",
|
|
20
20
|
validator: (e = "b") => {
|
|
21
|
-
const
|
|
22
|
-
return ["b", "ib"].includes(
|
|
21
|
+
const m = e ? e.toLowerCase() : "";
|
|
22
|
+
return ["b", "ib"].includes(m);
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
tabIndex: {
|
|
26
26
|
type: [Number, Array],
|
|
27
27
|
default: 0,
|
|
28
|
-
validator: (e,
|
|
28
|
+
validator: (e, m) => Array.isArray(e) ? e.length === m.options.length : !0
|
|
29
29
|
},
|
|
30
30
|
hasTabIndexEnter: {
|
|
31
31
|
type: Boolean,
|
|
@@ -56,18 +56,15 @@ const Oa = (e, b) => {
|
|
|
56
56
|
options: {
|
|
57
57
|
type: Array,
|
|
58
58
|
required: !0,
|
|
59
|
-
default: () => []
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (!b)
|
|
69
|
-
return e;
|
|
70
|
-
}
|
|
59
|
+
default: () => []
|
|
60
|
+
},
|
|
61
|
+
valueKey: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "value"
|
|
64
|
+
},
|
|
65
|
+
textKey: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: "text"
|
|
71
68
|
},
|
|
72
69
|
currentOption: {
|
|
73
70
|
type: [String, Number, Boolean],
|
|
@@ -82,8 +79,8 @@ const Oa = (e, b) => {
|
|
|
82
79
|
type: String,
|
|
83
80
|
default: "light",
|
|
84
81
|
validator: (e) => {
|
|
85
|
-
const
|
|
86
|
-
return ["light", "dark"].includes(
|
|
82
|
+
const m = e ? e.toLowerCase() : "";
|
|
83
|
+
return ["light", "dark"].includes(m);
|
|
87
84
|
}
|
|
88
85
|
},
|
|
89
86
|
// Cores do tema light
|
|
@@ -155,143 +152,145 @@ const Oa = (e, b) => {
|
|
|
155
152
|
}
|
|
156
153
|
},
|
|
157
154
|
emits: ["current-value", "changed", "clicked"],
|
|
158
|
-
setup(e, { emit:
|
|
159
|
-
Wa((
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"
|
|
166
|
-
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
|
|
155
|
+
setup(e, { emit: m }) {
|
|
156
|
+
Wa((C) => ({
|
|
157
|
+
"6fc5a6bd": pt.value,
|
|
158
|
+
"8fb6c8ae": we.value,
|
|
159
|
+
"1584944e": Ct.value,
|
|
160
|
+
"7b1eb666": $e.value,
|
|
161
|
+
"4e3a5dcc": Ie.value,
|
|
162
|
+
"13458da3": ht.value,
|
|
163
|
+
"751c4d50": ot.value,
|
|
164
|
+
"24a9c7ac": xt.value,
|
|
165
|
+
"7ca55b92": St.value,
|
|
166
|
+
"0440bf1d": At.value,
|
|
167
|
+
a5e1686c: gt.value
|
|
171
168
|
})), Aa(() => {
|
|
172
|
-
|
|
169
|
+
Ze();
|
|
173
170
|
});
|
|
174
|
-
const
|
|
175
|
-
ariaLabel:
|
|
176
|
-
ariaAttrs:
|
|
177
|
-
currentOption:
|
|
171
|
+
const b = m, T = e, I = le(null), {
|
|
172
|
+
ariaLabel: de,
|
|
173
|
+
ariaAttrs: Ce,
|
|
174
|
+
currentOption: D,
|
|
178
175
|
valueType: B,
|
|
179
|
-
display:
|
|
180
|
-
options:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
176
|
+
display: x,
|
|
177
|
+
options: F,
|
|
178
|
+
valueKey: J,
|
|
179
|
+
textKey: oe,
|
|
180
|
+
theme: ce,
|
|
181
|
+
lightTextColor: q,
|
|
182
|
+
lightColor: k,
|
|
183
|
+
lightColorHover: Q,
|
|
184
|
+
darkTextColor: he,
|
|
185
|
+
darkColor: P,
|
|
186
|
+
darkColorHover: Be,
|
|
187
|
+
hoverEffect: _e,
|
|
188
|
+
activeHoverEffect: fe,
|
|
189
|
+
itemGap: Le,
|
|
190
|
+
internalGap: ve,
|
|
191
|
+
scale: pe,
|
|
192
|
+
disabled: Ae,
|
|
193
|
+
fontFamily: ze,
|
|
194
|
+
fontSize: ie,
|
|
195
|
+
fontWeight: Ke
|
|
196
|
+
} = Ea(T), v = a(() => {
|
|
197
|
+
const C = Ae.value ? "component-disabled" : "", w = x.value !== "b" ? "inline-block" : "block", ye = ze.value ? ze.value : "'Lato', sans-serif", se = ie.value ? ie.value : "1.6em", be = Ke.value !== 0 && !Ke.value || Ke.value < 0 ? 200 : Ke.value, We = [!1, !0].includes(_e.value) ? _e.value : !1, Se = [!1, !0].includes(fe.value) ? fe.value : !1, Ee = Le.value !== 0 && !Le.value || Le.value < 0 ? 15 : Le.value, g = ve.value !== 0 && !ve.value || ve.value < 0 ? 6 : ve.value, R = pe.value !== 0 && !pe.value || pe.value < 0 ? 1 : pe.value;
|
|
199
198
|
return {
|
|
200
|
-
disabled:
|
|
201
|
-
display:
|
|
202
|
-
hoverEffect:
|
|
203
|
-
activeHoverEffect:
|
|
204
|
-
itemGap:
|
|
205
|
-
internalGap:
|
|
206
|
-
scale:
|
|
207
|
-
font:
|
|
208
|
-
fontSize:
|
|
209
|
-
fontWeight:
|
|
199
|
+
disabled: C,
|
|
200
|
+
display: w,
|
|
201
|
+
hoverEffect: We,
|
|
202
|
+
activeHoverEffect: Se,
|
|
203
|
+
itemGap: Ee,
|
|
204
|
+
internalGap: g,
|
|
205
|
+
scale: R,
|
|
206
|
+
font: ye,
|
|
207
|
+
fontSize: se,
|
|
208
|
+
fontWeight: be
|
|
210
209
|
};
|
|
211
|
-
}),
|
|
212
|
-
display:
|
|
213
|
-
})),
|
|
214
|
-
const
|
|
210
|
+
}), X = a(() => v.value.disabled), E = a(() => ({
|
|
211
|
+
display: v.value.display
|
|
212
|
+
})), et = a(() => v.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), h = a(() => {
|
|
213
|
+
const C = v.value;
|
|
215
214
|
return {
|
|
216
|
-
fontSize:
|
|
217
|
-
fontWeight:
|
|
215
|
+
fontSize: C.fontSize,
|
|
216
|
+
fontWeight: C.fontWeight
|
|
218
217
|
};
|
|
219
|
-
}),
|
|
220
|
-
const
|
|
221
|
-
return !
|
|
222
|
-
}),
|
|
223
|
-
const
|
|
224
|
-
return !
|
|
225
|
-
}),
|
|
226
|
-
zoom:
|
|
227
|
-
})),
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
"aria-label":
|
|
232
|
-
"aria-disabled":
|
|
233
|
-
...
|
|
218
|
+
}), Ge = a(() => Array.isArray(F.value) && F.value.constructor === Array && F.value.length > 0), ge = a(() => ce.value === "dark" ? "component__theme--dark" : "component__theme--light"), pt = a(() => v.value.font), ht = a(() => q.value), ot = a(() => k.value), Ie = a(() => v.value.hoverEffect ? Q.value : k.value), $e = a(() => v.value.activeHoverEffect ? Q.value : k.value), At = a(() => he.value), gt = a(() => P.value), St = a(() => v.value.hoverEffect ? Be.value : P.value), xt = a(() => v.value.activeHoverEffect ? Be.value : P.value), Ct = a(() => {
|
|
219
|
+
const w = v.value.internalGap;
|
|
220
|
+
return !w || w < 0 ? 0 : `${w}px`;
|
|
221
|
+
}), we = a(() => {
|
|
222
|
+
const w = v.value.itemGap;
|
|
223
|
+
return !w || w < 0 ? 0 : `${w}px`;
|
|
224
|
+
}), Vt = a(() => ({
|
|
225
|
+
zoom: v.value.scale
|
|
226
|
+
})), tt = a(() => {
|
|
227
|
+
const C = {};
|
|
228
|
+
Ce.value && Object.keys(Ce.value).forEach((se) => C[`aria-${se}`] = Ce.value[se]);
|
|
229
|
+
const w = {
|
|
230
|
+
"aria-label": de.value,
|
|
231
|
+
"aria-disabled": Ae.value,
|
|
232
|
+
...C
|
|
234
233
|
};
|
|
235
234
|
return Object.fromEntries(
|
|
236
|
-
Object.entries(
|
|
235
|
+
Object.entries(w).filter(([ye, se]) => se != null)
|
|
237
236
|
);
|
|
238
|
-
}),
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
},
|
|
242
|
-
|
|
237
|
+
}), Ze = () => {
|
|
238
|
+
const C = D.value;
|
|
239
|
+
C && ["string"].includes(B.value) ? I.value = C.toString().toLowerCase() : I.value = C;
|
|
240
|
+
}, He = (C) => {
|
|
241
|
+
b("clicked", C);
|
|
243
242
|
};
|
|
244
|
-
return
|
|
245
|
-
|
|
246
|
-
}),
|
|
247
|
-
|
|
248
|
-
}), (
|
|
243
|
+
return ne(D, (C, w) => {
|
|
244
|
+
C !== w && Ze();
|
|
245
|
+
}), ne(I, (C, w) => {
|
|
246
|
+
C !== w && (b("current-value", C), b("changed", C));
|
|
247
|
+
}), (C, w) => e.nbId && Ge.value ? (H(), K("div", {
|
|
249
248
|
key: 0,
|
|
250
|
-
class:
|
|
251
|
-
style:
|
|
249
|
+
class: Ue(["nb-wrapper", X.value]),
|
|
250
|
+
style: Fe([E.value, Vt.value]),
|
|
252
251
|
title: e.title
|
|
253
252
|
}, [
|
|
254
|
-
|
|
253
|
+
ke("div", $a({
|
|
255
254
|
id: e.nbId,
|
|
256
255
|
role: "radiogroup"
|
|
257
|
-
},
|
|
258
|
-
class: ["nb-reset", "component",
|
|
256
|
+
}, tt.value, {
|
|
257
|
+
class: ["nb-reset", "component", et.value, ge.value]
|
|
259
258
|
}), [
|
|
260
|
-
(
|
|
261
|
-
key:
|
|
259
|
+
(H(!0), K(gl, null, yl(r(F), (ye, se) => (H(), K("div", {
|
|
260
|
+
key: ye[r(J)],
|
|
262
261
|
class: "component-radio__item"
|
|
263
262
|
}, [
|
|
264
|
-
Pa(
|
|
265
|
-
id: `${e.nbId}-${
|
|
266
|
-
"onUpdate:modelValue":
|
|
263
|
+
Pa(ke("input", {
|
|
264
|
+
id: `${e.nbId}-${ye[r(J)]}`,
|
|
265
|
+
"onUpdate:modelValue": w[0] || (w[0] = (be) => I.value = be),
|
|
267
266
|
type: "radio",
|
|
268
267
|
class: "component-radio__item--input",
|
|
269
|
-
disabled:
|
|
270
|
-
value:
|
|
268
|
+
disabled: r(Ae),
|
|
269
|
+
value: ye[r(J)],
|
|
271
270
|
name: e.groupName,
|
|
272
|
-
onClick:
|
|
271
|
+
onClick: w[1] || (w[1] = (be) => He(be))
|
|
273
272
|
}, null, 8, Rl), [
|
|
274
|
-
[Tl,
|
|
273
|
+
[Tl, I.value]
|
|
275
274
|
]),
|
|
276
|
-
|
|
277
|
-
for: `${e.nbId}-${
|
|
278
|
-
tabindex:
|
|
275
|
+
ke("label", {
|
|
276
|
+
for: `${e.nbId}-${ye[r(J)]}`,
|
|
277
|
+
tabindex: r(Ae) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[se] : e.tabIndex >= 0 ? e.tabIndex : se + 1,
|
|
279
278
|
class: "component-radio__item--label",
|
|
280
279
|
onKeydown: [
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
w[2] || (w[2] = na(Ia((be) => !r(Ae) && e.hasTabIndexEnter && be.target.click(), ["prevent"]), ["enter"])),
|
|
281
|
+
w[3] || (w[3] = na(Ia((be) => !r(Ae) && e.hasTabIndexSpace && be.target.click(), ["prevent"]), ["space"]))
|
|
283
282
|
]
|
|
284
283
|
}, [
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
style:
|
|
288
|
-
},
|
|
284
|
+
w[4] || (w[4] = ke("div", null, null, -1)),
|
|
285
|
+
ke("span", {
|
|
286
|
+
style: Fe([h.value])
|
|
287
|
+
}, Mt(ye[r(oe)]), 5)
|
|
289
288
|
], 40, Ml)
|
|
290
289
|
]))), 128))
|
|
291
290
|
], 16, Dl)
|
|
292
|
-
], 14, wl)) :
|
|
291
|
+
], 14, wl)) : xe("", !0);
|
|
293
292
|
}
|
|
294
|
-
}), Fl = /* @__PURE__ */ Oa(Nl, [["__scopeId", "data-v-
|
|
293
|
+
}), Fl = /* @__PURE__ */ Oa(Nl, [["__scopeId", "data-v-b9de2596"]]);
|
|
295
294
|
const zl = ["title"], Il = ["id"], Wl = ["id", "disabled", "value", "name"], El = ["for", "tabindex"], Pl = /* @__PURE__ */ Object.assign({
|
|
296
295
|
name: "NbInputCheckbox",
|
|
297
296
|
inheritAttrs: !1
|
|
@@ -306,14 +305,14 @@ const zl = ["title"], Il = ["id"], Wl = ["id", "disabled", "value", "name"], El
|
|
|
306
305
|
type: String,
|
|
307
306
|
default: "b",
|
|
308
307
|
validator: (e = "b") => {
|
|
309
|
-
const
|
|
310
|
-
return ["b", "ib"].includes(
|
|
308
|
+
const m = e ? e.toLowerCase() : "";
|
|
309
|
+
return ["b", "ib"].includes(m);
|
|
311
310
|
}
|
|
312
311
|
},
|
|
313
312
|
tabIndex: {
|
|
314
313
|
type: [Number, Array],
|
|
315
314
|
default: 0,
|
|
316
|
-
validator: (e,
|
|
315
|
+
validator: (e, m) => Array.isArray(e) ? e.length === m.options.length : !0
|
|
317
316
|
},
|
|
318
317
|
hasTabIndexEnter: {
|
|
319
318
|
type: Boolean,
|
|
@@ -344,18 +343,15 @@ const zl = ["title"], Il = ["id"], Wl = ["id", "disabled", "value", "name"], El
|
|
|
344
343
|
options: {
|
|
345
344
|
type: Array,
|
|
346
345
|
required: !0,
|
|
347
|
-
default: () => []
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
if (!b)
|
|
357
|
-
return e;
|
|
358
|
-
}
|
|
346
|
+
default: () => []
|
|
347
|
+
},
|
|
348
|
+
valueKey: {
|
|
349
|
+
type: String,
|
|
350
|
+
default: "value"
|
|
351
|
+
},
|
|
352
|
+
textKey: {
|
|
353
|
+
type: String,
|
|
354
|
+
default: "text"
|
|
359
355
|
},
|
|
360
356
|
currentOption: {
|
|
361
357
|
type: Array,
|
|
@@ -365,8 +361,8 @@ const zl = ["title"], Il = ["id"], Wl = ["id", "disabled", "value", "name"], El
|
|
|
365
361
|
type: String,
|
|
366
362
|
default: "light",
|
|
367
363
|
validator: (e) => {
|
|
368
|
-
const
|
|
369
|
-
return ["light", "dark"].includes(
|
|
364
|
+
const m = e ? e.toLowerCase() : "";
|
|
365
|
+
return ["light", "dark"].includes(m);
|
|
370
366
|
}
|
|
371
367
|
},
|
|
372
368
|
// Cores do tema light
|
|
@@ -456,171 +452,173 @@ const zl = ["title"], Il = ["id"], Wl = ["id", "disabled", "value", "name"], El
|
|
|
456
452
|
}
|
|
457
453
|
},
|
|
458
454
|
emits: ["current-value", "changed", "clicked"],
|
|
459
|
-
setup(e, { emit:
|
|
460
|
-
Wa((
|
|
461
|
-
"
|
|
462
|
-
"
|
|
463
|
-
"
|
|
464
|
-
"
|
|
465
|
-
"
|
|
466
|
-
"
|
|
467
|
-
|
|
468
|
-
"
|
|
469
|
-
"
|
|
470
|
-
|
|
471
|
-
"
|
|
472
|
-
"
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
455
|
+
setup(e, { emit: m }) {
|
|
456
|
+
Wa((g) => ({
|
|
457
|
+
"0f927bf8": ot.value,
|
|
458
|
+
"2078bb70": ye.value,
|
|
459
|
+
"194f2c93": w.value,
|
|
460
|
+
"18b50ed6": C.value,
|
|
461
|
+
"77bb126d": gt.value,
|
|
462
|
+
"1e320b13": At.value,
|
|
463
|
+
df7bbb5c: St.value,
|
|
464
|
+
"6a7da0ae": $e.value,
|
|
465
|
+
"6c8f9b7c": Ie.value,
|
|
466
|
+
f134773c: He.value,
|
|
467
|
+
"669e4ec5": Vt.value,
|
|
468
|
+
"54212d2a": we.value,
|
|
469
|
+
"5347a8aa": tt.value,
|
|
470
|
+
f2ef8b5e: Ct.value,
|
|
471
|
+
f9fddbb8: xt.value
|
|
476
472
|
})), Aa(() => {
|
|
477
|
-
|
|
473
|
+
Se();
|
|
478
474
|
});
|
|
479
|
-
const
|
|
480
|
-
ariaLabel:
|
|
481
|
-
ariaAttrs:
|
|
482
|
-
currentOption:
|
|
475
|
+
const b = m, T = e, I = le(null), {
|
|
476
|
+
ariaLabel: de,
|
|
477
|
+
ariaAttrs: Ce,
|
|
478
|
+
currentOption: D,
|
|
483
479
|
display: B,
|
|
484
|
-
options:
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
480
|
+
options: x,
|
|
481
|
+
valueKey: F,
|
|
482
|
+
textKey: J,
|
|
483
|
+
theme: oe,
|
|
484
|
+
lightTextColor: ce,
|
|
485
|
+
lightColor: q,
|
|
486
|
+
lightColorHover: k,
|
|
487
|
+
darkTextColor: Q,
|
|
488
|
+
darkColor: he,
|
|
489
|
+
darkColorHover: P,
|
|
490
|
+
boxRadius: Be,
|
|
491
|
+
hoverEffect: _e,
|
|
492
|
+
activeHoverEffect: fe,
|
|
493
|
+
itemGap: Le,
|
|
494
|
+
internalGap: ve,
|
|
495
|
+
scale: pe,
|
|
496
|
+
type: Ae,
|
|
497
|
+
background: ze,
|
|
498
|
+
disabled: ie,
|
|
499
|
+
fontFamily: Ke,
|
|
500
|
+
fontSize: v,
|
|
501
|
+
fontWeight: X
|
|
502
|
+
} = Ea(T), E = a(() => {
|
|
503
|
+
const g = ie.value ? "component-disabled" : "", R = B.value !== "b" ? "inline-block" : "block", me = Ke.value ? Ke.value : "'Lato', sans-serif", ee = v.value ? v.value : "1.6em", te = X.value !== 0 && !X.value || X.value < 0 ? 200 : X.value, Pe = Be.value !== 0 && !Be.value || Be.value < 0 ? 0 : Be.value, qe = [!1, !0].includes(_e.value) ? _e.value : !1, je = [!1, !0].includes(fe.value) ? fe.value : !1, Je = Le.value !== 0 && !Le.value || Le.value < 0 ? 15 : Le.value, at = ve.value !== 0 && !ve.value || ve.value < 0 ? 6 : ve.value, yt = ["box", "circle"].includes(Ae.value) ? Ae.value : "box", Tt = pe.value !== 0 && !pe.value || pe.value < 0 ? 1 : pe.value, rt = [!1, !0].includes(ze.value) ? ze.value : !1;
|
|
506
504
|
return {
|
|
507
|
-
disabled:
|
|
508
|
-
display:
|
|
509
|
-
boxRadius:
|
|
510
|
-
hoverEffect:
|
|
511
|
-
activeHoverEffect:
|
|
512
|
-
itemGap:
|
|
513
|
-
internalGap:
|
|
514
|
-
scale:
|
|
515
|
-
type:
|
|
516
|
-
font:
|
|
517
|
-
background:
|
|
518
|
-
fontSize:
|
|
519
|
-
fontWeight:
|
|
505
|
+
disabled: g,
|
|
506
|
+
display: R,
|
|
507
|
+
boxRadius: Pe,
|
|
508
|
+
hoverEffect: qe,
|
|
509
|
+
activeHoverEffect: je,
|
|
510
|
+
itemGap: Je,
|
|
511
|
+
internalGap: at,
|
|
512
|
+
scale: Tt,
|
|
513
|
+
type: yt,
|
|
514
|
+
font: me,
|
|
515
|
+
background: rt,
|
|
516
|
+
fontSize: ee,
|
|
517
|
+
fontWeight: te
|
|
520
518
|
};
|
|
521
|
-
}),
|
|
522
|
-
display:
|
|
523
|
-
})),
|
|
524
|
-
const
|
|
519
|
+
}), et = a(() => E.value.disabled), h = a(() => ({
|
|
520
|
+
display: E.value.display
|
|
521
|
+
})), Ge = a(() => E.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), ge = a(() => {
|
|
522
|
+
const g = E.value;
|
|
525
523
|
return {
|
|
526
|
-
fontSize:
|
|
527
|
-
fontWeight:
|
|
524
|
+
fontSize: g.fontSize,
|
|
525
|
+
fontWeight: g.fontWeight
|
|
528
526
|
};
|
|
529
|
-
}),
|
|
530
|
-
const
|
|
531
|
-
return
|
|
532
|
-
}),
|
|
533
|
-
const
|
|
534
|
-
return
|
|
535
|
-
}),
|
|
536
|
-
const
|
|
537
|
-
return
|
|
527
|
+
}), pt = a(() => Array.isArray(x.value) && x.value.constructor === Array && x.value.length > 0), ht = a(() => oe.value === "dark" ? "component__theme--dark" : "component__theme--light"), ot = a(() => E.value.font), Ie = a(() => ce.value), $e = a(() => q.value), At = a(() => E.value.hoverEffect ? k.value : q.value), gt = a(() => E.value.activeHoverEffect ? k.value : q.value), St = a(() => {
|
|
528
|
+
const g = E.value;
|
|
529
|
+
return g.activeHoverEffect && g.background ? `${k.value}80` : k.value;
|
|
530
|
+
}), xt = a(() => Q.value), Ct = a(() => he.value), we = a(() => E.value.hoverEffect ? P.value : he.value), Vt = a(() => E.value.activeHoverEffect ? P.value : he.value), tt = a(() => {
|
|
531
|
+
const g = E.value;
|
|
532
|
+
return g.activeHoverEffect && g.background ? `${P.value}80` : P.value;
|
|
533
|
+
}), Ze = a(() => E.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), He = a(() => {
|
|
534
|
+
const g = E.value, R = oe.value === "dark" ? Q.value : ce.value;
|
|
535
|
+
return g.background ? "#ffffff" : R;
|
|
538
536
|
});
|
|
539
|
-
a(() =>
|
|
540
|
-
const
|
|
541
|
-
const
|
|
542
|
-
return !
|
|
543
|
-
}),
|
|
544
|
-
const
|
|
545
|
-
return `${
|
|
546
|
-
}),
|
|
547
|
-
const
|
|
548
|
-
return !
|
|
549
|
-
}),
|
|
550
|
-
zoom:
|
|
551
|
-
})),
|
|
552
|
-
const
|
|
553
|
-
|
|
554
|
-
const
|
|
555
|
-
"aria-label":
|
|
556
|
-
"aria-disabled":
|
|
557
|
-
...
|
|
537
|
+
a(() => E.value.background ? "19px" : "auto");
|
|
538
|
+
const C = a(() => {
|
|
539
|
+
const R = E.value.internalGap;
|
|
540
|
+
return !R || R < 0 ? 0 : `${R}px`;
|
|
541
|
+
}), w = a(() => {
|
|
542
|
+
const g = E.value;
|
|
543
|
+
return `${g.boxRadius > 7 ? 7 : g.boxRadius}px`;
|
|
544
|
+
}), ye = a(() => {
|
|
545
|
+
const R = E.value.itemGap;
|
|
546
|
+
return !R || R < 0 ? 0 : `${R}px`;
|
|
547
|
+
}), se = a(() => E.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), be = a(() => ({
|
|
548
|
+
zoom: E.value.scale
|
|
549
|
+
})), We = a(() => {
|
|
550
|
+
const g = {};
|
|
551
|
+
Ce.value && Object.keys(Ce.value).forEach((ee) => g[`aria-${ee}`] = Ce.value[ee]);
|
|
552
|
+
const R = {
|
|
553
|
+
"aria-label": de.value,
|
|
554
|
+
"aria-disabled": ie.value,
|
|
555
|
+
...g
|
|
558
556
|
};
|
|
559
557
|
return Object.fromEntries(
|
|
560
|
-
Object.entries(
|
|
558
|
+
Object.entries(R).filter(([me, ee]) => ee != null)
|
|
561
559
|
);
|
|
562
|
-
}),
|
|
563
|
-
|
|
564
|
-
},
|
|
565
|
-
|
|
560
|
+
}), Se = () => {
|
|
561
|
+
I.value = D.value;
|
|
562
|
+
}, Ee = (g) => {
|
|
563
|
+
b("clicked", g);
|
|
566
564
|
};
|
|
567
|
-
return
|
|
568
|
-
|
|
569
|
-
}),
|
|
570
|
-
|
|
571
|
-
}), (
|
|
565
|
+
return ne(D, (g, R) => {
|
|
566
|
+
g !== R && Se();
|
|
567
|
+
}), ne(I, (g, R) => {
|
|
568
|
+
g !== R && (b("current-value", g), b("changed", g));
|
|
569
|
+
}), (g, R) => e.nbId && pt.value ? (H(), K("div", {
|
|
572
570
|
key: 0,
|
|
573
|
-
class:
|
|
574
|
-
style:
|
|
571
|
+
class: Ue(["nb-wrapper", et.value]),
|
|
572
|
+
style: Fe([h.value, be.value]),
|
|
575
573
|
title: e.title
|
|
576
574
|
}, [
|
|
577
|
-
|
|
575
|
+
ke("div", $a({
|
|
578
576
|
id: e.nbId,
|
|
579
577
|
role: "group"
|
|
580
|
-
},
|
|
581
|
-
class: ["nb-reset", "component",
|
|
578
|
+
}, We.value, {
|
|
579
|
+
class: ["nb-reset", "component", Ge.value, ht.value]
|
|
582
580
|
}), [
|
|
583
|
-
(
|
|
584
|
-
key:
|
|
581
|
+
(H(!0), K(gl, null, yl(r(x), (me, ee) => (H(), K("div", {
|
|
582
|
+
key: me[r(F)],
|
|
585
583
|
class: "component-checkbox__item"
|
|
586
584
|
}, [
|
|
587
|
-
Pa(
|
|
588
|
-
id: `${e.nbId}-${
|
|
589
|
-
"onUpdate:modelValue":
|
|
585
|
+
Pa(ke("input", {
|
|
586
|
+
id: `${e.nbId}-${me[r(F)]}`,
|
|
587
|
+
"onUpdate:modelValue": R[0] || (R[0] = (te) => I.value = te),
|
|
590
588
|
type: "checkbox",
|
|
591
589
|
class: "component-checkbox__item--input",
|
|
592
|
-
disabled:
|
|
593
|
-
value:
|
|
590
|
+
disabled: r(ie),
|
|
591
|
+
value: me[r(F)],
|
|
594
592
|
name: e.groupName,
|
|
595
|
-
onClick:
|
|
593
|
+
onClick: R[1] || (R[1] = (te) => Ee(te))
|
|
596
594
|
}, null, 8, Wl), [
|
|
597
|
-
[kl,
|
|
595
|
+
[kl, I.value]
|
|
598
596
|
]),
|
|
599
|
-
|
|
600
|
-
for: `${e.nbId}-${
|
|
601
|
-
class:
|
|
602
|
-
tabindex:
|
|
597
|
+
ke("label", {
|
|
598
|
+
for: `${e.nbId}-${me[r(F)]}`,
|
|
599
|
+
class: Ue([[se.value], "component-checkbox__item--label"]),
|
|
600
|
+
tabindex: r(ie) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[ee] : e.tabIndex >= 0 ? e.tabIndex : ee + 1,
|
|
603
601
|
onKeydown: [
|
|
604
|
-
|
|
605
|
-
|
|
602
|
+
R[2] || (R[2] = na(Ia((te) => !r(ie) && e.hasTabIndexEnter && te.target.click(), ["prevent"]), ["enter"])),
|
|
603
|
+
R[3] || (R[3] = na(Ia((te) => !r(ie) && e.hasTabIndexSpace && te.target.click(), ["prevent"]), ["space"]))
|
|
606
604
|
]
|
|
607
605
|
}, [
|
|
608
|
-
|
|
609
|
-
class:
|
|
606
|
+
ke("div", {
|
|
607
|
+
class: Ue([Ze.value])
|
|
610
608
|
}, null, 2),
|
|
611
|
-
|
|
612
|
-
style:
|
|
613
|
-
},
|
|
609
|
+
ke("span", {
|
|
610
|
+
style: Fe([ge.value])
|
|
611
|
+
}, Mt(me[r(J)]), 5)
|
|
614
612
|
], 42, El)
|
|
615
613
|
]))), 128))
|
|
616
614
|
], 16, Il)
|
|
617
|
-
], 14, zl)) :
|
|
615
|
+
], 14, zl)) : xe("", !0);
|
|
618
616
|
}
|
|
619
|
-
}), Ol = /* @__PURE__ */ Oa(Pl, [["__scopeId", "data-v-
|
|
617
|
+
}), Ol = /* @__PURE__ */ Oa(Pl, [["__scopeId", "data-v-5878e45a"]]);
|
|
620
618
|
const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
621
619
|
key: 0,
|
|
622
620
|
class: "component__label--required"
|
|
623
|
-
}, Yl = ["for"], Ul = { key: 0 },
|
|
621
|
+
}, Yl = ["for"], Ul = { key: 0 }, Kl = { key: 1 }, Gl = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex", "min", "max", "step"], Zl = ["for"], Jl = /* @__PURE__ */ Object.assign({
|
|
624
622
|
name: "NbInput",
|
|
625
623
|
inheritAttrs: !1
|
|
626
624
|
}, {
|
|
@@ -634,8 +632,8 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
634
632
|
type: String,
|
|
635
633
|
default: "b",
|
|
636
634
|
validator: (e = "b") => {
|
|
637
|
-
const
|
|
638
|
-
return ["b", "ib"].includes(
|
|
635
|
+
const m = e.toLowerCase();
|
|
636
|
+
return ["b", "ib"].includes(m);
|
|
639
637
|
}
|
|
640
638
|
},
|
|
641
639
|
tabIndex: {
|
|
@@ -1076,145 +1074,145 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1076
1074
|
"entered",
|
|
1077
1075
|
"paste"
|
|
1078
1076
|
],
|
|
1079
|
-
setup(e, { emit:
|
|
1077
|
+
setup(e, { emit: m }) {
|
|
1080
1078
|
Wa((o) => ({
|
|
1081
|
-
"
|
|
1082
|
-
"
|
|
1083
|
-
"
|
|
1084
|
-
|
|
1085
|
-
"
|
|
1086
|
-
"
|
|
1087
|
-
"
|
|
1088
|
-
"
|
|
1089
|
-
|
|
1090
|
-
"
|
|
1091
|
-
"
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
"
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
"
|
|
1098
|
-
"
|
|
1099
|
-
"
|
|
1100
|
-
"
|
|
1101
|
-
|
|
1102
|
-
"
|
|
1103
|
-
"
|
|
1104
|
-
"
|
|
1105
|
-
|
|
1106
|
-
"
|
|
1107
|
-
|
|
1108
|
-
"
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
"
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
"
|
|
1116
|
-
"
|
|
1117
|
-
"
|
|
1079
|
+
"1f018258": Et.value,
|
|
1080
|
+
"4e051488": ra.value,
|
|
1081
|
+
"8961fbf6": r(Ct),
|
|
1082
|
+
"412b5a8c": ca.value,
|
|
1083
|
+
"2ca9e244": fa.value,
|
|
1084
|
+
"7bbe1214": va.value,
|
|
1085
|
+
"1e33930a": r(C),
|
|
1086
|
+
"2be4f102": r(Pe),
|
|
1087
|
+
"4359c8b8": r(w),
|
|
1088
|
+
"137f2c64": r(Tt),
|
|
1089
|
+
"454bf087": r(He),
|
|
1090
|
+
bd7d09f0: r(tt),
|
|
1091
|
+
b280ffa4: r(Ze),
|
|
1092
|
+
"1a587bf9": ct.value,
|
|
1093
|
+
"5d546ba3": r(we),
|
|
1094
|
+
f02a7216: r(Vt),
|
|
1095
|
+
"3fb0cf44": r(te),
|
|
1096
|
+
"3535ab5a": r(ye),
|
|
1097
|
+
"24671c2a": r(yt),
|
|
1098
|
+
"926726de": r(xt),
|
|
1099
|
+
"23f220be": r(gt),
|
|
1100
|
+
"654e8564": r(St),
|
|
1101
|
+
"54a2dca6": r($e),
|
|
1102
|
+
"2108d72b": r(At),
|
|
1103
|
+
bc5b633e: ha.value,
|
|
1104
|
+
"1302bc28": xa.value,
|
|
1105
|
+
f2070f1a: Ca.value,
|
|
1106
|
+
"3c6df23a": _t.value,
|
|
1107
|
+
bbc47ff4: Rt.value,
|
|
1108
|
+
"425ba31a": r(se),
|
|
1109
|
+
bd743b28: ya.value,
|
|
1110
|
+
"7e1bc293": Pt.value,
|
|
1111
|
+
38278152: ia.value,
|
|
1112
|
+
"3550c7fb": Ut.value,
|
|
1113
|
+
"3002d155": da.value,
|
|
1114
|
+
"3b6dc836": Kt.value,
|
|
1115
|
+
"9478d06c": sa.value
|
|
1118
1116
|
})), Aa(() => {
|
|
1119
|
-
|
|
1117
|
+
ge.value != null ? X.value === "number" && typeof ge.value == "number" ? z.value = ge.value : z.value = String(ge.value) : z.value = "";
|
|
1120
1118
|
}), Ya(() => {
|
|
1121
1119
|
Ht();
|
|
1122
1120
|
});
|
|
1123
|
-
const
|
|
1124
|
-
nbId:
|
|
1125
|
-
display:
|
|
1126
|
-
hasTabIndexEnter:
|
|
1127
|
-
ariaLabel:
|
|
1121
|
+
const b = m, T = e, {
|
|
1122
|
+
nbId: I,
|
|
1123
|
+
display: de,
|
|
1124
|
+
hasTabIndexEnter: Ce,
|
|
1125
|
+
ariaLabel: D,
|
|
1128
1126
|
ariaAttrs: B,
|
|
1129
|
-
textColor:
|
|
1130
|
-
caretColor:
|
|
1131
|
-
selectionBgColor:
|
|
1132
|
-
selectionTextColor:
|
|
1133
|
-
hasBorderRadius:
|
|
1134
|
-
borderRadius:
|
|
1135
|
-
disabled:
|
|
1136
|
-
fontFamily:
|
|
1137
|
-
fontSize:
|
|
1138
|
-
fontWeight:
|
|
1139
|
-
fontFamilyMsg:
|
|
1140
|
-
fontSizeMsg:
|
|
1141
|
-
fontWeightMsg:
|
|
1142
|
-
textMessageColor:
|
|
1127
|
+
textColor: x,
|
|
1128
|
+
caretColor: F,
|
|
1129
|
+
selectionBgColor: J,
|
|
1130
|
+
selectionTextColor: oe,
|
|
1131
|
+
hasBorderRadius: ce,
|
|
1132
|
+
borderRadius: q,
|
|
1133
|
+
disabled: k,
|
|
1134
|
+
fontFamily: Q,
|
|
1135
|
+
fontSize: he,
|
|
1136
|
+
fontWeight: P,
|
|
1137
|
+
fontFamilyMsg: Be,
|
|
1138
|
+
fontSizeMsg: _e,
|
|
1139
|
+
fontWeightMsg: fe,
|
|
1140
|
+
textMessageColor: Le,
|
|
1143
1141
|
inputWidth: ve,
|
|
1144
|
-
inputStyle:
|
|
1145
|
-
activeTextStyle:
|
|
1146
|
-
sizeMediaQuery:
|
|
1147
|
-
inputReadonly:
|
|
1148
|
-
blockPaste:
|
|
1142
|
+
inputStyle: pe,
|
|
1143
|
+
activeTextStyle: Ae,
|
|
1144
|
+
sizeMediaQuery: ze,
|
|
1145
|
+
inputReadonly: ie,
|
|
1146
|
+
blockPaste: Ke,
|
|
1149
1147
|
showInputEye: v,
|
|
1150
|
-
inputType:
|
|
1151
|
-
hasTrim:
|
|
1152
|
-
inputUppercase:
|
|
1153
|
-
inputName:
|
|
1154
|
-
inputPlaceholder:
|
|
1155
|
-
inputText:
|
|
1156
|
-
theme:
|
|
1148
|
+
inputType: X,
|
|
1149
|
+
hasTrim: E,
|
|
1150
|
+
inputUppercase: et,
|
|
1151
|
+
inputName: h,
|
|
1152
|
+
inputPlaceholder: Ge,
|
|
1153
|
+
inputText: ge,
|
|
1154
|
+
theme: pt,
|
|
1157
1155
|
inputEyeIcon: ht,
|
|
1158
1156
|
tabindex: ot,
|
|
1159
|
-
inputEyeIconHidden:
|
|
1160
|
-
lightBgColor:
|
|
1161
|
-
lightBgColorFocus:
|
|
1162
|
-
lightEyeBgColor:
|
|
1157
|
+
inputEyeIconHidden: Ie,
|
|
1158
|
+
lightBgColor: $e,
|
|
1159
|
+
lightBgColorFocus: At,
|
|
1160
|
+
lightEyeBgColor: gt,
|
|
1163
1161
|
lightEyeBgColorActive: St,
|
|
1164
1162
|
lightDisabledBgColor: xt,
|
|
1165
1163
|
lightTextColor: Ct,
|
|
1166
|
-
darkBgColor:
|
|
1167
|
-
darkBgColorFocus:
|
|
1168
|
-
darkEyeBgColor:
|
|
1169
|
-
darkEyeBgColorActive:
|
|
1170
|
-
darkDisabledBgColor:
|
|
1171
|
-
darkTextColor:
|
|
1172
|
-
darkDisabledEyeBgColor:
|
|
1173
|
-
lightDisabledEyeBgColor:
|
|
1174
|
-
textAlign:
|
|
1175
|
-
showMsg:
|
|
1176
|
-
hasMsg:
|
|
1177
|
-
hasIcon:
|
|
1178
|
-
iconDirection:
|
|
1179
|
-
iconPadding:
|
|
1180
|
-
iconPaddingInput:
|
|
1181
|
-
iconMargin:
|
|
1182
|
-
iconBorderRadius:
|
|
1183
|
-
iconLightTextColor:
|
|
1184
|
-
iconDarkTextColor:
|
|
1185
|
-
iconLightBgColor:
|
|
1186
|
-
iconDarkBgColor:
|
|
1187
|
-
iconLightBgColorActive:
|
|
1164
|
+
darkBgColor: we,
|
|
1165
|
+
darkBgColorFocus: Vt,
|
|
1166
|
+
darkEyeBgColor: tt,
|
|
1167
|
+
darkEyeBgColorActive: Ze,
|
|
1168
|
+
darkDisabledBgColor: He,
|
|
1169
|
+
darkTextColor: C,
|
|
1170
|
+
darkDisabledEyeBgColor: w,
|
|
1171
|
+
lightDisabledEyeBgColor: ye,
|
|
1172
|
+
textAlign: se,
|
|
1173
|
+
showMsg: be,
|
|
1174
|
+
hasMsg: We,
|
|
1175
|
+
hasIcon: Se,
|
|
1176
|
+
iconDirection: Ee,
|
|
1177
|
+
iconPadding: g,
|
|
1178
|
+
iconPaddingInput: R,
|
|
1179
|
+
iconMargin: me,
|
|
1180
|
+
iconBorderRadius: ee,
|
|
1181
|
+
iconLightTextColor: te,
|
|
1182
|
+
iconDarkTextColor: Pe,
|
|
1183
|
+
iconLightBgColor: qe,
|
|
1184
|
+
iconDarkBgColor: je,
|
|
1185
|
+
iconLightBgColorActive: Je,
|
|
1188
1186
|
iconDarkBgColorActive: at,
|
|
1189
1187
|
iconLightDisabledBgColor: yt,
|
|
1190
|
-
iconDarkDisabledBgColor:
|
|
1191
|
-
iconWidth:
|
|
1188
|
+
iconDarkDisabledBgColor: Tt,
|
|
1189
|
+
iconWidth: rt,
|
|
1192
1190
|
iconSize: bt,
|
|
1193
1191
|
showLabel: lt,
|
|
1194
1192
|
label: Nt,
|
|
1195
|
-
labelBreakOnActive:
|
|
1196
|
-
labelBackground:
|
|
1193
|
+
labelBreakOnActive: ut,
|
|
1194
|
+
labelBackground: kt,
|
|
1197
1195
|
labelPadding: L,
|
|
1198
|
-
labelBorderRadius:
|
|
1199
|
-
labelLeft:
|
|
1200
|
-
inputLabelMarginActive:
|
|
1201
|
-
labelActiveTop:
|
|
1196
|
+
labelBorderRadius: O,
|
|
1197
|
+
labelLeft: G,
|
|
1198
|
+
inputLabelMarginActive: j,
|
|
1199
|
+
labelActiveTop: Re,
|
|
1202
1200
|
labelActiveLeft: M,
|
|
1203
1201
|
labelRight: Wt,
|
|
1204
|
-
labelActiveRight:
|
|
1205
|
-
fontFamilyLabel:
|
|
1206
|
-
fontSizeLabel:
|
|
1207
|
-
fontSizeLabelActive:
|
|
1208
|
-
fontWeightLabel:
|
|
1209
|
-
lightTextColorLabel:
|
|
1210
|
-
lightTextColorLabelActive:
|
|
1211
|
-
darkTextColorLabel:
|
|
1202
|
+
labelActiveRight: Me,
|
|
1203
|
+
fontFamilyLabel: $t,
|
|
1204
|
+
fontSizeLabel: re,
|
|
1205
|
+
fontSizeLabelActive: it,
|
|
1206
|
+
fontWeightLabel: ae,
|
|
1207
|
+
lightTextColorLabel: wt,
|
|
1208
|
+
lightTextColorLabelActive: _,
|
|
1209
|
+
darkTextColorLabel: Y,
|
|
1212
1210
|
darkTextColorLabelActive: Yt
|
|
1213
|
-
} = Ea(
|
|
1214
|
-
const o =
|
|
1211
|
+
} = Ea(T), z = le(""), U = le(null), Bt = le(""), Dt = le(!1), st = le(!1), N = a(() => {
|
|
1212
|
+
const o = k.value ? "component-disabled" : "", y = de.value !== "b" ? "inline-block" : "block", Te = x ? x.value : "#ffffff", nt = F.value ? F.value : "", Ba = J.value ? J.value : "", ta = oe.value ? oe.value : "", wa = ce.value ? ce.value : !1, Da = q.value !== 0 && !q.value || q.value < 0 ? 0 : q.value, It = Q.value ? Q.value : "'Lato', sans-serif", aa = he.value ? he.value : null, qt = P.value !== 0 && !P.value || P.value < 0 ? 100 : P.value, Ra = Be.value ? Be.value : "'Lato', sans-serif", _a = _e.value ? _e.value : "1em", Ma = fe.value !== 0 && !fe.value || fe.value < 0 ? 100 : fe.value, Ha = Le.value ? Le.value : "#f15574", De = ve.value ? ve.value : 200, qa = Ae.value ? Ae.value : "normal", mt = ze.value ? ze.value : "xs", t = ie.value ? ie.value : !1, l = v.value ? v.value : !1, n = X.value ? X.value : "text", u = et.value ? et.value : !1, s = pt.value ? pt.value : "normal", d = se.value ? se.value : "left", f = pe.value ? pe.value : "background", p = g.value ? g.value : "5px 10px", V = me.value ? me.value : "0", $ = R.value ? R.value : 10, W = te.value ? te.value : "#000000", Z = Pe.value ? Pe.value : "#000000", Ne = qe.value ? qe.value : "transparent", vt = je.value ? je.value : "transparent", Oe = ee.value !== 0 && !ee.value || ee.value < 0 ? 0 : ee.value, Xe = Je.value ? Je.value : "transparent", Ua = at.value ? at.value : "transparent", Ka = rt.value ? rt.value : 32, Ga = bt.value ? bt.value : 1, Za = lt.value ? lt.value : !1, Ja = G.value !== 0 && !G.value || G.value < 0 ? 5 : G.value, Qa = kt.value ? kt.value : "transparent", Xa = j.value !== 0 && !j.value || j.value < 0 ? 15 : j.value, el = L.value ? L.value : "1px 5px", tl = O.value !== 0 && !O.value || O.value < 0 ? 0 : O.value, al = Re.value === null || Re.value === void 0 ? -13 : Re.value, ll = M.value === null || M.value === void 0 ? 5 : M.value, nl = Wt.value === null || Wt.value === void 0 ? 0 : Wt.value, ol = Me.value === null || Me.value === void 0 ? 0 : Me.value, rl = $t.value ? $t.value : "'Lato', sans-serif", ul = re.value ? re.value : "1em", il = it.value ? it.value : "0.8em", sl = ae.value ? ae.value : 400, dl = wt.value ? wt.value : "#ffffff", cl = Y.value ? Y.value : "#000000", fl = _.value ? _.value : "#ffffff", vl = Yt.value ? Yt.value : "#000000";
|
|
1215
1213
|
return {
|
|
1216
1214
|
disabled: o,
|
|
1217
|
-
display:
|
|
1215
|
+
display: y,
|
|
1218
1216
|
font: It,
|
|
1219
1217
|
fontSize: aa,
|
|
1220
1218
|
fontWeight: qt,
|
|
@@ -1222,34 +1220,34 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1222
1220
|
fontSizeMsg: _a,
|
|
1223
1221
|
fontWeightMsg: Ma,
|
|
1224
1222
|
textMessageColor: Ha,
|
|
1225
|
-
textColor:
|
|
1223
|
+
textColor: Te,
|
|
1226
1224
|
caretColor: nt,
|
|
1227
1225
|
selectionBgColor: Ba,
|
|
1228
1226
|
selectionTextColor: ta,
|
|
1229
1227
|
hasBorderRadius: wa,
|
|
1230
1228
|
borderRadius: Da,
|
|
1231
1229
|
textAlign: d,
|
|
1232
|
-
inputWidth:
|
|
1230
|
+
inputWidth: De,
|
|
1233
1231
|
activeTextStyle: qa,
|
|
1234
1232
|
sizeMediaQuery: mt,
|
|
1235
1233
|
inputReadonly: t,
|
|
1236
1234
|
showInputEye: l,
|
|
1237
1235
|
inputType: n,
|
|
1238
|
-
inputUppercase:
|
|
1236
|
+
inputUppercase: u,
|
|
1239
1237
|
theme: s,
|
|
1240
1238
|
inputStyle: f,
|
|
1241
1239
|
iconPadding: p,
|
|
1242
|
-
iconMargin:
|
|
1240
|
+
iconMargin: V,
|
|
1243
1241
|
iconPaddingInput: $,
|
|
1244
1242
|
iconLightTextColor: W,
|
|
1245
|
-
iconDarkTextColor:
|
|
1246
|
-
iconLightBgColor:
|
|
1247
|
-
iconDarkBgColor:
|
|
1248
|
-
iconBorderRadius:
|
|
1249
|
-
iconLightBgColorActive:
|
|
1243
|
+
iconDarkTextColor: Z,
|
|
1244
|
+
iconLightBgColor: Ne,
|
|
1245
|
+
iconDarkBgColor: vt,
|
|
1246
|
+
iconBorderRadius: Oe,
|
|
1247
|
+
iconLightBgColorActive: Xe,
|
|
1250
1248
|
iconDarkBgColorActive: Ua,
|
|
1251
|
-
iconWidth:
|
|
1252
|
-
iconSize:
|
|
1249
|
+
iconWidth: Ka,
|
|
1250
|
+
iconSize: Ga,
|
|
1253
1251
|
showLabel: Za,
|
|
1254
1252
|
labelBackground: Qa,
|
|
1255
1253
|
labelPadding: el,
|
|
@@ -1270,20 +1268,21 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1270
1268
|
darkTextColorLabelActive: vl
|
|
1271
1269
|
};
|
|
1272
1270
|
}), Ft = a(() => N.value.disabled), oa = a(() => {
|
|
1273
|
-
const o = N.value,
|
|
1271
|
+
const o = N.value, y = Ye.value;
|
|
1274
1272
|
return {
|
|
1275
1273
|
display: o.display,
|
|
1276
1274
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
1277
1275
|
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
1278
1276
|
paddingTop: "0px",
|
|
1279
1277
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
1280
|
-
|
|
1278
|
+
// Se não tem label ou está ativo, permite overflow visible para não cortar conteúdo
|
|
1279
|
+
overflow: !lt.value || y ? "visible" : "hidden"
|
|
1281
1280
|
};
|
|
1282
1281
|
}), ra = a(() => {
|
|
1283
1282
|
const o = N.value;
|
|
1284
1283
|
if (o.fontSize)
|
|
1285
1284
|
return o.fontSize;
|
|
1286
|
-
let
|
|
1285
|
+
let y = "";
|
|
1287
1286
|
switch (o.sizeMediaQuery) {
|
|
1288
1287
|
case "sm":
|
|
1289
1288
|
return "1.2em";
|
|
@@ -1292,19 +1291,19 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1292
1291
|
case "lg":
|
|
1293
1292
|
return "2em";
|
|
1294
1293
|
default:
|
|
1295
|
-
|
|
1294
|
+
y = "1.2em";
|
|
1296
1295
|
}
|
|
1297
|
-
return
|
|
1296
|
+
return y;
|
|
1298
1297
|
}), ua = a(() => {
|
|
1299
|
-
const o = N.value,
|
|
1298
|
+
const o = N.value, y = Ye.value;
|
|
1300
1299
|
return {
|
|
1301
1300
|
fontWeight: o.fontWeight,
|
|
1302
|
-
marginTop:
|
|
1301
|
+
marginTop: y && lt.value ? `${o.inputLabelMarginActive}px` : "0"
|
|
1303
1302
|
};
|
|
1304
|
-
}),
|
|
1303
|
+
}), dt = a(() => {
|
|
1305
1304
|
const o = N.value;
|
|
1306
1305
|
return o.inputStyle !== "line" && o.hasBorderRadius ? { borderRadius: `${o.borderRadius}rem` } : {};
|
|
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),
|
|
1306
|
+
}), 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), Kt = a(() => N.value.theme === "dark" ? He.value : xt.value), da = a(() => N.value.textMessageColor), ca = a(() => {
|
|
1308
1307
|
const o = N.value;
|
|
1309
1308
|
return o.caretColor || (o.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1310
1309
|
}), fa = a(() => {
|
|
@@ -1313,13 +1312,13 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1313
1312
|
}), va = a(() => {
|
|
1314
1313
|
const o = N.value;
|
|
1315
1314
|
return o.selectionTextColor || (o.theme === "dark" ? "#000000" : "#ffffff");
|
|
1316
|
-
}),
|
|
1315
|
+
}), Gt = a(() => {
|
|
1317
1316
|
const o = N.value;
|
|
1318
1317
|
return o.display === "block" ? { width: "100%" } : {
|
|
1319
1318
|
width: `${o.inputWidth}px`
|
|
1320
1319
|
};
|
|
1321
1320
|
}), pa = a(() => {
|
|
1322
|
-
switch (
|
|
1321
|
+
switch (pe.value) {
|
|
1323
1322
|
case "line":
|
|
1324
1323
|
return "component__input--line";
|
|
1325
1324
|
case "border":
|
|
@@ -1354,61 +1353,61 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1354
1353
|
default:
|
|
1355
1354
|
return "component__theme--light";
|
|
1356
1355
|
}
|
|
1357
|
-
}),
|
|
1356
|
+
}), ue = a(() => N.value.inputReadonly ? "component__input--read-only" : ""), Qe = a(() => N.value.inputUppercase ? "component__input--uppercase" : ""), Ot = a(() => {
|
|
1358
1357
|
const o = N.value;
|
|
1359
1358
|
return !!(o.showInputEye && o.inputType === "password");
|
|
1360
|
-
}), i = a(() =>
|
|
1359
|
+
}), i = a(() => Dt.value ? ht.value : Ie.value), S = a(() => h.value ? h.value : `${I.value}-name-label`), Ve = a(() => lt.value ? st.value ? Ge.value : "" : Ge.value), Ye = a(() => {
|
|
1361
1360
|
const o = z.value;
|
|
1362
|
-
return
|
|
1363
|
-
}), Zt = a(() => N.value.inputType === "password" ? "component__input__eye-default--hidden" : ""), ga = a(() =>
|
|
1361
|
+
return st.value || o != null && String(o).trim().length > 0;
|
|
1362
|
+
}), Zt = a(() => N.value.inputType === "password" ? "component__input__eye-default--hidden" : ""), ga = a(() => st.value ? "component__input--active" : "component__input--no-active"), ya = a(() => Ot.value ? "6px 50px 6px 10px" : "6px 10px"), ba = a(() => !!(be.value && We.value)), ma = a(() => {
|
|
1364
1363
|
const o = {};
|
|
1365
1364
|
B.value && Object.keys(B.value).forEach((nt) => o[`aria-${nt}`] = B.value[nt]);
|
|
1366
|
-
const
|
|
1367
|
-
"aria-label":
|
|
1368
|
-
"aria-disabled":
|
|
1365
|
+
const y = {
|
|
1366
|
+
"aria-label": D.value,
|
|
1367
|
+
"aria-disabled": k.value,
|
|
1369
1368
|
...o
|
|
1370
1369
|
};
|
|
1371
1370
|
return Object.fromEntries(
|
|
1372
|
-
Object.entries(
|
|
1371
|
+
Object.entries(y).filter(([Te, nt]) => nt != null)
|
|
1373
1372
|
);
|
|
1374
|
-
}),
|
|
1373
|
+
}), Rt = a(() => Se.value ? `${bt.value}rem` : "0"), ha = a(() => Se.value ? `${rt.value}px` : "0"), Sa = a(() => Se.value ? `component__icon--${Ee.value}` : ""), xa = a(() => {
|
|
1375
1374
|
const o = N.value;
|
|
1376
|
-
return
|
|
1375
|
+
return Se.value ? o.iconPadding : "0";
|
|
1377
1376
|
}), Ca = a(() => {
|
|
1378
1377
|
const o = N.value;
|
|
1379
|
-
return
|
|
1380
|
-
}),
|
|
1378
|
+
return Se.value ? o.iconMargin : "0";
|
|
1379
|
+
}), ct = a(() => {
|
|
1381
1380
|
const o = N.value;
|
|
1382
|
-
return
|
|
1381
|
+
return Se.value ? o.theme === "dark" ? o.iconDarkBgColor : o.iconLightBgColor : "transparent";
|
|
1383
1382
|
}), _t = a(() => {
|
|
1384
1383
|
const o = N.value;
|
|
1385
|
-
return
|
|
1384
|
+
return Se.value ? `${o.iconBorderRadius}rem` : "0";
|
|
1386
1385
|
}), Jt = a(() => {
|
|
1387
1386
|
const o = N.value;
|
|
1388
|
-
return
|
|
1387
|
+
return Se.value ? Ee.value === "left" ? { paddingLeft: `${o.iconPaddingInput}px` } : { paddingRight: `${o.iconPaddingInput}px` } : {};
|
|
1389
1388
|
}), Qt = a(() => {
|
|
1390
|
-
const o = N.value,
|
|
1389
|
+
const o = N.value, y = Ye.value, Te = y ? o.lightTextColorLabelActive : o.lightTextColorLabel, nt = y ? o.darkTextColorLabelActive : o.darkTextColorLabel;
|
|
1391
1390
|
return {
|
|
1392
1391
|
fontFamily: o.fontFamilyLabel,
|
|
1393
|
-
fontSize:
|
|
1392
|
+
fontSize: y ? o.fontSizeLabelActive : o.fontSizeLabel,
|
|
1394
1393
|
fontWeight: o.fontWeightLabel,
|
|
1395
|
-
color: o.theme === "dark" ? nt :
|
|
1396
|
-
top:
|
|
1397
|
-
left:
|
|
1398
|
-
right:
|
|
1399
|
-
transform:
|
|
1394
|
+
color: o.theme === "dark" ? nt : Te,
|
|
1395
|
+
top: y ? `${o.labelActiveTop}px` : "50%",
|
|
1396
|
+
left: y ? `${o.labelActiveLeft}px` : `${o.labelLeft}px`,
|
|
1397
|
+
right: y ? `${o.labelActiveRight}px` : `${o.labelRight}px`,
|
|
1398
|
+
transform: y ? "translateY(0)" : "translateY(-50%)",
|
|
1400
1399
|
transition: "all 0.2s ease",
|
|
1401
|
-
backgroundColor:
|
|
1402
|
-
padding:
|
|
1403
|
-
borderRadius:
|
|
1400
|
+
backgroundColor: y ? o.labelBackground : "transparent",
|
|
1401
|
+
padding: y ? o.labelPadding : "0",
|
|
1402
|
+
borderRadius: y ? `${o.labelBorderRadius}rem` : "0",
|
|
1404
1403
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
1405
|
-
...
|
|
1406
|
-
whiteSpace:
|
|
1407
|
-
wordWrap:
|
|
1408
|
-
overflowWrap:
|
|
1404
|
+
...y ? {
|
|
1405
|
+
whiteSpace: ut.value ? "nowrap" : "normal",
|
|
1406
|
+
wordWrap: ut.value ? "normal" : "break-word",
|
|
1407
|
+
overflowWrap: ut.value ? "normal" : "break-word",
|
|
1409
1408
|
maxWidth: "100%",
|
|
1410
|
-
textOverflow:
|
|
1411
|
-
overflow:
|
|
1409
|
+
textOverflow: ut.value ? "ellipsis" : "clip",
|
|
1410
|
+
overflow: ut.value ? "hidden" : "visible"
|
|
1412
1411
|
} : {}
|
|
1413
1412
|
};
|
|
1414
1413
|
});
|
|
@@ -1417,152 +1416,152 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1417
1416
|
return o.theme === "dark" ? o.darkTextColorLabelActive : o.lightTextColorLabelActive;
|
|
1418
1417
|
});
|
|
1419
1418
|
const Ht = () => {
|
|
1420
|
-
|
|
1419
|
+
ge.value != null ? X.value === "number" && typeof ge.value == "number" ? z.value = ge.value : z.value = String(ge.value) : z.value = "", Bt.value = X.value;
|
|
1421
1420
|
}, Xt = () => {
|
|
1422
1421
|
const o = N.value;
|
|
1423
1422
|
if (o.inputReadonly || o.disabled)
|
|
1424
1423
|
return;
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1427
|
-
},
|
|
1428
|
-
if (
|
|
1424
|
+
const y = !Dt.value;
|
|
1425
|
+
y ? Bt.value = "text" : Bt.value = X.value, Dt.value = y;
|
|
1426
|
+
}, ft = a(() => Bt.value === "number"), Lt = (o) => {
|
|
1427
|
+
if (X.value === "number") {
|
|
1429
1428
|
if (o === "" || o === null || o === void 0)
|
|
1430
1429
|
return "";
|
|
1431
1430
|
{
|
|
1432
|
-
const
|
|
1433
|
-
return isNaN(
|
|
1431
|
+
const y = typeof o == "number" ? o : Number(o);
|
|
1432
|
+
return isNaN(y) ? o : y;
|
|
1434
1433
|
}
|
|
1435
1434
|
}
|
|
1436
1435
|
return o;
|
|
1437
1436
|
}, Va = (o) => {
|
|
1438
|
-
|
|
1437
|
+
b("clicked", o);
|
|
1439
1438
|
}, Ta = (o) => {
|
|
1440
|
-
o.stopPropagation(), !(
|
|
1439
|
+
o.stopPropagation(), !(k.value || N.value.inputReadonly) && U.value && U.value.focus();
|
|
1441
1440
|
}, ea = () => {
|
|
1442
|
-
|
|
1441
|
+
k.value || N.value.inputReadonly || !Ce.value || b("entered", Lt(z.value));
|
|
1443
1442
|
}, ka = async (o) => {
|
|
1444
|
-
var
|
|
1445
|
-
const
|
|
1446
|
-
|
|
1443
|
+
var Te;
|
|
1444
|
+
const y = ((Te = o.clipboardData) == null ? void 0 : Te.getData("text")) || "";
|
|
1445
|
+
b("paste", y), Ke.value && o.preventDefault();
|
|
1447
1446
|
};
|
|
1448
|
-
return
|
|
1449
|
-
|
|
1450
|
-
}, { immediate: !0 }),
|
|
1447
|
+
return ne(X, (o) => {
|
|
1448
|
+
Bt.value = o;
|
|
1449
|
+
}, { immediate: !0 }), ne(ge, (o) => {
|
|
1451
1450
|
if (o != null)
|
|
1452
|
-
if (
|
|
1451
|
+
if (X.value === "number" && typeof o == "number")
|
|
1453
1452
|
o !== z.value && (z.value = o);
|
|
1454
1453
|
else {
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1454
|
+
const y = String(o);
|
|
1455
|
+
y !== z.value && (z.value = y);
|
|
1457
1456
|
}
|
|
1458
1457
|
else
|
|
1459
1458
|
z.value !== "" && (z.value = "");
|
|
1460
|
-
}, { immediate: !0 }),
|
|
1461
|
-
|
|
1462
|
-
}),
|
|
1463
|
-
|
|
1464
|
-
}),
|
|
1465
|
-
|
|
1466
|
-
}, { immediate: !0 }),
|
|
1467
|
-
|
|
1468
|
-
}),
|
|
1459
|
+
}, { immediate: !0 }), ne(z, (o) => {
|
|
1460
|
+
E.value && typeof o == "string" && (o = o.trim()), b("changed", Lt(o));
|
|
1461
|
+
}), ne(st, (o) => {
|
|
1462
|
+
b(o ? "focused" : "blurred");
|
|
1463
|
+
}), ne(Dt, (o) => {
|
|
1464
|
+
b("show-input-eye", o);
|
|
1465
|
+
}, { immediate: !0 }), ne(z, (o) => {
|
|
1466
|
+
E.value && typeof o == "string" && (o = o.trim()), b("current-value", Lt(o));
|
|
1467
|
+
}), ne(X, (o) => {
|
|
1469
1468
|
o === "password" && nextTick(() => {
|
|
1470
|
-
const
|
|
1471
|
-
|
|
1469
|
+
const y = document.getElementById(h.value);
|
|
1470
|
+
y && (y.type = "password", y.removeAttribute("autocomplete"));
|
|
1472
1471
|
});
|
|
1473
|
-
}), (o,
|
|
1472
|
+
}), (o, y) => r(I) ? (H(), K("div", $a({
|
|
1474
1473
|
key: 0,
|
|
1475
1474
|
class: ["nb-wrapper", Ft.value],
|
|
1476
|
-
style: [oa.value,
|
|
1475
|
+
style: [oa.value, Gt.value, dt.value],
|
|
1477
1476
|
role: "input",
|
|
1478
1477
|
title: e.title
|
|
1479
1478
|
}, ma.value), [
|
|
1480
|
-
|
|
1481
|
-
id:
|
|
1482
|
-
class:
|
|
1483
|
-
style:
|
|
1484
|
-
onClick:
|
|
1479
|
+
ke("div", {
|
|
1480
|
+
id: r(I),
|
|
1481
|
+
class: Ue(["nb-reset", "component", c.value, A.value, ue.value, pa.value]),
|
|
1482
|
+
style: Fe([ua.value, Gt.value, dt.value]),
|
|
1483
|
+
onClick: y[4] || (y[4] = (Te) => Va(Te))
|
|
1485
1484
|
}, [
|
|
1486
|
-
|
|
1485
|
+
r(lt) ? (H(), K("label", {
|
|
1487
1486
|
key: 0,
|
|
1488
|
-
for:
|
|
1487
|
+
for: S.value,
|
|
1489
1488
|
class: "component__label",
|
|
1490
|
-
style:
|
|
1489
|
+
style: Fe([Qt.value]),
|
|
1491
1490
|
onClick: Ta
|
|
1492
1491
|
}, [
|
|
1493
|
-
jt(
|
|
1494
|
-
e.required ? (
|
|
1495
|
-
], 12, ql)) :
|
|
1496
|
-
Ot.value ? (
|
|
1492
|
+
jt(Mt(r(Nt)), 1),
|
|
1493
|
+
e.required ? (H(), K("span", jl, "*")) : xe("", !0)
|
|
1494
|
+
], 12, ql)) : xe("", !0),
|
|
1495
|
+
Ot.value ? (H(), K("div", {
|
|
1497
1496
|
key: 1,
|
|
1498
|
-
class:
|
|
1499
|
-
style:
|
|
1497
|
+
class: Ue(["component__eye", ga.value]),
|
|
1498
|
+
style: Fe([dt.value]),
|
|
1500
1499
|
onClick: Xt
|
|
1501
1500
|
}, [
|
|
1502
|
-
|
|
1503
|
-
for:
|
|
1504
|
-
class:
|
|
1501
|
+
ke("label", {
|
|
1502
|
+
for: S.value,
|
|
1503
|
+
class: Ue(["component__eye-icon", "fas"])
|
|
1505
1504
|
}, [
|
|
1506
|
-
e.inputEyeCustomIcon ? (
|
|
1507
|
-
|
|
1508
|
-
|
|
1505
|
+
e.inputEyeCustomIcon ? (H(), K("span", Kl, [
|
|
1506
|
+
Dt.value ? La(o.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
1507
|
+
y[5] || (y[5] = jt("show"))
|
|
1509
1508
|
], !0) : La(o.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1510
|
-
|
|
1509
|
+
y[6] || (y[6] = jt("hidden"))
|
|
1511
1510
|
], !0)
|
|
1512
|
-
])) : (
|
|
1511
|
+
])) : (H(), K("span", Ul, Mt(i.value), 1))
|
|
1513
1512
|
], 8, Yl)
|
|
1514
|
-
], 6)) :
|
|
1515
|
-
Pa(
|
|
1513
|
+
], 6)) : xe("", !0),
|
|
1514
|
+
Pa(ke("input", {
|
|
1516
1515
|
ref_key: "inputRef",
|
|
1517
|
-
ref:
|
|
1518
|
-
"onUpdate:modelValue":
|
|
1519
|
-
id:
|
|
1520
|
-
name:
|
|
1521
|
-
type:
|
|
1522
|
-
class:
|
|
1523
|
-
|
|
1516
|
+
ref: U,
|
|
1517
|
+
"onUpdate:modelValue": y[0] || (y[0] = (Te) => z.value = Te),
|
|
1518
|
+
id: S.value,
|
|
1519
|
+
name: S.value,
|
|
1520
|
+
type: Bt.value,
|
|
1521
|
+
class: Ue(["component__input", [
|
|
1522
|
+
Qe.value,
|
|
1524
1523
|
Zt.value,
|
|
1525
1524
|
zt.value
|
|
1526
1525
|
]]),
|
|
1527
|
-
placeholder:
|
|
1528
|
-
disabled:
|
|
1526
|
+
placeholder: Ve.value,
|
|
1527
|
+
disabled: r(k) || r(ie),
|
|
1529
1528
|
required: e.required,
|
|
1530
|
-
readonly:
|
|
1529
|
+
readonly: r(ie),
|
|
1531
1530
|
autocomplete: e.inputAutocomplete,
|
|
1532
|
-
tabindex:
|
|
1533
|
-
min:
|
|
1534
|
-
max:
|
|
1535
|
-
step:
|
|
1531
|
+
tabindex: r(k) || r(ie) ? -1 : r(ot),
|
|
1532
|
+
min: ft.value ? e.min : void 0,
|
|
1533
|
+
max: ft.value ? e.max : void 0,
|
|
1534
|
+
step: ft.value ? e.step : void 0,
|
|
1536
1535
|
role: "input",
|
|
1537
|
-
style:
|
|
1538
|
-
onFocus:
|
|
1539
|
-
onBlur:
|
|
1540
|
-
onKeydown:
|
|
1536
|
+
style: Fe([dt.value, Jt.value]),
|
|
1537
|
+
onFocus: y[1] || (y[1] = (Te) => st.value = !0),
|
|
1538
|
+
onBlur: y[2] || (y[2] = (Te) => st.value = !1),
|
|
1539
|
+
onKeydown: y[3] || (y[3] = na((Te) => !r(k) && r(Ce) && ea(), ["enter"])),
|
|
1541
1540
|
onPaste: ka
|
|
1542
|
-
}, null, 46,
|
|
1541
|
+
}, null, 46, Gl), [
|
|
1543
1542
|
[ml, z.value]
|
|
1544
1543
|
]),
|
|
1545
|
-
|
|
1544
|
+
r(Se) ? (H(), K("label", {
|
|
1546
1545
|
key: 2,
|
|
1547
|
-
for:
|
|
1548
|
-
class:
|
|
1546
|
+
for: S.value,
|
|
1547
|
+
class: Ue(["component__icon", Sa.value])
|
|
1549
1548
|
}, [
|
|
1550
1549
|
La(o.$slots, "icon", {}, () => [
|
|
1551
|
-
|
|
1550
|
+
y[7] || (y[7] = ke("span", null, "♥", -1))
|
|
1552
1551
|
], !0)
|
|
1553
|
-
], 10, Zl)) :
|
|
1552
|
+
], 10, Zl)) : xe("", !0)
|
|
1554
1553
|
], 14, Hl),
|
|
1555
|
-
ba.value ? (
|
|
1554
|
+
ba.value ? (H(), K("div", {
|
|
1556
1555
|
key: 0,
|
|
1557
|
-
class:
|
|
1556
|
+
class: Ue(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
1558
1557
|
}, [
|
|
1559
1558
|
La(o.$slots, "message", {}, () => [
|
|
1560
|
-
jt(
|
|
1559
|
+
jt(Mt(e.message), 1)
|
|
1561
1560
|
], !0)
|
|
1562
|
-
], 2)) :
|
|
1563
|
-
], 16, _l)) :
|
|
1561
|
+
], 2)) : xe("", !0)
|
|
1562
|
+
], 16, _l)) : xe("", !0);
|
|
1564
1563
|
}
|
|
1565
|
-
}), Ql = /* @__PURE__ */ Oa(Jl, [["__scopeId", "data-v-
|
|
1564
|
+
}), Ql = /* @__PURE__ */ Oa(Jl, [["__scopeId", "data-v-5069e468"]]);
|
|
1566
1565
|
const Xl = ["title"], en = ["for"], tn = {
|
|
1567
1566
|
key: 0,
|
|
1568
1567
|
class: "component__label--required"
|
|
@@ -1580,8 +1579,8 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
1580
1579
|
type: String,
|
|
1581
1580
|
default: "b",
|
|
1582
1581
|
validator: (e = "b") => {
|
|
1583
|
-
const
|
|
1584
|
-
return ["b", "ib"].includes(
|
|
1582
|
+
const m = e.toLowerCase();
|
|
1583
|
+
return ["b", "ib"].includes(m);
|
|
1585
1584
|
}
|
|
1586
1585
|
},
|
|
1587
1586
|
tabIndex: {
|
|
@@ -1916,178 +1915,179 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
1916
1915
|
}
|
|
1917
1916
|
},
|
|
1918
1917
|
emits: ["clicked", "changed", "removed", "added", "input-changed", "focused", "blurred", "paste"],
|
|
1919
|
-
setup(e, { emit:
|
|
1918
|
+
setup(e, { emit: m }) {
|
|
1920
1919
|
Wa((c) => ({
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
"
|
|
1925
|
-
"
|
|
1926
|
-
"
|
|
1927
|
-
"
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
"
|
|
1932
|
-
|
|
1933
|
-
"
|
|
1934
|
-
"
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
"
|
|
1938
|
-
"
|
|
1939
|
-
|
|
1940
|
-
"
|
|
1941
|
-
"
|
|
1942
|
-
|
|
1943
|
-
"
|
|
1944
|
-
"
|
|
1945
|
-
|
|
1946
|
-
"
|
|
1920
|
+
"2abf6c48": z.value,
|
|
1921
|
+
b640f0a2: Bt.value,
|
|
1922
|
+
"89f839e6": r(ht),
|
|
1923
|
+
"9c8fd696": r(et),
|
|
1924
|
+
"2e2461ae": r(Ge),
|
|
1925
|
+
"6eedc749": r(ot),
|
|
1926
|
+
"019740a1": r(Ie),
|
|
1927
|
+
"4195c62c": r($e),
|
|
1928
|
+
d3e5d71a: r(Vt),
|
|
1929
|
+
"4feb30ca": r(gt),
|
|
1930
|
+
"6ba6d194": r(xt),
|
|
1931
|
+
a71f91a2: r(tt),
|
|
1932
|
+
"2f8561f2": r(Ze),
|
|
1933
|
+
"96ddac60": r(He),
|
|
1934
|
+
"892c406c": r(ge),
|
|
1935
|
+
dce120b8: r(Ct),
|
|
1936
|
+
"7e2453b4": wt.value,
|
|
1937
|
+
"38129a84": st.value,
|
|
1938
|
+
"821f1654": N.value,
|
|
1939
|
+
"5ba4beee": Ft.value,
|
|
1940
|
+
"6f6c4a26": c.styleButtonColor,
|
|
1941
|
+
"950f0e5c": U.value,
|
|
1942
|
+
"20c66799": r(pt),
|
|
1943
|
+
"1372badc": r(At),
|
|
1944
|
+
"13bb1702": r(we),
|
|
1945
|
+
"7365cc78": r(C)
|
|
1947
1946
|
})), Aa(() => {
|
|
1948
|
-
|
|
1947
|
+
q.value.length > 0 && (Me.value = q.value);
|
|
1949
1948
|
});
|
|
1950
|
-
const
|
|
1951
|
-
nbId:
|
|
1952
|
-
display:
|
|
1953
|
-
textColor:
|
|
1954
|
-
paddingX:
|
|
1949
|
+
const b = m, T = e, {
|
|
1950
|
+
nbId: I,
|
|
1951
|
+
display: de,
|
|
1952
|
+
textColor: Ce,
|
|
1953
|
+
paddingX: D,
|
|
1955
1954
|
paddingY: B,
|
|
1956
|
-
borderRadius:
|
|
1957
|
-
disabled:
|
|
1958
|
-
fontFamily:
|
|
1959
|
-
fontSize:
|
|
1960
|
-
fontWeight:
|
|
1961
|
-
currentList:
|
|
1962
|
-
allowDuplicates:
|
|
1963
|
-
minChips:
|
|
1964
|
-
maxChips:
|
|
1965
|
-
inputPosition:
|
|
1966
|
-
width:
|
|
1967
|
-
inputName:
|
|
1968
|
-
inputPlaceholder:
|
|
1969
|
-
inputUppercase:
|
|
1955
|
+
borderRadius: x,
|
|
1956
|
+
disabled: F,
|
|
1957
|
+
fontFamily: J,
|
|
1958
|
+
fontSize: oe,
|
|
1959
|
+
fontWeight: ce,
|
|
1960
|
+
currentList: q,
|
|
1961
|
+
allowDuplicates: k,
|
|
1962
|
+
minChips: Q,
|
|
1963
|
+
maxChips: he,
|
|
1964
|
+
inputPosition: P,
|
|
1965
|
+
width: Be,
|
|
1966
|
+
inputName: _e,
|
|
1967
|
+
inputPlaceholder: fe,
|
|
1968
|
+
inputUppercase: Le,
|
|
1970
1969
|
inputReadonly: ve,
|
|
1971
|
-
blockPaste:
|
|
1972
|
-
inputAutocomplete:
|
|
1973
|
-
required:
|
|
1974
|
-
textAlign:
|
|
1975
|
-
hasBorderRadius:
|
|
1970
|
+
blockPaste: pe,
|
|
1971
|
+
inputAutocomplete: Ae,
|
|
1972
|
+
required: ze,
|
|
1973
|
+
textAlign: ie,
|
|
1974
|
+
hasBorderRadius: Ke,
|
|
1976
1975
|
activeTextStyle: v,
|
|
1977
|
-
theme:
|
|
1978
|
-
inputStyle:
|
|
1979
|
-
lightBgColor:
|
|
1980
|
-
lightBgColorFocus:
|
|
1981
|
-
lightBorderColor:
|
|
1982
|
-
lightBorderColorFocus:
|
|
1983
|
-
lightDisabledBgColor:
|
|
1976
|
+
theme: X,
|
|
1977
|
+
inputStyle: E,
|
|
1978
|
+
lightBgColor: et,
|
|
1979
|
+
lightBgColorFocus: h,
|
|
1980
|
+
lightBorderColor: Ge,
|
|
1981
|
+
lightBorderColorFocus: ge,
|
|
1982
|
+
lightDisabledBgColor: pt,
|
|
1984
1983
|
lightTextColor: ht,
|
|
1985
1984
|
lightChipBgColor: ot,
|
|
1986
|
-
lightChipTextColor:
|
|
1987
|
-
lightChipRemoveColor:
|
|
1988
|
-
lightDisabledBorderColor:
|
|
1989
|
-
darkBgColor:
|
|
1985
|
+
lightChipTextColor: Ie,
|
|
1986
|
+
lightChipRemoveColor: $e,
|
|
1987
|
+
lightDisabledBorderColor: At,
|
|
1988
|
+
darkBgColor: gt,
|
|
1990
1989
|
darkBgColorFocus: St,
|
|
1991
1990
|
darkBorderColor: xt,
|
|
1992
1991
|
darkBorderColorFocus: Ct,
|
|
1993
|
-
darkDisabledBgColor:
|
|
1994
|
-
darkTextColor:
|
|
1995
|
-
darkChipBgColor:
|
|
1996
|
-
darkChipTextColor:
|
|
1997
|
-
darkChipRemoveColor:
|
|
1998
|
-
darkDisabledBorderColor:
|
|
1999
|
-
tabIndex:
|
|
2000
|
-
hasTabIndexEnter:
|
|
2001
|
-
ariaLabel:
|
|
2002
|
-
ariaAttrs:
|
|
2003
|
-
caretColor:
|
|
2004
|
-
selectionBgColor:
|
|
2005
|
-
selectionTextColor:
|
|
2006
|
-
showLabel:
|
|
2007
|
-
label:
|
|
2008
|
-
labelBackground:
|
|
2009
|
-
labelPadding:
|
|
2010
|
-
labelBorderRadius:
|
|
2011
|
-
labelBreakOnActive:
|
|
2012
|
-
labelLeft:
|
|
2013
|
-
inputLabelMarginActive:
|
|
2014
|
-
labelActiveTop:
|
|
1992
|
+
darkDisabledBgColor: we,
|
|
1993
|
+
darkTextColor: Vt,
|
|
1994
|
+
darkChipBgColor: tt,
|
|
1995
|
+
darkChipTextColor: Ze,
|
|
1996
|
+
darkChipRemoveColor: He,
|
|
1997
|
+
darkDisabledBorderColor: C,
|
|
1998
|
+
tabIndex: w,
|
|
1999
|
+
hasTabIndexEnter: ye,
|
|
2000
|
+
ariaLabel: se,
|
|
2001
|
+
ariaAttrs: be,
|
|
2002
|
+
caretColor: We,
|
|
2003
|
+
selectionBgColor: Se,
|
|
2004
|
+
selectionTextColor: Ee,
|
|
2005
|
+
showLabel: g,
|
|
2006
|
+
label: R,
|
|
2007
|
+
labelBackground: me,
|
|
2008
|
+
labelPadding: ee,
|
|
2009
|
+
labelBorderRadius: te,
|
|
2010
|
+
labelBreakOnActive: Pe,
|
|
2011
|
+
labelLeft: qe,
|
|
2012
|
+
inputLabelMarginActive: je,
|
|
2013
|
+
labelActiveTop: Je,
|
|
2015
2014
|
labelActiveLeft: at,
|
|
2016
2015
|
fontFamilyLabel: yt,
|
|
2017
|
-
fontSizeLabel:
|
|
2018
|
-
fontSizeLabelActive:
|
|
2016
|
+
fontSizeLabel: Tt,
|
|
2017
|
+
fontSizeLabelActive: rt,
|
|
2019
2018
|
fontWeightLabel: bt,
|
|
2020
2019
|
lightTextColorLabel: lt,
|
|
2021
2020
|
lightTextColorLabelActive: Nt,
|
|
2022
|
-
darkTextColorLabel:
|
|
2023
|
-
darkTextColorLabelActive:
|
|
2021
|
+
darkTextColorLabel: ut,
|
|
2022
|
+
darkTextColorLabelActive: kt,
|
|
2024
2023
|
fontFamilyChip: L,
|
|
2025
|
-
fontSizeChip:
|
|
2026
|
-
fontWeightChip:
|
|
2027
|
-
} = Ea(
|
|
2028
|
-
const c =
|
|
2024
|
+
fontSizeChip: O,
|
|
2025
|
+
fontWeightChip: G
|
|
2026
|
+
} = Ea(T), j = le(""), Re = le(null), M = le(null), Wt = le(null), Me = le([]), $t = le(!1), re = a(() => {
|
|
2027
|
+
const c = F.value ? "component-disabled" : "", A = de.value !== "b" ? "inline-block" : "block", ue = !Be.value || Be.value < 185 ? 185 : Be.value, Qe = Ce ? Ce.value : "ffffff", Ot = We.value ? We.value : "", i = Se.value ? Se.value : "", S = Ee.value ? Ee.value : "", Ve = D.value !== 0 && !D.value || D.value < 0 ? 1 : D.value, Ye = B.value !== 0 && !B.value || B.value < 0 ? 0.2 : B.value, Zt = x.value !== 0 && !x.value || x.value < 0 ? 0 : x.value, ga = J.value ? J.value : "'Lato', sans-serif", ya = oe.value ? oe.value : "1.2em", ba = ce.value !== 0 && !ce.value || ce.value < 0 ? 100 : ce.value, ma = Q.value !== 0 && !Q.value || Q.value < 0 ? 0 : Q.value, Rt = he.value !== 0 && !he.value || he.value < 0 ? 10 : he.value, ha = !P.value || !["top", "bottom"].includes(P.value) ? "bottom" : P.value, Sa = !E.value || !["background", "line", "border"].includes(E.value) ? "background" : E.value, xa = X.value ? X.value : "light", Ca = g.value ? g.value : !1, ct = qe.value !== 0 && !qe.value || qe.value < 0 ? 5 : qe.value, _t = me.value ? me.value : "transparent", Jt = je.value !== 0 && !je.value || je.value < 0 ? 15 : je.value, Qt = ee.value ? ee.value : "1px 5px", Ht = te.value !== 0 && !te.value || te.value < 0 ? 0 : te.value, Xt = Je.value === null || Je.value === void 0 ? -13 : Je.value, ft = at.value === null || at.value === void 0 ? 5 : at.value, Lt = yt.value ? yt.value : "'Lato', sans-serif", Va = Tt.value ? Tt.value : "1em", Ta = rt.value ? rt.value : "0.8em", ea = bt.value ? bt.value : 400, ka = lt.value ? lt.value : "#333333", o = ut.value ? ut.value : "#ffffff", y = Nt.value ? Nt.value : "#333333", Te = kt.value ? kt.value : "#ffffff", nt = L.value ? L.value : "'Lato', sans-serif", Ba = O.value ? O.value : "1.2em", ta = G.value ? G.value : 400;
|
|
2029
2028
|
return {
|
|
2030
2029
|
disabled: c,
|
|
2031
2030
|
display: A,
|
|
2032
|
-
width:
|
|
2031
|
+
width: ue,
|
|
2033
2032
|
font: ga,
|
|
2034
2033
|
fontSize: ya,
|
|
2035
2034
|
fontWeight: ba,
|
|
2036
|
-
textColor:
|
|
2035
|
+
textColor: Qe,
|
|
2037
2036
|
caretColor: Ot,
|
|
2038
2037
|
selectionBgColor: i,
|
|
2039
|
-
selectionTextColor:
|
|
2040
|
-
paddingX:
|
|
2041
|
-
paddingY:
|
|
2038
|
+
selectionTextColor: S,
|
|
2039
|
+
paddingX: Ve,
|
|
2040
|
+
paddingY: Ye,
|
|
2042
2041
|
borderRadius: Zt,
|
|
2043
2042
|
minChips: ma,
|
|
2044
|
-
maxChips:
|
|
2043
|
+
maxChips: Rt,
|
|
2045
2044
|
inputPosition: ha,
|
|
2046
2045
|
inputStyle: Sa,
|
|
2047
2046
|
theme: xa,
|
|
2048
2047
|
showLabel: Ca,
|
|
2049
|
-
labelLeft:
|
|
2048
|
+
labelLeft: ct,
|
|
2050
2049
|
labelBackground: _t,
|
|
2051
2050
|
inputLabelMarginActive: Jt,
|
|
2052
2051
|
labelPadding: Qt,
|
|
2053
2052
|
labelBorderRadius: Ht,
|
|
2054
2053
|
labelActiveTop: Xt,
|
|
2055
|
-
labelActiveLeft:
|
|
2056
|
-
fontFamilyLabel:
|
|
2054
|
+
labelActiveLeft: ft,
|
|
2055
|
+
fontFamilyLabel: Lt,
|
|
2057
2056
|
fontSizeLabel: Va,
|
|
2058
2057
|
fontSizeLabelActive: Ta,
|
|
2059
2058
|
fontWeightLabel: ea,
|
|
2060
2059
|
lightTextColorLabel: ka,
|
|
2061
2060
|
darkTextColorLabel: o,
|
|
2062
|
-
lightTextColorLabelActive:
|
|
2063
|
-
darkTextColorLabelActive:
|
|
2061
|
+
lightTextColorLabelActive: y,
|
|
2062
|
+
darkTextColorLabelActive: Te,
|
|
2064
2063
|
fontFamilyChip: nt,
|
|
2065
2064
|
fontSizeChip: Ba,
|
|
2066
2065
|
fontWeightChip: ta
|
|
2067
2066
|
};
|
|
2068
|
-
}),
|
|
2069
|
-
const c =
|
|
2067
|
+
}), it = a(() => re.value.disabled), ae = a(() => {
|
|
2068
|
+
const c = re.value, A = Et.value;
|
|
2070
2069
|
return {
|
|
2071
2070
|
display: c.display,
|
|
2072
2071
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
2073
2072
|
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
2074
2073
|
paddingTop: "0px",
|
|
2075
2074
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
2076
|
-
|
|
2075
|
+
// Se não tem label ou está ativo, permite overflow visible para não cortar conteúdo
|
|
2076
|
+
overflow: !g.value || A ? "visible" : "hidden"
|
|
2077
2077
|
};
|
|
2078
|
-
}),
|
|
2079
|
-
const c =
|
|
2078
|
+
}), wt = a(() => {
|
|
2079
|
+
const c = re.value;
|
|
2080
2080
|
return c.fontSize ? c.fontSize : "1.2em";
|
|
2081
|
-
}),
|
|
2082
|
-
const c =
|
|
2081
|
+
}), _ = a(() => {
|
|
2082
|
+
const c = re.value, A = Et.value;
|
|
2083
2083
|
return {
|
|
2084
2084
|
color: c.textColor,
|
|
2085
2085
|
padding: `${c.paddingY}rem ${c.paddingX}rem`,
|
|
2086
2086
|
fontWeight: c.fontWeight,
|
|
2087
|
-
textAlign:
|
|
2088
|
-
marginTop: A &&
|
|
2087
|
+
textAlign: ie.value,
|
|
2088
|
+
marginTop: A && g.value ? `${c.inputLabelMarginActive}px` : "0"
|
|
2089
2089
|
};
|
|
2090
|
-
}),
|
|
2090
|
+
}), Y = a(() => {
|
|
2091
2091
|
switch (v.value) {
|
|
2092
2092
|
case "italic":
|
|
2093
2093
|
return "component__text--italic";
|
|
@@ -2097,45 +2097,45 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
2097
2097
|
return "component__text--normal";
|
|
2098
2098
|
}
|
|
2099
2099
|
}), Yt = a(() => {
|
|
2100
|
-
const c =
|
|
2101
|
-
return c.inputStyle !== "line" &&
|
|
2102
|
-
}), z = a(() =>
|
|
2100
|
+
const c = re.value;
|
|
2101
|
+
return c.inputStyle !== "line" && Ke.value ? { borderRadius: `${c.borderRadius}rem` } : {};
|
|
2102
|
+
}), z = a(() => re.value.font), U = a(() => re.value.textColor), Bt = a(() => re.value.inputPosition === "top" ? "column" : "column-reverse"), Dt = a(() => {
|
|
2103
2103
|
const c = {};
|
|
2104
|
-
|
|
2104
|
+
be.value && Object.keys(be.value).forEach((Qe) => c[`aria-${Qe}`] = be.value[Qe]);
|
|
2105
2105
|
const A = {
|
|
2106
|
-
"aria-label":
|
|
2107
|
-
"aria-disabled":
|
|
2106
|
+
"aria-label": se.value,
|
|
2107
|
+
"aria-disabled": F.value,
|
|
2108
2108
|
...c
|
|
2109
2109
|
};
|
|
2110
2110
|
return Object.fromEntries(
|
|
2111
|
-
Object.entries(A).filter(([
|
|
2111
|
+
Object.entries(A).filter(([ue, Qe]) => Qe != null)
|
|
2112
2112
|
);
|
|
2113
|
-
}),
|
|
2114
|
-
const c =
|
|
2113
|
+
}), st = a(() => {
|
|
2114
|
+
const c = re.value;
|
|
2115
2115
|
return c.caretColor || (c.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2116
2116
|
}), N = a(() => {
|
|
2117
|
-
const c =
|
|
2117
|
+
const c = re.value;
|
|
2118
2118
|
return c.selectionBgColor || (c.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2119
2119
|
}), Ft = a(() => {
|
|
2120
|
-
const c =
|
|
2120
|
+
const c = re.value;
|
|
2121
2121
|
return c.selectionTextColor || (c.theme === "dark" ? "#000000" : "#ffffff");
|
|
2122
2122
|
}), oa = a(() => ({
|
|
2123
|
-
caretColor:
|
|
2123
|
+
caretColor: st.value
|
|
2124
2124
|
})), ra = a(() => ({
|
|
2125
2125
|
"--selection-bg-color": N.value,
|
|
2126
2126
|
"--selection-text-color": Ft.value
|
|
2127
2127
|
})), ua = a(() => {
|
|
2128
|
-
const c =
|
|
2128
|
+
const c = re.value, A = {
|
|
2129
2129
|
width: `${c.width}px`
|
|
2130
2130
|
};
|
|
2131
2131
|
return c.display === "block" ? { width: "auto" } : A;
|
|
2132
|
-
}),
|
|
2133
|
-
const c =
|
|
2132
|
+
}), dt = a(() => _e.value ? _e.value : `${I.value}-name-label`), Et = a(() => $t.value || Me.value.length > 0 || j.value && j.value.trim().length > 0), Pt = a(() => g.value ? $t.value || Me.value.length > 0 ? fe.value : "" : fe.value), ia = a(() => {
|
|
2133
|
+
const c = re.value, A = Et.value, ue = A ? c.lightTextColorLabelActive : c.lightTextColorLabel, Qe = A ? c.darkTextColorLabelActive : c.darkTextColorLabel;
|
|
2134
2134
|
return {
|
|
2135
2135
|
fontFamily: c.fontFamilyLabel,
|
|
2136
2136
|
fontSize: A ? c.fontSizeLabelActive : c.fontSizeLabel,
|
|
2137
2137
|
fontWeight: c.fontWeightLabel,
|
|
2138
|
-
color: c.theme === "dark" ?
|
|
2138
|
+
color: c.theme === "dark" ? Qe : ue,
|
|
2139
2139
|
top: A ? `${c.labelActiveTop}px` : "50%",
|
|
2140
2140
|
left: A ? `${c.labelActiveLeft}px` : `${c.labelLeft}px`,
|
|
2141
2141
|
transform: A ? "translateY(0)" : "translateY(-50%)",
|
|
@@ -2145,30 +2145,30 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
2145
2145
|
borderRadius: A ? `${c.labelBorderRadius}rem` : "0",
|
|
2146
2146
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
2147
2147
|
...A ? {
|
|
2148
|
-
whiteSpace:
|
|
2149
|
-
wordWrap:
|
|
2150
|
-
overflowWrap:
|
|
2148
|
+
whiteSpace: Pe.value ? "nowrap" : "normal",
|
|
2149
|
+
wordWrap: Pe.value ? "normal" : "break-word",
|
|
2150
|
+
overflowWrap: Pe.value ? "normal" : "break-word",
|
|
2151
2151
|
maxWidth: "100%",
|
|
2152
|
-
textOverflow:
|
|
2153
|
-
overflow:
|
|
2152
|
+
textOverflow: Pe.value ? "ellipsis" : "clip",
|
|
2153
|
+
overflow: Pe.value ? "hidden" : "visible"
|
|
2154
2154
|
} : {}
|
|
2155
2155
|
};
|
|
2156
2156
|
}), Ut = a(() => {
|
|
2157
|
-
const c =
|
|
2157
|
+
const c = re.value;
|
|
2158
2158
|
return {
|
|
2159
2159
|
fontSize: c.fontSizeChip,
|
|
2160
2160
|
fontWeight: c.fontWeightChip,
|
|
2161
2161
|
fontFamily: c.fontFamilyChip
|
|
2162
2162
|
};
|
|
2163
2163
|
}), sa = a(() => {
|
|
2164
|
-
switch (
|
|
2164
|
+
switch (X.value) {
|
|
2165
2165
|
case "dark":
|
|
2166
2166
|
return "component__theme--dark";
|
|
2167
2167
|
default:
|
|
2168
2168
|
return "component__theme--light";
|
|
2169
2169
|
}
|
|
2170
|
-
}),
|
|
2171
|
-
switch (
|
|
2170
|
+
}), Kt = a(() => {
|
|
2171
|
+
switch (E.value) {
|
|
2172
2172
|
case "line":
|
|
2173
2173
|
return "component__input--line";
|
|
2174
2174
|
case "border":
|
|
@@ -2177,108 +2177,108 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
2177
2177
|
return "component__input--background";
|
|
2178
2178
|
}
|
|
2179
2179
|
}), da = (c) => {
|
|
2180
|
-
|
|
2180
|
+
b("clicked", c);
|
|
2181
2181
|
}, ca = () => {
|
|
2182
|
-
|
|
2182
|
+
$t.value = !0, b("focused");
|
|
2183
2183
|
}, fa = () => {
|
|
2184
|
-
|
|
2184
|
+
$t.value = !1, b("blurred");
|
|
2185
2185
|
}, va = async (c) => {
|
|
2186
|
-
var
|
|
2187
|
-
const A = ((
|
|
2188
|
-
|
|
2189
|
-
},
|
|
2190
|
-
if (!(
|
|
2186
|
+
var ue;
|
|
2187
|
+
const A = ((ue = c.clipboardData) == null ? void 0 : ue.getData("text")) || "";
|
|
2188
|
+
b("paste", A), pe.value && c.preventDefault();
|
|
2189
|
+
}, Gt = (c) => {
|
|
2190
|
+
if (!(F.value || ve.value) && c.key === "Enter" && j.value.trim() !== "") {
|
|
2191
2191
|
c.preventDefault();
|
|
2192
|
-
let A =
|
|
2193
|
-
|
|
2192
|
+
let A = j.value.trim();
|
|
2193
|
+
Le.value && (A = A.toUpperCase()), (k.value || !Me.value.includes(A)) && pa(A), j.value = "";
|
|
2194
2194
|
}
|
|
2195
2195
|
}, pa = (c) => {
|
|
2196
|
-
|
|
2196
|
+
Me.value.push(c), b("added", c);
|
|
2197
2197
|
}, zt = (c) => {
|
|
2198
|
-
|
|
2198
|
+
Me.value = Me.value.filter((A) => A !== c), b("removed", c);
|
|
2199
2199
|
};
|
|
2200
|
-
return
|
|
2201
|
-
|
|
2202
|
-
}),
|
|
2203
|
-
|
|
2204
|
-
}), (c, A) =>
|
|
2200
|
+
return ne(q, (c) => {
|
|
2201
|
+
Me.value = c, b("changed", c);
|
|
2202
|
+
}), ne(j, (c) => {
|
|
2203
|
+
b("input-changed", c);
|
|
2204
|
+
}), (c, A) => r(I) ? (H(), K("div", $a({
|
|
2205
2205
|
key: 0,
|
|
2206
|
-
class: ["nb-wrapper",
|
|
2207
|
-
style: [
|
|
2206
|
+
class: ["nb-wrapper", it.value],
|
|
2207
|
+
style: [ae.value],
|
|
2208
2208
|
role: "input",
|
|
2209
2209
|
title: e.title
|
|
2210
|
-
},
|
|
2211
|
-
onClick: A[2] || (A[2] = (
|
|
2210
|
+
}, Dt.value, {
|
|
2211
|
+
onClick: A[2] || (A[2] = (ue) => da(ue))
|
|
2212
2212
|
}), [
|
|
2213
|
-
|
|
2213
|
+
r(g) ? (H(), K("label", {
|
|
2214
2214
|
key: 0,
|
|
2215
|
-
for:
|
|
2215
|
+
for: dt.value,
|
|
2216
2216
|
class: "component__label",
|
|
2217
|
-
style:
|
|
2217
|
+
style: Fe([ia.value])
|
|
2218
2218
|
}, [
|
|
2219
|
-
jt(
|
|
2220
|
-
|
|
2221
|
-
], 12, en)) :
|
|
2222
|
-
|
|
2223
|
-
id:
|
|
2219
|
+
jt(Mt(r(R)), 1),
|
|
2220
|
+
r(ze) ? (H(), K("span", tn, "*")) : xe("", !0)
|
|
2221
|
+
], 12, en)) : xe("", !0),
|
|
2222
|
+
ke("div", {
|
|
2223
|
+
id: r(I),
|
|
2224
2224
|
ref_key: "chipsContainer",
|
|
2225
|
-
ref:
|
|
2226
|
-
class:
|
|
2227
|
-
style:
|
|
2225
|
+
ref: Re,
|
|
2226
|
+
class: Ue(["nb-reset", "component", sa.value, Kt.value]),
|
|
2227
|
+
style: Fe([_.value, ua.value, Yt.value])
|
|
2228
2228
|
}, [
|
|
2229
|
-
|
|
2229
|
+
Me.value.length > 0 ? (H(), K("div", {
|
|
2230
2230
|
key: 0,
|
|
2231
2231
|
ref_key: "chips",
|
|
2232
2232
|
ref: Wt,
|
|
2233
2233
|
class: "chips"
|
|
2234
2234
|
}, [
|
|
2235
|
-
(
|
|
2236
|
-
key:
|
|
2235
|
+
(H(!0), K(gl, null, yl(Me.value, (ue) => (H(), K("div", {
|
|
2236
|
+
key: ue,
|
|
2237
2237
|
class: "chip"
|
|
2238
2238
|
}, [
|
|
2239
2239
|
La(c.$slots, "chip", {
|
|
2240
|
-
chips:
|
|
2241
|
-
chip:
|
|
2240
|
+
chips: Me.value,
|
|
2241
|
+
chip: ue,
|
|
2242
2242
|
removeChip: zt
|
|
2243
2243
|
}, () => [
|
|
2244
|
-
|
|
2244
|
+
ke("span", {
|
|
2245
2245
|
class: "chip-text",
|
|
2246
|
-
style:
|
|
2247
|
-
},
|
|
2248
|
-
!
|
|
2246
|
+
style: Fe([Ut.value])
|
|
2247
|
+
}, Mt(ue), 5),
|
|
2248
|
+
!r(F) && !r(ve) ? (H(), K("span", {
|
|
2249
2249
|
key: 0,
|
|
2250
2250
|
class: "chip-remove",
|
|
2251
|
-
style:
|
|
2252
|
-
onClick: (
|
|
2253
|
-
}, "×", 12, ln)) :
|
|
2251
|
+
style: Fe([Ut.value]),
|
|
2252
|
+
onClick: (Qe) => zt(ue)
|
|
2253
|
+
}, "×", 12, ln)) : xe("", !0)
|
|
2254
2254
|
], !0)
|
|
2255
2255
|
]))), 128))
|
|
2256
|
-
], 512)) :
|
|
2257
|
-
Pa(
|
|
2256
|
+
], 512)) : xe("", !0),
|
|
2257
|
+
Pa(ke("input", {
|
|
2258
2258
|
ref_key: "chipInput",
|
|
2259
2259
|
ref: M,
|
|
2260
2260
|
type: "text",
|
|
2261
|
-
"onUpdate:modelValue": A[0] || (A[0] = (
|
|
2262
|
-
id:
|
|
2263
|
-
name:
|
|
2261
|
+
"onUpdate:modelValue": A[0] || (A[0] = (ue) => j.value = ue),
|
|
2262
|
+
id: dt.value,
|
|
2263
|
+
name: dt.value,
|
|
2264
2264
|
placeholder: Pt.value,
|
|
2265
|
-
readonly:
|
|
2266
|
-
autocomplete:
|
|
2267
|
-
required:
|
|
2268
|
-
tabindex:
|
|
2269
|
-
class:
|
|
2270
|
-
style:
|
|
2271
|
-
onKeydown: A[1] || (A[1] = na((
|
|
2265
|
+
readonly: r(ve),
|
|
2266
|
+
autocomplete: r(Ae),
|
|
2267
|
+
required: r(ze),
|
|
2268
|
+
tabindex: r(F) || r(ve) ? -1 : r(w),
|
|
2269
|
+
class: Ue(["chips-input", Y.value]),
|
|
2270
|
+
style: Fe([oa.value, ra.value]),
|
|
2271
|
+
onKeydown: A[1] || (A[1] = na((ue) => !r(F) && r(ye) && Gt(ue), ["enter"])),
|
|
2272
2272
|
onFocus: ca,
|
|
2273
2273
|
onBlur: fa,
|
|
2274
2274
|
onPaste: va
|
|
2275
2275
|
}, null, 46, nn), [
|
|
2276
|
-
[hl,
|
|
2276
|
+
[hl, j.value]
|
|
2277
2277
|
])
|
|
2278
2278
|
], 14, an)
|
|
2279
|
-
], 16, Xl)) :
|
|
2279
|
+
], 16, Xl)) : xe("", !0);
|
|
2280
2280
|
}
|
|
2281
|
-
}), rn = /* @__PURE__ */ Oa(on, [["__scopeId", "data-v-
|
|
2281
|
+
}), rn = /* @__PURE__ */ Oa(on, [["__scopeId", "data-v-857e8bac"]]);
|
|
2282
2282
|
const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
2283
2283
|
key: 0,
|
|
2284
2284
|
class: "component__label--required"
|
|
@@ -2296,8 +2296,8 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2296
2296
|
type: String,
|
|
2297
2297
|
default: "b",
|
|
2298
2298
|
validator: (e = "b") => {
|
|
2299
|
-
const
|
|
2300
|
-
return ["b", "ib"].includes(
|
|
2299
|
+
const m = e.toLowerCase();
|
|
2300
|
+
return ["b", "ib"].includes(m);
|
|
2301
2301
|
}
|
|
2302
2302
|
},
|
|
2303
2303
|
tabIndex: {
|
|
@@ -2692,143 +2692,143 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2692
2692
|
"entered",
|
|
2693
2693
|
"paste"
|
|
2694
2694
|
],
|
|
2695
|
-
setup(e, { emit:
|
|
2695
|
+
setup(e, { emit: m }) {
|
|
2696
2696
|
Wa((i) => ({
|
|
2697
|
-
"
|
|
2698
|
-
"
|
|
2699
|
-
"
|
|
2700
|
-
"
|
|
2701
|
-
"
|
|
2702
|
-
|
|
2703
|
-
"
|
|
2704
|
-
"
|
|
2705
|
-
"
|
|
2706
|
-
"
|
|
2707
|
-
|
|
2708
|
-
"
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
"
|
|
2712
|
-
|
|
2713
|
-
"
|
|
2714
|
-
"
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
"
|
|
2697
|
+
"99659cd8": ae.value,
|
|
2698
|
+
"0346f676": r(ot),
|
|
2699
|
+
"5fce2fcc": U.value,
|
|
2700
|
+
"60ae17c4": Bt.value,
|
|
2701
|
+
"203a8c36": Dt.value,
|
|
2702
|
+
ae85488a: r(gt),
|
|
2703
|
+
"000225c7": r(At),
|
|
2704
|
+
"0f33e0e3": r(Ie),
|
|
2705
|
+
"3da299b5": r($e),
|
|
2706
|
+
"52dcdf51": r(ht),
|
|
2707
|
+
"5fbdc46d": r(ge),
|
|
2708
|
+
"224b5c6b": r(pt),
|
|
2709
|
+
de56ca08: $t.value,
|
|
2710
|
+
"108df3b3": r(St),
|
|
2711
|
+
"2b55152c": ia.value,
|
|
2712
|
+
"2ffb37d3": wt.value,
|
|
2713
|
+
"56ca5692": _.value,
|
|
2714
|
+
"36934d3b": Y.value,
|
|
2715
|
+
"1600b695": z.value,
|
|
2716
|
+
cffe22b6: i.styleButtonColor,
|
|
2717
|
+
"0e5dcaec": Yt.value
|
|
2718
2718
|
})), Aa(() => {
|
|
2719
|
-
|
|
2719
|
+
j.value = et.value;
|
|
2720
2720
|
}), Ya(() => {
|
|
2721
2721
|
c();
|
|
2722
2722
|
});
|
|
2723
|
-
const
|
|
2724
|
-
nbId:
|
|
2725
|
-
display:
|
|
2726
|
-
hasTabIndexEnter:
|
|
2727
|
-
ariaLabel:
|
|
2723
|
+
const b = m, T = e, {
|
|
2724
|
+
nbId: I,
|
|
2725
|
+
display: de,
|
|
2726
|
+
hasTabIndexEnter: Ce,
|
|
2727
|
+
ariaLabel: D,
|
|
2728
2728
|
ariaAttrs: B,
|
|
2729
|
-
textColor:
|
|
2730
|
-
caretColor:
|
|
2731
|
-
selectionBgColor:
|
|
2732
|
-
selectionTextColor:
|
|
2733
|
-
hasBorderRadius:
|
|
2734
|
-
borderRadius:
|
|
2735
|
-
disabled:
|
|
2736
|
-
fontFamily:
|
|
2737
|
-
fontSize:
|
|
2738
|
-
fontWeight:
|
|
2739
|
-
fontFamilyMsg:
|
|
2740
|
-
fontSizeMsg:
|
|
2741
|
-
fontWeightMsg:
|
|
2742
|
-
textMessageColor:
|
|
2729
|
+
textColor: x,
|
|
2730
|
+
caretColor: F,
|
|
2731
|
+
selectionBgColor: J,
|
|
2732
|
+
selectionTextColor: oe,
|
|
2733
|
+
hasBorderRadius: ce,
|
|
2734
|
+
borderRadius: q,
|
|
2735
|
+
disabled: k,
|
|
2736
|
+
fontFamily: Q,
|
|
2737
|
+
fontSize: he,
|
|
2738
|
+
fontWeight: P,
|
|
2739
|
+
fontFamilyMsg: Be,
|
|
2740
|
+
fontSizeMsg: _e,
|
|
2741
|
+
fontWeightMsg: fe,
|
|
2742
|
+
textMessageColor: Le,
|
|
2743
2743
|
inputWidth: ve,
|
|
2744
|
-
inputStyle:
|
|
2745
|
-
activeTextStyle:
|
|
2746
|
-
inputReadonly:
|
|
2747
|
-
blockPaste:
|
|
2748
|
-
hasTrim:
|
|
2744
|
+
inputStyle: pe,
|
|
2745
|
+
activeTextStyle: Ae,
|
|
2746
|
+
inputReadonly: ze,
|
|
2747
|
+
blockPaste: ie,
|
|
2748
|
+
hasTrim: Ke,
|
|
2749
2749
|
inputUppercase: v,
|
|
2750
|
-
inputName:
|
|
2751
|
-
inputPlaceholder:
|
|
2752
|
-
inputText:
|
|
2753
|
-
theme:
|
|
2754
|
-
tabindex:
|
|
2755
|
-
lightBgColor:
|
|
2756
|
-
lightBgColorFocus:
|
|
2750
|
+
inputName: X,
|
|
2751
|
+
inputPlaceholder: E,
|
|
2752
|
+
inputText: et,
|
|
2753
|
+
theme: h,
|
|
2754
|
+
tabindex: Ge,
|
|
2755
|
+
lightBgColor: ge,
|
|
2756
|
+
lightBgColorFocus: pt,
|
|
2757
2757
|
lightDisabledBgColor: ht,
|
|
2758
2758
|
lightTextColor: ot,
|
|
2759
|
-
darkBgColor:
|
|
2760
|
-
darkBgColorFocus:
|
|
2761
|
-
darkDisabledBgColor:
|
|
2762
|
-
darkTextColor:
|
|
2759
|
+
darkBgColor: Ie,
|
|
2760
|
+
darkBgColorFocus: $e,
|
|
2761
|
+
darkDisabledBgColor: At,
|
|
2762
|
+
darkTextColor: gt,
|
|
2763
2763
|
textAlign: St,
|
|
2764
2764
|
showMsg: xt,
|
|
2765
2765
|
hasMsg: Ct,
|
|
2766
|
-
showLabel:
|
|
2767
|
-
labelBackground:
|
|
2768
|
-
labelPadding:
|
|
2769
|
-
labelBorderRadius:
|
|
2770
|
-
labelBreakOnActive:
|
|
2771
|
-
labelLeft:
|
|
2772
|
-
inputLabelMarginActive:
|
|
2773
|
-
labelActiveTop:
|
|
2774
|
-
labelActiveLeft:
|
|
2775
|
-
labelRight:
|
|
2776
|
-
labelActiveRight:
|
|
2777
|
-
fontFamilyLabel:
|
|
2778
|
-
fontSizeLabel:
|
|
2779
|
-
fontSizeLabelActive:
|
|
2780
|
-
fontWeightLabel:
|
|
2781
|
-
lightTextColorLabel:
|
|
2782
|
-
lightTextColorLabelActive:
|
|
2783
|
-
darkTextColorLabel:
|
|
2784
|
-
darkTextColorLabelActive:
|
|
2785
|
-
rows:
|
|
2786
|
-
cols:
|
|
2787
|
-
maxlength:
|
|
2766
|
+
showLabel: we,
|
|
2767
|
+
labelBackground: Vt,
|
|
2768
|
+
labelPadding: tt,
|
|
2769
|
+
labelBorderRadius: Ze,
|
|
2770
|
+
labelBreakOnActive: He,
|
|
2771
|
+
labelLeft: C,
|
|
2772
|
+
inputLabelMarginActive: w,
|
|
2773
|
+
labelActiveTop: ye,
|
|
2774
|
+
labelActiveLeft: se,
|
|
2775
|
+
labelRight: be,
|
|
2776
|
+
labelActiveRight: We,
|
|
2777
|
+
fontFamilyLabel: Se,
|
|
2778
|
+
fontSizeLabel: Ee,
|
|
2779
|
+
fontSizeLabelActive: g,
|
|
2780
|
+
fontWeightLabel: R,
|
|
2781
|
+
lightTextColorLabel: me,
|
|
2782
|
+
lightTextColorLabelActive: ee,
|
|
2783
|
+
darkTextColorLabel: te,
|
|
2784
|
+
darkTextColorLabelActive: Pe,
|
|
2785
|
+
rows: qe,
|
|
2786
|
+
cols: je,
|
|
2787
|
+
maxlength: Je,
|
|
2788
2788
|
minlength: at,
|
|
2789
2789
|
wrap: yt,
|
|
2790
|
-
spellcheck:
|
|
2791
|
-
autofocus:
|
|
2790
|
+
spellcheck: Tt,
|
|
2791
|
+
autofocus: rt,
|
|
2792
2792
|
resize: bt,
|
|
2793
2793
|
minWidth: lt,
|
|
2794
2794
|
maxWidth: Nt,
|
|
2795
|
-
minHeight:
|
|
2796
|
-
maxHeight:
|
|
2795
|
+
minHeight: ut,
|
|
2796
|
+
maxHeight: kt,
|
|
2797
2797
|
autoResize: L,
|
|
2798
|
-
minRows:
|
|
2799
|
-
maxRows:
|
|
2800
|
-
} = Ea(
|
|
2801
|
-
const i =
|
|
2798
|
+
minRows: O,
|
|
2799
|
+
maxRows: G
|
|
2800
|
+
} = Ea(T), j = le(""), Re = le(!1), M = a(() => {
|
|
2801
|
+
const i = k.value ? "component-disabled" : "", S = de.value !== "b" ? "inline-block" : "block", Ve = x ? x.value : "ffffff", Ye = F.value ? F.value : "", Zt = J.value ? J.value : "", ga = oe.value ? oe.value : "", ya = ce.value ? ce.value : !1, ba = q.value !== 0 && !q.value || q.value < 0 ? 0 : q.value, ma = Q.value ? Q.value : "'Lato', sans-serif", Rt = he.value ? he.value : "1.4em", ha = P.value !== 0 && !P.value || P.value < 0 ? 100 : P.value, Sa = Be.value ? Be.value : "'Lato', sans-serif", xa = _e.value ? _e.value : "1em", Ca = fe.value !== 0 && !fe.value || fe.value < 0 ? 100 : fe.value, ct = Le.value ? Le.value : "#f15574", _t = ve.value ? ve.value : 200, Jt = Ae.value ? Ae.value : "normal", Qt = ze.value ? ze.value : !1, Ht = v.value ? v.value : !1, Xt = h.value ? h.value : "normal", ft = St.value ? St.value : "left", Lt = pe.value ? pe.value : "background", Va = we.value ? we.value : !1, Ta = C.value !== 0 && !C.value || C.value < 0 ? 5 : C.value, ea = Vt.value ? Vt.value : "transparent", ka = w.value !== 0 && !w.value || w.value < 0 ? 15 : w.value, o = tt.value ? tt.value : "1px 5px", y = Ze.value !== 0 && !Ze.value || Ze.value < 0 ? 0 : Ze.value, Te = ye.value === null || ye.value === void 0 ? -13 : ye.value, nt = se.value === null || se.value === void 0 ? 5 : se.value, Ba = be.value === null || be.value === void 0 ? 0 : be.value, ta = We.value === null || We.value === void 0 ? 0 : We.value, wa = Se.value ? Se.value : "'Lato', sans-serif", Da = Ee.value ? Ee.value : "1em", It = g.value ? g.value : "0.8em", aa = R.value ? R.value : 400, qt = me.value ? me.value : "#ffffff", Ra = te.value ? te.value : "#000000", _a = ee.value ? ee.value : "#ffffff", Ma = Pe.value ? Pe.value : "#000000", Ha = qe.value && qe.value > 0 ? qe.value : 2, De = je.value && je.value > 0 ? je.value : 20, qa = Je.value !== null && Je.value >= 0 ? Je.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 = Tt.value !== void 0 ? Tt.value : "default", n = rt.value !== void 0 ? rt.value : !1, u = 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 = ut.value ? ut.value : "auto", p = kt.value ? kt.value : "auto", V = L.value !== void 0 ? L.value : !1, $ = O.value !== null && O.value > 0 ? O.value : null, W = G.value !== null && G.value > 0 ? G.value : null;
|
|
2802
2802
|
return {
|
|
2803
2803
|
disabled: i,
|
|
2804
|
-
display:
|
|
2804
|
+
display: S,
|
|
2805
2805
|
font: ma,
|
|
2806
|
-
fontSize:
|
|
2806
|
+
fontSize: Rt,
|
|
2807
2807
|
fontWeight: ha,
|
|
2808
2808
|
fontFamilyMsg: Sa,
|
|
2809
2809
|
fontSizeMsg: xa,
|
|
2810
2810
|
fontWeightMsg: Ca,
|
|
2811
|
-
textMessageColor:
|
|
2812
|
-
textColor:
|
|
2813
|
-
caretColor:
|
|
2811
|
+
textMessageColor: ct,
|
|
2812
|
+
textColor: Ve,
|
|
2813
|
+
caretColor: Ye,
|
|
2814
2814
|
selectionBgColor: Zt,
|
|
2815
2815
|
selectionTextColor: ga,
|
|
2816
2816
|
hasBorderRadius: ya,
|
|
2817
2817
|
borderRadius: ba,
|
|
2818
|
-
textAlign:
|
|
2818
|
+
textAlign: ft,
|
|
2819
2819
|
inputWidth: _t,
|
|
2820
2820
|
activeTextStyle: Jt,
|
|
2821
2821
|
inputReadonly: Qt,
|
|
2822
2822
|
inputUppercase: Ht,
|
|
2823
2823
|
theme: Xt,
|
|
2824
|
-
inputStyle:
|
|
2824
|
+
inputStyle: Lt,
|
|
2825
2825
|
showLabel: Va,
|
|
2826
2826
|
labelBackground: ea,
|
|
2827
2827
|
labelPadding: o,
|
|
2828
|
-
labelBorderRadius:
|
|
2828
|
+
labelBorderRadius: y,
|
|
2829
2829
|
labelLeft: Ta,
|
|
2830
2830
|
inputLabelMarginActive: ka,
|
|
2831
|
-
labelActiveTop:
|
|
2831
|
+
labelActiveTop: Te,
|
|
2832
2832
|
labelActiveLeft: nt,
|
|
2833
2833
|
labelRight: Ba,
|
|
2834
2834
|
labelActiveRight: ta,
|
|
@@ -2841,64 +2841,65 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2841
2841
|
lightTextColorLabelActive: _a,
|
|
2842
2842
|
darkTextColorLabelActive: Ma,
|
|
2843
2843
|
rows: Ha,
|
|
2844
|
-
cols:
|
|
2844
|
+
cols: De,
|
|
2845
2845
|
maxlength: qa,
|
|
2846
2846
|
minlength: mt,
|
|
2847
2847
|
wrap: t,
|
|
2848
2848
|
spellcheck: l,
|
|
2849
2849
|
autofocus: n,
|
|
2850
|
-
resize:
|
|
2850
|
+
resize: u,
|
|
2851
2851
|
minWidth: s,
|
|
2852
2852
|
maxWidth: d,
|
|
2853
2853
|
minHeight: f,
|
|
2854
2854
|
maxHeight: p,
|
|
2855
|
-
autoResize:
|
|
2855
|
+
autoResize: V,
|
|
2856
2856
|
minRows: $,
|
|
2857
2857
|
maxRows: W
|
|
2858
2858
|
};
|
|
2859
|
-
}), Wt = a(() => M.value.disabled),
|
|
2860
|
-
const i = M.value,
|
|
2859
|
+
}), Wt = a(() => M.value.disabled), Me = a(() => {
|
|
2860
|
+
const i = M.value, S = Pt.value;
|
|
2861
2861
|
return {
|
|
2862
2862
|
display: i.display,
|
|
2863
2863
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
2864
2864
|
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
2865
2865
|
paddingTop: "0px",
|
|
2866
2866
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
2867
|
-
|
|
2867
|
+
// Se não tem label ou está ativo, permite overflow visible para não cortar conteúdo
|
|
2868
|
+
overflow: !we.value || S ? "visible" : "hidden"
|
|
2868
2869
|
};
|
|
2869
|
-
}),
|
|
2870
|
+
}), $t = a(() => {
|
|
2870
2871
|
const i = M.value;
|
|
2871
2872
|
return i.fontSize ? i.fontSize : "1.4em";
|
|
2872
|
-
}),
|
|
2873
|
-
const i = M.value,
|
|
2873
|
+
}), re = a(() => {
|
|
2874
|
+
const i = M.value, S = Pt.value;
|
|
2874
2875
|
return {
|
|
2875
2876
|
fontWeight: i.fontWeight,
|
|
2876
|
-
marginTop:
|
|
2877
|
+
marginTop: S && we.value ? `${i.inputLabelMarginActive}px` : "0",
|
|
2877
2878
|
// Quando o label está ativo, define altura mínima igual ao input para alinhar baseline
|
|
2878
2879
|
// Mas permite que o textarea cresça quando há conteúdo
|
|
2879
|
-
minHeight: (
|
|
2880
|
-
height:
|
|
2881
|
-
maxHeight:
|
|
2880
|
+
minHeight: (S && we.value, "28px"),
|
|
2881
|
+
height: S && we.value ? "auto" : "28px",
|
|
2882
|
+
maxHeight: S && we.value ? void 0 : "28px"
|
|
2882
2883
|
};
|
|
2883
|
-
}),
|
|
2884
|
+
}), it = a(() => {
|
|
2884
2885
|
const i = M.value;
|
|
2885
2886
|
return i.inputStyle !== "line" && i.hasBorderRadius ? { borderRadius: `${i.borderRadius}rem` } : {};
|
|
2886
|
-
}),
|
|
2887
|
+
}), ae = a(() => M.value.font), wt = a(() => M.value.fontFamilyMsg), _ = a(() => M.value.fontSizeMsg), Y = a(() => M.value.fontWeightMsg), Yt = a(() => M.value.textColor), z = a(() => M.value.textMessageColor), U = a(() => {
|
|
2887
2888
|
const i = M.value;
|
|
2888
2889
|
return i.caretColor || (i.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2889
|
-
}),
|
|
2890
|
+
}), Bt = a(() => {
|
|
2890
2891
|
const i = M.value;
|
|
2891
2892
|
return i.selectionBgColor || (i.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2892
|
-
}),
|
|
2893
|
+
}), Dt = a(() => {
|
|
2893
2894
|
const i = M.value;
|
|
2894
2895
|
return i.selectionTextColor || (i.theme === "dark" ? "#000000" : "#ffffff");
|
|
2895
|
-
}),
|
|
2896
|
+
}), st = a(() => {
|
|
2896
2897
|
const i = M.value;
|
|
2897
2898
|
return i.display === "block" ? { width: "100%" } : {
|
|
2898
2899
|
width: `${i.inputWidth}px`
|
|
2899
2900
|
};
|
|
2900
2901
|
}), N = a(() => {
|
|
2901
|
-
switch (
|
|
2902
|
+
switch (pe.value) {
|
|
2902
2903
|
case "line":
|
|
2903
2904
|
return "component__input--line";
|
|
2904
2905
|
case "border":
|
|
@@ -2922,42 +2923,42 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2922
2923
|
default:
|
|
2923
2924
|
return "component__theme--light";
|
|
2924
2925
|
}
|
|
2925
|
-
}), ra = a(() => M.value.inputReadonly ? "component__input--read-only" : ""), ua = a(() => M.value.inputUppercase ? "component__input--uppercase" : ""),
|
|
2926
|
-
a(() =>
|
|
2926
|
+
}), ra = a(() => M.value.inputReadonly ? "component__input--read-only" : ""), ua = a(() => M.value.inputUppercase ? "component__input--uppercase" : ""), dt = a(() => X.value ? X.value : `${I.value}-name-label`), Et = a(() => we.value ? Re.value ? E.value : "" : E.value), Pt = a(() => Re.value || j.value && j.value.trim().length > 0);
|
|
2927
|
+
a(() => Re.value ? "component__input--active" : "component__input--no-active");
|
|
2927
2928
|
const ia = a(() => "6px 10px"), Ut = a(() => !!(xt.value && Ct.value)), sa = a(() => {
|
|
2928
2929
|
const i = {};
|
|
2929
|
-
B.value && Object.keys(B.value).forEach((
|
|
2930
|
-
const
|
|
2931
|
-
"aria-label":
|
|
2932
|
-
"aria-disabled":
|
|
2930
|
+
B.value && Object.keys(B.value).forEach((Ye) => i[`aria-${Ye}`] = B.value[Ye]);
|
|
2931
|
+
const S = {
|
|
2932
|
+
"aria-label": D.value,
|
|
2933
|
+
"aria-disabled": k.value,
|
|
2933
2934
|
...i
|
|
2934
2935
|
};
|
|
2935
2936
|
return Object.fromEntries(
|
|
2936
|
-
Object.entries(
|
|
2937
|
+
Object.entries(S).filter(([Ve, Ye]) => Ye != null)
|
|
2937
2938
|
);
|
|
2938
|
-
}),
|
|
2939
|
-
const i = M.value,
|
|
2939
|
+
}), Kt = a(() => {
|
|
2940
|
+
const i = M.value, S = Pt.value, Ve = S ? i.lightTextColorLabelActive : i.lightTextColorLabel, Ye = S ? i.darkTextColorLabelActive : i.darkTextColorLabel;
|
|
2940
2941
|
return {
|
|
2941
2942
|
fontFamily: i.fontFamilyLabel,
|
|
2942
|
-
fontSize:
|
|
2943
|
+
fontSize: S ? i.fontSizeLabelActive : i.fontSizeLabel,
|
|
2943
2944
|
fontWeight: i.fontWeightLabel,
|
|
2944
|
-
color: i.theme === "dark" ?
|
|
2945
|
-
top:
|
|
2946
|
-
transform:
|
|
2947
|
-
left:
|
|
2948
|
-
right:
|
|
2945
|
+
color: i.theme === "dark" ? Ye : Ve,
|
|
2946
|
+
top: S ? `${i.labelActiveTop}px` : "50%",
|
|
2947
|
+
transform: S ? "translateY(0)" : "translateY(-50%)",
|
|
2948
|
+
left: S ? `${i.labelActiveLeft}px` : `${i.labelLeft}px`,
|
|
2949
|
+
right: S ? `${i.labelActiveRight}px` : `${i.labelRight}px`,
|
|
2949
2950
|
transition: "all 0.2s ease",
|
|
2950
|
-
backgroundColor:
|
|
2951
|
-
padding:
|
|
2952
|
-
borderRadius:
|
|
2951
|
+
backgroundColor: S ? i.labelBackground : "transparent",
|
|
2952
|
+
padding: S ? i.labelPadding : "0",
|
|
2953
|
+
borderRadius: S ? `${i.labelBorderRadius}rem` : "0",
|
|
2953
2954
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
2954
|
-
...
|
|
2955
|
-
whiteSpace:
|
|
2956
|
-
wordWrap:
|
|
2957
|
-
overflowWrap:
|
|
2955
|
+
...S ? {
|
|
2956
|
+
whiteSpace: He.value ? "nowrap" : "normal",
|
|
2957
|
+
wordWrap: He.value ? "normal" : "break-word",
|
|
2958
|
+
overflowWrap: He.value ? "normal" : "break-word",
|
|
2958
2959
|
maxWidth: "100%",
|
|
2959
|
-
textOverflow:
|
|
2960
|
-
overflow:
|
|
2960
|
+
textOverflow: He.value ? "ellipsis" : "clip",
|
|
2961
|
+
overflow: He.value ? "hidden" : "visible"
|
|
2961
2962
|
} : {}
|
|
2962
2963
|
};
|
|
2963
2964
|
});
|
|
@@ -2966,14 +2967,14 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2966
2967
|
return i.theme === "dark" ? i.darkTextColorLabelActive : i.lightTextColorLabelActive;
|
|
2967
2968
|
});
|
|
2968
2969
|
const da = a(() => {
|
|
2969
|
-
const i = M.value,
|
|
2970
|
+
const i = M.value, S = {
|
|
2970
2971
|
rows: i.rows,
|
|
2971
2972
|
cols: i.cols,
|
|
2972
2973
|
wrap: i.wrap,
|
|
2973
2974
|
spellcheck: i.spellcheck === "default" ? void 0 : i.spellcheck,
|
|
2974
2975
|
autofocus: i.autofocus || void 0
|
|
2975
2976
|
};
|
|
2976
|
-
return i.maxlength !== null && (
|
|
2977
|
+
return i.maxlength !== null && (S.maxlength = i.maxlength), i.minlength !== null && (S.minlength = i.minlength), S;
|
|
2977
2978
|
}), ca = a(() => ({
|
|
2978
2979
|
resize: M.value.resize
|
|
2979
2980
|
})), fa = a(() => M.value.wrap === "off" ? {
|
|
@@ -2984,7 +2985,7 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2984
2985
|
return i.minWidth === "auto" ? {} : {
|
|
2985
2986
|
minWidth: i.minWidth
|
|
2986
2987
|
};
|
|
2987
|
-
}),
|
|
2988
|
+
}), Gt = a(() => {
|
|
2988
2989
|
const i = M.value;
|
|
2989
2990
|
return i.maxWidth === "auto" ? {} : {
|
|
2990
2991
|
maxWidth: i.maxWidth
|
|
@@ -3000,134 +3001,134 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
3000
3001
|
maxHeight: i.maxHeight
|
|
3001
3002
|
};
|
|
3002
3003
|
}), c = () => {
|
|
3003
|
-
|
|
3004
|
+
j.value = et.value;
|
|
3004
3005
|
}, A = (i) => {
|
|
3005
|
-
|
|
3006
|
-
},
|
|
3007
|
-
|
|
3008
|
-
},
|
|
3009
|
-
var
|
|
3010
|
-
const
|
|
3011
|
-
|
|
3006
|
+
b("clicked", i);
|
|
3007
|
+
}, ue = () => {
|
|
3008
|
+
k.value || M.value.inputReadonly || !Ce.value || b("entered", j.value);
|
|
3009
|
+
}, Qe = async (i) => {
|
|
3010
|
+
var Ve;
|
|
3011
|
+
const S = ((Ve = i.clipboardData) == null ? void 0 : Ve.getData("text")) || "";
|
|
3012
|
+
b("paste", S), ie.value && i.preventDefault();
|
|
3012
3013
|
}, Ot = () => {
|
|
3013
|
-
let i =
|
|
3014
|
-
|
|
3014
|
+
let i = j.value;
|
|
3015
|
+
Ke.value && (i = i.trim()), b("current-value", i);
|
|
3015
3016
|
};
|
|
3016
|
-
return
|
|
3017
|
-
i !==
|
|
3018
|
-
}, { immediate: !0 }),
|
|
3019
|
-
|
|
3020
|
-
}),
|
|
3021
|
-
|
|
3022
|
-
}),
|
|
3017
|
+
return ne(et, (i) => {
|
|
3018
|
+
i !== j.value && (j.value = i);
|
|
3019
|
+
}, { immediate: !0 }), ne(j, (i) => {
|
|
3020
|
+
Ke.value && (i = i.trim()), b("changed", i);
|
|
3021
|
+
}), ne(Re, (i) => {
|
|
3022
|
+
b(i ? "focused" : "blurred");
|
|
3023
|
+
}), ne(j, () => {
|
|
3023
3024
|
Ot();
|
|
3024
|
-
}, { immediate: !0 }), (i,
|
|
3025
|
+
}, { immediate: !0 }), (i, S) => r(I) ? (H(), K("div", $a({
|
|
3025
3026
|
key: 0,
|
|
3026
3027
|
class: ["nb-wrapper", Wt.value],
|
|
3027
|
-
style: [
|
|
3028
|
+
style: [Me.value, st.value, it.value],
|
|
3028
3029
|
role: "input",
|
|
3029
3030
|
title: e.title
|
|
3030
3031
|
}, sa.value), [
|
|
3031
|
-
|
|
3032
|
-
id:
|
|
3033
|
-
class:
|
|
3034
|
-
style:
|
|
3035
|
-
onClick:
|
|
3032
|
+
ke("div", {
|
|
3033
|
+
id: r(I),
|
|
3034
|
+
class: Ue(["nb-reset", "component", oa.value, ra.value, N.value]),
|
|
3035
|
+
style: Fe([re.value, st.value, it.value]),
|
|
3036
|
+
onClick: S[4] || (S[4] = (Ve) => A(Ve))
|
|
3036
3037
|
}, [
|
|
3037
|
-
|
|
3038
|
+
r(we) ? (H(), K("label", {
|
|
3038
3039
|
key: 0,
|
|
3039
|
-
for:
|
|
3040
|
+
for: dt.value,
|
|
3040
3041
|
class: "component__label",
|
|
3041
|
-
style:
|
|
3042
|
+
style: Fe([Kt.value])
|
|
3042
3043
|
}, [
|
|
3043
|
-
jt(
|
|
3044
|
-
e.required ? (
|
|
3045
|
-
], 12, dn)) :
|
|
3046
|
-
Pa(
|
|
3047
|
-
"onUpdate:modelValue":
|
|
3048
|
-
id:
|
|
3049
|
-
name:
|
|
3044
|
+
jt(Mt(e.label), 1),
|
|
3045
|
+
e.required ? (H(), K("span", cn, "*")) : xe("", !0)
|
|
3046
|
+
], 12, dn)) : xe("", !0),
|
|
3047
|
+
Pa(ke("textarea", $a({
|
|
3048
|
+
"onUpdate:modelValue": S[0] || (S[0] = (Ve) => j.value = Ve),
|
|
3049
|
+
id: dt.value,
|
|
3050
|
+
name: dt.value
|
|
3050
3051
|
}, da.value, {
|
|
3051
3052
|
class: ["component__input", [
|
|
3052
3053
|
ua.value,
|
|
3053
3054
|
Ft.value
|
|
3054
3055
|
]],
|
|
3055
3056
|
placeholder: Et.value,
|
|
3056
|
-
disabled:
|
|
3057
|
+
disabled: r(k) || r(ze),
|
|
3057
3058
|
required: e.required,
|
|
3058
|
-
readonly:
|
|
3059
|
+
readonly: r(ze),
|
|
3059
3060
|
autocomplete: e.inputAutocomplete,
|
|
3060
|
-
tabindex:
|
|
3061
|
+
tabindex: r(k) || r(ze) ? -1 : r(Ge),
|
|
3061
3062
|
role: "textbox",
|
|
3062
|
-
style: [
|
|
3063
|
-
onFocus:
|
|
3064
|
-
onBlur:
|
|
3063
|
+
style: [it.value, ca.value, fa.value, va.value, Gt.value, pa.value, zt.value],
|
|
3064
|
+
onFocus: S[1] || (S[1] = (Ve) => Re.value = !0),
|
|
3065
|
+
onBlur: S[2] || (S[2] = (Ve) => Re.value = !1),
|
|
3065
3066
|
onInput: Ot,
|
|
3066
|
-
onKeydown:
|
|
3067
|
-
onPaste:
|
|
3067
|
+
onKeydown: S[3] || (S[3] = na((Ve) => !r(k) && r(Ce) && ue(), ["enter"])),
|
|
3068
|
+
onPaste: Qe
|
|
3068
3069
|
}), null, 16, fn), [
|
|
3069
|
-
[hl,
|
|
3070
|
+
[hl, j.value]
|
|
3070
3071
|
])
|
|
3071
3072
|
], 14, sn),
|
|
3072
|
-
Ut.value ? (
|
|
3073
|
+
Ut.value ? (H(), K("div", {
|
|
3073
3074
|
key: 0,
|
|
3074
|
-
class:
|
|
3075
|
+
class: Ue(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
3075
3076
|
}, [
|
|
3076
3077
|
La(i.$slots, "message", {}, () => [
|
|
3077
|
-
jt(
|
|
3078
|
+
jt(Mt(e.message), 1)
|
|
3078
3079
|
], !0)
|
|
3079
|
-
], 2)) :
|
|
3080
|
-
], 16, un)) :
|
|
3080
|
+
], 2)) : xe("", !0)
|
|
3081
|
+
], 16, un)) : xe("", !0);
|
|
3081
3082
|
}
|
|
3082
|
-
}), pn = /* @__PURE__ */ Oa(vn, [["__scopeId", "data-v-
|
|
3083
|
+
}), pn = /* @__PURE__ */ Oa(vn, [["__scopeId", "data-v-f8d0486c"]]), za = (e) => String(e).padStart(2, "0"), Na = (e) => {
|
|
3083
3084
|
if (!e || !(e instanceof Date))
|
|
3084
3085
|
return null;
|
|
3085
|
-
const
|
|
3086
|
-
return `${
|
|
3087
|
-
}, Fa = (e,
|
|
3086
|
+
const m = e.getFullYear(), b = za(e.getMonth() + 1), T = za(e.getDate()), I = za(e.getHours()), de = za(e.getMinutes()), Ce = za(e.getSeconds());
|
|
3087
|
+
return `${m}-${b}-${T}T${I}:${de}:${Ce}`;
|
|
3088
|
+
}, Fa = (e, m = "Z") => {
|
|
3088
3089
|
if (!e || !(e instanceof Date))
|
|
3089
3090
|
return null;
|
|
3090
|
-
const
|
|
3091
|
-
return
|
|
3092
|
-
}, bl = (e,
|
|
3093
|
-
e.getMonth() ===
|
|
3094
|
-
e.getDate() ===
|
|
3091
|
+
const b = e.toISOString();
|
|
3092
|
+
return m === "+00:00" ? b.replace("Z", "+00:00") : b;
|
|
3093
|
+
}, bl = (e, m) => !e || !m ? !1 : e.getFullYear() === m.getFullYear() && // Verificar se o ano é o mesmo
|
|
3094
|
+
e.getMonth() === m.getMonth() && // Verificar se o mês é o mesmo
|
|
3095
|
+
e.getDate() === m.getDate(), ja = (e) => {
|
|
3095
3096
|
if (!e)
|
|
3096
3097
|
return null;
|
|
3097
3098
|
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
3098
|
-
const [
|
|
3099
|
-
return new Date(
|
|
3099
|
+
const [b, T, I] = e.split("-").map(Number);
|
|
3100
|
+
return new Date(b, T - 1, I);
|
|
3100
3101
|
}
|
|
3101
|
-
const
|
|
3102
|
-
return isNaN(
|
|
3103
|
-
}, gn = (e,
|
|
3102
|
+
const m = new Date(e);
|
|
3103
|
+
return isNaN(m.getTime()) ? null : m;
|
|
3104
|
+
}, gn = (e, m = {}) => {
|
|
3104
3105
|
const {
|
|
3105
|
-
inputType:
|
|
3106
|
-
hasSeconds:
|
|
3107
|
-
allowRange:
|
|
3108
|
-
timezoneFormat:
|
|
3109
|
-
locale:
|
|
3110
|
-
} =
|
|
3106
|
+
inputType: b,
|
|
3107
|
+
hasSeconds: T = !1,
|
|
3108
|
+
allowRange: I = !1,
|
|
3109
|
+
timezoneFormat: de = "Z",
|
|
3110
|
+
locale: Ce = "en-US"
|
|
3111
|
+
} = m;
|
|
3111
3112
|
if (!e || e === "" || e === null || e === void 0)
|
|
3112
|
-
return
|
|
3113
|
+
return b === "date" ? { date: null, dateString: null, isoString: null, isoStringLocal: null, day: null } : b === "time" ? { hour: 0, minute: 0, second: void 0, timeString: "" } : b === "datetime-local" ? { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null } : b === "week" ? { weekString: null, weekStartDate: null, weekEndDate: null, weekNumber: null, weekYear: null, isoString: null, isoStringLocal: null } : b === "month" ? { date: null, dateString: null, month: null, year: null, monthName: null, isoString: null, isoStringLocal: null } : I ? { startDate: null, endDate: null, isRange: !0, isoString: null, isoStringLocal: null } : null;
|
|
3113
3114
|
try {
|
|
3114
|
-
if (
|
|
3115
|
-
const
|
|
3116
|
-
if (!
|
|
3115
|
+
if (b === "date") {
|
|
3116
|
+
const D = ja(e);
|
|
3117
|
+
if (!D)
|
|
3117
3118
|
return { date: null, dateString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3118
3119
|
const B = /* @__PURE__ */ new Date();
|
|
3119
3120
|
B.setHours(0, 0, 0, 0);
|
|
3120
|
-
const
|
|
3121
|
-
return
|
|
3122
|
-
date:
|
|
3121
|
+
const x = new Date(D.getTime());
|
|
3122
|
+
return x.setHours(0, 0, 0, 0), {
|
|
3123
|
+
date: x,
|
|
3123
3124
|
dateString: e,
|
|
3124
|
-
isoString: Fa(
|
|
3125
|
-
isoStringLocal: Na(
|
|
3125
|
+
isoString: Fa(x, de),
|
|
3126
|
+
isoStringLocal: Na(x),
|
|
3126
3127
|
day: {
|
|
3127
|
-
date:
|
|
3128
|
-
fullDate:
|
|
3128
|
+
date: x.getDate(),
|
|
3129
|
+
fullDate: x,
|
|
3129
3130
|
isOtherMonth: !1,
|
|
3130
|
-
isToday: bl(
|
|
3131
|
+
isToday: bl(x, B),
|
|
3131
3132
|
isSelected: !0,
|
|
3132
3133
|
isInRange: !1,
|
|
3133
3134
|
isRangeStart: !1,
|
|
@@ -3136,45 +3137,45 @@ e.getDate() === b.getDate(), ja = (e) => {
|
|
|
3136
3137
|
events: []
|
|
3137
3138
|
}
|
|
3138
3139
|
};
|
|
3139
|
-
} else if (
|
|
3140
|
-
const
|
|
3140
|
+
} else if (b === "time") {
|
|
3141
|
+
const D = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, B = e.match(D);
|
|
3141
3142
|
if (!B)
|
|
3142
3143
|
return { hour: 0, minute: 0, second: void 0, timeString: "" };
|
|
3143
|
-
const
|
|
3144
|
+
const x = parseInt(B[1], 10), F = parseInt(B[2], 10), J = B[3] ? parseInt(B[3], 10) : void 0;
|
|
3144
3145
|
return {
|
|
3145
|
-
hour:
|
|
3146
|
-
minute:
|
|
3147
|
-
second:
|
|
3146
|
+
hour: x,
|
|
3147
|
+
minute: F,
|
|
3148
|
+
second: T ? J : void 0,
|
|
3148
3149
|
timeString: e
|
|
3149
3150
|
};
|
|
3150
|
-
} else if (
|
|
3151
|
-
const
|
|
3152
|
-
if (
|
|
3151
|
+
} else if (b === "datetime-local") {
|
|
3152
|
+
const D = e.split("T");
|
|
3153
|
+
if (D.length !== 2)
|
|
3153
3154
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3154
|
-
const B =
|
|
3155
|
-
if (!
|
|
3155
|
+
const B = D[0], x = D[1], F = ja(B);
|
|
3156
|
+
if (!F)
|
|
3156
3157
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3157
|
-
const
|
|
3158
|
-
if (!
|
|
3158
|
+
const J = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, oe = x.match(J);
|
|
3159
|
+
if (!oe)
|
|
3159
3160
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3160
|
-
const
|
|
3161
|
-
|
|
3162
|
-
const
|
|
3163
|
-
|
|
3164
|
-
const
|
|
3165
|
-
return
|
|
3166
|
-
date:
|
|
3167
|
-
hour:
|
|
3168
|
-
minute:
|
|
3169
|
-
second:
|
|
3161
|
+
const ce = parseInt(oe[1], 10), q = parseInt(oe[2], 10), k = oe[3] ? parseInt(oe[3], 10) : void 0, Q = new Date(F.getTime());
|
|
3162
|
+
Q.setHours(ce, q, k || 0, 0);
|
|
3163
|
+
const he = /* @__PURE__ */ new Date();
|
|
3164
|
+
he.setHours(0, 0, 0, 0);
|
|
3165
|
+
const P = new Date(F.getTime());
|
|
3166
|
+
return P.setHours(0, 0, 0, 0), {
|
|
3167
|
+
date: P,
|
|
3168
|
+
hour: ce,
|
|
3169
|
+
minute: q,
|
|
3170
|
+
second: T ? k : void 0,
|
|
3170
3171
|
datetimeString: e,
|
|
3171
|
-
isoString: Fa(
|
|
3172
|
-
isoStringLocal: Na(
|
|
3172
|
+
isoString: Fa(Q, de),
|
|
3173
|
+
isoStringLocal: Na(Q),
|
|
3173
3174
|
day: {
|
|
3174
|
-
date:
|
|
3175
|
-
fullDate:
|
|
3175
|
+
date: P.getDate(),
|
|
3176
|
+
fullDate: P,
|
|
3176
3177
|
isOtherMonth: !1,
|
|
3177
|
-
isToday: bl(
|
|
3178
|
+
isToday: bl(P, he),
|
|
3178
3179
|
isSelected: !0,
|
|
3179
3180
|
isInRange: !1,
|
|
3180
3181
|
isRangeStart: !1,
|
|
@@ -3183,58 +3184,58 @@ e.getDate() === b.getDate(), ja = (e) => {
|
|
|
3183
3184
|
events: []
|
|
3184
3185
|
}
|
|
3185
3186
|
};
|
|
3186
|
-
} else if (
|
|
3187
|
-
const
|
|
3187
|
+
} else if (b === "week") {
|
|
3188
|
+
const D = /^(\d{4})-W(\d{2})$/, B = e.match(D);
|
|
3188
3189
|
if (!B)
|
|
3189
3190
|
return { weekString: null, weekStartDate: null, weekEndDate: null, weekNumber: null, weekYear: null, isoString: null, isoStringLocal: null };
|
|
3190
|
-
const
|
|
3191
|
-
|
|
3192
|
-
const
|
|
3193
|
-
return
|
|
3191
|
+
const x = parseInt(B[1], 10), F = parseInt(B[2], 10), ce = (8 - (new Date(x, 0, 4).getDay() || 7)) % 7, q = new Date(x, 0, 4 + ce), k = new Date(q.getTime());
|
|
3192
|
+
k.setDate(q.getDate() + (F - 1) * 7), k.setHours(0, 0, 0, 0);
|
|
3193
|
+
const Q = new Date(k.getTime());
|
|
3194
|
+
return Q.setDate(k.getDate() + 6), Q.setHours(23, 59, 59, 999), {
|
|
3194
3195
|
weekString: e,
|
|
3195
|
-
weekStartDate:
|
|
3196
|
-
weekEndDate:
|
|
3197
|
-
weekNumber:
|
|
3198
|
-
weekYear:
|
|
3199
|
-
isoString: Fa(
|
|
3200
|
-
isoStringLocal: Na(
|
|
3196
|
+
weekStartDate: k,
|
|
3197
|
+
weekEndDate: Q,
|
|
3198
|
+
weekNumber: F,
|
|
3199
|
+
weekYear: x,
|
|
3200
|
+
isoString: Fa(k, de),
|
|
3201
|
+
isoStringLocal: Na(k)
|
|
3201
3202
|
};
|
|
3202
|
-
} else if (
|
|
3203
|
-
const
|
|
3203
|
+
} else if (b === "month") {
|
|
3204
|
+
const D = /^(\d{4})-(\d{2})$/, B = e.match(D);
|
|
3204
3205
|
if (!B)
|
|
3205
3206
|
return { date: null, dateString: null, month: null, year: null, monthName: null, isoString: null, isoStringLocal: null };
|
|
3206
|
-
const
|
|
3207
|
-
|
|
3208
|
-
const
|
|
3207
|
+
const x = parseInt(B[1], 10), F = parseInt(B[2], 10) - 1, J = new Date(x, F, 1);
|
|
3208
|
+
J.setHours(0, 0, 0, 0);
|
|
3209
|
+
const oe = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
3209
3210
|
return {
|
|
3210
|
-
date:
|
|
3211
|
-
dateString: `${
|
|
3212
|
-
month:
|
|
3213
|
-
year:
|
|
3214
|
-
monthName:
|
|
3215
|
-
isoString: Fa(
|
|
3216
|
-
isoStringLocal: Na(
|
|
3211
|
+
date: J,
|
|
3212
|
+
dateString: `${x}-${za(F + 1)}-01`,
|
|
3213
|
+
month: F,
|
|
3214
|
+
year: x,
|
|
3215
|
+
monthName: oe[F],
|
|
3216
|
+
isoString: Fa(J, de),
|
|
3217
|
+
isoStringLocal: Na(J)
|
|
3217
3218
|
};
|
|
3218
|
-
} else if (
|
|
3219
|
+
} else if (I && typeof e == "string" && e.startsWith("{"))
|
|
3219
3220
|
try {
|
|
3220
|
-
const
|
|
3221
|
-
if (
|
|
3222
|
-
const B =
|
|
3223
|
-
return B &&
|
|
3221
|
+
const D = JSON.parse(e);
|
|
3222
|
+
if (D && (D.startDate || D.endDate)) {
|
|
3223
|
+
const B = D.startDate ? ja(D.startDate) : null, x = D.endDate ? ja(D.endDate) : null;
|
|
3224
|
+
return B && x ? (B.setHours(0, 0, 0, 0), x.setHours(0, 0, 0, 0), {
|
|
3224
3225
|
startDate: B,
|
|
3225
|
-
endDate:
|
|
3226
|
+
endDate: x,
|
|
3226
3227
|
isRange: !0,
|
|
3227
3228
|
isoString: {
|
|
3228
|
-
start: Fa(B,
|
|
3229
|
-
end: Fa(
|
|
3229
|
+
start: Fa(B, de),
|
|
3230
|
+
end: Fa(x, de)
|
|
3230
3231
|
},
|
|
3231
3232
|
isoStringLocal: {
|
|
3232
3233
|
start: Na(B),
|
|
3233
|
-
end: Na(
|
|
3234
|
+
end: Na(x)
|
|
3234
3235
|
}
|
|
3235
3236
|
}) : {
|
|
3236
3237
|
startDate: B,
|
|
3237
|
-
endDate:
|
|
3238
|
+
endDate: x,
|
|
3238
3239
|
isRange: !0,
|
|
3239
3240
|
isoString: null,
|
|
3240
3241
|
isoStringLocal: null
|
|
@@ -3243,8 +3244,8 @@ e.getDate() === b.getDate(), ja = (e) => {
|
|
|
3243
3244
|
} catch {
|
|
3244
3245
|
return { startDate: null, endDate: null, isRange: !0, isoString: null, isoStringLocal: null };
|
|
3245
3246
|
}
|
|
3246
|
-
} catch (
|
|
3247
|
-
console.error("Error building complete data from inputText:",
|
|
3247
|
+
} catch (D) {
|
|
3248
|
+
console.error("Error building complete data from inputText:", D);
|
|
3248
3249
|
}
|
|
3249
3250
|
return null;
|
|
3250
3251
|
};
|
|
@@ -3265,8 +3266,8 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
3265
3266
|
type: String,
|
|
3266
3267
|
default: "b",
|
|
3267
3268
|
validator: (e = "b") => {
|
|
3268
|
-
const
|
|
3269
|
-
return ["b", "ib"].includes(
|
|
3269
|
+
const m = e.toLowerCase();
|
|
3270
|
+
return ["b", "ib"].includes(m);
|
|
3270
3271
|
}
|
|
3271
3272
|
},
|
|
3272
3273
|
tabIndex: {
|
|
@@ -3661,7 +3662,7 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
3661
3662
|
calendarEvents: {
|
|
3662
3663
|
type: Array,
|
|
3663
3664
|
default: () => [],
|
|
3664
|
-
validator: (e) => Array.isArray(e) && e.every((
|
|
3665
|
+
validator: (e) => Array.isArray(e) && e.every((m) => m && m.date && (m.color || !0))
|
|
3665
3666
|
},
|
|
3666
3667
|
// Calendar props - Text
|
|
3667
3668
|
calendarSelectMonthText: {
|
|
@@ -3905,114 +3906,114 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
3905
3906
|
"date-selected",
|
|
3906
3907
|
"month-changed"
|
|
3907
3908
|
],
|
|
3908
|
-
setup(e, { emit:
|
|
3909
|
+
setup(e, { emit: m }) {
|
|
3909
3910
|
Wa((t) => ({
|
|
3910
|
-
|
|
3911
|
-
"
|
|
3912
|
-
"
|
|
3913
|
-
"
|
|
3914
|
-
"
|
|
3915
|
-
|
|
3916
|
-
"
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
"
|
|
3921
|
-
"
|
|
3922
|
-
"
|
|
3923
|
-
"
|
|
3924
|
-
"
|
|
3925
|
-
"
|
|
3926
|
-
"
|
|
3927
|
-
"
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
"
|
|
3932
|
-
|
|
3911
|
+
63363671: oa.value,
|
|
3912
|
+
"7f928282": st.value,
|
|
3913
|
+
"89824d3c": r(tt),
|
|
3914
|
+
"3f366ecf": ia.value,
|
|
3915
|
+
"6f4eb63e": Ut.value,
|
|
3916
|
+
a87dcf8e: sa.value,
|
|
3917
|
+
"4fc10104": r(w),
|
|
3918
|
+
"635d2b4a": r(C),
|
|
3919
|
+
ed7bcd34: r(Ze),
|
|
3920
|
+
def20fc8: Et.value,
|
|
3921
|
+
"4b423b12": r(He),
|
|
3922
|
+
"3b214f48": S.value,
|
|
3923
|
+
"41793b20": Ve.value,
|
|
3924
|
+
"5ae28a2e": r(Vt),
|
|
3925
|
+
"27769c4a": r(Ct),
|
|
3926
|
+
"6ec032a4": r(we),
|
|
3927
|
+
"36c670f6": r(ye),
|
|
3928
|
+
"19e425ee": Qe.value,
|
|
3929
|
+
abed1f54: ra.value,
|
|
3930
|
+
36329595: ua.value,
|
|
3931
|
+
46305104: dt.value,
|
|
3932
|
+
"0eb06758": Pt.value,
|
|
3933
|
+
b4bedffc: t.styleButtonColor
|
|
3933
3934
|
}));
|
|
3934
|
-
const
|
|
3935
|
+
const b = Bl(
|
|
3935
3936
|
() => import("@vlalg-nimbus/nb-calendar").then((t) => t.Calendar ? t.Calendar : t.default && t.default.Calendar ? t.default.Calendar : t.default)
|
|
3936
3937
|
);
|
|
3937
3938
|
Aa(() => {
|
|
3938
|
-
L.value =
|
|
3939
|
+
L.value = h.value;
|
|
3939
3940
|
}), Ya(() => {
|
|
3940
3941
|
Zt();
|
|
3941
3942
|
});
|
|
3942
|
-
const
|
|
3943
|
-
nbId:
|
|
3944
|
-
display:
|
|
3945
|
-
hasTabIndexEnter:
|
|
3943
|
+
const T = m, I = e, {
|
|
3944
|
+
nbId: de,
|
|
3945
|
+
display: Ce,
|
|
3946
|
+
hasTabIndexEnter: D,
|
|
3946
3947
|
ariaLabel: B,
|
|
3947
|
-
ariaAttrs:
|
|
3948
|
-
caretColor:
|
|
3949
|
-
selectionBgColor:
|
|
3950
|
-
selectionTextColor:
|
|
3951
|
-
hasBorderRadius:
|
|
3952
|
-
borderRadius:
|
|
3953
|
-
disabled:
|
|
3954
|
-
fontFamily:
|
|
3955
|
-
fontSize:
|
|
3956
|
-
fontWeight:
|
|
3957
|
-
fontFamilyMsg:
|
|
3958
|
-
fontSizeMsg:
|
|
3959
|
-
fontWeightMsg:
|
|
3960
|
-
textMessageColor:
|
|
3948
|
+
ariaAttrs: x,
|
|
3949
|
+
caretColor: F,
|
|
3950
|
+
selectionBgColor: J,
|
|
3951
|
+
selectionTextColor: oe,
|
|
3952
|
+
hasBorderRadius: ce,
|
|
3953
|
+
borderRadius: q,
|
|
3954
|
+
disabled: k,
|
|
3955
|
+
fontFamily: Q,
|
|
3956
|
+
fontSize: he,
|
|
3957
|
+
fontWeight: P,
|
|
3958
|
+
fontFamilyMsg: Be,
|
|
3959
|
+
fontSizeMsg: _e,
|
|
3960
|
+
fontWeightMsg: fe,
|
|
3961
|
+
textMessageColor: Le,
|
|
3961
3962
|
inputWidth: ve,
|
|
3962
|
-
inputStyle:
|
|
3963
|
-
activeTextStyle:
|
|
3964
|
-
sizeMediaQuery:
|
|
3965
|
-
inputReadonly:
|
|
3966
|
-
blockPaste:
|
|
3963
|
+
inputStyle: pe,
|
|
3964
|
+
activeTextStyle: Ae,
|
|
3965
|
+
sizeMediaQuery: ze,
|
|
3966
|
+
inputReadonly: ie,
|
|
3967
|
+
blockPaste: Ke,
|
|
3967
3968
|
inputType: v,
|
|
3968
|
-
hasTrim:
|
|
3969
|
-
inputUppercase:
|
|
3970
|
-
inputName:
|
|
3971
|
-
inputText:
|
|
3972
|
-
min:
|
|
3973
|
-
max:
|
|
3974
|
-
step:
|
|
3969
|
+
hasTrim: X,
|
|
3970
|
+
inputUppercase: E,
|
|
3971
|
+
inputName: et,
|
|
3972
|
+
inputText: h,
|
|
3973
|
+
min: Ge,
|
|
3974
|
+
max: ge,
|
|
3975
|
+
step: pt,
|
|
3975
3976
|
hasSeconds: ht,
|
|
3976
3977
|
locale: ot,
|
|
3977
|
-
theme:
|
|
3978
|
-
allowRange:
|
|
3979
|
-
calendarZIndex:
|
|
3980
|
-
calendarWidth:
|
|
3978
|
+
theme: Ie,
|
|
3979
|
+
allowRange: $e,
|
|
3980
|
+
calendarZIndex: At,
|
|
3981
|
+
calendarWidth: gt,
|
|
3981
3982
|
blockClicksWithoutEvents: St,
|
|
3982
3983
|
tabindex: xt,
|
|
3983
3984
|
lightBgColor: Ct,
|
|
3984
|
-
lightBgColorFocus:
|
|
3985
|
-
lightDisabledBgColor:
|
|
3986
|
-
lightTextColor:
|
|
3987
|
-
darkBgColor:
|
|
3988
|
-
darkBgColorFocus:
|
|
3989
|
-
darkDisabledBgColor:
|
|
3990
|
-
darkTextColor:
|
|
3991
|
-
textAlign:
|
|
3992
|
-
showMsg:
|
|
3993
|
-
hasMsg:
|
|
3994
|
-
showLabel:
|
|
3995
|
-
label:
|
|
3996
|
-
labelBreakOnActive:
|
|
3997
|
-
labelBackground:
|
|
3998
|
-
labelPadding:
|
|
3999
|
-
labelBorderRadius:
|
|
4000
|
-
labelLeft:
|
|
4001
|
-
inputLabelMarginActive:
|
|
4002
|
-
labelActiveTop:
|
|
4003
|
-
labelActiveLeft:
|
|
4004
|
-
labelRight:
|
|
4005
|
-
labelActiveRight:
|
|
3985
|
+
lightBgColorFocus: we,
|
|
3986
|
+
lightDisabledBgColor: Vt,
|
|
3987
|
+
lightTextColor: tt,
|
|
3988
|
+
darkBgColor: Ze,
|
|
3989
|
+
darkBgColorFocus: He,
|
|
3990
|
+
darkDisabledBgColor: C,
|
|
3991
|
+
darkTextColor: w,
|
|
3992
|
+
textAlign: ye,
|
|
3993
|
+
showMsg: se,
|
|
3994
|
+
hasMsg: be,
|
|
3995
|
+
showLabel: We,
|
|
3996
|
+
label: Se,
|
|
3997
|
+
labelBreakOnActive: Ee,
|
|
3998
|
+
labelBackground: g,
|
|
3999
|
+
labelPadding: R,
|
|
4000
|
+
labelBorderRadius: me,
|
|
4001
|
+
labelLeft: ee,
|
|
4002
|
+
inputLabelMarginActive: te,
|
|
4003
|
+
labelActiveTop: Pe,
|
|
4004
|
+
labelActiveLeft: qe,
|
|
4005
|
+
labelRight: je,
|
|
4006
|
+
labelActiveRight: Je,
|
|
4006
4007
|
fontFamilyLabel: at,
|
|
4007
4008
|
fontSizeLabel: yt,
|
|
4008
|
-
fontSizeLabelActive:
|
|
4009
|
-
fontWeightLabel:
|
|
4009
|
+
fontSizeLabelActive: Tt,
|
|
4010
|
+
fontWeightLabel: rt,
|
|
4010
4011
|
lightTextColorLabel: bt,
|
|
4011
4012
|
lightTextColorLabelActive: lt,
|
|
4012
4013
|
darkTextColorLabel: Nt,
|
|
4013
|
-
darkTextColorLabelActive:
|
|
4014
|
-
required:
|
|
4015
|
-
} = Ea(
|
|
4014
|
+
darkTextColorLabelActive: ut,
|
|
4015
|
+
required: kt
|
|
4016
|
+
} = Ea(I), L = le(""), O = le(""), G = le(""), j = le(""), Re = le(!1), M = le(!1), Wt = a(() => !gt.value || gt.value < 280 ? 280 : parseInt(gt.value, 10)), Me = a(() => {
|
|
4016
4017
|
if (ht.value !== null)
|
|
4017
4018
|
return ht.value;
|
|
4018
4019
|
if (v.value === "time" || v.value === "datetime-local") {
|
|
@@ -4022,14 +4023,14 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4022
4023
|
let n = l;
|
|
4023
4024
|
return v.value === "datetime-local" && (n = l.split("T")[1] || "", n = n.split(/[Z+-]/)[0] || ""), n.split(":").length >= 3;
|
|
4024
4025
|
};
|
|
4025
|
-
if (t(L.value) || t(
|
|
4026
|
+
if (t(L.value) || t(h.value))
|
|
4026
4027
|
return !0;
|
|
4027
4028
|
}
|
|
4028
4029
|
return !1;
|
|
4029
|
-
}),
|
|
4030
|
+
}), $t = a(() => {
|
|
4030
4031
|
if (!L.value)
|
|
4031
4032
|
return null;
|
|
4032
|
-
if (
|
|
4033
|
+
if ($e.value && typeof L.value == "string" && L.value.startsWith("{"))
|
|
4033
4034
|
try {
|
|
4034
4035
|
const t = JSON.parse(L.value);
|
|
4035
4036
|
if (t && (t.startDate || t.endDate)) {
|
|
@@ -4037,8 +4038,8 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4037
4038
|
if (!n)
|
|
4038
4039
|
return null;
|
|
4039
4040
|
if (/^\d{4}-\d{2}-\d{2}$/.test(n)) {
|
|
4040
|
-
const [
|
|
4041
|
-
return new Date(
|
|
4041
|
+
const [u, s, d] = n.split("-").map(Number);
|
|
4042
|
+
return new Date(u, s - 1, d);
|
|
4042
4043
|
}
|
|
4043
4044
|
return new Date(n);
|
|
4044
4045
|
};
|
|
@@ -4054,23 +4055,23 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4054
4055
|
return new Date(t, l - 1, n);
|
|
4055
4056
|
}
|
|
4056
4057
|
return L.value;
|
|
4057
|
-
}),
|
|
4058
|
+
}), re = (t, l, n) => {
|
|
4058
4059
|
if (!t)
|
|
4059
4060
|
return "";
|
|
4060
|
-
const
|
|
4061
|
+
const u = n || ot.value;
|
|
4061
4062
|
if (l === "date") {
|
|
4062
|
-
if (
|
|
4063
|
+
if ($e.value && typeof t == "string" && t.startsWith("{"))
|
|
4063
4064
|
try {
|
|
4064
4065
|
const s = JSON.parse(t);
|
|
4065
4066
|
if (s && (s.startDate || s.endDate)) {
|
|
4066
|
-
const d = (
|
|
4067
|
-
if (!
|
|
4067
|
+
const d = (V) => {
|
|
4068
|
+
if (!V)
|
|
4068
4069
|
return "";
|
|
4069
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
4070
|
-
const [$, W,
|
|
4071
|
-
return
|
|
4070
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(V)) {
|
|
4071
|
+
const [$, W, Z] = V.split("-");
|
|
4072
|
+
return u === "pt-BR" ? `${Z}/${W}/${$}` : `${W}/${Z}/${$}`;
|
|
4072
4073
|
}
|
|
4073
|
-
return
|
|
4074
|
+
return V;
|
|
4074
4075
|
}, f = d(s.startDate), p = d(s.endDate);
|
|
4075
4076
|
if (f && p)
|
|
4076
4077
|
return `${f} - ${p}`;
|
|
@@ -4084,31 +4085,31 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4084
4085
|
if (typeof t == "string") {
|
|
4085
4086
|
if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
4086
4087
|
const [d, f, p] = t.split("-");
|
|
4087
|
-
return
|
|
4088
|
+
return u === "pt-BR" ? `${p}/${f}/${d}` : `${f}/${p}/${d}`;
|
|
4088
4089
|
}
|
|
4089
4090
|
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")) {
|
|
4090
4091
|
const d = new Date(t);
|
|
4091
4092
|
if (!isNaN(d.getTime())) {
|
|
4092
|
-
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"),
|
|
4093
|
-
return
|
|
4093
|
+
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"), V = String(d.getDate()).padStart(2, "0");
|
|
4094
|
+
return u === "pt-BR" ? `${V}/${p}/${f}` : `${p}/${V}/${f}`;
|
|
4094
4095
|
}
|
|
4095
4096
|
}
|
|
4096
4097
|
} else if (t instanceof Date && !isNaN(t.getTime())) {
|
|
4097
4098
|
const s = t.getFullYear(), d = String(t.getMonth() + 1).padStart(2, "0"), f = String(t.getDate()).padStart(2, "0");
|
|
4098
|
-
return
|
|
4099
|
+
return u === "pt-BR" ? `${f}/${d}/${s}` : `${d}/${f}/${s}`;
|
|
4099
4100
|
}
|
|
4100
4101
|
return "";
|
|
4101
4102
|
} else if (l === "datetime-local") {
|
|
4102
4103
|
if (typeof t == "string") {
|
|
4103
4104
|
if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/.test(t)) {
|
|
4104
|
-
const [d, f] = t.split("T"), [p,
|
|
4105
|
-
return
|
|
4105
|
+
const [d, f] = t.split("T"), [p, V, $] = d.split("-");
|
|
4106
|
+
return u === "pt-BR" ? `${$}/${V}/${p} ${f}` : `${V}/${$}/${p} ${f}`;
|
|
4106
4107
|
}
|
|
4107
4108
|
if (/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)(?:Z|[+-]\d{2}:\d{2})?$/.test(t)) {
|
|
4108
4109
|
const d = new Date(t);
|
|
4109
4110
|
if (!isNaN(d.getTime())) {
|
|
4110
|
-
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"),
|
|
4111
|
-
return
|
|
4111
|
+
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"), V = String(d.getDate()).padStart(2, "0"), $ = String(d.getHours()).padStart(2, "0"), W = String(d.getMinutes()).padStart(2, "0"), Z = String(d.getSeconds()).padStart(2, "0");
|
|
4112
|
+
return u === "pt-BR" ? `${V}/${p}/${f} ${$}:${W}:${Z}` : `${p}/${V}/${f} ${$}:${W}:${Z}`;
|
|
4112
4113
|
}
|
|
4113
4114
|
}
|
|
4114
4115
|
}
|
|
@@ -4123,118 +4124,118 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4123
4124
|
if (typeof t == "string" && /^\d{4}-W\d{2}$/i.test(t)) {
|
|
4124
4125
|
const s = t.match(/^(\d{4})-W(\d{2})$/i);
|
|
4125
4126
|
if (s)
|
|
4126
|
-
return
|
|
4127
|
+
return u === "pt-BR" ? `Semana ${s[2]} de ${s[1]}` : `Week ${s[2]} of ${s[1]}`;
|
|
4127
4128
|
}
|
|
4128
4129
|
return t;
|
|
4129
4130
|
}
|
|
4130
4131
|
return t;
|
|
4131
|
-
},
|
|
4132
|
+
}, it = (t, l, n) => {
|
|
4132
4133
|
if (!t || !t.trim())
|
|
4133
4134
|
return "";
|
|
4134
|
-
const
|
|
4135
|
+
const u = t.trim(), s = n || ot.value;
|
|
4135
4136
|
if (l === "date") {
|
|
4136
|
-
if (
|
|
4137
|
-
const d =
|
|
4137
|
+
if ($e.value && u.includes("-")) {
|
|
4138
|
+
const d = u.split(/\s*-\s*/).map(($) => $.trim()), f = ($) => {
|
|
4138
4139
|
if (!$)
|
|
4139
4140
|
return null;
|
|
4140
4141
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test($)) {
|
|
4141
4142
|
const W = $.split("/");
|
|
4142
4143
|
if (s === "pt-BR") {
|
|
4143
|
-
const [
|
|
4144
|
-
return `${
|
|
4144
|
+
const [Z, Ne, vt] = W, Oe = Z.padStart(2, "0"), Xe = Ne.padStart(2, "0");
|
|
4145
|
+
return `${vt}-${Xe}-${Oe}`;
|
|
4145
4146
|
} else {
|
|
4146
|
-
const [
|
|
4147
|
-
return `${
|
|
4147
|
+
const [Z, Ne, vt] = W, Oe = Ne.padStart(2, "0"), Xe = Z.padStart(2, "0");
|
|
4148
|
+
return `${vt}-${Xe}-${Oe}`;
|
|
4148
4149
|
}
|
|
4149
4150
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test($)) {
|
|
4150
|
-
const W = $.split("-"), [
|
|
4151
|
-
return `${
|
|
4151
|
+
const W = $.split("-"), [Z, Ne, vt] = W, Oe = vt.padStart(2, "0"), Xe = Ne.padStart(2, "0");
|
|
4152
|
+
return `${Z}-${Xe}-${Oe}`;
|
|
4152
4153
|
}
|
|
4153
4154
|
return null;
|
|
4154
4155
|
};
|
|
4155
|
-
let p = f(d[0]),
|
|
4156
|
-
if (p &&
|
|
4156
|
+
let p = f(d[0]), V = d[1] ? f(d[1]) : null;
|
|
4157
|
+
if (p && V) {
|
|
4157
4158
|
const $ = new Date(p);
|
|
4158
|
-
if (new Date(
|
|
4159
|
-
const
|
|
4160
|
-
p =
|
|
4159
|
+
if (new Date(V) < $) {
|
|
4160
|
+
const Z = p;
|
|
4161
|
+
p = V, V = Z;
|
|
4161
4162
|
}
|
|
4162
|
-
return JSON.stringify({ startDate: p, endDate:
|
|
4163
|
+
return JSON.stringify({ startDate: p, endDate: V });
|
|
4163
4164
|
} else if (p)
|
|
4164
4165
|
return JSON.stringify({ startDate: p, endDate: null });
|
|
4165
4166
|
return "";
|
|
4166
4167
|
}
|
|
4167
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(
|
|
4168
|
-
const d =
|
|
4168
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(u)) {
|
|
4169
|
+
const d = u.split("/");
|
|
4169
4170
|
if (s === "pt-BR") {
|
|
4170
|
-
const [f, p,
|
|
4171
|
-
return `${
|
|
4171
|
+
const [f, p, V] = d, $ = f.padStart(2, "0"), W = p.padStart(2, "0");
|
|
4172
|
+
return `${V}-${W}-${$}`;
|
|
4172
4173
|
} else {
|
|
4173
|
-
const [f, p,
|
|
4174
|
-
return `${
|
|
4174
|
+
const [f, p, V] = d, $ = p.padStart(2, "0"), W = f.padStart(2, "0");
|
|
4175
|
+
return `${V}-${W}-${$}`;
|
|
4175
4176
|
}
|
|
4176
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
4177
|
-
const d =
|
|
4177
|
+
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(u)) {
|
|
4178
|
+
const d = u.split("-"), [f, p, V] = d, $ = V.padStart(2, "0"), W = p.padStart(2, "0");
|
|
4178
4179
|
return `${f}-${W}-${$}`;
|
|
4179
4180
|
}
|
|
4180
4181
|
return "";
|
|
4181
4182
|
} else if (l === "datetime-local") {
|
|
4182
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(
|
|
4183
|
-
const [d, f] =
|
|
4183
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(u)) {
|
|
4184
|
+
const [d, f] = u.split(" "), p = d.split("/");
|
|
4184
4185
|
if (s === "pt-BR") {
|
|
4185
|
-
const [
|
|
4186
|
-
return `${W}-${
|
|
4186
|
+
const [V, $, W] = p, Z = V.padStart(2, "0"), Ne = $.padStart(2, "0"), Oe = f.split(":").map((Xe) => Xe.padStart(2, "0")).join(":");
|
|
4187
|
+
return `${W}-${Ne}-${Z}T${Oe}`;
|
|
4187
4188
|
} else {
|
|
4188
|
-
const [
|
|
4189
|
-
return `${W}-${
|
|
4189
|
+
const [V, $, W] = p, Z = $.padStart(2, "0"), Ne = V.padStart(2, "0"), Oe = f.split(":").map((Xe) => Xe.padStart(2, "0")).join(":");
|
|
4190
|
+
return `${W}-${Ne}-${Z}T${Oe}`;
|
|
4190
4191
|
}
|
|
4191
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(
|
|
4192
|
-
const [d, f] =
|
|
4193
|
-
return `${
|
|
4192
|
+
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(u)) {
|
|
4193
|
+
const [d, f] = u.split("T"), p = d.split("-"), [V, $, W] = p, Z = W.padStart(2, "0"), Ne = $.padStart(2, "0"), Oe = f.split(":").map((Xe) => Xe.padStart(2, "0")).join(":");
|
|
4194
|
+
return `${V}-${Ne}-${Z}T${Oe}`;
|
|
4194
4195
|
}
|
|
4195
4196
|
return "";
|
|
4196
4197
|
} else if (l === "month") {
|
|
4197
|
-
if (/^\d{1,2}\/\d{4}$/.test(
|
|
4198
|
-
const [d, f] =
|
|
4198
|
+
if (/^\d{1,2}\/\d{4}$/.test(u)) {
|
|
4199
|
+
const [d, f] = u.split("/"), p = d.padStart(2, "0");
|
|
4199
4200
|
return `${f}-${p}`;
|
|
4200
|
-
} else if (/^\d{4}-\d{1,2}$/.test(
|
|
4201
|
-
const [d, f] =
|
|
4201
|
+
} else if (/^\d{4}-\d{1,2}$/.test(u)) {
|
|
4202
|
+
const [d, f] = u.split("-"), p = f.padStart(2, "0");
|
|
4202
4203
|
return `${d}-${p}`;
|
|
4203
4204
|
}
|
|
4204
4205
|
return "";
|
|
4205
4206
|
} else if (l === "week") {
|
|
4206
|
-
if (/^\d{4}-W\d{2}$/i.test(
|
|
4207
|
-
return
|
|
4208
|
-
const d =
|
|
4207
|
+
if (/^\d{4}-W\d{2}$/i.test(u))
|
|
4208
|
+
return u.toUpperCase();
|
|
4209
|
+
const d = u.match(/semana\s+W?(\d{2})\s+de\s+(\d{4})/i);
|
|
4209
4210
|
if (d)
|
|
4210
4211
|
return `${d[2]}-W${d[1]}`;
|
|
4211
|
-
const f =
|
|
4212
|
+
const f = u.match(/week\s+W?(\d{2})\s+of\s+(\d{4})/i);
|
|
4212
4213
|
return f ? `${f[2]}-W${f[1]}` : "";
|
|
4213
4214
|
}
|
|
4214
|
-
return
|
|
4215
|
-
},
|
|
4216
|
-
const t =
|
|
4215
|
+
return u;
|
|
4216
|
+
}, ae = le(!1), wt = le({ top: 0, left: 0 }), _ = le(null), Y = le(null), Yt = le(!0), z = a(() => Yt.value === !0), U = a(() => {
|
|
4217
|
+
const t = k.value ? "component-disabled" : "", l = Ce.value !== "b" ? "inline-block" : "block", n = F.value ? F.value : "", u = J.value ? J.value : "", s = oe.value ? oe.value : "", d = ce.value ? ce.value : !1, f = q.value !== 0 && !q.value || q.value < 0 ? 0 : q.value, p = Q.value ? Q.value : "'Lato', sans-serif", V = he.value ? he.value : "1.4em", $ = P.value !== 0 && !P.value || P.value < 0 ? 100 : P.value, W = Be.value ? Be.value : "'Lato', sans-serif", Z = _e.value ? _e.value : "1em", Ne = fe.value !== 0 && !fe.value || fe.value < 0 ? 100 : fe.value, vt = Le.value ? Le.value : "#f15574", Oe = ve.value ? ve.value : 200, Xe = Ae.value ? Ae.value : "normal", Ua = "sm", Ka = ie.value ? ie.value : !1, Ga = v.value ? v.value : "date", Za = E.value ? E.value : !1, Ja = Ie.value ? Ie.value : "normal", Qa = ye.value ? ye.value : "left", Xa = pe.value ? pe.value : "background", el = We.value ? We.value : !1, tl = ee.value !== 0 && !ee.value || ee.value < 0 ? 5 : ee.value, al = g.value ? g.value : "transparent", ll = te.value !== 0 && !te.value || te.value < 0 ? 15 : te.value, nl = R.value ? R.value : "1px 5px", ol = me.value !== 0 && !me.value || me.value < 0 ? 0 : me.value, rl = Pe.value === null || Pe.value === void 0 ? -13 : Pe.value, ul = qe.value === null || qe.value === void 0 ? 5 : qe.value, il = je.value === null || je.value === void 0 ? 0 : je.value, sl = Je.value === null || Je.value === void 0 ? 0 : Je.value, dl = at.value ? at.value : "'Lato', sans-serif", cl = yt.value ? yt.value : "1em", fl = Tt.value ? Tt.value : "0.8em", vl = rt.value ? rt.value : 400, Sl = bt.value ? bt.value : "#ffffff", xl = Nt.value ? Nt.value : "#000000", Cl = lt.value ? lt.value : "#ffffff", Vl = ut.value ? ut.value : "#000000";
|
|
4217
4218
|
return {
|
|
4218
4219
|
disabled: t,
|
|
4219
4220
|
display: l,
|
|
4220
4221
|
font: p,
|
|
4221
|
-
fontSize:
|
|
4222
|
+
fontSize: V,
|
|
4222
4223
|
fontWeight: $,
|
|
4223
4224
|
fontFamilyMsg: W,
|
|
4224
|
-
fontSizeMsg:
|
|
4225
|
-
fontWeightMsg:
|
|
4226
|
-
textMessageColor:
|
|
4225
|
+
fontSizeMsg: Z,
|
|
4226
|
+
fontWeightMsg: Ne,
|
|
4227
|
+
textMessageColor: vt,
|
|
4227
4228
|
caretColor: n,
|
|
4228
|
-
selectionBgColor:
|
|
4229
|
+
selectionBgColor: u,
|
|
4229
4230
|
selectionTextColor: s,
|
|
4230
4231
|
hasBorderRadius: d,
|
|
4231
4232
|
borderRadius: f,
|
|
4232
4233
|
textAlign: Qa,
|
|
4233
|
-
inputWidth:
|
|
4234
|
-
activeTextStyle:
|
|
4234
|
+
inputWidth: Oe,
|
|
4235
|
+
activeTextStyle: Xe,
|
|
4235
4236
|
sizeMediaQuery: Ua,
|
|
4236
|
-
inputReadonly:
|
|
4237
|
-
inputType:
|
|
4237
|
+
inputReadonly: Ka,
|
|
4238
|
+
inputType: Ga,
|
|
4238
4239
|
inputUppercase: Za,
|
|
4239
4240
|
theme: Ja,
|
|
4240
4241
|
inputStyle: Xa,
|
|
@@ -4257,44 +4258,45 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4257
4258
|
lightTextColorLabelActive: Cl,
|
|
4258
4259
|
darkTextColorLabelActive: Vl
|
|
4259
4260
|
};
|
|
4260
|
-
}),
|
|
4261
|
-
const t =
|
|
4261
|
+
}), Bt = a(() => U.value.disabled), Dt = a(() => {
|
|
4262
|
+
const t = U.value, l = A.value;
|
|
4262
4263
|
return {
|
|
4263
4264
|
display: t.display,
|
|
4264
4265
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
4265
4266
|
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
4266
4267
|
paddingTop: "0px",
|
|
4267
4268
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
4268
|
-
|
|
4269
|
+
// Se não tem label ou está ativo, permite overflow visible para não cortar conteúdo
|
|
4270
|
+
overflow: !We.value || l ? "visible" : "hidden"
|
|
4269
4271
|
};
|
|
4270
|
-
}),
|
|
4271
|
-
const t =
|
|
4272
|
+
}), st = a(() => {
|
|
4273
|
+
const t = U.value;
|
|
4272
4274
|
return t.fontSize ? t.fontSize : "1.4em";
|
|
4273
4275
|
}), N = a(() => {
|
|
4274
|
-
const t =
|
|
4276
|
+
const t = U.value, l = A.value;
|
|
4275
4277
|
return {
|
|
4276
4278
|
fontWeight: t.fontWeight,
|
|
4277
|
-
marginTop: l &&
|
|
4279
|
+
marginTop: l && We.value ? `${t.inputLabelMarginActive}px` : "0"
|
|
4278
4280
|
};
|
|
4279
4281
|
}), Ft = a(() => {
|
|
4280
|
-
const t =
|
|
4282
|
+
const t = U.value;
|
|
4281
4283
|
return t.inputStyle !== "line" && t.hasBorderRadius ? { borderRadius: `${t.borderRadius}rem` } : {};
|
|
4282
|
-
}), oa = a(() =>
|
|
4283
|
-
const t =
|
|
4284
|
+
}), oa = a(() => U.value.font), ra = a(() => U.value.fontFamilyMsg), ua = a(() => U.value.fontSizeMsg), dt = a(() => U.value.fontWeightMsg), Et = a(() => Ie.value === "dark" ? w.value : tt.value), Pt = a(() => U.value.textMessageColor), ia = a(() => {
|
|
4285
|
+
const t = U.value;
|
|
4284
4286
|
return t.caretColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
4285
4287
|
}), Ut = a(() => {
|
|
4286
|
-
const t =
|
|
4288
|
+
const t = U.value;
|
|
4287
4289
|
return t.selectionBgColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
4288
4290
|
}), sa = a(() => {
|
|
4289
|
-
const t =
|
|
4291
|
+
const t = U.value;
|
|
4290
4292
|
return t.selectionTextColor || (t.theme === "dark" ? "#000000" : "#ffffff");
|
|
4291
|
-
}),
|
|
4292
|
-
const t =
|
|
4293
|
+
}), Kt = a(() => {
|
|
4294
|
+
const t = U.value;
|
|
4293
4295
|
return t.display === "block" ? { width: "100%" } : {
|
|
4294
4296
|
width: `${t.inputWidth}px`
|
|
4295
4297
|
};
|
|
4296
4298
|
}), da = a(() => {
|
|
4297
|
-
switch (
|
|
4299
|
+
switch (pe.value) {
|
|
4298
4300
|
case "line":
|
|
4299
4301
|
return "component__input--line";
|
|
4300
4302
|
case "border":
|
|
@@ -4303,7 +4305,7 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4303
4305
|
return "component__input--background";
|
|
4304
4306
|
}
|
|
4305
4307
|
}), ca = a(() => {
|
|
4306
|
-
switch (
|
|
4308
|
+
switch (U.value.activeTextStyle) {
|
|
4307
4309
|
case "italic":
|
|
4308
4310
|
return "component__input--active--italic";
|
|
4309
4311
|
case "oblique":
|
|
@@ -4312,38 +4314,38 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4312
4314
|
return "component__input--active--normal";
|
|
4313
4315
|
}
|
|
4314
4316
|
}), fa = a(() => "component__sm"), va = a(() => {
|
|
4315
|
-
switch (
|
|
4317
|
+
switch (U.value.theme) {
|
|
4316
4318
|
case "dark":
|
|
4317
4319
|
return "component__theme--dark";
|
|
4318
4320
|
default:
|
|
4319
4321
|
return "component__theme--light";
|
|
4320
4322
|
}
|
|
4321
|
-
}),
|
|
4322
|
-
a(() =>
|
|
4323
|
-
const
|
|
4323
|
+
}), Gt = a(() => U.value.inputReadonly ? "component__input--read-only" : ""), pa = a(() => U.value.inputUppercase ? "component__input--uppercase" : ""), zt = a(() => et.value ? et.value : `${de.value}-name-label`), c = a(() => ""), A = a(() => Re.value || O.value && O.value.trim().length > 0), ue = a(() => !O.value || O.value.trim().length === 0 ? "component__input--empty" : "");
|
|
4324
|
+
a(() => Re.value ? "component__input--active" : "component__input--no-active");
|
|
4325
|
+
const Qe = a(() => "6px 10px"), Ot = a(() => !!(se.value && be.value)), i = a(() => {
|
|
4324
4326
|
const t = {};
|
|
4325
|
-
|
|
4327
|
+
x.value && Object.keys(x.value).forEach((u) => t[`aria-${u}`] = x.value[u]);
|
|
4326
4328
|
const l = {
|
|
4327
4329
|
"aria-label": B.value,
|
|
4328
|
-
"aria-disabled":
|
|
4330
|
+
"aria-disabled": k.value,
|
|
4329
4331
|
...t
|
|
4330
4332
|
};
|
|
4331
4333
|
return Object.fromEntries(
|
|
4332
|
-
Object.entries(l).filter(([n,
|
|
4334
|
+
Object.entries(l).filter(([n, u]) => u != null)
|
|
4333
4335
|
);
|
|
4334
|
-
}),
|
|
4335
|
-
const t =
|
|
4336
|
+
}), S = a(() => {
|
|
4337
|
+
const t = Ie.value === "dark" ? Ze.value : Ct.value, l = Ie.value === "dark" ? w.value : tt.value;
|
|
4336
4338
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
4337
|
-
}),
|
|
4338
|
-
const t =
|
|
4339
|
+
}), Ve = a(() => {
|
|
4340
|
+
const t = Ie.value === "dark" ? He.value : we.value, l = Ie.value === "dark" ? w.value : tt.value;
|
|
4339
4341
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
4340
|
-
}),
|
|
4341
|
-
const t =
|
|
4342
|
+
}), Ye = a(() => {
|
|
4343
|
+
const t = U.value, l = A.value, n = l ? t.lightTextColorLabelActive : t.lightTextColorLabel, u = l ? t.darkTextColorLabelActive : t.darkTextColorLabel;
|
|
4342
4344
|
return {
|
|
4343
4345
|
fontFamily: t.fontFamilyLabel,
|
|
4344
4346
|
fontSize: l ? t.fontSizeLabelActive : t.fontSizeLabel,
|
|
4345
4347
|
fontWeight: t.fontWeightLabel,
|
|
4346
|
-
color: t.theme === "dark" ?
|
|
4348
|
+
color: t.theme === "dark" ? u : n,
|
|
4347
4349
|
top: l ? `${t.labelActiveTop}px` : "50%",
|
|
4348
4350
|
left: l ? `${t.labelActiveLeft}px` : `${t.labelLeft}px`,
|
|
4349
4351
|
right: l ? `${t.labelActiveRight}px` : `${t.labelRight}px`,
|
|
@@ -4355,88 +4357,88 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4355
4357
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
4356
4358
|
...l ? {
|
|
4357
4359
|
width: "fit-content",
|
|
4358
|
-
whiteSpace:
|
|
4359
|
-
wordWrap:
|
|
4360
|
-
overflowWrap:
|
|
4360
|
+
whiteSpace: Ee.value ? "nowrap" : "normal",
|
|
4361
|
+
wordWrap: Ee.value ? "normal" : "break-word",
|
|
4362
|
+
overflowWrap: Ee.value ? "normal" : "break-word",
|
|
4361
4363
|
maxWidth: "100%",
|
|
4362
|
-
textOverflow:
|
|
4363
|
-
overflow:
|
|
4364
|
+
textOverflow: Ee.value ? "ellipsis" : "clip",
|
|
4365
|
+
overflow: Ee.value ? "hidden" : "visible"
|
|
4364
4366
|
} : {}
|
|
4365
4367
|
};
|
|
4366
4368
|
});
|
|
4367
4369
|
a(() => {
|
|
4368
|
-
const t =
|
|
4370
|
+
const t = U.value;
|
|
4369
4371
|
return t.theme === "dark" ? t.darkTextColorLabelActive : t.lightTextColorLabelActive;
|
|
4370
4372
|
});
|
|
4371
4373
|
const Zt = () => {
|
|
4372
|
-
L.value =
|
|
4374
|
+
L.value = h.value, j.value = v.value;
|
|
4373
4375
|
}, ga = (t) => {
|
|
4374
|
-
|
|
4376
|
+
T("clicked", t);
|
|
4375
4377
|
}, ya = (t) => {
|
|
4376
|
-
t.stopPropagation(), !(
|
|
4377
|
-
|
|
4378
|
+
t.stopPropagation(), !(k.value || U.value.inputReadonly) && _.value && (_.value.focus(), z.value && (ae.value = !1, requestAnimationFrame(() => {
|
|
4379
|
+
Rt(), ae.value = !0;
|
|
4378
4380
|
})));
|
|
4379
4381
|
}, ba = () => {
|
|
4380
|
-
|
|
4382
|
+
k.value || U.value.inputReadonly || !D.value || T("entered", L.value);
|
|
4381
4383
|
}, ma = async (t) => {
|
|
4382
4384
|
var n;
|
|
4383
4385
|
const l = ((n = t.clipboardData) == null ? void 0 : n.getData("text")) || "";
|
|
4384
|
-
|
|
4385
|
-
},
|
|
4386
|
-
|
|
4387
|
-
const t =
|
|
4388
|
-
|
|
4386
|
+
T("paste", l), Ke.value && t.preventDefault();
|
|
4387
|
+
}, Rt = () => {
|
|
4388
|
+
_.value && la(() => {
|
|
4389
|
+
const t = _.value.getBoundingClientRect(), l = 4;
|
|
4390
|
+
wt.value = {
|
|
4389
4391
|
top: `${t.bottom + l}px`,
|
|
4390
4392
|
left: `${t.left}px`
|
|
4391
4393
|
};
|
|
4392
4394
|
});
|
|
4393
4395
|
}, ha = a(() => ({
|
|
4394
4396
|
position: "fixed",
|
|
4395
|
-
top:
|
|
4396
|
-
left:
|
|
4397
|
-
zIndex:
|
|
4397
|
+
top: wt.value.top,
|
|
4398
|
+
left: wt.value.left,
|
|
4399
|
+
zIndex: At.value
|
|
4398
4400
|
})), Sa = () => {
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
+
Re.value = !0, T("focused"), z.value && (ae.value = !1, requestAnimationFrame(() => {
|
|
4402
|
+
Rt(), ae.value = !0;
|
|
4401
4403
|
}));
|
|
4402
4404
|
}, xa = (t) => {
|
|
4403
|
-
t.relatedTarget &&
|
|
4404
|
-
var
|
|
4405
|
+
t.relatedTarget && Y.value && Y.value.contains(t.relatedTarget) || setTimeout(() => {
|
|
4406
|
+
var u;
|
|
4405
4407
|
const l = document.activeElement;
|
|
4406
|
-
if (
|
|
4407
|
-
if (
|
|
4408
|
+
if (ae.value) {
|
|
4409
|
+
if (Y.value && Y.value.contains(l) || t.relatedTarget && Y.value && Y.value.contains(t.relatedTarget))
|
|
4408
4410
|
return;
|
|
4409
|
-
if (l === document.body &&
|
|
4410
|
-
const s =
|
|
4411
|
+
if (l === document.body && Y.value) {
|
|
4412
|
+
const s = Y.value.querySelectorAll('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
4411
4413
|
if (Array.from(s).some((f) => f === document.activeElement || f.contains(document.activeElement)))
|
|
4412
4414
|
return;
|
|
4413
4415
|
}
|
|
4414
4416
|
}
|
|
4415
|
-
const n = (
|
|
4416
|
-
n && n.contains(l) ||
|
|
4417
|
+
const n = (u = _.value) == null ? void 0 : u.closest(".component");
|
|
4418
|
+
n && n.contains(l) || _.value !== l && (Re.value = !1, ae.value = !1, T("blurred"));
|
|
4417
4419
|
}, 200);
|
|
4418
4420
|
}, Ca = () => {
|
|
4419
|
-
z.value && (
|
|
4420
|
-
|
|
4421
|
+
z.value && (ae.value, ae.value = !1, requestAnimationFrame(() => {
|
|
4422
|
+
Rt(), ae.value = !0;
|
|
4421
4423
|
}));
|
|
4422
|
-
},
|
|
4424
|
+
}, ct = (t) => {
|
|
4423
4425
|
if (!t || !(t instanceof Date))
|
|
4424
4426
|
return null;
|
|
4425
|
-
const l = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"),
|
|
4426
|
-
return `${l}-${n}-${
|
|
4427
|
+
const l = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"), u = String(t.getDate()).padStart(2, "0");
|
|
4428
|
+
return `${l}-${n}-${u}`;
|
|
4427
4429
|
}, _t = (t) => {
|
|
4428
4430
|
if (t == null || t === "")
|
|
4429
4431
|
return "";
|
|
4430
4432
|
if (t instanceof Date)
|
|
4431
|
-
return isNaN(t.getTime()) ? "" :
|
|
4433
|
+
return isNaN(t.getTime()) ? "" : ct(t);
|
|
4432
4434
|
if (typeof t == "string") {
|
|
4433
4435
|
if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
4434
|
-
const [n,
|
|
4435
|
-
return d.getFullYear() === n && d.getMonth() ===
|
|
4436
|
+
const [n, u, s] = t.split("-").map(Number), d = new Date(n, u - 1, s);
|
|
4437
|
+
return d.getFullYear() === n && d.getMonth() === u - 1 && d.getDate() === s ? t : "";
|
|
4436
4438
|
}
|
|
4437
4439
|
if (/^(\d{4}-\d{2}-\d{2})(T\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})?)?$/.test(t)) {
|
|
4438
4440
|
const n = new Date(t);
|
|
4439
|
-
return isNaN(n.getTime()) ? "" :
|
|
4441
|
+
return isNaN(n.getTime()) ? "" : ct(n);
|
|
4440
4442
|
}
|
|
4441
4443
|
}
|
|
4442
4444
|
return "";
|
|
@@ -4449,7 +4451,7 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4449
4451
|
}
|
|
4450
4452
|
if (typeof t == "string") {
|
|
4451
4453
|
if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
4452
|
-
const [n,
|
|
4454
|
+
const [n, u, s] = t.split("-").map(Number), d = new Date(n, u - 1, s);
|
|
4453
4455
|
return d.setHours(0, 0, 0, 0), d;
|
|
4454
4456
|
}
|
|
4455
4457
|
const l = new Date(t);
|
|
@@ -4461,9 +4463,9 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4461
4463
|
if (!t)
|
|
4462
4464
|
return null;
|
|
4463
4465
|
if (t instanceof Date && !isNaN(t.getTime())) {
|
|
4464
|
-
const l = t.getHours(), n = t.getMinutes(),
|
|
4465
|
-
if (l >= 0 && l <= 23 && n >= 0 && n <= 59 &&
|
|
4466
|
-
return { hour: l, minute: n, second:
|
|
4466
|
+
const l = t.getHours(), n = t.getMinutes(), u = t.getSeconds();
|
|
4467
|
+
if (l >= 0 && l <= 23 && n >= 0 && n <= 59 && u >= 0 && u <= 59)
|
|
4468
|
+
return { hour: l, minute: n, second: u };
|
|
4467
4469
|
}
|
|
4468
4470
|
if (typeof t == "string") {
|
|
4469
4471
|
let l = t;
|
|
@@ -4471,9 +4473,9 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4471
4473
|
const s = t.split("T");
|
|
4472
4474
|
s.length === 2 && (l = s[1]);
|
|
4473
4475
|
}
|
|
4474
|
-
const n = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/,
|
|
4475
|
-
if (
|
|
4476
|
-
const s = parseInt(
|
|
4476
|
+
const n = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, u = l.match(n);
|
|
4477
|
+
if (u) {
|
|
4478
|
+
const s = parseInt(u[1], 10), d = parseInt(u[2], 10), f = u[3] ? parseInt(u[3], 10) : 0;
|
|
4477
4479
|
if (s >= 0 && s <= 23 && d >= 0 && d <= 59 && f >= 0 && f <= 59)
|
|
4478
4480
|
return { hour: s, minute: d, second: f };
|
|
4479
4481
|
}
|
|
@@ -4495,235 +4497,235 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4495
4497
|
return !0;
|
|
4496
4498
|
if (!l || isNaN(l.getTime()))
|
|
4497
4499
|
return !0;
|
|
4498
|
-
const n = Jt(
|
|
4500
|
+
const n = Jt(Ge.value);
|
|
4499
4501
|
if (n) {
|
|
4500
4502
|
const s = new Date(n.getTime());
|
|
4501
4503
|
if (s.setHours(0, 0, 0, 0), l < s)
|
|
4502
4504
|
return !0;
|
|
4503
4505
|
}
|
|
4504
|
-
const
|
|
4505
|
-
if (
|
|
4506
|
-
const s = new Date(
|
|
4506
|
+
const u = Jt(ge.value);
|
|
4507
|
+
if (u) {
|
|
4508
|
+
const s = new Date(u.getTime());
|
|
4507
4509
|
if (s.setHours(0, 0, 0, 0), l > s)
|
|
4508
4510
|
return !0;
|
|
4509
4511
|
}
|
|
4510
4512
|
return !1;
|
|
4511
4513
|
}, Xt = (t, l, n = 0) => {
|
|
4512
|
-
const
|
|
4514
|
+
const u = t * 3600 + l * 60 + n, s = Qt(Ge.value);
|
|
4513
4515
|
if (s) {
|
|
4514
4516
|
const f = s.hour * 3600 + s.minute * 60 + (s.second || 0);
|
|
4515
|
-
if (
|
|
4517
|
+
if (u < f)
|
|
4516
4518
|
return !0;
|
|
4517
4519
|
}
|
|
4518
|
-
const d = Qt(
|
|
4520
|
+
const d = Qt(ge.value);
|
|
4519
4521
|
if (d) {
|
|
4520
4522
|
const f = d.hour * 3600 + d.minute * 60 + (d.second || 0);
|
|
4521
|
-
if (
|
|
4523
|
+
if (u > f)
|
|
4522
4524
|
return !0;
|
|
4523
4525
|
}
|
|
4524
4526
|
return !1;
|
|
4525
|
-
},
|
|
4527
|
+
}, ft = (t, l) => {
|
|
4526
4528
|
if (!t || t === "")
|
|
4527
4529
|
return !0;
|
|
4528
4530
|
if (l === "date") {
|
|
4529
4531
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(t))
|
|
4530
4532
|
return !1;
|
|
4531
|
-
const [n,
|
|
4532
|
-
return d.getFullYear() === n && d.getMonth() ===
|
|
4533
|
+
const [n, u, s] = t.split("-").map(Number), d = new Date(n, u - 1, s);
|
|
4534
|
+
return d.getFullYear() === n && d.getMonth() === u - 1 && d.getDate() === s;
|
|
4533
4535
|
} else if (l === "time") {
|
|
4534
|
-
const n = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/,
|
|
4535
|
-
if (!
|
|
4536
|
+
const n = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, u = t.match(n);
|
|
4537
|
+
if (!u)
|
|
4536
4538
|
return !1;
|
|
4537
|
-
const s = parseInt(
|
|
4539
|
+
const s = parseInt(u[1], 10), d = parseInt(u[2], 10), f = u[3] ? parseInt(u[3], 10) : 0;
|
|
4538
4540
|
return s >= 0 && s <= 23 && d >= 0 && d <= 59 && f >= 0 && f <= 59;
|
|
4539
4541
|
} else if (l === "datetime-local") {
|
|
4540
4542
|
const n = t.split("T");
|
|
4541
4543
|
if (n.length !== 2)
|
|
4542
4544
|
return !1;
|
|
4543
|
-
const
|
|
4544
|
-
return
|
|
4545
|
+
const u = n[0], s = n[1];
|
|
4546
|
+
return ft(u, "date") && ft(s, "time");
|
|
4545
4547
|
} else if (l === "month") {
|
|
4546
4548
|
if (!/^\d{4}-\d{2}$/.test(t))
|
|
4547
4549
|
return !1;
|
|
4548
|
-
const [n,
|
|
4549
|
-
return n >= 1900 && n <= 2100 &&
|
|
4550
|
+
const [n, u] = t.split("-").map(Number);
|
|
4551
|
+
return n >= 1900 && n <= 2100 && u >= 1 && u <= 12;
|
|
4550
4552
|
} else if (l === "week") {
|
|
4551
4553
|
if (!/^\d{4}-W\d{2}$/.test(t))
|
|
4552
4554
|
return !1;
|
|
4553
|
-
const [n,
|
|
4554
|
-
return n >= 1900 && n <= 2100 &&
|
|
4555
|
+
const [n, u] = t.split("-W").map(Number);
|
|
4556
|
+
return n >= 1900 && n <= 2100 && u >= 1 && u <= 53;
|
|
4555
4557
|
}
|
|
4556
4558
|
return !1;
|
|
4557
|
-
},
|
|
4559
|
+
}, Lt = () => {
|
|
4558
4560
|
let t = !0;
|
|
4559
|
-
if (
|
|
4560
|
-
t = !
|
|
4561
|
+
if (h.value === null || h.value === void 0 || h.value === "") {
|
|
4562
|
+
t = !kt.value, T("valid", t);
|
|
4561
4563
|
return;
|
|
4562
4564
|
}
|
|
4563
4565
|
if (v.value === "date") {
|
|
4564
|
-
const n = _t(
|
|
4565
|
-
if (n === "" &&
|
|
4566
|
-
|
|
4566
|
+
const n = _t(h.value);
|
|
4567
|
+
if (n === "" && h.value !== "" && h.value !== null && h.value !== void 0) {
|
|
4568
|
+
T("valid", !1);
|
|
4567
4569
|
return;
|
|
4568
4570
|
}
|
|
4569
4571
|
if (n === "") {
|
|
4570
|
-
|
|
4572
|
+
T("valid", !0);
|
|
4571
4573
|
return;
|
|
4572
4574
|
}
|
|
4573
|
-
if (!
|
|
4574
|
-
|
|
4575
|
+
if (!ft(n, v.value)) {
|
|
4576
|
+
T("valid", !1);
|
|
4575
4577
|
return;
|
|
4576
4578
|
}
|
|
4577
4579
|
t = !Ht(n);
|
|
4578
4580
|
} else if (v.value === "time") {
|
|
4579
|
-
if (!
|
|
4580
|
-
|
|
4581
|
+
if (!ft(h.value, v.value)) {
|
|
4582
|
+
T("valid", !1);
|
|
4581
4583
|
return;
|
|
4582
4584
|
}
|
|
4583
|
-
const n =
|
|
4585
|
+
const n = h.value.split(":");
|
|
4584
4586
|
if (n.length >= 2) {
|
|
4585
|
-
const
|
|
4586
|
-
t = !Xt(
|
|
4587
|
+
const u = parseInt(n[0], 10) || 0, s = parseInt(n[1], 10) || 0, d = n[2] ? parseInt(n[2], 10) : 0;
|
|
4588
|
+
t = !Xt(u, s, d);
|
|
4587
4589
|
}
|
|
4588
4590
|
} else if (v.value === "datetime-local") {
|
|
4589
|
-
if (
|
|
4590
|
-
const n = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/,
|
|
4591
|
-
if (!n.test(
|
|
4592
|
-
|
|
4591
|
+
if (h.value, typeof h.value == "string") {
|
|
4592
|
+
const n = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/, u = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)(?:Z|[+-]\d{2}:\d{2})?$/;
|
|
4593
|
+
if (!n.test(h.value) && !u.test(h.value)) {
|
|
4594
|
+
T("valid", !1);
|
|
4593
4595
|
return;
|
|
4594
4596
|
}
|
|
4595
|
-
if (
|
|
4596
|
-
const s = new Date(
|
|
4597
|
+
if (u.test(h.value)) {
|
|
4598
|
+
const s = new Date(h.value);
|
|
4597
4599
|
if (isNaN(s.getTime())) {
|
|
4598
|
-
|
|
4600
|
+
T("valid", !1);
|
|
4599
4601
|
return;
|
|
4600
4602
|
}
|
|
4601
4603
|
}
|
|
4602
|
-
} else if (
|
|
4603
|
-
|
|
4604
|
+
} else if (h.value !== null && h.value !== void 0 && h.value !== "") {
|
|
4605
|
+
T("valid", !1);
|
|
4604
4606
|
return;
|
|
4605
4607
|
}
|
|
4606
4608
|
if (L.value) {
|
|
4607
4609
|
const n = L.value.split("T");
|
|
4608
4610
|
if (n.length === 2) {
|
|
4609
|
-
const
|
|
4611
|
+
const u = n[0], s = n[1], d = !Ht(u), f = s.split(":");
|
|
4610
4612
|
let p = !0;
|
|
4611
4613
|
if (f.length >= 2) {
|
|
4612
|
-
const
|
|
4613
|
-
p = !Xt(
|
|
4614
|
+
const V = parseInt(f[0], 10) || 0, $ = parseInt(f[1], 10) || 0, W = f[2] ? parseInt(f[2], 10) : 0;
|
|
4615
|
+
p = !Xt(V, $, W);
|
|
4614
4616
|
}
|
|
4615
4617
|
t = d && p;
|
|
4616
4618
|
}
|
|
4617
4619
|
}
|
|
4618
4620
|
} else if (v.value === "month") {
|
|
4619
|
-
if (!
|
|
4620
|
-
|
|
4621
|
+
if (!ft(h.value, v.value)) {
|
|
4622
|
+
T("valid", !1);
|
|
4621
4623
|
return;
|
|
4622
4624
|
}
|
|
4623
|
-
t = !Ht(
|
|
4625
|
+
t = !Ht(h.value + "-01");
|
|
4624
4626
|
} else if (v.value === "week") {
|
|
4625
|
-
if (!
|
|
4626
|
-
|
|
4627
|
+
if (!ft(h.value, v.value)) {
|
|
4628
|
+
T("valid", !1);
|
|
4627
4629
|
return;
|
|
4628
4630
|
}
|
|
4629
4631
|
t = !0;
|
|
4630
4632
|
}
|
|
4631
|
-
|
|
4633
|
+
T("valid", t);
|
|
4632
4634
|
}, Va = (t) => {
|
|
4633
|
-
|
|
4635
|
+
T("valid", t);
|
|
4634
4636
|
}, Ta = (t) => {
|
|
4635
|
-
|
|
4637
|
+
T("month-changed", t);
|
|
4636
4638
|
}, ea = (t, l) => {
|
|
4637
4639
|
if (!t || !(t instanceof Date))
|
|
4638
4640
|
return t || "";
|
|
4639
4641
|
if (l === "date")
|
|
4640
|
-
return
|
|
4642
|
+
return ct(t);
|
|
4641
4643
|
if (l === "time") {
|
|
4642
|
-
const n = String(t.getHours()).padStart(2, "0"),
|
|
4643
|
-
return `${n}:${
|
|
4644
|
+
const n = String(t.getHours()).padStart(2, "0"), u = String(t.getMinutes()).padStart(2, "0"), s = String(t.getSeconds()).padStart(2, "0");
|
|
4645
|
+
return `${n}:${u}:${s}`;
|
|
4644
4646
|
} else if (l === "datetime-local") {
|
|
4645
|
-
const n =
|
|
4646
|
-
return `${n}T${
|
|
4647
|
+
const n = ct(t), u = String(t.getHours()).padStart(2, "0"), s = String(t.getMinutes()).padStart(2, "0"), d = String(t.getSeconds()).padStart(2, "0");
|
|
4648
|
+
return `${n}T${u}:${s}:${d}`;
|
|
4647
4649
|
} else if (l === "month") {
|
|
4648
|
-
const n = t.getFullYear(),
|
|
4649
|
-
return `${n}-${
|
|
4650
|
+
const n = t.getFullYear(), u = String(t.getMonth() + 1).padStart(2, "0");
|
|
4651
|
+
return `${n}-${u}`;
|
|
4650
4652
|
} else if (l === "week")
|
|
4651
|
-
return
|
|
4653
|
+
return ct(t);
|
|
4652
4654
|
return "";
|
|
4653
4655
|
}, ka = a(() => {
|
|
4654
4656
|
if (!z.value)
|
|
4655
|
-
return ea(
|
|
4657
|
+
return ea(Ge.value, v.value);
|
|
4656
4658
|
}), o = a(() => {
|
|
4657
4659
|
if (!z.value)
|
|
4658
|
-
return ea(
|
|
4659
|
-
}),
|
|
4660
|
+
return ea(ge.value, v.value);
|
|
4661
|
+
}), y = a(() => !0), Te = (t) => {
|
|
4660
4662
|
let l = "";
|
|
4661
4663
|
if (!t)
|
|
4662
4664
|
l = "";
|
|
4663
|
-
else if (
|
|
4665
|
+
else if ($e.value && typeof t == "object" && !(t instanceof Date)) {
|
|
4664
4666
|
if (t.startDate === null && t.endDate === null)
|
|
4665
4667
|
l = "";
|
|
4666
4668
|
else if (t.startDate || t.endDate) {
|
|
4667
|
-
const
|
|
4669
|
+
const u = {
|
|
4668
4670
|
// Converter startDate para string ISO se existir
|
|
4669
|
-
startDate: t.startDate ?
|
|
4671
|
+
startDate: t.startDate ? ct(t.startDate) : null,
|
|
4670
4672
|
// Converter endDate para string ISO se existir
|
|
4671
|
-
endDate: t.endDate ?
|
|
4673
|
+
endDate: t.endDate ? ct(t.endDate) : null
|
|
4672
4674
|
};
|
|
4673
|
-
l = JSON.stringify(
|
|
4675
|
+
l = JSON.stringify(u);
|
|
4674
4676
|
}
|
|
4675
4677
|
} else
|
|
4676
|
-
v.value === "date" ? t instanceof Date ? l =
|
|
4678
|
+
v.value === "date" ? t instanceof Date ? l = ct(t) : typeof t == "string" && (l = t) : (v.value === "month" || v.value === "time" || v.value === "datetime-local" || v.value === "week") && (l = typeof t == "string" ? t : "");
|
|
4677
4679
|
mt = !0, L.value = l;
|
|
4678
|
-
const n = l ?
|
|
4679
|
-
|
|
4680
|
+
const n = l ? re(l, v.value) : "";
|
|
4681
|
+
O.value = n, G.value = n;
|
|
4680
4682
|
}, nt = () => {
|
|
4681
4683
|
if (!z.value) {
|
|
4682
|
-
L.value =
|
|
4684
|
+
L.value = O.value;
|
|
4683
4685
|
return;
|
|
4684
4686
|
}
|
|
4685
|
-
|
|
4686
|
-
const t =
|
|
4687
|
-
start:
|
|
4688
|
-
end:
|
|
4689
|
-
} : null, l =
|
|
4687
|
+
De = !0;
|
|
4688
|
+
const t = _.value ? {
|
|
4689
|
+
start: _.value.selectionStart,
|
|
4690
|
+
end: _.value.selectionEnd
|
|
4691
|
+
} : null, l = O.value.trim();
|
|
4690
4692
|
if (!l || l.length === 0) {
|
|
4691
|
-
mt = !0, L.value = "",
|
|
4692
|
-
|
|
4693
|
+
mt = !0, L.value = "", O.value = "", G.value = "", setTimeout(() => {
|
|
4694
|
+
De = !1;
|
|
4693
4695
|
}, 50);
|
|
4694
4696
|
return;
|
|
4695
4697
|
}
|
|
4696
4698
|
if (v.value === "date") {
|
|
4697
|
-
const
|
|
4698
|
-
if (
|
|
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 && !
|
|
4700
|
-
|
|
4701
|
-
const s = Math.min(t.start,
|
|
4702
|
-
|
|
4699
|
+
const u = $e.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}$/;
|
|
4700
|
+
if ($e.value) {
|
|
4701
|
+
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/), l.length > 23 && !u.test(l)) {
|
|
4702
|
+
O.value = G.value, t && _.value && la(() => {
|
|
4703
|
+
const s = Math.min(t.start, G.value.length);
|
|
4704
|
+
_.value.setSelectionRange(s, s);
|
|
4703
4705
|
}), setTimeout(() => {
|
|
4704
|
-
|
|
4706
|
+
De = !1;
|
|
4705
4707
|
}, 50);
|
|
4706
4708
|
return;
|
|
4707
4709
|
}
|
|
4708
|
-
if (!
|
|
4710
|
+
if (!u.test(l) && l.length <= 23) {
|
|
4709
4711
|
setTimeout(() => {
|
|
4710
|
-
|
|
4712
|
+
De = !1;
|
|
4711
4713
|
}, 50);
|
|
4712
4714
|
return;
|
|
4713
4715
|
}
|
|
4714
4716
|
} else {
|
|
4715
|
-
if (l.length > 10 && !
|
|
4716
|
-
|
|
4717
|
-
const s = Math.min(t.start,
|
|
4718
|
-
|
|
4717
|
+
if (l.length > 10 && !u.test(l)) {
|
|
4718
|
+
O.value = G.value, t && _.value && la(() => {
|
|
4719
|
+
const s = Math.min(t.start, G.value.length);
|
|
4720
|
+
_.value.setSelectionRange(s, s);
|
|
4719
4721
|
}), setTimeout(() => {
|
|
4720
|
-
|
|
4722
|
+
De = !1;
|
|
4721
4723
|
}, 50);
|
|
4722
4724
|
return;
|
|
4723
4725
|
}
|
|
4724
|
-
if (!
|
|
4726
|
+
if (!u.test(l) && l.length <= 10) {
|
|
4725
4727
|
setTimeout(() => {
|
|
4726
|
-
|
|
4728
|
+
De = !1;
|
|
4727
4729
|
}, 50);
|
|
4728
4730
|
return;
|
|
4729
4731
|
}
|
|
@@ -4731,163 +4733,163 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4731
4733
|
}
|
|
4732
4734
|
let n = null;
|
|
4733
4735
|
if (v.value === "date")
|
|
4734
|
-
if (
|
|
4736
|
+
if ($e.value)
|
|
4735
4737
|
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/))
|
|
4736
|
-
if (n =
|
|
4737
|
-
mt = !0, L.value = n,
|
|
4738
|
+
if (n = it(l, v.value), n && n !== L.value)
|
|
4739
|
+
mt = !0, L.value = n, G.value = l;
|
|
4738
4740
|
else {
|
|
4739
4741
|
setTimeout(() => {
|
|
4740
|
-
|
|
4742
|
+
De = !1;
|
|
4741
4743
|
}, 50);
|
|
4742
4744
|
return;
|
|
4743
4745
|
}
|
|
4744
4746
|
else if (l.includes("-")) {
|
|
4745
4747
|
const s = l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*$/);
|
|
4746
4748
|
if (s) {
|
|
4747
|
-
const d = s[1], f =
|
|
4749
|
+
const d = s[1], f = it(d, v.value);
|
|
4748
4750
|
if (f) {
|
|
4749
4751
|
const p = JSON.stringify({ startDate: f, endDate: null });
|
|
4750
|
-
p !== L.value && (mt = !0, L.value = p,
|
|
4752
|
+
p !== L.value && (mt = !0, L.value = p, G.value = l);
|
|
4751
4753
|
} else {
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
+
G.value = l, setTimeout(() => {
|
|
4755
|
+
De = !1;
|
|
4754
4756
|
}, 50);
|
|
4755
4757
|
return;
|
|
4756
4758
|
}
|
|
4757
4759
|
} else {
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
+
G.value = l, setTimeout(() => {
|
|
4761
|
+
De = !1;
|
|
4760
4762
|
}, 50);
|
|
4761
4763
|
return;
|
|
4762
4764
|
}
|
|
4763
4765
|
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
4764
|
-
if (n =
|
|
4766
|
+
if (n = it(l, v.value), n) {
|
|
4765
4767
|
const d = JSON.stringify({ startDate: n, endDate: null });
|
|
4766
|
-
d !== L.value && (mt = !0, L.value = d,
|
|
4768
|
+
d !== L.value && (mt = !0, L.value = d, G.value = l);
|
|
4767
4769
|
} else {
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
+
G.value = l, setTimeout(() => {
|
|
4771
|
+
De = !1;
|
|
4770
4772
|
}, 50);
|
|
4771
4773
|
return;
|
|
4772
4774
|
}
|
|
4773
4775
|
else {
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
+
G.value = l, setTimeout(() => {
|
|
4777
|
+
De = !1;
|
|
4776
4778
|
}, 50);
|
|
4777
4779
|
return;
|
|
4778
4780
|
}
|
|
4779
4781
|
else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
4780
|
-
n =
|
|
4782
|
+
n = it(l, v.value), n && n !== L.value && (mt = !0, L.value = n, G.value = l);
|
|
4781
4783
|
else {
|
|
4782
4784
|
setTimeout(() => {
|
|
4783
|
-
|
|
4785
|
+
De = !1;
|
|
4784
4786
|
}, 50);
|
|
4785
4787
|
return;
|
|
4786
4788
|
}
|
|
4787
4789
|
else
|
|
4788
|
-
n =
|
|
4790
|
+
n = it(l, v.value), n && n !== L.value && (mt = !0, L.value = n, G.value = l);
|
|
4789
4791
|
setTimeout(() => {
|
|
4790
|
-
|
|
4792
|
+
De = !1;
|
|
4791
4793
|
}, 50);
|
|
4792
4794
|
}, Ba = (t) => {
|
|
4793
|
-
|
|
4795
|
+
T("changed-complete", t), T("current-value-complete", t);
|
|
4794
4796
|
}, ta = (t) => {
|
|
4795
4797
|
var s;
|
|
4796
|
-
if (!
|
|
4798
|
+
if (!ae.value || !Y.value || !_.value)
|
|
4797
4799
|
return;
|
|
4798
|
-
const l = t.target, n = (s =
|
|
4799
|
-
if (
|
|
4800
|
+
const l = t.target, n = (s = _.value) == null ? void 0 : s.closest(".nb-wrapper");
|
|
4801
|
+
if (Y.value && Y.value.contains(l) || n && (l === n || n.contains(l)) || Y.value && Y.value.contains(l))
|
|
4800
4802
|
return;
|
|
4801
|
-
let
|
|
4802
|
-
for (;
|
|
4803
|
-
if (
|
|
4803
|
+
let u = l;
|
|
4804
|
+
for (; u && u !== document.body; ) {
|
|
4805
|
+
if (u === Y.value || Y.value && Y.value.contains(u))
|
|
4804
4806
|
return;
|
|
4805
|
-
|
|
4807
|
+
u = u.parentElement;
|
|
4806
4808
|
}
|
|
4807
4809
|
setTimeout(() => {
|
|
4808
|
-
if (!
|
|
4810
|
+
if (!ae.value || !Y.value || Y.value && Y.value.contains(l))
|
|
4809
4811
|
return;
|
|
4810
|
-
for (
|
|
4811
|
-
if (
|
|
4812
|
+
for (u = l; u && u !== document.body; ) {
|
|
4813
|
+
if (u === Y.value || Y.value && Y.value.contains(u))
|
|
4812
4814
|
return;
|
|
4813
|
-
|
|
4815
|
+
u = u.parentElement;
|
|
4814
4816
|
}
|
|
4815
4817
|
if (!document.body.contains(l))
|
|
4816
4818
|
return;
|
|
4817
|
-
const d =
|
|
4818
|
-
!d && !f && (
|
|
4819
|
+
const d = _.value && (l === _.value || _.value.contains(l)), f = n && (l === n || n.contains(l));
|
|
4820
|
+
!d && !f && (ae.value = !1, (!O.value || O.value.trim().length === 0) && (Re.value = !1));
|
|
4819
4821
|
}, 50);
|
|
4820
4822
|
}, wa = () => {
|
|
4821
|
-
|
|
4823
|
+
ae.value && z.value && Rt();
|
|
4822
4824
|
}, Da = () => {
|
|
4823
|
-
|
|
4825
|
+
ae.value && z.value && (ae.value = !1);
|
|
4824
4826
|
};
|
|
4825
4827
|
let It = null, aa = null, qt = { top: 0, left: 0 };
|
|
4826
4828
|
const Ra = () => {
|
|
4827
|
-
if (!
|
|
4829
|
+
if (!ae.value || !z.value || !_.value)
|
|
4828
4830
|
return;
|
|
4829
|
-
const t = 4, l =
|
|
4830
|
-
(qt.top !== n || qt.left !==
|
|
4831
|
+
const t = 4, l = _.value.getBoundingClientRect(), n = `${l.bottom + t}px`, u = `${l.left}px`;
|
|
4832
|
+
(qt.top !== n || qt.left !== u) && (qt.top = n, qt.left = u, wt.value = {
|
|
4831
4833
|
top: n,
|
|
4832
|
-
left:
|
|
4834
|
+
left: u
|
|
4833
4835
|
}), aa = requestAnimationFrame(Ra);
|
|
4834
4836
|
}, _a = () => {
|
|
4835
|
-
if (!
|
|
4837
|
+
if (!_.value || !z.value)
|
|
4836
4838
|
return;
|
|
4837
4839
|
qt = { top: 0, left: 0 }, Ra(), It = new ResizeObserver(() => {
|
|
4838
|
-
|
|
4839
|
-
}), It.observe(
|
|
4840
|
-
const t =
|
|
4840
|
+
ae.value && Rt();
|
|
4841
|
+
}), It.observe(_.value);
|
|
4842
|
+
const t = _.value.closest(".component");
|
|
4841
4843
|
t && It.observe(t);
|
|
4842
4844
|
}, Ma = () => {
|
|
4843
4845
|
aa !== null && (cancelAnimationFrame(aa), aa = null), It && (It.disconnect(), It = null);
|
|
4844
4846
|
};
|
|
4845
|
-
|
|
4847
|
+
ne(ae, (t) => {
|
|
4846
4848
|
t && z.value ? la(() => {
|
|
4847
4849
|
_a();
|
|
4848
4850
|
}) : Ma();
|
|
4849
4851
|
}), Aa(() => {
|
|
4850
4852
|
var l;
|
|
4851
|
-
let t =
|
|
4853
|
+
let t = h.value;
|
|
4852
4854
|
if (v.value === "date")
|
|
4853
|
-
t = _t(
|
|
4855
|
+
t = _t(h.value);
|
|
4854
4856
|
else if (v.value === "datetime-local")
|
|
4855
|
-
if (
|
|
4857
|
+
if (h.value === null || h.value === void 0 || h.value === "")
|
|
4856
4858
|
t = "";
|
|
4857
|
-
else if (typeof
|
|
4858
|
-
const n = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/,
|
|
4859
|
-
if (n.test(
|
|
4860
|
-
t =
|
|
4861
|
-
else if (
|
|
4862
|
-
const s = new Date(
|
|
4859
|
+
else if (typeof h.value == "string") {
|
|
4860
|
+
const n = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/, u = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)(?:Z|[+-]\d{2}:\d{2})?$/;
|
|
4861
|
+
if (n.test(h.value))
|
|
4862
|
+
t = h.value;
|
|
4863
|
+
else if (u.test(h.value)) {
|
|
4864
|
+
const s = new Date(h.value);
|
|
4863
4865
|
if (isNaN(s.getTime()))
|
|
4864
4866
|
t = "";
|
|
4865
4867
|
else {
|
|
4866
|
-
const d = s.getFullYear(), f = String(s.getMonth() + 1).padStart(2, "0"), p = String(s.getDate()).padStart(2, "0"),
|
|
4867
|
-
t =
|
|
4868
|
+
const d = s.getFullYear(), f = String(s.getMonth() + 1).padStart(2, "0"), p = String(s.getDate()).padStart(2, "0"), V = String(s.getHours()).padStart(2, "0"), $ = String(s.getMinutes()).padStart(2, "0"), W = String(s.getSeconds()).padStart(2, "0"), Z = ((l = h.value.split("T")[1]) == null ? void 0 : l.split(/[Z+-]/)[0]) || "";
|
|
4869
|
+
t = Z.includes(":") && Z.split(":").length >= 3 ? `${d}-${f}-${p}T${V}:${$}:${W}` : `${d}-${f}-${p}T${V}:${$}`;
|
|
4868
4870
|
}
|
|
4869
4871
|
} else
|
|
4870
4872
|
t = "";
|
|
4871
4873
|
} else
|
|
4872
4874
|
t = "";
|
|
4873
|
-
L.value = t,
|
|
4874
|
-
|
|
4875
|
+
L.value = t, O.value = re(h.value, v.value), document.addEventListener("click", ta, !1), window.addEventListener("scroll", wa, { capture: !0, passive: !0 }), window.addEventListener("resize", Da), la(() => {
|
|
4876
|
+
Lt();
|
|
4875
4877
|
});
|
|
4876
4878
|
}), Ya(() => {
|
|
4877
4879
|
Zt(), Ma(), document.removeEventListener("click", ta), window.removeEventListener("scroll", wa, { capture: !0, passive: !0 }), window.removeEventListener("resize", Da);
|
|
4878
|
-
}),
|
|
4879
|
-
|
|
4880
|
-
}, { immediate: !0 }),
|
|
4881
|
-
L.value && z.value && (
|
|
4880
|
+
}), ne(v, (t) => {
|
|
4881
|
+
j.value = t;
|
|
4882
|
+
}, { immediate: !0 }), ne(ot, () => {
|
|
4883
|
+
L.value && z.value && (O.value = re(L.value, v.value));
|
|
4882
4884
|
});
|
|
4883
4885
|
const Ha = (t) => gn(t, {
|
|
4884
4886
|
inputType: v.value,
|
|
4885
|
-
hasSeconds:
|
|
4886
|
-
allowRange:
|
|
4887
|
-
timezoneFormat:
|
|
4888
|
-
locale:
|
|
4887
|
+
hasSeconds: I.hasSeconds,
|
|
4888
|
+
allowRange: $e.value,
|
|
4889
|
+
timezoneFormat: I.calendarIsoStringTimezoneFormat,
|
|
4890
|
+
locale: I.calendarLocale
|
|
4889
4891
|
});
|
|
4890
|
-
|
|
4892
|
+
ne(h, (t) => {
|
|
4891
4893
|
var l;
|
|
4892
4894
|
if (t !== L.value) {
|
|
4893
4895
|
let n = t;
|
|
@@ -4905,37 +4907,37 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4905
4907
|
if (isNaN(p.getTime()))
|
|
4906
4908
|
n = "";
|
|
4907
4909
|
else {
|
|
4908
|
-
const
|
|
4909
|
-
n =
|
|
4910
|
+
const V = p.getFullYear(), $ = String(p.getMonth() + 1).padStart(2, "0"), W = String(p.getDate()).padStart(2, "0"), Z = String(p.getHours()).padStart(2, "0"), Ne = String(p.getMinutes()).padStart(2, "0"), vt = String(p.getSeconds()).padStart(2, "0"), Oe = ((l = t.split("T")[1]) == null ? void 0 : l.split(/[Z+-]/)[0]) || "";
|
|
4911
|
+
n = Oe.includes(":") && Oe.split(":").length >= 3 ? `${V}-${$}-${W}T${Z}:${Ne}:${vt}` : `${V}-${$}-${W}T${Z}:${Ne}`;
|
|
4910
4912
|
}
|
|
4911
4913
|
} else
|
|
4912
4914
|
n = "";
|
|
4913
4915
|
} else
|
|
4914
4916
|
n = "";
|
|
4915
4917
|
L.value = n;
|
|
4916
|
-
const
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
}),
|
|
4918
|
+
const u = re(t, v.value);
|
|
4919
|
+
O.value = u, la(() => {
|
|
4920
|
+
Lt();
|
|
4921
|
+
}), G.value = u;
|
|
4920
4922
|
const s = Ha(n);
|
|
4921
|
-
s && (
|
|
4923
|
+
s && (T("changed-complete", s), T("current-value-complete", s));
|
|
4922
4924
|
}
|
|
4923
4925
|
}, { immediate: !0 });
|
|
4924
|
-
let
|
|
4926
|
+
let De = !1;
|
|
4925
4927
|
const qa = () => {
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
+
De = !0, setTimeout(() => {
|
|
4929
|
+
De = !1;
|
|
4928
4930
|
}, 100);
|
|
4929
4931
|
};
|
|
4930
4932
|
let mt = !1;
|
|
4931
|
-
return
|
|
4932
|
-
if (z.value && !mt &&
|
|
4933
|
-
const l =
|
|
4934
|
-
l !==
|
|
4933
|
+
return ne(() => L.value, (t) => {
|
|
4934
|
+
if (z.value && !mt && !De) {
|
|
4935
|
+
const l = re(t, v.value);
|
|
4936
|
+
l !== O.value && (O.value = l, G.value = l);
|
|
4935
4937
|
}
|
|
4936
4938
|
mt = !1;
|
|
4937
|
-
}),
|
|
4938
|
-
if (
|
|
4939
|
+
}), ne(L, (t) => {
|
|
4940
|
+
if (X.value && (t = t.trim()), $e.value && typeof t == "string" && t.startsWith("{"))
|
|
4939
4941
|
try {
|
|
4940
4942
|
const l = JSON.parse(t);
|
|
4941
4943
|
if (l && (l.startDate || l.endDate)) {
|
|
@@ -4943,118 +4945,118 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4943
4945
|
if (!d)
|
|
4944
4946
|
return null;
|
|
4945
4947
|
if (/^\d{4}-\d{2}-\d{2}$/.test(d)) {
|
|
4946
|
-
const [f, p,
|
|
4947
|
-
return new Date(f, p - 1,
|
|
4948
|
+
const [f, p, V] = d.split("-").map(Number);
|
|
4949
|
+
return new Date(f, p - 1, V);
|
|
4948
4950
|
}
|
|
4949
4951
|
return new Date(d);
|
|
4950
|
-
},
|
|
4951
|
-
|
|
4952
|
+
}, u = l.startDate ? n(l.startDate) : null, s = l.endDate ? n(l.endDate) : null;
|
|
4953
|
+
T("changed", { startDate: u, endDate: s });
|
|
4952
4954
|
return;
|
|
4953
4955
|
}
|
|
4954
4956
|
} catch {
|
|
4955
4957
|
}
|
|
4956
|
-
|
|
4957
|
-
}),
|
|
4958
|
-
|
|
4959
|
-
}),
|
|
4960
|
-
|
|
4961
|
-
|
|
4958
|
+
T("changed", t);
|
|
4959
|
+
}), ne(Re, (t) => {
|
|
4960
|
+
T(t ? "focused" : "blurred");
|
|
4961
|
+
}), ne(L, (t) => {
|
|
4962
|
+
X.value && (t = t.trim()), T("current-value", t), la(() => {
|
|
4963
|
+
Lt();
|
|
4962
4964
|
});
|
|
4963
|
-
}),
|
|
4965
|
+
}), ne([Ge, ge], () => {
|
|
4964
4966
|
la(() => {
|
|
4965
|
-
|
|
4967
|
+
Lt();
|
|
4966
4968
|
});
|
|
4967
|
-
}), (t, l) =>
|
|
4969
|
+
}), (t, l) => r(de) ? (H(), K("div", $a({
|
|
4968
4970
|
key: 0,
|
|
4969
|
-
class: ["nb-wrapper",
|
|
4970
|
-
style: [
|
|
4971
|
+
class: ["nb-wrapper", Bt.value],
|
|
4972
|
+
style: [Dt.value, Kt.value, Ft.value],
|
|
4971
4973
|
role: "input",
|
|
4972
4974
|
title: e.title
|
|
4973
4975
|
}, i.value), [
|
|
4974
|
-
|
|
4975
|
-
id:
|
|
4976
|
-
class:
|
|
4977
|
-
style:
|
|
4976
|
+
ke("div", {
|
|
4977
|
+
id: r(de),
|
|
4978
|
+
class: Ue(["nb-reset", "component", fa.value, va.value, Gt.value, da.value]),
|
|
4979
|
+
style: Fe([N.value, Kt.value, Ft.value]),
|
|
4978
4980
|
onClick: l[2] || (l[2] = (n) => ga(n))
|
|
4979
4981
|
}, [
|
|
4980
|
-
|
|
4982
|
+
r(We) ? (H(), K("label", {
|
|
4981
4983
|
key: 0,
|
|
4982
4984
|
for: zt.value,
|
|
4983
4985
|
class: "component__label",
|
|
4984
|
-
style:
|
|
4986
|
+
style: Fe([Ye.value]),
|
|
4985
4987
|
onClick: ya
|
|
4986
4988
|
}, [
|
|
4987
|
-
jt(
|
|
4988
|
-
|
|
4989
|
-
], 12, mn)) :
|
|
4990
|
-
Pa(
|
|
4989
|
+
jt(Mt(r(Se)), 1),
|
|
4990
|
+
r(kt) ? (H(), K("span", hn, "*")) : xe("", !0)
|
|
4991
|
+
], 12, mn)) : xe("", !0),
|
|
4992
|
+
Pa(ke("input", {
|
|
4991
4993
|
ref_key: "inputRef",
|
|
4992
|
-
ref:
|
|
4993
|
-
"onUpdate:modelValue": l[0] || (l[0] = (n) =>
|
|
4994
|
+
ref: _,
|
|
4995
|
+
"onUpdate:modelValue": l[0] || (l[0] = (n) => O.value = n),
|
|
4994
4996
|
onInput: nt,
|
|
4995
4997
|
onKeydown: [
|
|
4996
4998
|
qa,
|
|
4997
|
-
l[1] || (l[1] = na((n) => !
|
|
4999
|
+
l[1] || (l[1] = na((n) => !r(k) && r(D) && ba(), ["enter"]))
|
|
4998
5000
|
],
|
|
4999
5001
|
id: zt.value,
|
|
5000
5002
|
name: zt.value,
|
|
5001
|
-
type: z.value ? "text" :
|
|
5002
|
-
class:
|
|
5003
|
+
type: z.value ? "text" : j.value,
|
|
5004
|
+
class: Ue(["component__input", [
|
|
5003
5005
|
pa.value,
|
|
5004
5006
|
ca.value,
|
|
5005
|
-
|
|
5007
|
+
ue.value
|
|
5006
5008
|
]]),
|
|
5007
5009
|
placeholder: c.value,
|
|
5008
|
-
disabled:
|
|
5009
|
-
required:
|
|
5010
|
-
readonly:
|
|
5010
|
+
disabled: r(k) || r(ie),
|
|
5011
|
+
required: r(kt),
|
|
5012
|
+
readonly: y.value,
|
|
5011
5013
|
autocomplete: e.inputAutocomplete,
|
|
5012
5014
|
min: ka.value,
|
|
5013
5015
|
max: o.value,
|
|
5014
|
-
step: z.value ? void 0 :
|
|
5015
|
-
tabindex:
|
|
5016
|
+
step: z.value ? void 0 : r(pt),
|
|
5017
|
+
tabindex: r(k) || r(ie) ? -1 : r(xt),
|
|
5016
5018
|
role: "input",
|
|
5017
|
-
style:
|
|
5019
|
+
style: Fe([Ft.value]),
|
|
5018
5020
|
onFocus: Sa,
|
|
5019
5021
|
onBlur: xa,
|
|
5020
5022
|
onClick: Ca,
|
|
5021
5023
|
onPaste: ma
|
|
5022
5024
|
}, null, 46, Sn), [
|
|
5023
|
-
[ml,
|
|
5025
|
+
[ml, O.value]
|
|
5024
5026
|
])
|
|
5025
5027
|
], 14, bn),
|
|
5026
|
-
Ot.value ? (
|
|
5028
|
+
Ot.value ? (H(), K("div", {
|
|
5027
5029
|
key: 0,
|
|
5028
|
-
class:
|
|
5030
|
+
class: Ue(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
5029
5031
|
}, [
|
|
5030
5032
|
La(t.$slots, "message", {}, () => [
|
|
5031
|
-
jt(
|
|
5033
|
+
jt(Mt(e.message), 1)
|
|
5032
5034
|
], !0)
|
|
5033
|
-
], 2)) :
|
|
5034
|
-
(
|
|
5035
|
-
z.value &&
|
|
5035
|
+
], 2)) : xe("", !0),
|
|
5036
|
+
(H(), Ll(Al, { to: "body" }, [
|
|
5037
|
+
z.value && ae.value ? (H(), K("div", {
|
|
5036
5038
|
key: 0,
|
|
5037
5039
|
ref_key: "calendarRef",
|
|
5038
|
-
ref:
|
|
5040
|
+
ref: Y,
|
|
5039
5041
|
class: "datepicker__custom-calendar-wrapper",
|
|
5040
|
-
style:
|
|
5042
|
+
style: Fe(ha.value),
|
|
5041
5043
|
onClick: l[5] || (l[5] = Ia((n) => M.value = !0, ["stop"])),
|
|
5042
5044
|
onMousedown: l[6] || (l[6] = Ia((n) => M.value = !0, ["stop"]))
|
|
5043
5045
|
}, [
|
|
5044
|
-
$l(
|
|
5045
|
-
"nb-id": `${
|
|
5046
|
-
value:
|
|
5047
|
-
"input-type":
|
|
5048
|
-
"has-seconds":
|
|
5049
|
-
min:
|
|
5050
|
-
max:
|
|
5051
|
-
step:
|
|
5052
|
-
disabled:
|
|
5046
|
+
$l(r(b), {
|
|
5047
|
+
"nb-id": `${r(de)}-calendar`,
|
|
5048
|
+
value: $t.value,
|
|
5049
|
+
"input-type": r(v),
|
|
5050
|
+
"has-seconds": Me.value,
|
|
5051
|
+
min: r(Ge),
|
|
5052
|
+
max: r(ge),
|
|
5053
|
+
step: r(pt),
|
|
5054
|
+
disabled: r(k),
|
|
5053
5055
|
width: Wt.value,
|
|
5054
|
-
locale:
|
|
5055
|
-
theme:
|
|
5056
|
-
"allow-range":
|
|
5057
|
-
"block-clicks-without-events":
|
|
5056
|
+
locale: r(ot),
|
|
5057
|
+
theme: r(Ie),
|
|
5058
|
+
"allow-range": r($e),
|
|
5059
|
+
"block-clicks-without-events": r(St),
|
|
5058
5060
|
"font-family": e.calendarFontFamily,
|
|
5059
5061
|
"font-size": e.calendarFontSize,
|
|
5060
5062
|
"font-weight": e.calendarFontWeight,
|
|
@@ -5113,18 +5115,18 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
5113
5115
|
"clear-button-title": e.calendarClearButtonTitle,
|
|
5114
5116
|
"clear-button-symbol": e.calendarClearButtonSymbol,
|
|
5115
5117
|
"iso-string-timezone-format": e.calendarIsoStringTimezoneFormat,
|
|
5116
|
-
onChanged:
|
|
5118
|
+
onChanged: Te,
|
|
5117
5119
|
onDateSelected: Ba,
|
|
5118
5120
|
onMonthChanged: Ta,
|
|
5119
5121
|
onValid: Va,
|
|
5120
5122
|
onMousedown: l[3] || (l[3] = (n) => M.value = !0),
|
|
5121
5123
|
onClick: l[4] || (l[4] = (n) => M.value = !0)
|
|
5122
5124
|
}, 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"])
|
|
5123
|
-
], 36)) :
|
|
5125
|
+
], 36)) : xe("", !0)
|
|
5124
5126
|
]))
|
|
5125
|
-
], 16, yn)) :
|
|
5127
|
+
], 16, yn)) : xe("", !0);
|
|
5126
5128
|
}
|
|
5127
|
-
}), Cn = /* @__PURE__ */ Oa(xn, [["__scopeId", "data-v-
|
|
5129
|
+
}), Cn = /* @__PURE__ */ Oa(xn, [["__scopeId", "data-v-0ae3635e"]]), pl = {
|
|
5128
5130
|
NbInputRadio: Fl,
|
|
5129
5131
|
NbInputCheckbox: Ol,
|
|
5130
5132
|
NbInput: Ql,
|
|
@@ -5133,10 +5135,10 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
5133
5135
|
NbDatePicker: Cn
|
|
5134
5136
|
}, Tn = {
|
|
5135
5137
|
install(e) {
|
|
5136
|
-
for (const
|
|
5137
|
-
if (Object.prototype.hasOwnProperty.call(pl,
|
|
5138
|
-
const
|
|
5139
|
-
e.component(
|
|
5138
|
+
for (const m in pl)
|
|
5139
|
+
if (Object.prototype.hasOwnProperty.call(pl, m)) {
|
|
5140
|
+
const b = pl[m];
|
|
5141
|
+
e.component(b.name, b);
|
|
5140
5142
|
}
|
|
5141
5143
|
}
|
|
5142
5144
|
};
|