@vlalg-nimbus/nb-inputs 9.5.1 → 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 +1469 -1471
- 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
1079
|
"1f018258": Et.value,
|
|
1082
1080
|
"4e051488": ra.value,
|
|
1083
|
-
"8961fbf6":
|
|
1081
|
+
"8961fbf6": r(Ct),
|
|
1084
1082
|
"412b5a8c": ca.value,
|
|
1085
1083
|
"2ca9e244": fa.value,
|
|
1086
1084
|
"7bbe1214": va.value,
|
|
1087
|
-
"1e33930a":
|
|
1088
|
-
"2be4f102":
|
|
1089
|
-
"4359c8b8":
|
|
1090
|
-
"137f2c64":
|
|
1091
|
-
"454bf087":
|
|
1092
|
-
bd7d09f0:
|
|
1093
|
-
b280ffa4:
|
|
1094
|
-
"1a587bf9":
|
|
1095
|
-
"5d546ba3":
|
|
1096
|
-
f02a7216:
|
|
1097
|
-
"3fb0cf44":
|
|
1098
|
-
"3535ab5a":
|
|
1099
|
-
"24671c2a":
|
|
1100
|
-
"926726de":
|
|
1101
|
-
"23f220be":
|
|
1102
|
-
"654e8564":
|
|
1103
|
-
"54a2dca6":
|
|
1104
|
-
"2108d72b":
|
|
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),
|
|
1105
1103
|
bc5b633e: ha.value,
|
|
1106
1104
|
"1302bc28": xa.value,
|
|
1107
1105
|
f2070f1a: Ca.value,
|
|
1108
1106
|
"3c6df23a": _t.value,
|
|
1109
|
-
bbc47ff4:
|
|
1110
|
-
"425ba31a":
|
|
1107
|
+
bbc47ff4: Rt.value,
|
|
1108
|
+
"425ba31a": r(se),
|
|
1111
1109
|
bd743b28: ya.value,
|
|
1112
1110
|
"7e1bc293": Pt.value,
|
|
1113
1111
|
38278152: ia.value,
|
|
1114
1112
|
"3550c7fb": Ut.value,
|
|
1115
1113
|
"3002d155": da.value,
|
|
1116
|
-
"3b6dc836":
|
|
1114
|
+
"3b6dc836": Kt.value,
|
|
1117
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,7 +1268,7 @@ 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
|
|
@@ -1278,13 +1276,13 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
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
|
|
1281
|
-
overflow: !lt.value ||
|
|
1279
|
+
overflow: !lt.value || y ? "visible" : "hidden"
|
|
1282
1280
|
};
|
|
1283
1281
|
}), ra = a(() => {
|
|
1284
1282
|
const o = N.value;
|
|
1285
1283
|
if (o.fontSize)
|
|
1286
1284
|
return o.fontSize;
|
|
1287
|
-
let
|
|
1285
|
+
let y = "";
|
|
1288
1286
|
switch (o.sizeMediaQuery) {
|
|
1289
1287
|
case "sm":
|
|
1290
1288
|
return "1.2em";
|
|
@@ -1293,19 +1291,19 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1293
1291
|
case "lg":
|
|
1294
1292
|
return "2em";
|
|
1295
1293
|
default:
|
|
1296
|
-
|
|
1294
|
+
y = "1.2em";
|
|
1297
1295
|
}
|
|
1298
|
-
return
|
|
1296
|
+
return y;
|
|
1299
1297
|
}), ua = a(() => {
|
|
1300
|
-
const o = N.value,
|
|
1298
|
+
const o = N.value, y = Ye.value;
|
|
1301
1299
|
return {
|
|
1302
1300
|
fontWeight: o.fontWeight,
|
|
1303
|
-
marginTop:
|
|
1301
|
+
marginTop: y && lt.value ? `${o.inputLabelMarginActive}px` : "0"
|
|
1304
1302
|
};
|
|
1305
|
-
}),
|
|
1303
|
+
}), dt = a(() => {
|
|
1306
1304
|
const o = N.value;
|
|
1307
1305
|
return o.inputStyle !== "line" && o.hasBorderRadius ? { borderRadius: `${o.borderRadius}rem` } : {};
|
|
1308
|
-
}), 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(() => {
|
|
1309
1307
|
const o = N.value;
|
|
1310
1308
|
return o.caretColor || (o.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1311
1309
|
}), fa = a(() => {
|
|
@@ -1314,13 +1312,13 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1314
1312
|
}), va = a(() => {
|
|
1315
1313
|
const o = N.value;
|
|
1316
1314
|
return o.selectionTextColor || (o.theme === "dark" ? "#000000" : "#ffffff");
|
|
1317
|
-
}),
|
|
1315
|
+
}), Gt = a(() => {
|
|
1318
1316
|
const o = N.value;
|
|
1319
1317
|
return o.display === "block" ? { width: "100%" } : {
|
|
1320
1318
|
width: `${o.inputWidth}px`
|
|
1321
1319
|
};
|
|
1322
1320
|
}), pa = a(() => {
|
|
1323
|
-
switch (
|
|
1321
|
+
switch (pe.value) {
|
|
1324
1322
|
case "line":
|
|
1325
1323
|
return "component__input--line";
|
|
1326
1324
|
case "border":
|
|
@@ -1355,61 +1353,61 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1355
1353
|
default:
|
|
1356
1354
|
return "component__theme--light";
|
|
1357
1355
|
}
|
|
1358
|
-
}),
|
|
1356
|
+
}), ue = a(() => N.value.inputReadonly ? "component__input--read-only" : ""), Qe = a(() => N.value.inputUppercase ? "component__input--uppercase" : ""), Ot = a(() => {
|
|
1359
1357
|
const o = N.value;
|
|
1360
1358
|
return !!(o.showInputEye && o.inputType === "password");
|
|
1361
|
-
}), 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(() => {
|
|
1362
1360
|
const o = z.value;
|
|
1363
|
-
return
|
|
1364
|
-
}), 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(() => {
|
|
1365
1363
|
const o = {};
|
|
1366
1364
|
B.value && Object.keys(B.value).forEach((nt) => o[`aria-${nt}`] = B.value[nt]);
|
|
1367
|
-
const
|
|
1368
|
-
"aria-label":
|
|
1369
|
-
"aria-disabled":
|
|
1365
|
+
const y = {
|
|
1366
|
+
"aria-label": D.value,
|
|
1367
|
+
"aria-disabled": k.value,
|
|
1370
1368
|
...o
|
|
1371
1369
|
};
|
|
1372
1370
|
return Object.fromEntries(
|
|
1373
|
-
Object.entries(
|
|
1371
|
+
Object.entries(y).filter(([Te, nt]) => nt != null)
|
|
1374
1372
|
);
|
|
1375
|
-
}),
|
|
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(() => {
|
|
1376
1374
|
const o = N.value;
|
|
1377
|
-
return
|
|
1375
|
+
return Se.value ? o.iconPadding : "0";
|
|
1378
1376
|
}), Ca = a(() => {
|
|
1379
1377
|
const o = N.value;
|
|
1380
|
-
return
|
|
1381
|
-
}),
|
|
1378
|
+
return Se.value ? o.iconMargin : "0";
|
|
1379
|
+
}), ct = a(() => {
|
|
1382
1380
|
const o = N.value;
|
|
1383
|
-
return
|
|
1381
|
+
return Se.value ? o.theme === "dark" ? o.iconDarkBgColor : o.iconLightBgColor : "transparent";
|
|
1384
1382
|
}), _t = a(() => {
|
|
1385
1383
|
const o = N.value;
|
|
1386
|
-
return
|
|
1384
|
+
return Se.value ? `${o.iconBorderRadius}rem` : "0";
|
|
1387
1385
|
}), Jt = a(() => {
|
|
1388
1386
|
const o = N.value;
|
|
1389
|
-
return
|
|
1387
|
+
return Se.value ? Ee.value === "left" ? { paddingLeft: `${o.iconPaddingInput}px` } : { paddingRight: `${o.iconPaddingInput}px` } : {};
|
|
1390
1388
|
}), Qt = a(() => {
|
|
1391
|
-
const o = N.value,
|
|
1389
|
+
const o = N.value, y = Ye.value, Te = y ? o.lightTextColorLabelActive : o.lightTextColorLabel, nt = y ? o.darkTextColorLabelActive : o.darkTextColorLabel;
|
|
1392
1390
|
return {
|
|
1393
1391
|
fontFamily: o.fontFamilyLabel,
|
|
1394
|
-
fontSize:
|
|
1392
|
+
fontSize: y ? o.fontSizeLabelActive : o.fontSizeLabel,
|
|
1395
1393
|
fontWeight: o.fontWeightLabel,
|
|
1396
|
-
color: o.theme === "dark" ? nt :
|
|
1397
|
-
top:
|
|
1398
|
-
left:
|
|
1399
|
-
right:
|
|
1400
|
-
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%)",
|
|
1401
1399
|
transition: "all 0.2s ease",
|
|
1402
|
-
backgroundColor:
|
|
1403
|
-
padding:
|
|
1404
|
-
borderRadius:
|
|
1400
|
+
backgroundColor: y ? o.labelBackground : "transparent",
|
|
1401
|
+
padding: y ? o.labelPadding : "0",
|
|
1402
|
+
borderRadius: y ? `${o.labelBorderRadius}rem` : "0",
|
|
1405
1403
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
1406
|
-
...
|
|
1407
|
-
whiteSpace:
|
|
1408
|
-
wordWrap:
|
|
1409
|
-
overflowWrap:
|
|
1404
|
+
...y ? {
|
|
1405
|
+
whiteSpace: ut.value ? "nowrap" : "normal",
|
|
1406
|
+
wordWrap: ut.value ? "normal" : "break-word",
|
|
1407
|
+
overflowWrap: ut.value ? "normal" : "break-word",
|
|
1410
1408
|
maxWidth: "100%",
|
|
1411
|
-
textOverflow:
|
|
1412
|
-
overflow:
|
|
1409
|
+
textOverflow: ut.value ? "ellipsis" : "clip",
|
|
1410
|
+
overflow: ut.value ? "hidden" : "visible"
|
|
1413
1411
|
} : {}
|
|
1414
1412
|
};
|
|
1415
1413
|
});
|
|
@@ -1418,150 +1416,150 @@ const _l = ["title"], Hl = ["id"], ql = ["for"], jl = {
|
|
|
1418
1416
|
return o.theme === "dark" ? o.darkTextColorLabelActive : o.lightTextColorLabelActive;
|
|
1419
1417
|
});
|
|
1420
1418
|
const Ht = () => {
|
|
1421
|
-
|
|
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;
|
|
1422
1420
|
}, Xt = () => {
|
|
1423
1421
|
const o = N.value;
|
|
1424
1422
|
if (o.inputReadonly || o.disabled)
|
|
1425
1423
|
return;
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1428
|
-
},
|
|
1429
|
-
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") {
|
|
1430
1428
|
if (o === "" || o === null || o === void 0)
|
|
1431
1429
|
return "";
|
|
1432
1430
|
{
|
|
1433
|
-
const
|
|
1434
|
-
return isNaN(
|
|
1431
|
+
const y = typeof o == "number" ? o : Number(o);
|
|
1432
|
+
return isNaN(y) ? o : y;
|
|
1435
1433
|
}
|
|
1436
1434
|
}
|
|
1437
1435
|
return o;
|
|
1438
1436
|
}, Va = (o) => {
|
|
1439
|
-
|
|
1437
|
+
b("clicked", o);
|
|
1440
1438
|
}, Ta = (o) => {
|
|
1441
|
-
o.stopPropagation(), !(
|
|
1439
|
+
o.stopPropagation(), !(k.value || N.value.inputReadonly) && U.value && U.value.focus();
|
|
1442
1440
|
}, ea = () => {
|
|
1443
|
-
|
|
1441
|
+
k.value || N.value.inputReadonly || !Ce.value || b("entered", Lt(z.value));
|
|
1444
1442
|
}, ka = async (o) => {
|
|
1445
|
-
var
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1443
|
+
var Te;
|
|
1444
|
+
const y = ((Te = o.clipboardData) == null ? void 0 : Te.getData("text")) || "";
|
|
1445
|
+
b("paste", y), Ke.value && o.preventDefault();
|
|
1448
1446
|
};
|
|
1449
|
-
return
|
|
1450
|
-
|
|
1451
|
-
}, { immediate: !0 }),
|
|
1447
|
+
return ne(X, (o) => {
|
|
1448
|
+
Bt.value = o;
|
|
1449
|
+
}, { immediate: !0 }), ne(ge, (o) => {
|
|
1452
1450
|
if (o != null)
|
|
1453
|
-
if (
|
|
1451
|
+
if (X.value === "number" && typeof o == "number")
|
|
1454
1452
|
o !== z.value && (z.value = o);
|
|
1455
1453
|
else {
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1454
|
+
const y = String(o);
|
|
1455
|
+
y !== z.value && (z.value = y);
|
|
1458
1456
|
}
|
|
1459
1457
|
else
|
|
1460
1458
|
z.value !== "" && (z.value = "");
|
|
1461
|
-
}, { immediate: !0 }),
|
|
1462
|
-
|
|
1463
|
-
}),
|
|
1464
|
-
|
|
1465
|
-
}),
|
|
1466
|
-
|
|
1467
|
-
}, { immediate: !0 }),
|
|
1468
|
-
|
|
1469
|
-
}),
|
|
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) => {
|
|
1470
1468
|
o === "password" && nextTick(() => {
|
|
1471
|
-
const
|
|
1472
|
-
|
|
1469
|
+
const y = document.getElementById(h.value);
|
|
1470
|
+
y && (y.type = "password", y.removeAttribute("autocomplete"));
|
|
1473
1471
|
});
|
|
1474
|
-
}), (o,
|
|
1472
|
+
}), (o, y) => r(I) ? (H(), K("div", $a({
|
|
1475
1473
|
key: 0,
|
|
1476
1474
|
class: ["nb-wrapper", Ft.value],
|
|
1477
|
-
style: [oa.value,
|
|
1475
|
+
style: [oa.value, Gt.value, dt.value],
|
|
1478
1476
|
role: "input",
|
|
1479
1477
|
title: e.title
|
|
1480
1478
|
}, ma.value), [
|
|
1481
|
-
|
|
1482
|
-
id:
|
|
1483
|
-
class:
|
|
1484
|
-
style:
|
|
1485
|
-
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))
|
|
1486
1484
|
}, [
|
|
1487
|
-
|
|
1485
|
+
r(lt) ? (H(), K("label", {
|
|
1488
1486
|
key: 0,
|
|
1489
|
-
for:
|
|
1487
|
+
for: S.value,
|
|
1490
1488
|
class: "component__label",
|
|
1491
|
-
style:
|
|
1489
|
+
style: Fe([Qt.value]),
|
|
1492
1490
|
onClick: Ta
|
|
1493
1491
|
}, [
|
|
1494
|
-
jt(
|
|
1495
|
-
e.required ? (
|
|
1496
|
-
], 12, ql)) :
|
|
1497
|
-
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", {
|
|
1498
1496
|
key: 1,
|
|
1499
|
-
class:
|
|
1500
|
-
style:
|
|
1497
|
+
class: Ue(["component__eye", ga.value]),
|
|
1498
|
+
style: Fe([dt.value]),
|
|
1501
1499
|
onClick: Xt
|
|
1502
1500
|
}, [
|
|
1503
|
-
|
|
1504
|
-
for:
|
|
1505
|
-
class:
|
|
1501
|
+
ke("label", {
|
|
1502
|
+
for: S.value,
|
|
1503
|
+
class: Ue(["component__eye-icon", "fas"])
|
|
1506
1504
|
}, [
|
|
1507
|
-
e.inputEyeCustomIcon ? (
|
|
1508
|
-
|
|
1509
|
-
|
|
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"))
|
|
1510
1508
|
], !0) : La(o.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1511
|
-
|
|
1509
|
+
y[6] || (y[6] = jt("hidden"))
|
|
1512
1510
|
], !0)
|
|
1513
|
-
])) : (
|
|
1511
|
+
])) : (H(), K("span", Ul, Mt(i.value), 1))
|
|
1514
1512
|
], 8, Yl)
|
|
1515
|
-
], 6)) :
|
|
1516
|
-
Pa(
|
|
1513
|
+
], 6)) : xe("", !0),
|
|
1514
|
+
Pa(ke("input", {
|
|
1517
1515
|
ref_key: "inputRef",
|
|
1518
|
-
ref:
|
|
1519
|
-
"onUpdate:modelValue":
|
|
1520
|
-
id:
|
|
1521
|
-
name:
|
|
1522
|
-
type:
|
|
1523
|
-
class:
|
|
1524
|
-
|
|
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,
|
|
1525
1523
|
Zt.value,
|
|
1526
1524
|
zt.value
|
|
1527
1525
|
]]),
|
|
1528
|
-
placeholder:
|
|
1529
|
-
disabled:
|
|
1526
|
+
placeholder: Ve.value,
|
|
1527
|
+
disabled: r(k) || r(ie),
|
|
1530
1528
|
required: e.required,
|
|
1531
|
-
readonly:
|
|
1529
|
+
readonly: r(ie),
|
|
1532
1530
|
autocomplete: e.inputAutocomplete,
|
|
1533
|
-
tabindex:
|
|
1534
|
-
min:
|
|
1535
|
-
max:
|
|
1536
|
-
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,
|
|
1537
1535
|
role: "input",
|
|
1538
|
-
style:
|
|
1539
|
-
onFocus:
|
|
1540
|
-
onBlur:
|
|
1541
|
-
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"])),
|
|
1542
1540
|
onPaste: ka
|
|
1543
|
-
}, null, 46,
|
|
1541
|
+
}, null, 46, Gl), [
|
|
1544
1542
|
[ml, z.value]
|
|
1545
1543
|
]),
|
|
1546
|
-
|
|
1544
|
+
r(Se) ? (H(), K("label", {
|
|
1547
1545
|
key: 2,
|
|
1548
|
-
for:
|
|
1549
|
-
class:
|
|
1546
|
+
for: S.value,
|
|
1547
|
+
class: Ue(["component__icon", Sa.value])
|
|
1550
1548
|
}, [
|
|
1551
1549
|
La(o.$slots, "icon", {}, () => [
|
|
1552
|
-
|
|
1550
|
+
y[7] || (y[7] = ke("span", null, "♥", -1))
|
|
1553
1551
|
], !0)
|
|
1554
|
-
], 10, Zl)) :
|
|
1552
|
+
], 10, Zl)) : xe("", !0)
|
|
1555
1553
|
], 14, Hl),
|
|
1556
|
-
ba.value ? (
|
|
1554
|
+
ba.value ? (H(), K("div", {
|
|
1557
1555
|
key: 0,
|
|
1558
|
-
class:
|
|
1556
|
+
class: Ue(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
1559
1557
|
}, [
|
|
1560
1558
|
La(o.$slots, "message", {}, () => [
|
|
1561
|
-
jt(
|
|
1559
|
+
jt(Mt(e.message), 1)
|
|
1562
1560
|
], !0)
|
|
1563
|
-
], 2)) :
|
|
1564
|
-
], 16, _l)) :
|
|
1561
|
+
], 2)) : xe("", !0)
|
|
1562
|
+
], 16, _l)) : xe("", !0);
|
|
1565
1563
|
}
|
|
1566
1564
|
}), Ql = /* @__PURE__ */ Oa(Jl, [["__scopeId", "data-v-5069e468"]]);
|
|
1567
1565
|
const Xl = ["title"], en = ["for"], tn = {
|
|
@@ -1581,8 +1579,8 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
1581
1579
|
type: String,
|
|
1582
1580
|
default: "b",
|
|
1583
1581
|
validator: (e = "b") => {
|
|
1584
|
-
const
|
|
1585
|
-
return ["b", "ib"].includes(
|
|
1582
|
+
const m = e.toLowerCase();
|
|
1583
|
+
return ["b", "ib"].includes(m);
|
|
1586
1584
|
}
|
|
1587
1585
|
},
|
|
1588
1586
|
tabIndex: {
|
|
@@ -1917,157 +1915,157 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
1917
1915
|
}
|
|
1918
1916
|
},
|
|
1919
1917
|
emits: ["clicked", "changed", "removed", "added", "input-changed", "focused", "blurred", "paste"],
|
|
1920
|
-
setup(e, { emit:
|
|
1918
|
+
setup(e, { emit: m }) {
|
|
1921
1919
|
Wa((c) => ({
|
|
1922
1920
|
"2abf6c48": z.value,
|
|
1923
|
-
b640f0a2:
|
|
1924
|
-
"89f839e6":
|
|
1925
|
-
"9c8fd696":
|
|
1926
|
-
"2e2461ae":
|
|
1927
|
-
"6eedc749":
|
|
1928
|
-
"019740a1":
|
|
1929
|
-
"4195c62c":
|
|
1930
|
-
d3e5d71a:
|
|
1931
|
-
"4feb30ca":
|
|
1932
|
-
"6ba6d194":
|
|
1933
|
-
a71f91a2:
|
|
1934
|
-
"2f8561f2":
|
|
1935
|
-
"96ddac60":
|
|
1936
|
-
"892c406c":
|
|
1937
|
-
dce120b8:
|
|
1938
|
-
"7e2453b4":
|
|
1939
|
-
"38129a84":
|
|
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,
|
|
1940
1938
|
"821f1654": N.value,
|
|
1941
1939
|
"5ba4beee": Ft.value,
|
|
1942
1940
|
"6f6c4a26": c.styleButtonColor,
|
|
1943
|
-
"950f0e5c":
|
|
1944
|
-
"20c66799":
|
|
1945
|
-
"1372badc":
|
|
1946
|
-
"13bb1702":
|
|
1947
|
-
"7365cc78":
|
|
1941
|
+
"950f0e5c": U.value,
|
|
1942
|
+
"20c66799": r(pt),
|
|
1943
|
+
"1372badc": r(At),
|
|
1944
|
+
"13bb1702": r(we),
|
|
1945
|
+
"7365cc78": r(C)
|
|
1948
1946
|
})), Aa(() => {
|
|
1949
|
-
|
|
1947
|
+
q.value.length > 0 && (Me.value = q.value);
|
|
1950
1948
|
});
|
|
1951
|
-
const
|
|
1952
|
-
nbId:
|
|
1953
|
-
display:
|
|
1954
|
-
textColor:
|
|
1955
|
-
paddingX:
|
|
1949
|
+
const b = m, T = e, {
|
|
1950
|
+
nbId: I,
|
|
1951
|
+
display: de,
|
|
1952
|
+
textColor: Ce,
|
|
1953
|
+
paddingX: D,
|
|
1956
1954
|
paddingY: B,
|
|
1957
|
-
borderRadius:
|
|
1958
|
-
disabled:
|
|
1959
|
-
fontFamily:
|
|
1960
|
-
fontSize:
|
|
1961
|
-
fontWeight:
|
|
1962
|
-
currentList:
|
|
1963
|
-
allowDuplicates:
|
|
1964
|
-
minChips:
|
|
1965
|
-
maxChips:
|
|
1966
|
-
inputPosition:
|
|
1967
|
-
width:
|
|
1968
|
-
inputName:
|
|
1969
|
-
inputPlaceholder:
|
|
1970
|
-
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,
|
|
1971
1969
|
inputReadonly: ve,
|
|
1972
|
-
blockPaste:
|
|
1973
|
-
inputAutocomplete:
|
|
1974
|
-
required:
|
|
1975
|
-
textAlign:
|
|
1976
|
-
hasBorderRadius:
|
|
1970
|
+
blockPaste: pe,
|
|
1971
|
+
inputAutocomplete: Ae,
|
|
1972
|
+
required: ze,
|
|
1973
|
+
textAlign: ie,
|
|
1974
|
+
hasBorderRadius: Ke,
|
|
1977
1975
|
activeTextStyle: v,
|
|
1978
|
-
theme:
|
|
1979
|
-
inputStyle:
|
|
1980
|
-
lightBgColor:
|
|
1981
|
-
lightBgColorFocus:
|
|
1982
|
-
lightBorderColor:
|
|
1983
|
-
lightBorderColorFocus:
|
|
1984
|
-
lightDisabledBgColor:
|
|
1976
|
+
theme: X,
|
|
1977
|
+
inputStyle: E,
|
|
1978
|
+
lightBgColor: et,
|
|
1979
|
+
lightBgColorFocus: h,
|
|
1980
|
+
lightBorderColor: Ge,
|
|
1981
|
+
lightBorderColorFocus: ge,
|
|
1982
|
+
lightDisabledBgColor: pt,
|
|
1985
1983
|
lightTextColor: ht,
|
|
1986
1984
|
lightChipBgColor: ot,
|
|
1987
|
-
lightChipTextColor:
|
|
1988
|
-
lightChipRemoveColor:
|
|
1989
|
-
lightDisabledBorderColor:
|
|
1990
|
-
darkBgColor:
|
|
1985
|
+
lightChipTextColor: Ie,
|
|
1986
|
+
lightChipRemoveColor: $e,
|
|
1987
|
+
lightDisabledBorderColor: At,
|
|
1988
|
+
darkBgColor: gt,
|
|
1991
1989
|
darkBgColorFocus: St,
|
|
1992
1990
|
darkBorderColor: xt,
|
|
1993
1991
|
darkBorderColorFocus: Ct,
|
|
1994
|
-
darkDisabledBgColor:
|
|
1995
|
-
darkTextColor:
|
|
1996
|
-
darkChipBgColor:
|
|
1997
|
-
darkChipTextColor:
|
|
1998
|
-
darkChipRemoveColor:
|
|
1999
|
-
darkDisabledBorderColor:
|
|
2000
|
-
tabIndex:
|
|
2001
|
-
hasTabIndexEnter:
|
|
2002
|
-
ariaLabel:
|
|
2003
|
-
ariaAttrs:
|
|
2004
|
-
caretColor:
|
|
2005
|
-
selectionBgColor:
|
|
2006
|
-
selectionTextColor:
|
|
2007
|
-
showLabel:
|
|
2008
|
-
label:
|
|
2009
|
-
labelBackground:
|
|
2010
|
-
labelPadding:
|
|
2011
|
-
labelBorderRadius:
|
|
2012
|
-
labelBreakOnActive:
|
|
2013
|
-
labelLeft:
|
|
2014
|
-
inputLabelMarginActive:
|
|
2015
|
-
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,
|
|
2016
2014
|
labelActiveLeft: at,
|
|
2017
2015
|
fontFamilyLabel: yt,
|
|
2018
|
-
fontSizeLabel:
|
|
2019
|
-
fontSizeLabelActive:
|
|
2016
|
+
fontSizeLabel: Tt,
|
|
2017
|
+
fontSizeLabelActive: rt,
|
|
2020
2018
|
fontWeightLabel: bt,
|
|
2021
2019
|
lightTextColorLabel: lt,
|
|
2022
2020
|
lightTextColorLabelActive: Nt,
|
|
2023
|
-
darkTextColorLabel:
|
|
2024
|
-
darkTextColorLabelActive:
|
|
2021
|
+
darkTextColorLabel: ut,
|
|
2022
|
+
darkTextColorLabelActive: kt,
|
|
2025
2023
|
fontFamilyChip: L,
|
|
2026
|
-
fontSizeChip:
|
|
2027
|
-
fontWeightChip:
|
|
2028
|
-
} = Ea(
|
|
2029
|
-
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;
|
|
2030
2028
|
return {
|
|
2031
2029
|
disabled: c,
|
|
2032
2030
|
display: A,
|
|
2033
|
-
width:
|
|
2031
|
+
width: ue,
|
|
2034
2032
|
font: ga,
|
|
2035
2033
|
fontSize: ya,
|
|
2036
2034
|
fontWeight: ba,
|
|
2037
|
-
textColor:
|
|
2035
|
+
textColor: Qe,
|
|
2038
2036
|
caretColor: Ot,
|
|
2039
2037
|
selectionBgColor: i,
|
|
2040
|
-
selectionTextColor:
|
|
2041
|
-
paddingX:
|
|
2042
|
-
paddingY:
|
|
2038
|
+
selectionTextColor: S,
|
|
2039
|
+
paddingX: Ve,
|
|
2040
|
+
paddingY: Ye,
|
|
2043
2041
|
borderRadius: Zt,
|
|
2044
2042
|
minChips: ma,
|
|
2045
|
-
maxChips:
|
|
2043
|
+
maxChips: Rt,
|
|
2046
2044
|
inputPosition: ha,
|
|
2047
2045
|
inputStyle: Sa,
|
|
2048
2046
|
theme: xa,
|
|
2049
2047
|
showLabel: Ca,
|
|
2050
|
-
labelLeft:
|
|
2048
|
+
labelLeft: ct,
|
|
2051
2049
|
labelBackground: _t,
|
|
2052
2050
|
inputLabelMarginActive: Jt,
|
|
2053
2051
|
labelPadding: Qt,
|
|
2054
2052
|
labelBorderRadius: Ht,
|
|
2055
2053
|
labelActiveTop: Xt,
|
|
2056
|
-
labelActiveLeft:
|
|
2057
|
-
fontFamilyLabel:
|
|
2054
|
+
labelActiveLeft: ft,
|
|
2055
|
+
fontFamilyLabel: Lt,
|
|
2058
2056
|
fontSizeLabel: Va,
|
|
2059
2057
|
fontSizeLabelActive: Ta,
|
|
2060
2058
|
fontWeightLabel: ea,
|
|
2061
2059
|
lightTextColorLabel: ka,
|
|
2062
2060
|
darkTextColorLabel: o,
|
|
2063
|
-
lightTextColorLabelActive:
|
|
2064
|
-
darkTextColorLabelActive:
|
|
2061
|
+
lightTextColorLabelActive: y,
|
|
2062
|
+
darkTextColorLabelActive: Te,
|
|
2065
2063
|
fontFamilyChip: nt,
|
|
2066
2064
|
fontSizeChip: Ba,
|
|
2067
2065
|
fontWeightChip: ta
|
|
2068
2066
|
};
|
|
2069
|
-
}),
|
|
2070
|
-
const c =
|
|
2067
|
+
}), it = a(() => re.value.disabled), ae = a(() => {
|
|
2068
|
+
const c = re.value, A = Et.value;
|
|
2071
2069
|
return {
|
|
2072
2070
|
display: c.display,
|
|
2073
2071
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
@@ -2075,21 +2073,21 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
2075
2073
|
paddingTop: "0px",
|
|
2076
2074
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
2077
2075
|
// Se não tem label ou está ativo, permite overflow visible para não cortar conteúdo
|
|
2078
|
-
overflow: !
|
|
2076
|
+
overflow: !g.value || A ? "visible" : "hidden"
|
|
2079
2077
|
};
|
|
2080
|
-
}),
|
|
2081
|
-
const c =
|
|
2078
|
+
}), wt = a(() => {
|
|
2079
|
+
const c = re.value;
|
|
2082
2080
|
return c.fontSize ? c.fontSize : "1.2em";
|
|
2083
|
-
}),
|
|
2084
|
-
const c =
|
|
2081
|
+
}), _ = a(() => {
|
|
2082
|
+
const c = re.value, A = Et.value;
|
|
2085
2083
|
return {
|
|
2086
2084
|
color: c.textColor,
|
|
2087
2085
|
padding: `${c.paddingY}rem ${c.paddingX}rem`,
|
|
2088
2086
|
fontWeight: c.fontWeight,
|
|
2089
|
-
textAlign:
|
|
2090
|
-
marginTop: A &&
|
|
2087
|
+
textAlign: ie.value,
|
|
2088
|
+
marginTop: A && g.value ? `${c.inputLabelMarginActive}px` : "0"
|
|
2091
2089
|
};
|
|
2092
|
-
}),
|
|
2090
|
+
}), Y = a(() => {
|
|
2093
2091
|
switch (v.value) {
|
|
2094
2092
|
case "italic":
|
|
2095
2093
|
return "component__text--italic";
|
|
@@ -2099,45 +2097,45 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
2099
2097
|
return "component__text--normal";
|
|
2100
2098
|
}
|
|
2101
2099
|
}), Yt = a(() => {
|
|
2102
|
-
const c =
|
|
2103
|
-
return c.inputStyle !== "line" &&
|
|
2104
|
-
}), 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(() => {
|
|
2105
2103
|
const c = {};
|
|
2106
|
-
|
|
2104
|
+
be.value && Object.keys(be.value).forEach((Qe) => c[`aria-${Qe}`] = be.value[Qe]);
|
|
2107
2105
|
const A = {
|
|
2108
|
-
"aria-label":
|
|
2109
|
-
"aria-disabled":
|
|
2106
|
+
"aria-label": se.value,
|
|
2107
|
+
"aria-disabled": F.value,
|
|
2110
2108
|
...c
|
|
2111
2109
|
};
|
|
2112
2110
|
return Object.fromEntries(
|
|
2113
|
-
Object.entries(A).filter(([
|
|
2111
|
+
Object.entries(A).filter(([ue, Qe]) => Qe != null)
|
|
2114
2112
|
);
|
|
2115
|
-
}),
|
|
2116
|
-
const c =
|
|
2113
|
+
}), st = a(() => {
|
|
2114
|
+
const c = re.value;
|
|
2117
2115
|
return c.caretColor || (c.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2118
2116
|
}), N = a(() => {
|
|
2119
|
-
const c =
|
|
2117
|
+
const c = re.value;
|
|
2120
2118
|
return c.selectionBgColor || (c.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2121
2119
|
}), Ft = a(() => {
|
|
2122
|
-
const c =
|
|
2120
|
+
const c = re.value;
|
|
2123
2121
|
return c.selectionTextColor || (c.theme === "dark" ? "#000000" : "#ffffff");
|
|
2124
2122
|
}), oa = a(() => ({
|
|
2125
|
-
caretColor:
|
|
2123
|
+
caretColor: st.value
|
|
2126
2124
|
})), ra = a(() => ({
|
|
2127
2125
|
"--selection-bg-color": N.value,
|
|
2128
2126
|
"--selection-text-color": Ft.value
|
|
2129
2127
|
})), ua = a(() => {
|
|
2130
|
-
const c =
|
|
2128
|
+
const c = re.value, A = {
|
|
2131
2129
|
width: `${c.width}px`
|
|
2132
2130
|
};
|
|
2133
2131
|
return c.display === "block" ? { width: "auto" } : A;
|
|
2134
|
-
}),
|
|
2135
|
-
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;
|
|
2136
2134
|
return {
|
|
2137
2135
|
fontFamily: c.fontFamilyLabel,
|
|
2138
2136
|
fontSize: A ? c.fontSizeLabelActive : c.fontSizeLabel,
|
|
2139
2137
|
fontWeight: c.fontWeightLabel,
|
|
2140
|
-
color: c.theme === "dark" ?
|
|
2138
|
+
color: c.theme === "dark" ? Qe : ue,
|
|
2141
2139
|
top: A ? `${c.labelActiveTop}px` : "50%",
|
|
2142
2140
|
left: A ? `${c.labelActiveLeft}px` : `${c.labelLeft}px`,
|
|
2143
2141
|
transform: A ? "translateY(0)" : "translateY(-50%)",
|
|
@@ -2147,30 +2145,30 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
2147
2145
|
borderRadius: A ? `${c.labelBorderRadius}rem` : "0",
|
|
2148
2146
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
2149
2147
|
...A ? {
|
|
2150
|
-
whiteSpace:
|
|
2151
|
-
wordWrap:
|
|
2152
|
-
overflowWrap:
|
|
2148
|
+
whiteSpace: Pe.value ? "nowrap" : "normal",
|
|
2149
|
+
wordWrap: Pe.value ? "normal" : "break-word",
|
|
2150
|
+
overflowWrap: Pe.value ? "normal" : "break-word",
|
|
2153
2151
|
maxWidth: "100%",
|
|
2154
|
-
textOverflow:
|
|
2155
|
-
overflow:
|
|
2152
|
+
textOverflow: Pe.value ? "ellipsis" : "clip",
|
|
2153
|
+
overflow: Pe.value ? "hidden" : "visible"
|
|
2156
2154
|
} : {}
|
|
2157
2155
|
};
|
|
2158
2156
|
}), Ut = a(() => {
|
|
2159
|
-
const c =
|
|
2157
|
+
const c = re.value;
|
|
2160
2158
|
return {
|
|
2161
2159
|
fontSize: c.fontSizeChip,
|
|
2162
2160
|
fontWeight: c.fontWeightChip,
|
|
2163
2161
|
fontFamily: c.fontFamilyChip
|
|
2164
2162
|
};
|
|
2165
2163
|
}), sa = a(() => {
|
|
2166
|
-
switch (
|
|
2164
|
+
switch (X.value) {
|
|
2167
2165
|
case "dark":
|
|
2168
2166
|
return "component__theme--dark";
|
|
2169
2167
|
default:
|
|
2170
2168
|
return "component__theme--light";
|
|
2171
2169
|
}
|
|
2172
|
-
}),
|
|
2173
|
-
switch (
|
|
2170
|
+
}), Kt = a(() => {
|
|
2171
|
+
switch (E.value) {
|
|
2174
2172
|
case "line":
|
|
2175
2173
|
return "component__input--line";
|
|
2176
2174
|
case "border":
|
|
@@ -2179,106 +2177,106 @@ const Xl = ["title"], en = ["for"], tn = {
|
|
|
2179
2177
|
return "component__input--background";
|
|
2180
2178
|
}
|
|
2181
2179
|
}), da = (c) => {
|
|
2182
|
-
|
|
2180
|
+
b("clicked", c);
|
|
2183
2181
|
}, ca = () => {
|
|
2184
|
-
|
|
2182
|
+
$t.value = !0, b("focused");
|
|
2185
2183
|
}, fa = () => {
|
|
2186
|
-
|
|
2184
|
+
$t.value = !1, b("blurred");
|
|
2187
2185
|
}, va = async (c) => {
|
|
2188
|
-
var
|
|
2189
|
-
const A = ((
|
|
2190
|
-
|
|
2191
|
-
},
|
|
2192
|
-
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() !== "") {
|
|
2193
2191
|
c.preventDefault();
|
|
2194
|
-
let A =
|
|
2195
|
-
|
|
2192
|
+
let A = j.value.trim();
|
|
2193
|
+
Le.value && (A = A.toUpperCase()), (k.value || !Me.value.includes(A)) && pa(A), j.value = "";
|
|
2196
2194
|
}
|
|
2197
2195
|
}, pa = (c) => {
|
|
2198
|
-
|
|
2196
|
+
Me.value.push(c), b("added", c);
|
|
2199
2197
|
}, zt = (c) => {
|
|
2200
|
-
|
|
2198
|
+
Me.value = Me.value.filter((A) => A !== c), b("removed", c);
|
|
2201
2199
|
};
|
|
2202
|
-
return
|
|
2203
|
-
|
|
2204
|
-
}),
|
|
2205
|
-
|
|
2206
|
-
}), (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({
|
|
2207
2205
|
key: 0,
|
|
2208
|
-
class: ["nb-wrapper",
|
|
2209
|
-
style: [
|
|
2206
|
+
class: ["nb-wrapper", it.value],
|
|
2207
|
+
style: [ae.value],
|
|
2210
2208
|
role: "input",
|
|
2211
2209
|
title: e.title
|
|
2212
|
-
},
|
|
2213
|
-
onClick: A[2] || (A[2] = (
|
|
2210
|
+
}, Dt.value, {
|
|
2211
|
+
onClick: A[2] || (A[2] = (ue) => da(ue))
|
|
2214
2212
|
}), [
|
|
2215
|
-
|
|
2213
|
+
r(g) ? (H(), K("label", {
|
|
2216
2214
|
key: 0,
|
|
2217
|
-
for:
|
|
2215
|
+
for: dt.value,
|
|
2218
2216
|
class: "component__label",
|
|
2219
|
-
style:
|
|
2217
|
+
style: Fe([ia.value])
|
|
2220
2218
|
}, [
|
|
2221
|
-
jt(
|
|
2222
|
-
|
|
2223
|
-
], 12, en)) :
|
|
2224
|
-
|
|
2225
|
-
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),
|
|
2226
2224
|
ref_key: "chipsContainer",
|
|
2227
|
-
ref:
|
|
2228
|
-
class:
|
|
2229
|
-
style:
|
|
2225
|
+
ref: Re,
|
|
2226
|
+
class: Ue(["nb-reset", "component", sa.value, Kt.value]),
|
|
2227
|
+
style: Fe([_.value, ua.value, Yt.value])
|
|
2230
2228
|
}, [
|
|
2231
|
-
|
|
2229
|
+
Me.value.length > 0 ? (H(), K("div", {
|
|
2232
2230
|
key: 0,
|
|
2233
2231
|
ref_key: "chips",
|
|
2234
2232
|
ref: Wt,
|
|
2235
2233
|
class: "chips"
|
|
2236
2234
|
}, [
|
|
2237
|
-
(
|
|
2238
|
-
key:
|
|
2235
|
+
(H(!0), K(gl, null, yl(Me.value, (ue) => (H(), K("div", {
|
|
2236
|
+
key: ue,
|
|
2239
2237
|
class: "chip"
|
|
2240
2238
|
}, [
|
|
2241
2239
|
La(c.$slots, "chip", {
|
|
2242
|
-
chips:
|
|
2243
|
-
chip:
|
|
2240
|
+
chips: Me.value,
|
|
2241
|
+
chip: ue,
|
|
2244
2242
|
removeChip: zt
|
|
2245
2243
|
}, () => [
|
|
2246
|
-
|
|
2244
|
+
ke("span", {
|
|
2247
2245
|
class: "chip-text",
|
|
2248
|
-
style:
|
|
2249
|
-
},
|
|
2250
|
-
!
|
|
2246
|
+
style: Fe([Ut.value])
|
|
2247
|
+
}, Mt(ue), 5),
|
|
2248
|
+
!r(F) && !r(ve) ? (H(), K("span", {
|
|
2251
2249
|
key: 0,
|
|
2252
2250
|
class: "chip-remove",
|
|
2253
|
-
style:
|
|
2254
|
-
onClick: (
|
|
2255
|
-
}, "×", 12, ln)) :
|
|
2251
|
+
style: Fe([Ut.value]),
|
|
2252
|
+
onClick: (Qe) => zt(ue)
|
|
2253
|
+
}, "×", 12, ln)) : xe("", !0)
|
|
2256
2254
|
], !0)
|
|
2257
2255
|
]))), 128))
|
|
2258
|
-
], 512)) :
|
|
2259
|
-
Pa(
|
|
2256
|
+
], 512)) : xe("", !0),
|
|
2257
|
+
Pa(ke("input", {
|
|
2260
2258
|
ref_key: "chipInput",
|
|
2261
2259
|
ref: M,
|
|
2262
2260
|
type: "text",
|
|
2263
|
-
"onUpdate:modelValue": A[0] || (A[0] = (
|
|
2264
|
-
id:
|
|
2265
|
-
name:
|
|
2261
|
+
"onUpdate:modelValue": A[0] || (A[0] = (ue) => j.value = ue),
|
|
2262
|
+
id: dt.value,
|
|
2263
|
+
name: dt.value,
|
|
2266
2264
|
placeholder: Pt.value,
|
|
2267
|
-
readonly:
|
|
2268
|
-
autocomplete:
|
|
2269
|
-
required:
|
|
2270
|
-
tabindex:
|
|
2271
|
-
class:
|
|
2272
|
-
style:
|
|
2273
|
-
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"])),
|
|
2274
2272
|
onFocus: ca,
|
|
2275
2273
|
onBlur: fa,
|
|
2276
2274
|
onPaste: va
|
|
2277
2275
|
}, null, 46, nn), [
|
|
2278
|
-
[hl,
|
|
2276
|
+
[hl, j.value]
|
|
2279
2277
|
])
|
|
2280
2278
|
], 14, an)
|
|
2281
|
-
], 16, Xl)) :
|
|
2279
|
+
], 16, Xl)) : xe("", !0);
|
|
2282
2280
|
}
|
|
2283
2281
|
}), rn = /* @__PURE__ */ Oa(on, [["__scopeId", "data-v-857e8bac"]]);
|
|
2284
2282
|
const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
@@ -2298,8 +2296,8 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2298
2296
|
type: String,
|
|
2299
2297
|
default: "b",
|
|
2300
2298
|
validator: (e = "b") => {
|
|
2301
|
-
const
|
|
2302
|
-
return ["b", "ib"].includes(
|
|
2299
|
+
const m = e.toLowerCase();
|
|
2300
|
+
return ["b", "ib"].includes(m);
|
|
2303
2301
|
}
|
|
2304
2302
|
},
|
|
2305
2303
|
tabIndex: {
|
|
@@ -2694,143 +2692,143 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2694
2692
|
"entered",
|
|
2695
2693
|
"paste"
|
|
2696
2694
|
],
|
|
2697
|
-
setup(e, { emit:
|
|
2695
|
+
setup(e, { emit: m }) {
|
|
2698
2696
|
Wa((i) => ({
|
|
2699
|
-
"99659cd8":
|
|
2700
|
-
"0346f676":
|
|
2701
|
-
"5fce2fcc":
|
|
2702
|
-
"60ae17c4":
|
|
2703
|
-
"203a8c36":
|
|
2704
|
-
ae85488a:
|
|
2705
|
-
"000225c7":
|
|
2706
|
-
"0f33e0e3":
|
|
2707
|
-
"3da299b5":
|
|
2708
|
-
"52dcdf51":
|
|
2709
|
-
"5fbdc46d":
|
|
2710
|
-
"224b5c6b":
|
|
2711
|
-
de56ca08:
|
|
2712
|
-
"108df3b3":
|
|
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),
|
|
2713
2711
|
"2b55152c": ia.value,
|
|
2714
|
-
"2ffb37d3":
|
|
2715
|
-
"56ca5692":
|
|
2716
|
-
"36934d3b":
|
|
2712
|
+
"2ffb37d3": wt.value,
|
|
2713
|
+
"56ca5692": _.value,
|
|
2714
|
+
"36934d3b": Y.value,
|
|
2717
2715
|
"1600b695": z.value,
|
|
2718
2716
|
cffe22b6: i.styleButtonColor,
|
|
2719
2717
|
"0e5dcaec": Yt.value
|
|
2720
2718
|
})), Aa(() => {
|
|
2721
|
-
|
|
2719
|
+
j.value = et.value;
|
|
2722
2720
|
}), Ya(() => {
|
|
2723
2721
|
c();
|
|
2724
2722
|
});
|
|
2725
|
-
const
|
|
2726
|
-
nbId:
|
|
2727
|
-
display:
|
|
2728
|
-
hasTabIndexEnter:
|
|
2729
|
-
ariaLabel:
|
|
2723
|
+
const b = m, T = e, {
|
|
2724
|
+
nbId: I,
|
|
2725
|
+
display: de,
|
|
2726
|
+
hasTabIndexEnter: Ce,
|
|
2727
|
+
ariaLabel: D,
|
|
2730
2728
|
ariaAttrs: B,
|
|
2731
|
-
textColor:
|
|
2732
|
-
caretColor:
|
|
2733
|
-
selectionBgColor:
|
|
2734
|
-
selectionTextColor:
|
|
2735
|
-
hasBorderRadius:
|
|
2736
|
-
borderRadius:
|
|
2737
|
-
disabled:
|
|
2738
|
-
fontFamily:
|
|
2739
|
-
fontSize:
|
|
2740
|
-
fontWeight:
|
|
2741
|
-
fontFamilyMsg:
|
|
2742
|
-
fontSizeMsg:
|
|
2743
|
-
fontWeightMsg:
|
|
2744
|
-
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,
|
|
2745
2743
|
inputWidth: ve,
|
|
2746
|
-
inputStyle:
|
|
2747
|
-
activeTextStyle:
|
|
2748
|
-
inputReadonly:
|
|
2749
|
-
blockPaste:
|
|
2750
|
-
hasTrim:
|
|
2744
|
+
inputStyle: pe,
|
|
2745
|
+
activeTextStyle: Ae,
|
|
2746
|
+
inputReadonly: ze,
|
|
2747
|
+
blockPaste: ie,
|
|
2748
|
+
hasTrim: Ke,
|
|
2751
2749
|
inputUppercase: v,
|
|
2752
|
-
inputName:
|
|
2753
|
-
inputPlaceholder:
|
|
2754
|
-
inputText:
|
|
2755
|
-
theme:
|
|
2756
|
-
tabindex:
|
|
2757
|
-
lightBgColor:
|
|
2758
|
-
lightBgColorFocus:
|
|
2750
|
+
inputName: X,
|
|
2751
|
+
inputPlaceholder: E,
|
|
2752
|
+
inputText: et,
|
|
2753
|
+
theme: h,
|
|
2754
|
+
tabindex: Ge,
|
|
2755
|
+
lightBgColor: ge,
|
|
2756
|
+
lightBgColorFocus: pt,
|
|
2759
2757
|
lightDisabledBgColor: ht,
|
|
2760
2758
|
lightTextColor: ot,
|
|
2761
|
-
darkBgColor:
|
|
2762
|
-
darkBgColorFocus:
|
|
2763
|
-
darkDisabledBgColor:
|
|
2764
|
-
darkTextColor:
|
|
2759
|
+
darkBgColor: Ie,
|
|
2760
|
+
darkBgColorFocus: $e,
|
|
2761
|
+
darkDisabledBgColor: At,
|
|
2762
|
+
darkTextColor: gt,
|
|
2765
2763
|
textAlign: St,
|
|
2766
2764
|
showMsg: xt,
|
|
2767
2765
|
hasMsg: Ct,
|
|
2768
|
-
showLabel:
|
|
2769
|
-
labelBackground:
|
|
2770
|
-
labelPadding:
|
|
2771
|
-
labelBorderRadius:
|
|
2772
|
-
labelBreakOnActive:
|
|
2773
|
-
labelLeft:
|
|
2774
|
-
inputLabelMarginActive:
|
|
2775
|
-
labelActiveTop:
|
|
2776
|
-
labelActiveLeft:
|
|
2777
|
-
labelRight:
|
|
2778
|
-
labelActiveRight:
|
|
2779
|
-
fontFamilyLabel:
|
|
2780
|
-
fontSizeLabel:
|
|
2781
|
-
fontSizeLabelActive:
|
|
2782
|
-
fontWeightLabel:
|
|
2783
|
-
lightTextColorLabel:
|
|
2784
|
-
lightTextColorLabelActive:
|
|
2785
|
-
darkTextColorLabel:
|
|
2786
|
-
darkTextColorLabelActive:
|
|
2787
|
-
rows:
|
|
2788
|
-
cols:
|
|
2789
|
-
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,
|
|
2790
2788
|
minlength: at,
|
|
2791
2789
|
wrap: yt,
|
|
2792
|
-
spellcheck:
|
|
2793
|
-
autofocus:
|
|
2790
|
+
spellcheck: Tt,
|
|
2791
|
+
autofocus: rt,
|
|
2794
2792
|
resize: bt,
|
|
2795
2793
|
minWidth: lt,
|
|
2796
2794
|
maxWidth: Nt,
|
|
2797
|
-
minHeight:
|
|
2798
|
-
maxHeight:
|
|
2795
|
+
minHeight: ut,
|
|
2796
|
+
maxHeight: kt,
|
|
2799
2797
|
autoResize: L,
|
|
2800
|
-
minRows:
|
|
2801
|
-
maxRows:
|
|
2802
|
-
} = Ea(
|
|
2803
|
-
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;
|
|
2804
2802
|
return {
|
|
2805
2803
|
disabled: i,
|
|
2806
|
-
display:
|
|
2804
|
+
display: S,
|
|
2807
2805
|
font: ma,
|
|
2808
|
-
fontSize:
|
|
2806
|
+
fontSize: Rt,
|
|
2809
2807
|
fontWeight: ha,
|
|
2810
2808
|
fontFamilyMsg: Sa,
|
|
2811
2809
|
fontSizeMsg: xa,
|
|
2812
2810
|
fontWeightMsg: Ca,
|
|
2813
|
-
textMessageColor:
|
|
2814
|
-
textColor:
|
|
2815
|
-
caretColor:
|
|
2811
|
+
textMessageColor: ct,
|
|
2812
|
+
textColor: Ve,
|
|
2813
|
+
caretColor: Ye,
|
|
2816
2814
|
selectionBgColor: Zt,
|
|
2817
2815
|
selectionTextColor: ga,
|
|
2818
2816
|
hasBorderRadius: ya,
|
|
2819
2817
|
borderRadius: ba,
|
|
2820
|
-
textAlign:
|
|
2818
|
+
textAlign: ft,
|
|
2821
2819
|
inputWidth: _t,
|
|
2822
2820
|
activeTextStyle: Jt,
|
|
2823
2821
|
inputReadonly: Qt,
|
|
2824
2822
|
inputUppercase: Ht,
|
|
2825
2823
|
theme: Xt,
|
|
2826
|
-
inputStyle:
|
|
2824
|
+
inputStyle: Lt,
|
|
2827
2825
|
showLabel: Va,
|
|
2828
2826
|
labelBackground: ea,
|
|
2829
2827
|
labelPadding: o,
|
|
2830
|
-
labelBorderRadius:
|
|
2828
|
+
labelBorderRadius: y,
|
|
2831
2829
|
labelLeft: Ta,
|
|
2832
2830
|
inputLabelMarginActive: ka,
|
|
2833
|
-
labelActiveTop:
|
|
2831
|
+
labelActiveTop: Te,
|
|
2834
2832
|
labelActiveLeft: nt,
|
|
2835
2833
|
labelRight: Ba,
|
|
2836
2834
|
labelActiveRight: ta,
|
|
@@ -2843,23 +2841,23 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2843
2841
|
lightTextColorLabelActive: _a,
|
|
2844
2842
|
darkTextColorLabelActive: Ma,
|
|
2845
2843
|
rows: Ha,
|
|
2846
|
-
cols:
|
|
2844
|
+
cols: De,
|
|
2847
2845
|
maxlength: qa,
|
|
2848
2846
|
minlength: mt,
|
|
2849
2847
|
wrap: t,
|
|
2850
2848
|
spellcheck: l,
|
|
2851
2849
|
autofocus: n,
|
|
2852
|
-
resize:
|
|
2850
|
+
resize: u,
|
|
2853
2851
|
minWidth: s,
|
|
2854
2852
|
maxWidth: d,
|
|
2855
2853
|
minHeight: f,
|
|
2856
2854
|
maxHeight: p,
|
|
2857
|
-
autoResize:
|
|
2855
|
+
autoResize: V,
|
|
2858
2856
|
minRows: $,
|
|
2859
2857
|
maxRows: W
|
|
2860
2858
|
};
|
|
2861
|
-
}), Wt = a(() => M.value.disabled),
|
|
2862
|
-
const i = M.value,
|
|
2859
|
+
}), Wt = a(() => M.value.disabled), Me = a(() => {
|
|
2860
|
+
const i = M.value, S = Pt.value;
|
|
2863
2861
|
return {
|
|
2864
2862
|
display: i.display,
|
|
2865
2863
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
@@ -2867,41 +2865,41 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2867
2865
|
paddingTop: "0px",
|
|
2868
2866
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
2869
2867
|
// Se não tem label ou está ativo, permite overflow visible para não cortar conteúdo
|
|
2870
|
-
overflow: !
|
|
2868
|
+
overflow: !we.value || S ? "visible" : "hidden"
|
|
2871
2869
|
};
|
|
2872
|
-
}),
|
|
2870
|
+
}), $t = a(() => {
|
|
2873
2871
|
const i = M.value;
|
|
2874
2872
|
return i.fontSize ? i.fontSize : "1.4em";
|
|
2875
|
-
}),
|
|
2876
|
-
const i = M.value,
|
|
2873
|
+
}), re = a(() => {
|
|
2874
|
+
const i = M.value, S = Pt.value;
|
|
2877
2875
|
return {
|
|
2878
2876
|
fontWeight: i.fontWeight,
|
|
2879
|
-
marginTop:
|
|
2877
|
+
marginTop: S && we.value ? `${i.inputLabelMarginActive}px` : "0",
|
|
2880
2878
|
// Quando o label está ativo, define altura mínima igual ao input para alinhar baseline
|
|
2881
2879
|
// Mas permite que o textarea cresça quando há conteúdo
|
|
2882
|
-
minHeight: (
|
|
2883
|
-
height:
|
|
2884
|
-
maxHeight:
|
|
2880
|
+
minHeight: (S && we.value, "28px"),
|
|
2881
|
+
height: S && we.value ? "auto" : "28px",
|
|
2882
|
+
maxHeight: S && we.value ? void 0 : "28px"
|
|
2885
2883
|
};
|
|
2886
|
-
}),
|
|
2884
|
+
}), it = a(() => {
|
|
2887
2885
|
const i = M.value;
|
|
2888
2886
|
return i.inputStyle !== "line" && i.hasBorderRadius ? { borderRadius: `${i.borderRadius}rem` } : {};
|
|
2889
|
-
}),
|
|
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(() => {
|
|
2890
2888
|
const i = M.value;
|
|
2891
2889
|
return i.caretColor || (i.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2892
|
-
}),
|
|
2890
|
+
}), Bt = a(() => {
|
|
2893
2891
|
const i = M.value;
|
|
2894
2892
|
return i.selectionBgColor || (i.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2895
|
-
}),
|
|
2893
|
+
}), Dt = a(() => {
|
|
2896
2894
|
const i = M.value;
|
|
2897
2895
|
return i.selectionTextColor || (i.theme === "dark" ? "#000000" : "#ffffff");
|
|
2898
|
-
}),
|
|
2896
|
+
}), st = a(() => {
|
|
2899
2897
|
const i = M.value;
|
|
2900
2898
|
return i.display === "block" ? { width: "100%" } : {
|
|
2901
2899
|
width: `${i.inputWidth}px`
|
|
2902
2900
|
};
|
|
2903
2901
|
}), N = a(() => {
|
|
2904
|
-
switch (
|
|
2902
|
+
switch (pe.value) {
|
|
2905
2903
|
case "line":
|
|
2906
2904
|
return "component__input--line";
|
|
2907
2905
|
case "border":
|
|
@@ -2925,42 +2923,42 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2925
2923
|
default:
|
|
2926
2924
|
return "component__theme--light";
|
|
2927
2925
|
}
|
|
2928
|
-
}), ra = a(() => M.value.inputReadonly ? "component__input--read-only" : ""), ua = a(() => M.value.inputUppercase ? "component__input--uppercase" : ""),
|
|
2929
|
-
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");
|
|
2930
2928
|
const ia = a(() => "6px 10px"), Ut = a(() => !!(xt.value && Ct.value)), sa = a(() => {
|
|
2931
2929
|
const i = {};
|
|
2932
|
-
B.value && Object.keys(B.value).forEach((
|
|
2933
|
-
const
|
|
2934
|
-
"aria-label":
|
|
2935
|
-
"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,
|
|
2936
2934
|
...i
|
|
2937
2935
|
};
|
|
2938
2936
|
return Object.fromEntries(
|
|
2939
|
-
Object.entries(
|
|
2937
|
+
Object.entries(S).filter(([Ve, Ye]) => Ye != null)
|
|
2940
2938
|
);
|
|
2941
|
-
}),
|
|
2942
|
-
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;
|
|
2943
2941
|
return {
|
|
2944
2942
|
fontFamily: i.fontFamilyLabel,
|
|
2945
|
-
fontSize:
|
|
2943
|
+
fontSize: S ? i.fontSizeLabelActive : i.fontSizeLabel,
|
|
2946
2944
|
fontWeight: i.fontWeightLabel,
|
|
2947
|
-
color: i.theme === "dark" ?
|
|
2948
|
-
top:
|
|
2949
|
-
transform:
|
|
2950
|
-
left:
|
|
2951
|
-
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`,
|
|
2952
2950
|
transition: "all 0.2s ease",
|
|
2953
|
-
backgroundColor:
|
|
2954
|
-
padding:
|
|
2955
|
-
borderRadius:
|
|
2951
|
+
backgroundColor: S ? i.labelBackground : "transparent",
|
|
2952
|
+
padding: S ? i.labelPadding : "0",
|
|
2953
|
+
borderRadius: S ? `${i.labelBorderRadius}rem` : "0",
|
|
2956
2954
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
2957
|
-
...
|
|
2958
|
-
whiteSpace:
|
|
2959
|
-
wordWrap:
|
|
2960
|
-
overflowWrap:
|
|
2955
|
+
...S ? {
|
|
2956
|
+
whiteSpace: He.value ? "nowrap" : "normal",
|
|
2957
|
+
wordWrap: He.value ? "normal" : "break-word",
|
|
2958
|
+
overflowWrap: He.value ? "normal" : "break-word",
|
|
2961
2959
|
maxWidth: "100%",
|
|
2962
|
-
textOverflow:
|
|
2963
|
-
overflow:
|
|
2960
|
+
textOverflow: He.value ? "ellipsis" : "clip",
|
|
2961
|
+
overflow: He.value ? "hidden" : "visible"
|
|
2964
2962
|
} : {}
|
|
2965
2963
|
};
|
|
2966
2964
|
});
|
|
@@ -2969,14 +2967,14 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2969
2967
|
return i.theme === "dark" ? i.darkTextColorLabelActive : i.lightTextColorLabelActive;
|
|
2970
2968
|
});
|
|
2971
2969
|
const da = a(() => {
|
|
2972
|
-
const i = M.value,
|
|
2970
|
+
const i = M.value, S = {
|
|
2973
2971
|
rows: i.rows,
|
|
2974
2972
|
cols: i.cols,
|
|
2975
2973
|
wrap: i.wrap,
|
|
2976
2974
|
spellcheck: i.spellcheck === "default" ? void 0 : i.spellcheck,
|
|
2977
2975
|
autofocus: i.autofocus || void 0
|
|
2978
2976
|
};
|
|
2979
|
-
return i.maxlength !== null && (
|
|
2977
|
+
return i.maxlength !== null && (S.maxlength = i.maxlength), i.minlength !== null && (S.minlength = i.minlength), S;
|
|
2980
2978
|
}), ca = a(() => ({
|
|
2981
2979
|
resize: M.value.resize
|
|
2982
2980
|
})), fa = a(() => M.value.wrap === "off" ? {
|
|
@@ -2987,7 +2985,7 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
2987
2985
|
return i.minWidth === "auto" ? {} : {
|
|
2988
2986
|
minWidth: i.minWidth
|
|
2989
2987
|
};
|
|
2990
|
-
}),
|
|
2988
|
+
}), Gt = a(() => {
|
|
2991
2989
|
const i = M.value;
|
|
2992
2990
|
return i.maxWidth === "auto" ? {} : {
|
|
2993
2991
|
maxWidth: i.maxWidth
|
|
@@ -3003,134 +3001,134 @@ const un = ["title"], sn = ["id"], dn = ["for"], cn = {
|
|
|
3003
3001
|
maxHeight: i.maxHeight
|
|
3004
3002
|
};
|
|
3005
3003
|
}), c = () => {
|
|
3006
|
-
|
|
3004
|
+
j.value = et.value;
|
|
3007
3005
|
}, A = (i) => {
|
|
3008
|
-
|
|
3009
|
-
},
|
|
3010
|
-
|
|
3011
|
-
},
|
|
3012
|
-
var
|
|
3013
|
-
const
|
|
3014
|
-
|
|
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();
|
|
3015
3013
|
}, Ot = () => {
|
|
3016
|
-
let i =
|
|
3017
|
-
|
|
3014
|
+
let i = j.value;
|
|
3015
|
+
Ke.value && (i = i.trim()), b("current-value", i);
|
|
3018
3016
|
};
|
|
3019
|
-
return
|
|
3020
|
-
i !==
|
|
3021
|
-
}, { immediate: !0 }),
|
|
3022
|
-
|
|
3023
|
-
}),
|
|
3024
|
-
|
|
3025
|
-
}),
|
|
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, () => {
|
|
3026
3024
|
Ot();
|
|
3027
|
-
}, { immediate: !0 }), (i,
|
|
3025
|
+
}, { immediate: !0 }), (i, S) => r(I) ? (H(), K("div", $a({
|
|
3028
3026
|
key: 0,
|
|
3029
3027
|
class: ["nb-wrapper", Wt.value],
|
|
3030
|
-
style: [
|
|
3028
|
+
style: [Me.value, st.value, it.value],
|
|
3031
3029
|
role: "input",
|
|
3032
3030
|
title: e.title
|
|
3033
3031
|
}, sa.value), [
|
|
3034
|
-
|
|
3035
|
-
id:
|
|
3036
|
-
class:
|
|
3037
|
-
style:
|
|
3038
|
-
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))
|
|
3039
3037
|
}, [
|
|
3040
|
-
|
|
3038
|
+
r(we) ? (H(), K("label", {
|
|
3041
3039
|
key: 0,
|
|
3042
|
-
for:
|
|
3040
|
+
for: dt.value,
|
|
3043
3041
|
class: "component__label",
|
|
3044
|
-
style:
|
|
3042
|
+
style: Fe([Kt.value])
|
|
3045
3043
|
}, [
|
|
3046
|
-
jt(
|
|
3047
|
-
e.required ? (
|
|
3048
|
-
], 12, dn)) :
|
|
3049
|
-
Pa(
|
|
3050
|
-
"onUpdate:modelValue":
|
|
3051
|
-
id:
|
|
3052
|
-
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
|
|
3053
3051
|
}, da.value, {
|
|
3054
3052
|
class: ["component__input", [
|
|
3055
3053
|
ua.value,
|
|
3056
3054
|
Ft.value
|
|
3057
3055
|
]],
|
|
3058
3056
|
placeholder: Et.value,
|
|
3059
|
-
disabled:
|
|
3057
|
+
disabled: r(k) || r(ze),
|
|
3060
3058
|
required: e.required,
|
|
3061
|
-
readonly:
|
|
3059
|
+
readonly: r(ze),
|
|
3062
3060
|
autocomplete: e.inputAutocomplete,
|
|
3063
|
-
tabindex:
|
|
3061
|
+
tabindex: r(k) || r(ze) ? -1 : r(Ge),
|
|
3064
3062
|
role: "textbox",
|
|
3065
|
-
style: [
|
|
3066
|
-
onFocus:
|
|
3067
|
-
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),
|
|
3068
3066
|
onInput: Ot,
|
|
3069
|
-
onKeydown:
|
|
3070
|
-
onPaste:
|
|
3067
|
+
onKeydown: S[3] || (S[3] = na((Ve) => !r(k) && r(Ce) && ue(), ["enter"])),
|
|
3068
|
+
onPaste: Qe
|
|
3071
3069
|
}), null, 16, fn), [
|
|
3072
|
-
[hl,
|
|
3070
|
+
[hl, j.value]
|
|
3073
3071
|
])
|
|
3074
3072
|
], 14, sn),
|
|
3075
|
-
Ut.value ? (
|
|
3073
|
+
Ut.value ? (H(), K("div", {
|
|
3076
3074
|
key: 0,
|
|
3077
|
-
class:
|
|
3075
|
+
class: Ue(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
3078
3076
|
}, [
|
|
3079
3077
|
La(i.$slots, "message", {}, () => [
|
|
3080
|
-
jt(
|
|
3078
|
+
jt(Mt(e.message), 1)
|
|
3081
3079
|
], !0)
|
|
3082
|
-
], 2)) :
|
|
3083
|
-
], 16, un)) :
|
|
3080
|
+
], 2)) : xe("", !0)
|
|
3081
|
+
], 16, un)) : xe("", !0);
|
|
3084
3082
|
}
|
|
3085
3083
|
}), pn = /* @__PURE__ */ Oa(vn, [["__scopeId", "data-v-f8d0486c"]]), za = (e) => String(e).padStart(2, "0"), Na = (e) => {
|
|
3086
3084
|
if (!e || !(e instanceof Date))
|
|
3087
3085
|
return null;
|
|
3088
|
-
const
|
|
3089
|
-
return `${
|
|
3090
|
-
}, 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") => {
|
|
3091
3089
|
if (!e || !(e instanceof Date))
|
|
3092
3090
|
return null;
|
|
3093
|
-
const
|
|
3094
|
-
return
|
|
3095
|
-
}, bl = (e,
|
|
3096
|
-
e.getMonth() ===
|
|
3097
|
-
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) => {
|
|
3098
3096
|
if (!e)
|
|
3099
3097
|
return null;
|
|
3100
3098
|
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
3101
|
-
const [
|
|
3102
|
-
return new Date(
|
|
3099
|
+
const [b, T, I] = e.split("-").map(Number);
|
|
3100
|
+
return new Date(b, T - 1, I);
|
|
3103
3101
|
}
|
|
3104
|
-
const
|
|
3105
|
-
return isNaN(
|
|
3106
|
-
}, gn = (e,
|
|
3102
|
+
const m = new Date(e);
|
|
3103
|
+
return isNaN(m.getTime()) ? null : m;
|
|
3104
|
+
}, gn = (e, m = {}) => {
|
|
3107
3105
|
const {
|
|
3108
|
-
inputType:
|
|
3109
|
-
hasSeconds:
|
|
3110
|
-
allowRange:
|
|
3111
|
-
timezoneFormat:
|
|
3112
|
-
locale:
|
|
3113
|
-
} =
|
|
3106
|
+
inputType: b,
|
|
3107
|
+
hasSeconds: T = !1,
|
|
3108
|
+
allowRange: I = !1,
|
|
3109
|
+
timezoneFormat: de = "Z",
|
|
3110
|
+
locale: Ce = "en-US"
|
|
3111
|
+
} = m;
|
|
3114
3112
|
if (!e || e === "" || e === null || e === void 0)
|
|
3115
|
-
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;
|
|
3116
3114
|
try {
|
|
3117
|
-
if (
|
|
3118
|
-
const
|
|
3119
|
-
if (!
|
|
3115
|
+
if (b === "date") {
|
|
3116
|
+
const D = ja(e);
|
|
3117
|
+
if (!D)
|
|
3120
3118
|
return { date: null, dateString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3121
3119
|
const B = /* @__PURE__ */ new Date();
|
|
3122
3120
|
B.setHours(0, 0, 0, 0);
|
|
3123
|
-
const
|
|
3124
|
-
return
|
|
3125
|
-
date:
|
|
3121
|
+
const x = new Date(D.getTime());
|
|
3122
|
+
return x.setHours(0, 0, 0, 0), {
|
|
3123
|
+
date: x,
|
|
3126
3124
|
dateString: e,
|
|
3127
|
-
isoString: Fa(
|
|
3128
|
-
isoStringLocal: Na(
|
|
3125
|
+
isoString: Fa(x, de),
|
|
3126
|
+
isoStringLocal: Na(x),
|
|
3129
3127
|
day: {
|
|
3130
|
-
date:
|
|
3131
|
-
fullDate:
|
|
3128
|
+
date: x.getDate(),
|
|
3129
|
+
fullDate: x,
|
|
3132
3130
|
isOtherMonth: !1,
|
|
3133
|
-
isToday: bl(
|
|
3131
|
+
isToday: bl(x, B),
|
|
3134
3132
|
isSelected: !0,
|
|
3135
3133
|
isInRange: !1,
|
|
3136
3134
|
isRangeStart: !1,
|
|
@@ -3139,45 +3137,45 @@ e.getDate() === b.getDate(), ja = (e) => {
|
|
|
3139
3137
|
events: []
|
|
3140
3138
|
}
|
|
3141
3139
|
};
|
|
3142
|
-
} else if (
|
|
3143
|
-
const
|
|
3140
|
+
} else if (b === "time") {
|
|
3141
|
+
const D = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, B = e.match(D);
|
|
3144
3142
|
if (!B)
|
|
3145
3143
|
return { hour: 0, minute: 0, second: void 0, timeString: "" };
|
|
3146
|
-
const
|
|
3144
|
+
const x = parseInt(B[1], 10), F = parseInt(B[2], 10), J = B[3] ? parseInt(B[3], 10) : void 0;
|
|
3147
3145
|
return {
|
|
3148
|
-
hour:
|
|
3149
|
-
minute:
|
|
3150
|
-
second:
|
|
3146
|
+
hour: x,
|
|
3147
|
+
minute: F,
|
|
3148
|
+
second: T ? J : void 0,
|
|
3151
3149
|
timeString: e
|
|
3152
3150
|
};
|
|
3153
|
-
} else if (
|
|
3154
|
-
const
|
|
3155
|
-
if (
|
|
3151
|
+
} else if (b === "datetime-local") {
|
|
3152
|
+
const D = e.split("T");
|
|
3153
|
+
if (D.length !== 2)
|
|
3156
3154
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3157
|
-
const B =
|
|
3158
|
-
if (!
|
|
3155
|
+
const B = D[0], x = D[1], F = ja(B);
|
|
3156
|
+
if (!F)
|
|
3159
3157
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3160
|
-
const
|
|
3161
|
-
if (!
|
|
3158
|
+
const J = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, oe = x.match(J);
|
|
3159
|
+
if (!oe)
|
|
3162
3160
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3163
|
-
const
|
|
3164
|
-
|
|
3165
|
-
const
|
|
3166
|
-
|
|
3167
|
-
const
|
|
3168
|
-
return
|
|
3169
|
-
date:
|
|
3170
|
-
hour:
|
|
3171
|
-
minute:
|
|
3172
|
-
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,
|
|
3173
3171
|
datetimeString: e,
|
|
3174
|
-
isoString: Fa(
|
|
3175
|
-
isoStringLocal: Na(
|
|
3172
|
+
isoString: Fa(Q, de),
|
|
3173
|
+
isoStringLocal: Na(Q),
|
|
3176
3174
|
day: {
|
|
3177
|
-
date:
|
|
3178
|
-
fullDate:
|
|
3175
|
+
date: P.getDate(),
|
|
3176
|
+
fullDate: P,
|
|
3179
3177
|
isOtherMonth: !1,
|
|
3180
|
-
isToday: bl(
|
|
3178
|
+
isToday: bl(P, he),
|
|
3181
3179
|
isSelected: !0,
|
|
3182
3180
|
isInRange: !1,
|
|
3183
3181
|
isRangeStart: !1,
|
|
@@ -3186,58 +3184,58 @@ e.getDate() === b.getDate(), ja = (e) => {
|
|
|
3186
3184
|
events: []
|
|
3187
3185
|
}
|
|
3188
3186
|
};
|
|
3189
|
-
} else if (
|
|
3190
|
-
const
|
|
3187
|
+
} else if (b === "week") {
|
|
3188
|
+
const D = /^(\d{4})-W(\d{2})$/, B = e.match(D);
|
|
3191
3189
|
if (!B)
|
|
3192
3190
|
return { weekString: null, weekStartDate: null, weekEndDate: null, weekNumber: null, weekYear: null, isoString: null, isoStringLocal: null };
|
|
3193
|
-
const
|
|
3194
|
-
|
|
3195
|
-
const
|
|
3196
|
-
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), {
|
|
3197
3195
|
weekString: e,
|
|
3198
|
-
weekStartDate:
|
|
3199
|
-
weekEndDate:
|
|
3200
|
-
weekNumber:
|
|
3201
|
-
weekYear:
|
|
3202
|
-
isoString: Fa(
|
|
3203
|
-
isoStringLocal: Na(
|
|
3196
|
+
weekStartDate: k,
|
|
3197
|
+
weekEndDate: Q,
|
|
3198
|
+
weekNumber: F,
|
|
3199
|
+
weekYear: x,
|
|
3200
|
+
isoString: Fa(k, de),
|
|
3201
|
+
isoStringLocal: Na(k)
|
|
3204
3202
|
};
|
|
3205
|
-
} else if (
|
|
3206
|
-
const
|
|
3203
|
+
} else if (b === "month") {
|
|
3204
|
+
const D = /^(\d{4})-(\d{2})$/, B = e.match(D);
|
|
3207
3205
|
if (!B)
|
|
3208
3206
|
return { date: null, dateString: null, month: null, year: null, monthName: null, isoString: null, isoStringLocal: null };
|
|
3209
|
-
const
|
|
3210
|
-
|
|
3211
|
-
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"];
|
|
3212
3210
|
return {
|
|
3213
|
-
date:
|
|
3214
|
-
dateString: `${
|
|
3215
|
-
month:
|
|
3216
|
-
year:
|
|
3217
|
-
monthName:
|
|
3218
|
-
isoString: Fa(
|
|
3219
|
-
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)
|
|
3220
3218
|
};
|
|
3221
|
-
} else if (
|
|
3219
|
+
} else if (I && typeof e == "string" && e.startsWith("{"))
|
|
3222
3220
|
try {
|
|
3223
|
-
const
|
|
3224
|
-
if (
|
|
3225
|
-
const B =
|
|
3226
|
-
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), {
|
|
3227
3225
|
startDate: B,
|
|
3228
|
-
endDate:
|
|
3226
|
+
endDate: x,
|
|
3229
3227
|
isRange: !0,
|
|
3230
3228
|
isoString: {
|
|
3231
|
-
start: Fa(B,
|
|
3232
|
-
end: Fa(
|
|
3229
|
+
start: Fa(B, de),
|
|
3230
|
+
end: Fa(x, de)
|
|
3233
3231
|
},
|
|
3234
3232
|
isoStringLocal: {
|
|
3235
3233
|
start: Na(B),
|
|
3236
|
-
end: Na(
|
|
3234
|
+
end: Na(x)
|
|
3237
3235
|
}
|
|
3238
3236
|
}) : {
|
|
3239
3237
|
startDate: B,
|
|
3240
|
-
endDate:
|
|
3238
|
+
endDate: x,
|
|
3241
3239
|
isRange: !0,
|
|
3242
3240
|
isoString: null,
|
|
3243
3241
|
isoStringLocal: null
|
|
@@ -3246,8 +3244,8 @@ e.getDate() === b.getDate(), ja = (e) => {
|
|
|
3246
3244
|
} catch {
|
|
3247
3245
|
return { startDate: null, endDate: null, isRange: !0, isoString: null, isoStringLocal: null };
|
|
3248
3246
|
}
|
|
3249
|
-
} catch (
|
|
3250
|
-
console.error("Error building complete data from inputText:",
|
|
3247
|
+
} catch (D) {
|
|
3248
|
+
console.error("Error building complete data from inputText:", D);
|
|
3251
3249
|
}
|
|
3252
3250
|
return null;
|
|
3253
3251
|
};
|
|
@@ -3268,8 +3266,8 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
3268
3266
|
type: String,
|
|
3269
3267
|
default: "b",
|
|
3270
3268
|
validator: (e = "b") => {
|
|
3271
|
-
const
|
|
3272
|
-
return ["b", "ib"].includes(
|
|
3269
|
+
const m = e.toLowerCase();
|
|
3270
|
+
return ["b", "ib"].includes(m);
|
|
3273
3271
|
}
|
|
3274
3272
|
},
|
|
3275
3273
|
tabIndex: {
|
|
@@ -3664,7 +3662,7 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
3664
3662
|
calendarEvents: {
|
|
3665
3663
|
type: Array,
|
|
3666
3664
|
default: () => [],
|
|
3667
|
-
validator: (e) => Array.isArray(e) && e.every((
|
|
3665
|
+
validator: (e) => Array.isArray(e) && e.every((m) => m && m.date && (m.color || !0))
|
|
3668
3666
|
},
|
|
3669
3667
|
// Calendar props - Text
|
|
3670
3668
|
calendarSelectMonthText: {
|
|
@@ -3908,114 +3906,114 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
3908
3906
|
"date-selected",
|
|
3909
3907
|
"month-changed"
|
|
3910
3908
|
],
|
|
3911
|
-
setup(e, { emit:
|
|
3909
|
+
setup(e, { emit: m }) {
|
|
3912
3910
|
Wa((t) => ({
|
|
3913
3911
|
63363671: oa.value,
|
|
3914
|
-
"7f928282":
|
|
3915
|
-
"89824d3c":
|
|
3912
|
+
"7f928282": st.value,
|
|
3913
|
+
"89824d3c": r(tt),
|
|
3916
3914
|
"3f366ecf": ia.value,
|
|
3917
3915
|
"6f4eb63e": Ut.value,
|
|
3918
3916
|
a87dcf8e: sa.value,
|
|
3919
|
-
"4fc10104":
|
|
3920
|
-
"635d2b4a":
|
|
3921
|
-
ed7bcd34:
|
|
3917
|
+
"4fc10104": r(w),
|
|
3918
|
+
"635d2b4a": r(C),
|
|
3919
|
+
ed7bcd34: r(Ze),
|
|
3922
3920
|
def20fc8: Et.value,
|
|
3923
|
-
"4b423b12":
|
|
3924
|
-
"3b214f48":
|
|
3925
|
-
"41793b20":
|
|
3926
|
-
"5ae28a2e":
|
|
3927
|
-
"27769c4a":
|
|
3928
|
-
"6ec032a4":
|
|
3929
|
-
"36c670f6":
|
|
3930
|
-
"19e425ee":
|
|
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,
|
|
3931
3929
|
abed1f54: ra.value,
|
|
3932
3930
|
36329595: ua.value,
|
|
3933
|
-
46305104:
|
|
3931
|
+
46305104: dt.value,
|
|
3934
3932
|
"0eb06758": Pt.value,
|
|
3935
3933
|
b4bedffc: t.styleButtonColor
|
|
3936
3934
|
}));
|
|
3937
|
-
const
|
|
3935
|
+
const b = Bl(
|
|
3938
3936
|
() => import("@vlalg-nimbus/nb-calendar").then((t) => t.Calendar ? t.Calendar : t.default && t.default.Calendar ? t.default.Calendar : t.default)
|
|
3939
3937
|
);
|
|
3940
3938
|
Aa(() => {
|
|
3941
|
-
L.value =
|
|
3939
|
+
L.value = h.value;
|
|
3942
3940
|
}), Ya(() => {
|
|
3943
3941
|
Zt();
|
|
3944
3942
|
});
|
|
3945
|
-
const
|
|
3946
|
-
nbId:
|
|
3947
|
-
display:
|
|
3948
|
-
hasTabIndexEnter:
|
|
3943
|
+
const T = m, I = e, {
|
|
3944
|
+
nbId: de,
|
|
3945
|
+
display: Ce,
|
|
3946
|
+
hasTabIndexEnter: D,
|
|
3949
3947
|
ariaLabel: B,
|
|
3950
|
-
ariaAttrs:
|
|
3951
|
-
caretColor:
|
|
3952
|
-
selectionBgColor:
|
|
3953
|
-
selectionTextColor:
|
|
3954
|
-
hasBorderRadius:
|
|
3955
|
-
borderRadius:
|
|
3956
|
-
disabled:
|
|
3957
|
-
fontFamily:
|
|
3958
|
-
fontSize:
|
|
3959
|
-
fontWeight:
|
|
3960
|
-
fontFamilyMsg:
|
|
3961
|
-
fontSizeMsg:
|
|
3962
|
-
fontWeightMsg:
|
|
3963
|
-
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,
|
|
3964
3962
|
inputWidth: ve,
|
|
3965
|
-
inputStyle:
|
|
3966
|
-
activeTextStyle:
|
|
3967
|
-
sizeMediaQuery:
|
|
3968
|
-
inputReadonly:
|
|
3969
|
-
blockPaste:
|
|
3963
|
+
inputStyle: pe,
|
|
3964
|
+
activeTextStyle: Ae,
|
|
3965
|
+
sizeMediaQuery: ze,
|
|
3966
|
+
inputReadonly: ie,
|
|
3967
|
+
blockPaste: Ke,
|
|
3970
3968
|
inputType: v,
|
|
3971
|
-
hasTrim:
|
|
3972
|
-
inputUppercase:
|
|
3973
|
-
inputName:
|
|
3974
|
-
inputText:
|
|
3975
|
-
min:
|
|
3976
|
-
max:
|
|
3977
|
-
step:
|
|
3969
|
+
hasTrim: X,
|
|
3970
|
+
inputUppercase: E,
|
|
3971
|
+
inputName: et,
|
|
3972
|
+
inputText: h,
|
|
3973
|
+
min: Ge,
|
|
3974
|
+
max: ge,
|
|
3975
|
+
step: pt,
|
|
3978
3976
|
hasSeconds: ht,
|
|
3979
3977
|
locale: ot,
|
|
3980
|
-
theme:
|
|
3981
|
-
allowRange:
|
|
3982
|
-
calendarZIndex:
|
|
3983
|
-
calendarWidth:
|
|
3978
|
+
theme: Ie,
|
|
3979
|
+
allowRange: $e,
|
|
3980
|
+
calendarZIndex: At,
|
|
3981
|
+
calendarWidth: gt,
|
|
3984
3982
|
blockClicksWithoutEvents: St,
|
|
3985
3983
|
tabindex: xt,
|
|
3986
3984
|
lightBgColor: Ct,
|
|
3987
|
-
lightBgColorFocus:
|
|
3988
|
-
lightDisabledBgColor:
|
|
3989
|
-
lightTextColor:
|
|
3990
|
-
darkBgColor:
|
|
3991
|
-
darkBgColorFocus:
|
|
3992
|
-
darkDisabledBgColor:
|
|
3993
|
-
darkTextColor:
|
|
3994
|
-
textAlign:
|
|
3995
|
-
showMsg:
|
|
3996
|
-
hasMsg:
|
|
3997
|
-
showLabel:
|
|
3998
|
-
label:
|
|
3999
|
-
labelBreakOnActive:
|
|
4000
|
-
labelBackground:
|
|
4001
|
-
labelPadding:
|
|
4002
|
-
labelBorderRadius:
|
|
4003
|
-
labelLeft:
|
|
4004
|
-
inputLabelMarginActive:
|
|
4005
|
-
labelActiveTop:
|
|
4006
|
-
labelActiveLeft:
|
|
4007
|
-
labelRight:
|
|
4008
|
-
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,
|
|
4009
4007
|
fontFamilyLabel: at,
|
|
4010
4008
|
fontSizeLabel: yt,
|
|
4011
|
-
fontSizeLabelActive:
|
|
4012
|
-
fontWeightLabel:
|
|
4009
|
+
fontSizeLabelActive: Tt,
|
|
4010
|
+
fontWeightLabel: rt,
|
|
4013
4011
|
lightTextColorLabel: bt,
|
|
4014
4012
|
lightTextColorLabelActive: lt,
|
|
4015
4013
|
darkTextColorLabel: Nt,
|
|
4016
|
-
darkTextColorLabelActive:
|
|
4017
|
-
required:
|
|
4018
|
-
} = 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(() => {
|
|
4019
4017
|
if (ht.value !== null)
|
|
4020
4018
|
return ht.value;
|
|
4021
4019
|
if (v.value === "time" || v.value === "datetime-local") {
|
|
@@ -4025,14 +4023,14 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4025
4023
|
let n = l;
|
|
4026
4024
|
return v.value === "datetime-local" && (n = l.split("T")[1] || "", n = n.split(/[Z+-]/)[0] || ""), n.split(":").length >= 3;
|
|
4027
4025
|
};
|
|
4028
|
-
if (t(L.value) || t(
|
|
4026
|
+
if (t(L.value) || t(h.value))
|
|
4029
4027
|
return !0;
|
|
4030
4028
|
}
|
|
4031
4029
|
return !1;
|
|
4032
|
-
}),
|
|
4030
|
+
}), $t = a(() => {
|
|
4033
4031
|
if (!L.value)
|
|
4034
4032
|
return null;
|
|
4035
|
-
if (
|
|
4033
|
+
if ($e.value && typeof L.value == "string" && L.value.startsWith("{"))
|
|
4036
4034
|
try {
|
|
4037
4035
|
const t = JSON.parse(L.value);
|
|
4038
4036
|
if (t && (t.startDate || t.endDate)) {
|
|
@@ -4040,8 +4038,8 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4040
4038
|
if (!n)
|
|
4041
4039
|
return null;
|
|
4042
4040
|
if (/^\d{4}-\d{2}-\d{2}$/.test(n)) {
|
|
4043
|
-
const [
|
|
4044
|
-
return new Date(
|
|
4041
|
+
const [u, s, d] = n.split("-").map(Number);
|
|
4042
|
+
return new Date(u, s - 1, d);
|
|
4045
4043
|
}
|
|
4046
4044
|
return new Date(n);
|
|
4047
4045
|
};
|
|
@@ -4057,23 +4055,23 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4057
4055
|
return new Date(t, l - 1, n);
|
|
4058
4056
|
}
|
|
4059
4057
|
return L.value;
|
|
4060
|
-
}),
|
|
4058
|
+
}), re = (t, l, n) => {
|
|
4061
4059
|
if (!t)
|
|
4062
4060
|
return "";
|
|
4063
|
-
const
|
|
4061
|
+
const u = n || ot.value;
|
|
4064
4062
|
if (l === "date") {
|
|
4065
|
-
if (
|
|
4063
|
+
if ($e.value && typeof t == "string" && t.startsWith("{"))
|
|
4066
4064
|
try {
|
|
4067
4065
|
const s = JSON.parse(t);
|
|
4068
4066
|
if (s && (s.startDate || s.endDate)) {
|
|
4069
|
-
const d = (
|
|
4070
|
-
if (!
|
|
4067
|
+
const d = (V) => {
|
|
4068
|
+
if (!V)
|
|
4071
4069
|
return "";
|
|
4072
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
4073
|
-
const [$, W,
|
|
4074
|
-
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}/${$}`;
|
|
4075
4073
|
}
|
|
4076
|
-
return
|
|
4074
|
+
return V;
|
|
4077
4075
|
}, f = d(s.startDate), p = d(s.endDate);
|
|
4078
4076
|
if (f && p)
|
|
4079
4077
|
return `${f} - ${p}`;
|
|
@@ -4087,31 +4085,31 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4087
4085
|
if (typeof t == "string") {
|
|
4088
4086
|
if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
4089
4087
|
const [d, f, p] = t.split("-");
|
|
4090
|
-
return
|
|
4088
|
+
return u === "pt-BR" ? `${p}/${f}/${d}` : `${f}/${p}/${d}`;
|
|
4091
4089
|
}
|
|
4092
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")) {
|
|
4093
4091
|
const d = new Date(t);
|
|
4094
4092
|
if (!isNaN(d.getTime())) {
|
|
4095
|
-
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"),
|
|
4096
|
-
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}`;
|
|
4097
4095
|
}
|
|
4098
4096
|
}
|
|
4099
4097
|
} else if (t instanceof Date && !isNaN(t.getTime())) {
|
|
4100
4098
|
const s = t.getFullYear(), d = String(t.getMonth() + 1).padStart(2, "0"), f = String(t.getDate()).padStart(2, "0");
|
|
4101
|
-
return
|
|
4099
|
+
return u === "pt-BR" ? `${f}/${d}/${s}` : `${d}/${f}/${s}`;
|
|
4102
4100
|
}
|
|
4103
4101
|
return "";
|
|
4104
4102
|
} else if (l === "datetime-local") {
|
|
4105
4103
|
if (typeof t == "string") {
|
|
4106
4104
|
if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/.test(t)) {
|
|
4107
|
-
const [d, f] = t.split("T"), [p,
|
|
4108
|
-
return
|
|
4105
|
+
const [d, f] = t.split("T"), [p, V, $] = d.split("-");
|
|
4106
|
+
return u === "pt-BR" ? `${$}/${V}/${p} ${f}` : `${V}/${$}/${p} ${f}`;
|
|
4109
4107
|
}
|
|
4110
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)) {
|
|
4111
4109
|
const d = new Date(t);
|
|
4112
4110
|
if (!isNaN(d.getTime())) {
|
|
4113
|
-
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"),
|
|
4114
|
-
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}`;
|
|
4115
4113
|
}
|
|
4116
4114
|
}
|
|
4117
4115
|
}
|
|
@@ -4126,118 +4124,118 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4126
4124
|
if (typeof t == "string" && /^\d{4}-W\d{2}$/i.test(t)) {
|
|
4127
4125
|
const s = t.match(/^(\d{4})-W(\d{2})$/i);
|
|
4128
4126
|
if (s)
|
|
4129
|
-
return
|
|
4127
|
+
return u === "pt-BR" ? `Semana ${s[2]} de ${s[1]}` : `Week ${s[2]} of ${s[1]}`;
|
|
4130
4128
|
}
|
|
4131
4129
|
return t;
|
|
4132
4130
|
}
|
|
4133
4131
|
return t;
|
|
4134
|
-
},
|
|
4132
|
+
}, it = (t, l, n) => {
|
|
4135
4133
|
if (!t || !t.trim())
|
|
4136
4134
|
return "";
|
|
4137
|
-
const
|
|
4135
|
+
const u = t.trim(), s = n || ot.value;
|
|
4138
4136
|
if (l === "date") {
|
|
4139
|
-
if (
|
|
4140
|
-
const d =
|
|
4137
|
+
if ($e.value && u.includes("-")) {
|
|
4138
|
+
const d = u.split(/\s*-\s*/).map(($) => $.trim()), f = ($) => {
|
|
4141
4139
|
if (!$)
|
|
4142
4140
|
return null;
|
|
4143
4141
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test($)) {
|
|
4144
4142
|
const W = $.split("/");
|
|
4145
4143
|
if (s === "pt-BR") {
|
|
4146
|
-
const [
|
|
4147
|
-
return `${
|
|
4144
|
+
const [Z, Ne, vt] = W, Oe = Z.padStart(2, "0"), Xe = Ne.padStart(2, "0");
|
|
4145
|
+
return `${vt}-${Xe}-${Oe}`;
|
|
4148
4146
|
} else {
|
|
4149
|
-
const [
|
|
4150
|
-
return `${
|
|
4147
|
+
const [Z, Ne, vt] = W, Oe = Ne.padStart(2, "0"), Xe = Z.padStart(2, "0");
|
|
4148
|
+
return `${vt}-${Xe}-${Oe}`;
|
|
4151
4149
|
}
|
|
4152
4150
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test($)) {
|
|
4153
|
-
const W = $.split("-"), [
|
|
4154
|
-
return `${
|
|
4151
|
+
const W = $.split("-"), [Z, Ne, vt] = W, Oe = vt.padStart(2, "0"), Xe = Ne.padStart(2, "0");
|
|
4152
|
+
return `${Z}-${Xe}-${Oe}`;
|
|
4155
4153
|
}
|
|
4156
4154
|
return null;
|
|
4157
4155
|
};
|
|
4158
|
-
let p = f(d[0]),
|
|
4159
|
-
if (p &&
|
|
4156
|
+
let p = f(d[0]), V = d[1] ? f(d[1]) : null;
|
|
4157
|
+
if (p && V) {
|
|
4160
4158
|
const $ = new Date(p);
|
|
4161
|
-
if (new Date(
|
|
4162
|
-
const
|
|
4163
|
-
p =
|
|
4159
|
+
if (new Date(V) < $) {
|
|
4160
|
+
const Z = p;
|
|
4161
|
+
p = V, V = Z;
|
|
4164
4162
|
}
|
|
4165
|
-
return JSON.stringify({ startDate: p, endDate:
|
|
4163
|
+
return JSON.stringify({ startDate: p, endDate: V });
|
|
4166
4164
|
} else if (p)
|
|
4167
4165
|
return JSON.stringify({ startDate: p, endDate: null });
|
|
4168
4166
|
return "";
|
|
4169
4167
|
}
|
|
4170
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(
|
|
4171
|
-
const d =
|
|
4168
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(u)) {
|
|
4169
|
+
const d = u.split("/");
|
|
4172
4170
|
if (s === "pt-BR") {
|
|
4173
|
-
const [f, p,
|
|
4174
|
-
return `${
|
|
4171
|
+
const [f, p, V] = d, $ = f.padStart(2, "0"), W = p.padStart(2, "0");
|
|
4172
|
+
return `${V}-${W}-${$}`;
|
|
4175
4173
|
} else {
|
|
4176
|
-
const [f, p,
|
|
4177
|
-
return `${
|
|
4174
|
+
const [f, p, V] = d, $ = p.padStart(2, "0"), W = f.padStart(2, "0");
|
|
4175
|
+
return `${V}-${W}-${$}`;
|
|
4178
4176
|
}
|
|
4179
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
4180
|
-
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");
|
|
4181
4179
|
return `${f}-${W}-${$}`;
|
|
4182
4180
|
}
|
|
4183
4181
|
return "";
|
|
4184
4182
|
} else if (l === "datetime-local") {
|
|
4185
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(
|
|
4186
|
-
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("/");
|
|
4187
4185
|
if (s === "pt-BR") {
|
|
4188
|
-
const [
|
|
4189
|
-
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}`;
|
|
4190
4188
|
} else {
|
|
4191
|
-
const [
|
|
4192
|
-
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}`;
|
|
4193
4191
|
}
|
|
4194
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(
|
|
4195
|
-
const [d, f] =
|
|
4196
|
-
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}`;
|
|
4197
4195
|
}
|
|
4198
4196
|
return "";
|
|
4199
4197
|
} else if (l === "month") {
|
|
4200
|
-
if (/^\d{1,2}\/\d{4}$/.test(
|
|
4201
|
-
const [d, f] =
|
|
4198
|
+
if (/^\d{1,2}\/\d{4}$/.test(u)) {
|
|
4199
|
+
const [d, f] = u.split("/"), p = d.padStart(2, "0");
|
|
4202
4200
|
return `${f}-${p}`;
|
|
4203
|
-
} else if (/^\d{4}-\d{1,2}$/.test(
|
|
4204
|
-
const [d, f] =
|
|
4201
|
+
} else if (/^\d{4}-\d{1,2}$/.test(u)) {
|
|
4202
|
+
const [d, f] = u.split("-"), p = f.padStart(2, "0");
|
|
4205
4203
|
return `${d}-${p}`;
|
|
4206
4204
|
}
|
|
4207
4205
|
return "";
|
|
4208
4206
|
} else if (l === "week") {
|
|
4209
|
-
if (/^\d{4}-W\d{2}$/i.test(
|
|
4210
|
-
return
|
|
4211
|
-
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);
|
|
4212
4210
|
if (d)
|
|
4213
4211
|
return `${d[2]}-W${d[1]}`;
|
|
4214
|
-
const f =
|
|
4212
|
+
const f = u.match(/week\s+W?(\d{2})\s+of\s+(\d{4})/i);
|
|
4215
4213
|
return f ? `${f[2]}-W${f[1]}` : "";
|
|
4216
4214
|
}
|
|
4217
|
-
return
|
|
4218
|
-
},
|
|
4219
|
-
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";
|
|
4220
4218
|
return {
|
|
4221
4219
|
disabled: t,
|
|
4222
4220
|
display: l,
|
|
4223
4221
|
font: p,
|
|
4224
|
-
fontSize:
|
|
4222
|
+
fontSize: V,
|
|
4225
4223
|
fontWeight: $,
|
|
4226
4224
|
fontFamilyMsg: W,
|
|
4227
|
-
fontSizeMsg:
|
|
4228
|
-
fontWeightMsg:
|
|
4229
|
-
textMessageColor:
|
|
4225
|
+
fontSizeMsg: Z,
|
|
4226
|
+
fontWeightMsg: Ne,
|
|
4227
|
+
textMessageColor: vt,
|
|
4230
4228
|
caretColor: n,
|
|
4231
|
-
selectionBgColor:
|
|
4229
|
+
selectionBgColor: u,
|
|
4232
4230
|
selectionTextColor: s,
|
|
4233
4231
|
hasBorderRadius: d,
|
|
4234
4232
|
borderRadius: f,
|
|
4235
4233
|
textAlign: Qa,
|
|
4236
|
-
inputWidth:
|
|
4237
|
-
activeTextStyle:
|
|
4234
|
+
inputWidth: Oe,
|
|
4235
|
+
activeTextStyle: Xe,
|
|
4238
4236
|
sizeMediaQuery: Ua,
|
|
4239
|
-
inputReadonly:
|
|
4240
|
-
inputType:
|
|
4237
|
+
inputReadonly: Ka,
|
|
4238
|
+
inputType: Ga,
|
|
4241
4239
|
inputUppercase: Za,
|
|
4242
4240
|
theme: Ja,
|
|
4243
4241
|
inputStyle: Xa,
|
|
@@ -4260,8 +4258,8 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4260
4258
|
lightTextColorLabelActive: Cl,
|
|
4261
4259
|
darkTextColorLabelActive: Vl
|
|
4262
4260
|
};
|
|
4263
|
-
}),
|
|
4264
|
-
const t =
|
|
4261
|
+
}), Bt = a(() => U.value.disabled), Dt = a(() => {
|
|
4262
|
+
const t = U.value, l = A.value;
|
|
4265
4263
|
return {
|
|
4266
4264
|
display: t.display,
|
|
4267
4265
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
@@ -4269,36 +4267,36 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4269
4267
|
paddingTop: "0px",
|
|
4270
4268
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
4271
4269
|
// Se não tem label ou está ativo, permite overflow visible para não cortar conteúdo
|
|
4272
|
-
overflow: !
|
|
4270
|
+
overflow: !We.value || l ? "visible" : "hidden"
|
|
4273
4271
|
};
|
|
4274
|
-
}),
|
|
4275
|
-
const t =
|
|
4272
|
+
}), st = a(() => {
|
|
4273
|
+
const t = U.value;
|
|
4276
4274
|
return t.fontSize ? t.fontSize : "1.4em";
|
|
4277
4275
|
}), N = a(() => {
|
|
4278
|
-
const t =
|
|
4276
|
+
const t = U.value, l = A.value;
|
|
4279
4277
|
return {
|
|
4280
4278
|
fontWeight: t.fontWeight,
|
|
4281
|
-
marginTop: l &&
|
|
4279
|
+
marginTop: l && We.value ? `${t.inputLabelMarginActive}px` : "0"
|
|
4282
4280
|
};
|
|
4283
4281
|
}), Ft = a(() => {
|
|
4284
|
-
const t =
|
|
4282
|
+
const t = U.value;
|
|
4285
4283
|
return t.inputStyle !== "line" && t.hasBorderRadius ? { borderRadius: `${t.borderRadius}rem` } : {};
|
|
4286
|
-
}), oa = a(() =>
|
|
4287
|
-
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;
|
|
4288
4286
|
return t.caretColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
4289
4287
|
}), Ut = a(() => {
|
|
4290
|
-
const t =
|
|
4288
|
+
const t = U.value;
|
|
4291
4289
|
return t.selectionBgColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
4292
4290
|
}), sa = a(() => {
|
|
4293
|
-
const t =
|
|
4291
|
+
const t = U.value;
|
|
4294
4292
|
return t.selectionTextColor || (t.theme === "dark" ? "#000000" : "#ffffff");
|
|
4295
|
-
}),
|
|
4296
|
-
const t =
|
|
4293
|
+
}), Kt = a(() => {
|
|
4294
|
+
const t = U.value;
|
|
4297
4295
|
return t.display === "block" ? { width: "100%" } : {
|
|
4298
4296
|
width: `${t.inputWidth}px`
|
|
4299
4297
|
};
|
|
4300
4298
|
}), da = a(() => {
|
|
4301
|
-
switch (
|
|
4299
|
+
switch (pe.value) {
|
|
4302
4300
|
case "line":
|
|
4303
4301
|
return "component__input--line";
|
|
4304
4302
|
case "border":
|
|
@@ -4307,7 +4305,7 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4307
4305
|
return "component__input--background";
|
|
4308
4306
|
}
|
|
4309
4307
|
}), ca = a(() => {
|
|
4310
|
-
switch (
|
|
4308
|
+
switch (U.value.activeTextStyle) {
|
|
4311
4309
|
case "italic":
|
|
4312
4310
|
return "component__input--active--italic";
|
|
4313
4311
|
case "oblique":
|
|
@@ -4316,38 +4314,38 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4316
4314
|
return "component__input--active--normal";
|
|
4317
4315
|
}
|
|
4318
4316
|
}), fa = a(() => "component__sm"), va = a(() => {
|
|
4319
|
-
switch (
|
|
4317
|
+
switch (U.value.theme) {
|
|
4320
4318
|
case "dark":
|
|
4321
4319
|
return "component__theme--dark";
|
|
4322
4320
|
default:
|
|
4323
4321
|
return "component__theme--light";
|
|
4324
4322
|
}
|
|
4325
|
-
}),
|
|
4326
|
-
a(() =>
|
|
4327
|
-
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(() => {
|
|
4328
4326
|
const t = {};
|
|
4329
|
-
|
|
4327
|
+
x.value && Object.keys(x.value).forEach((u) => t[`aria-${u}`] = x.value[u]);
|
|
4330
4328
|
const l = {
|
|
4331
4329
|
"aria-label": B.value,
|
|
4332
|
-
"aria-disabled":
|
|
4330
|
+
"aria-disabled": k.value,
|
|
4333
4331
|
...t
|
|
4334
4332
|
};
|
|
4335
4333
|
return Object.fromEntries(
|
|
4336
|
-
Object.entries(l).filter(([n,
|
|
4334
|
+
Object.entries(l).filter(([n, u]) => u != null)
|
|
4337
4335
|
);
|
|
4338
|
-
}),
|
|
4339
|
-
const t =
|
|
4336
|
+
}), S = a(() => {
|
|
4337
|
+
const t = Ie.value === "dark" ? Ze.value : Ct.value, l = Ie.value === "dark" ? w.value : tt.value;
|
|
4340
4338
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
4341
|
-
}),
|
|
4342
|
-
const t =
|
|
4339
|
+
}), Ve = a(() => {
|
|
4340
|
+
const t = Ie.value === "dark" ? He.value : we.value, l = Ie.value === "dark" ? w.value : tt.value;
|
|
4343
4341
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
4344
|
-
}),
|
|
4345
|
-
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;
|
|
4346
4344
|
return {
|
|
4347
4345
|
fontFamily: t.fontFamilyLabel,
|
|
4348
4346
|
fontSize: l ? t.fontSizeLabelActive : t.fontSizeLabel,
|
|
4349
4347
|
fontWeight: t.fontWeightLabel,
|
|
4350
|
-
color: t.theme === "dark" ?
|
|
4348
|
+
color: t.theme === "dark" ? u : n,
|
|
4351
4349
|
top: l ? `${t.labelActiveTop}px` : "50%",
|
|
4352
4350
|
left: l ? `${t.labelActiveLeft}px` : `${t.labelLeft}px`,
|
|
4353
4351
|
right: l ? `${t.labelActiveRight}px` : `${t.labelRight}px`,
|
|
@@ -4359,88 +4357,88 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4359
4357
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
4360
4358
|
...l ? {
|
|
4361
4359
|
width: "fit-content",
|
|
4362
|
-
whiteSpace:
|
|
4363
|
-
wordWrap:
|
|
4364
|
-
overflowWrap:
|
|
4360
|
+
whiteSpace: Ee.value ? "nowrap" : "normal",
|
|
4361
|
+
wordWrap: Ee.value ? "normal" : "break-word",
|
|
4362
|
+
overflowWrap: Ee.value ? "normal" : "break-word",
|
|
4365
4363
|
maxWidth: "100%",
|
|
4366
|
-
textOverflow:
|
|
4367
|
-
overflow:
|
|
4364
|
+
textOverflow: Ee.value ? "ellipsis" : "clip",
|
|
4365
|
+
overflow: Ee.value ? "hidden" : "visible"
|
|
4368
4366
|
} : {}
|
|
4369
4367
|
};
|
|
4370
4368
|
});
|
|
4371
4369
|
a(() => {
|
|
4372
|
-
const t =
|
|
4370
|
+
const t = U.value;
|
|
4373
4371
|
return t.theme === "dark" ? t.darkTextColorLabelActive : t.lightTextColorLabelActive;
|
|
4374
4372
|
});
|
|
4375
4373
|
const Zt = () => {
|
|
4376
|
-
L.value =
|
|
4374
|
+
L.value = h.value, j.value = v.value;
|
|
4377
4375
|
}, ga = (t) => {
|
|
4378
|
-
|
|
4376
|
+
T("clicked", t);
|
|
4379
4377
|
}, ya = (t) => {
|
|
4380
|
-
t.stopPropagation(), !(
|
|
4381
|
-
|
|
4378
|
+
t.stopPropagation(), !(k.value || U.value.inputReadonly) && _.value && (_.value.focus(), z.value && (ae.value = !1, requestAnimationFrame(() => {
|
|
4379
|
+
Rt(), ae.value = !0;
|
|
4382
4380
|
})));
|
|
4383
4381
|
}, ba = () => {
|
|
4384
|
-
|
|
4382
|
+
k.value || U.value.inputReadonly || !D.value || T("entered", L.value);
|
|
4385
4383
|
}, ma = async (t) => {
|
|
4386
4384
|
var n;
|
|
4387
4385
|
const l = ((n = t.clipboardData) == null ? void 0 : n.getData("text")) || "";
|
|
4388
|
-
|
|
4389
|
-
},
|
|
4390
|
-
|
|
4391
|
-
const t =
|
|
4392
|
-
|
|
4386
|
+
T("paste", l), Ke.value && t.preventDefault();
|
|
4387
|
+
}, Rt = () => {
|
|
4388
|
+
_.value && la(() => {
|
|
4389
|
+
const t = _.value.getBoundingClientRect(), l = 4;
|
|
4390
|
+
wt.value = {
|
|
4393
4391
|
top: `${t.bottom + l}px`,
|
|
4394
4392
|
left: `${t.left}px`
|
|
4395
4393
|
};
|
|
4396
4394
|
});
|
|
4397
4395
|
}, ha = a(() => ({
|
|
4398
4396
|
position: "fixed",
|
|
4399
|
-
top:
|
|
4400
|
-
left:
|
|
4401
|
-
zIndex:
|
|
4397
|
+
top: wt.value.top,
|
|
4398
|
+
left: wt.value.left,
|
|
4399
|
+
zIndex: At.value
|
|
4402
4400
|
})), Sa = () => {
|
|
4403
|
-
|
|
4404
|
-
|
|
4401
|
+
Re.value = !0, T("focused"), z.value && (ae.value = !1, requestAnimationFrame(() => {
|
|
4402
|
+
Rt(), ae.value = !0;
|
|
4405
4403
|
}));
|
|
4406
4404
|
}, xa = (t) => {
|
|
4407
|
-
t.relatedTarget &&
|
|
4408
|
-
var
|
|
4405
|
+
t.relatedTarget && Y.value && Y.value.contains(t.relatedTarget) || setTimeout(() => {
|
|
4406
|
+
var u;
|
|
4409
4407
|
const l = document.activeElement;
|
|
4410
|
-
if (
|
|
4411
|
-
if (
|
|
4408
|
+
if (ae.value) {
|
|
4409
|
+
if (Y.value && Y.value.contains(l) || t.relatedTarget && Y.value && Y.value.contains(t.relatedTarget))
|
|
4412
4410
|
return;
|
|
4413
|
-
if (l === document.body &&
|
|
4414
|
-
const s =
|
|
4411
|
+
if (l === document.body && Y.value) {
|
|
4412
|
+
const s = Y.value.querySelectorAll('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
4415
4413
|
if (Array.from(s).some((f) => f === document.activeElement || f.contains(document.activeElement)))
|
|
4416
4414
|
return;
|
|
4417
4415
|
}
|
|
4418
4416
|
}
|
|
4419
|
-
const n = (
|
|
4420
|
-
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"));
|
|
4421
4419
|
}, 200);
|
|
4422
4420
|
}, Ca = () => {
|
|
4423
|
-
z.value && (
|
|
4424
|
-
|
|
4421
|
+
z.value && (ae.value, ae.value = !1, requestAnimationFrame(() => {
|
|
4422
|
+
Rt(), ae.value = !0;
|
|
4425
4423
|
}));
|
|
4426
|
-
},
|
|
4424
|
+
}, ct = (t) => {
|
|
4427
4425
|
if (!t || !(t instanceof Date))
|
|
4428
4426
|
return null;
|
|
4429
|
-
const l = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"),
|
|
4430
|
-
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}`;
|
|
4431
4429
|
}, _t = (t) => {
|
|
4432
4430
|
if (t == null || t === "")
|
|
4433
4431
|
return "";
|
|
4434
4432
|
if (t instanceof Date)
|
|
4435
|
-
return isNaN(t.getTime()) ? "" :
|
|
4433
|
+
return isNaN(t.getTime()) ? "" : ct(t);
|
|
4436
4434
|
if (typeof t == "string") {
|
|
4437
4435
|
if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
4438
|
-
const [n,
|
|
4439
|
-
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 : "";
|
|
4440
4438
|
}
|
|
4441
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)) {
|
|
4442
4440
|
const n = new Date(t);
|
|
4443
|
-
return isNaN(n.getTime()) ? "" :
|
|
4441
|
+
return isNaN(n.getTime()) ? "" : ct(n);
|
|
4444
4442
|
}
|
|
4445
4443
|
}
|
|
4446
4444
|
return "";
|
|
@@ -4453,7 +4451,7 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4453
4451
|
}
|
|
4454
4452
|
if (typeof t == "string") {
|
|
4455
4453
|
if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
4456
|
-
const [n,
|
|
4454
|
+
const [n, u, s] = t.split("-").map(Number), d = new Date(n, u - 1, s);
|
|
4457
4455
|
return d.setHours(0, 0, 0, 0), d;
|
|
4458
4456
|
}
|
|
4459
4457
|
const l = new Date(t);
|
|
@@ -4465,9 +4463,9 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4465
4463
|
if (!t)
|
|
4466
4464
|
return null;
|
|
4467
4465
|
if (t instanceof Date && !isNaN(t.getTime())) {
|
|
4468
|
-
const l = t.getHours(), n = t.getMinutes(),
|
|
4469
|
-
if (l >= 0 && l <= 23 && n >= 0 && n <= 59 &&
|
|
4470
|
-
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 };
|
|
4471
4469
|
}
|
|
4472
4470
|
if (typeof t == "string") {
|
|
4473
4471
|
let l = t;
|
|
@@ -4475,9 +4473,9 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4475
4473
|
const s = t.split("T");
|
|
4476
4474
|
s.length === 2 && (l = s[1]);
|
|
4477
4475
|
}
|
|
4478
|
-
const n = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/,
|
|
4479
|
-
if (
|
|
4480
|
-
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;
|
|
4481
4479
|
if (s >= 0 && s <= 23 && d >= 0 && d <= 59 && f >= 0 && f <= 59)
|
|
4482
4480
|
return { hour: s, minute: d, second: f };
|
|
4483
4481
|
}
|
|
@@ -4499,235 +4497,235 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4499
4497
|
return !0;
|
|
4500
4498
|
if (!l || isNaN(l.getTime()))
|
|
4501
4499
|
return !0;
|
|
4502
|
-
const n = Jt(
|
|
4500
|
+
const n = Jt(Ge.value);
|
|
4503
4501
|
if (n) {
|
|
4504
4502
|
const s = new Date(n.getTime());
|
|
4505
4503
|
if (s.setHours(0, 0, 0, 0), l < s)
|
|
4506
4504
|
return !0;
|
|
4507
4505
|
}
|
|
4508
|
-
const
|
|
4509
|
-
if (
|
|
4510
|
-
const s = new Date(
|
|
4506
|
+
const u = Jt(ge.value);
|
|
4507
|
+
if (u) {
|
|
4508
|
+
const s = new Date(u.getTime());
|
|
4511
4509
|
if (s.setHours(0, 0, 0, 0), l > s)
|
|
4512
4510
|
return !0;
|
|
4513
4511
|
}
|
|
4514
4512
|
return !1;
|
|
4515
4513
|
}, Xt = (t, l, n = 0) => {
|
|
4516
|
-
const
|
|
4514
|
+
const u = t * 3600 + l * 60 + n, s = Qt(Ge.value);
|
|
4517
4515
|
if (s) {
|
|
4518
4516
|
const f = s.hour * 3600 + s.minute * 60 + (s.second || 0);
|
|
4519
|
-
if (
|
|
4517
|
+
if (u < f)
|
|
4520
4518
|
return !0;
|
|
4521
4519
|
}
|
|
4522
|
-
const d = Qt(
|
|
4520
|
+
const d = Qt(ge.value);
|
|
4523
4521
|
if (d) {
|
|
4524
4522
|
const f = d.hour * 3600 + d.minute * 60 + (d.second || 0);
|
|
4525
|
-
if (
|
|
4523
|
+
if (u > f)
|
|
4526
4524
|
return !0;
|
|
4527
4525
|
}
|
|
4528
4526
|
return !1;
|
|
4529
|
-
},
|
|
4527
|
+
}, ft = (t, l) => {
|
|
4530
4528
|
if (!t || t === "")
|
|
4531
4529
|
return !0;
|
|
4532
4530
|
if (l === "date") {
|
|
4533
4531
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(t))
|
|
4534
4532
|
return !1;
|
|
4535
|
-
const [n,
|
|
4536
|
-
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;
|
|
4537
4535
|
} else if (l === "time") {
|
|
4538
|
-
const n = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/,
|
|
4539
|
-
if (!
|
|
4536
|
+
const n = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, u = t.match(n);
|
|
4537
|
+
if (!u)
|
|
4540
4538
|
return !1;
|
|
4541
|
-
const s = parseInt(
|
|
4539
|
+
const s = parseInt(u[1], 10), d = parseInt(u[2], 10), f = u[3] ? parseInt(u[3], 10) : 0;
|
|
4542
4540
|
return s >= 0 && s <= 23 && d >= 0 && d <= 59 && f >= 0 && f <= 59;
|
|
4543
4541
|
} else if (l === "datetime-local") {
|
|
4544
4542
|
const n = t.split("T");
|
|
4545
4543
|
if (n.length !== 2)
|
|
4546
4544
|
return !1;
|
|
4547
|
-
const
|
|
4548
|
-
return
|
|
4545
|
+
const u = n[0], s = n[1];
|
|
4546
|
+
return ft(u, "date") && ft(s, "time");
|
|
4549
4547
|
} else if (l === "month") {
|
|
4550
4548
|
if (!/^\d{4}-\d{2}$/.test(t))
|
|
4551
4549
|
return !1;
|
|
4552
|
-
const [n,
|
|
4553
|
-
return n >= 1900 && n <= 2100 &&
|
|
4550
|
+
const [n, u] = t.split("-").map(Number);
|
|
4551
|
+
return n >= 1900 && n <= 2100 && u >= 1 && u <= 12;
|
|
4554
4552
|
} else if (l === "week") {
|
|
4555
4553
|
if (!/^\d{4}-W\d{2}$/.test(t))
|
|
4556
4554
|
return !1;
|
|
4557
|
-
const [n,
|
|
4558
|
-
return n >= 1900 && n <= 2100 &&
|
|
4555
|
+
const [n, u] = t.split("-W").map(Number);
|
|
4556
|
+
return n >= 1900 && n <= 2100 && u >= 1 && u <= 53;
|
|
4559
4557
|
}
|
|
4560
4558
|
return !1;
|
|
4561
|
-
},
|
|
4559
|
+
}, Lt = () => {
|
|
4562
4560
|
let t = !0;
|
|
4563
|
-
if (
|
|
4564
|
-
t = !
|
|
4561
|
+
if (h.value === null || h.value === void 0 || h.value === "") {
|
|
4562
|
+
t = !kt.value, T("valid", t);
|
|
4565
4563
|
return;
|
|
4566
4564
|
}
|
|
4567
4565
|
if (v.value === "date") {
|
|
4568
|
-
const n = _t(
|
|
4569
|
-
if (n === "" &&
|
|
4570
|
-
|
|
4566
|
+
const n = _t(h.value);
|
|
4567
|
+
if (n === "" && h.value !== "" && h.value !== null && h.value !== void 0) {
|
|
4568
|
+
T("valid", !1);
|
|
4571
4569
|
return;
|
|
4572
4570
|
}
|
|
4573
4571
|
if (n === "") {
|
|
4574
|
-
|
|
4572
|
+
T("valid", !0);
|
|
4575
4573
|
return;
|
|
4576
4574
|
}
|
|
4577
|
-
if (!
|
|
4578
|
-
|
|
4575
|
+
if (!ft(n, v.value)) {
|
|
4576
|
+
T("valid", !1);
|
|
4579
4577
|
return;
|
|
4580
4578
|
}
|
|
4581
4579
|
t = !Ht(n);
|
|
4582
4580
|
} else if (v.value === "time") {
|
|
4583
|
-
if (!
|
|
4584
|
-
|
|
4581
|
+
if (!ft(h.value, v.value)) {
|
|
4582
|
+
T("valid", !1);
|
|
4585
4583
|
return;
|
|
4586
4584
|
}
|
|
4587
|
-
const n =
|
|
4585
|
+
const n = h.value.split(":");
|
|
4588
4586
|
if (n.length >= 2) {
|
|
4589
|
-
const
|
|
4590
|
-
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);
|
|
4591
4589
|
}
|
|
4592
4590
|
} else if (v.value === "datetime-local") {
|
|
4593
|
-
if (
|
|
4594
|
-
const n = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/,
|
|
4595
|
-
if (!n.test(
|
|
4596
|
-
|
|
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);
|
|
4597
4595
|
return;
|
|
4598
4596
|
}
|
|
4599
|
-
if (
|
|
4600
|
-
const s = new Date(
|
|
4597
|
+
if (u.test(h.value)) {
|
|
4598
|
+
const s = new Date(h.value);
|
|
4601
4599
|
if (isNaN(s.getTime())) {
|
|
4602
|
-
|
|
4600
|
+
T("valid", !1);
|
|
4603
4601
|
return;
|
|
4604
4602
|
}
|
|
4605
4603
|
}
|
|
4606
|
-
} else if (
|
|
4607
|
-
|
|
4604
|
+
} else if (h.value !== null && h.value !== void 0 && h.value !== "") {
|
|
4605
|
+
T("valid", !1);
|
|
4608
4606
|
return;
|
|
4609
4607
|
}
|
|
4610
4608
|
if (L.value) {
|
|
4611
4609
|
const n = L.value.split("T");
|
|
4612
4610
|
if (n.length === 2) {
|
|
4613
|
-
const
|
|
4611
|
+
const u = n[0], s = n[1], d = !Ht(u), f = s.split(":");
|
|
4614
4612
|
let p = !0;
|
|
4615
4613
|
if (f.length >= 2) {
|
|
4616
|
-
const
|
|
4617
|
-
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);
|
|
4618
4616
|
}
|
|
4619
4617
|
t = d && p;
|
|
4620
4618
|
}
|
|
4621
4619
|
}
|
|
4622
4620
|
} else if (v.value === "month") {
|
|
4623
|
-
if (!
|
|
4624
|
-
|
|
4621
|
+
if (!ft(h.value, v.value)) {
|
|
4622
|
+
T("valid", !1);
|
|
4625
4623
|
return;
|
|
4626
4624
|
}
|
|
4627
|
-
t = !Ht(
|
|
4625
|
+
t = !Ht(h.value + "-01");
|
|
4628
4626
|
} else if (v.value === "week") {
|
|
4629
|
-
if (!
|
|
4630
|
-
|
|
4627
|
+
if (!ft(h.value, v.value)) {
|
|
4628
|
+
T("valid", !1);
|
|
4631
4629
|
return;
|
|
4632
4630
|
}
|
|
4633
4631
|
t = !0;
|
|
4634
4632
|
}
|
|
4635
|
-
|
|
4633
|
+
T("valid", t);
|
|
4636
4634
|
}, Va = (t) => {
|
|
4637
|
-
|
|
4635
|
+
T("valid", t);
|
|
4638
4636
|
}, Ta = (t) => {
|
|
4639
|
-
|
|
4637
|
+
T("month-changed", t);
|
|
4640
4638
|
}, ea = (t, l) => {
|
|
4641
4639
|
if (!t || !(t instanceof Date))
|
|
4642
4640
|
return t || "";
|
|
4643
4641
|
if (l === "date")
|
|
4644
|
-
return
|
|
4642
|
+
return ct(t);
|
|
4645
4643
|
if (l === "time") {
|
|
4646
|
-
const n = String(t.getHours()).padStart(2, "0"),
|
|
4647
|
-
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}`;
|
|
4648
4646
|
} else if (l === "datetime-local") {
|
|
4649
|
-
const n =
|
|
4650
|
-
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}`;
|
|
4651
4649
|
} else if (l === "month") {
|
|
4652
|
-
const n = t.getFullYear(),
|
|
4653
|
-
return `${n}-${
|
|
4650
|
+
const n = t.getFullYear(), u = String(t.getMonth() + 1).padStart(2, "0");
|
|
4651
|
+
return `${n}-${u}`;
|
|
4654
4652
|
} else if (l === "week")
|
|
4655
|
-
return
|
|
4653
|
+
return ct(t);
|
|
4656
4654
|
return "";
|
|
4657
4655
|
}, ka = a(() => {
|
|
4658
4656
|
if (!z.value)
|
|
4659
|
-
return ea(
|
|
4657
|
+
return ea(Ge.value, v.value);
|
|
4660
4658
|
}), o = a(() => {
|
|
4661
4659
|
if (!z.value)
|
|
4662
|
-
return ea(
|
|
4663
|
-
}),
|
|
4660
|
+
return ea(ge.value, v.value);
|
|
4661
|
+
}), y = a(() => !0), Te = (t) => {
|
|
4664
4662
|
let l = "";
|
|
4665
4663
|
if (!t)
|
|
4666
4664
|
l = "";
|
|
4667
|
-
else if (
|
|
4665
|
+
else if ($e.value && typeof t == "object" && !(t instanceof Date)) {
|
|
4668
4666
|
if (t.startDate === null && t.endDate === null)
|
|
4669
4667
|
l = "";
|
|
4670
4668
|
else if (t.startDate || t.endDate) {
|
|
4671
|
-
const
|
|
4669
|
+
const u = {
|
|
4672
4670
|
// Converter startDate para string ISO se existir
|
|
4673
|
-
startDate: t.startDate ?
|
|
4671
|
+
startDate: t.startDate ? ct(t.startDate) : null,
|
|
4674
4672
|
// Converter endDate para string ISO se existir
|
|
4675
|
-
endDate: t.endDate ?
|
|
4673
|
+
endDate: t.endDate ? ct(t.endDate) : null
|
|
4676
4674
|
};
|
|
4677
|
-
l = JSON.stringify(
|
|
4675
|
+
l = JSON.stringify(u);
|
|
4678
4676
|
}
|
|
4679
4677
|
} else
|
|
4680
|
-
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 : "");
|
|
4681
4679
|
mt = !0, L.value = l;
|
|
4682
|
-
const n = l ?
|
|
4683
|
-
|
|
4680
|
+
const n = l ? re(l, v.value) : "";
|
|
4681
|
+
O.value = n, G.value = n;
|
|
4684
4682
|
}, nt = () => {
|
|
4685
4683
|
if (!z.value) {
|
|
4686
|
-
L.value =
|
|
4684
|
+
L.value = O.value;
|
|
4687
4685
|
return;
|
|
4688
4686
|
}
|
|
4689
|
-
|
|
4690
|
-
const t =
|
|
4691
|
-
start:
|
|
4692
|
-
end:
|
|
4693
|
-
} : null, l =
|
|
4687
|
+
De = !0;
|
|
4688
|
+
const t = _.value ? {
|
|
4689
|
+
start: _.value.selectionStart,
|
|
4690
|
+
end: _.value.selectionEnd
|
|
4691
|
+
} : null, l = O.value.trim();
|
|
4694
4692
|
if (!l || l.length === 0) {
|
|
4695
|
-
mt = !0, L.value = "",
|
|
4696
|
-
|
|
4693
|
+
mt = !0, L.value = "", O.value = "", G.value = "", setTimeout(() => {
|
|
4694
|
+
De = !1;
|
|
4697
4695
|
}, 50);
|
|
4698
4696
|
return;
|
|
4699
4697
|
}
|
|
4700
4698
|
if (v.value === "date") {
|
|
4701
|
-
const
|
|
4702
|
-
if (
|
|
4703
|
-
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/), l.length > 23 && !
|
|
4704
|
-
|
|
4705
|
-
const s = Math.min(t.start,
|
|
4706
|
-
|
|
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);
|
|
4707
4705
|
}), setTimeout(() => {
|
|
4708
|
-
|
|
4706
|
+
De = !1;
|
|
4709
4707
|
}, 50);
|
|
4710
4708
|
return;
|
|
4711
4709
|
}
|
|
4712
|
-
if (!
|
|
4710
|
+
if (!u.test(l) && l.length <= 23) {
|
|
4713
4711
|
setTimeout(() => {
|
|
4714
|
-
|
|
4712
|
+
De = !1;
|
|
4715
4713
|
}, 50);
|
|
4716
4714
|
return;
|
|
4717
4715
|
}
|
|
4718
4716
|
} else {
|
|
4719
|
-
if (l.length > 10 && !
|
|
4720
|
-
|
|
4721
|
-
const s = Math.min(t.start,
|
|
4722
|
-
|
|
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);
|
|
4723
4721
|
}), setTimeout(() => {
|
|
4724
|
-
|
|
4722
|
+
De = !1;
|
|
4725
4723
|
}, 50);
|
|
4726
4724
|
return;
|
|
4727
4725
|
}
|
|
4728
|
-
if (!
|
|
4726
|
+
if (!u.test(l) && l.length <= 10) {
|
|
4729
4727
|
setTimeout(() => {
|
|
4730
|
-
|
|
4728
|
+
De = !1;
|
|
4731
4729
|
}, 50);
|
|
4732
4730
|
return;
|
|
4733
4731
|
}
|
|
@@ -4735,163 +4733,163 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4735
4733
|
}
|
|
4736
4734
|
let n = null;
|
|
4737
4735
|
if (v.value === "date")
|
|
4738
|
-
if (
|
|
4736
|
+
if ($e.value)
|
|
4739
4737
|
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/))
|
|
4740
|
-
if (n =
|
|
4741
|
-
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;
|
|
4742
4740
|
else {
|
|
4743
4741
|
setTimeout(() => {
|
|
4744
|
-
|
|
4742
|
+
De = !1;
|
|
4745
4743
|
}, 50);
|
|
4746
4744
|
return;
|
|
4747
4745
|
}
|
|
4748
4746
|
else if (l.includes("-")) {
|
|
4749
4747
|
const s = l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*$/);
|
|
4750
4748
|
if (s) {
|
|
4751
|
-
const d = s[1], f =
|
|
4749
|
+
const d = s[1], f = it(d, v.value);
|
|
4752
4750
|
if (f) {
|
|
4753
4751
|
const p = JSON.stringify({ startDate: f, endDate: null });
|
|
4754
|
-
p !== L.value && (mt = !0, L.value = p,
|
|
4752
|
+
p !== L.value && (mt = !0, L.value = p, G.value = l);
|
|
4755
4753
|
} else {
|
|
4756
|
-
|
|
4757
|
-
|
|
4754
|
+
G.value = l, setTimeout(() => {
|
|
4755
|
+
De = !1;
|
|
4758
4756
|
}, 50);
|
|
4759
4757
|
return;
|
|
4760
4758
|
}
|
|
4761
4759
|
} else {
|
|
4762
|
-
|
|
4763
|
-
|
|
4760
|
+
G.value = l, setTimeout(() => {
|
|
4761
|
+
De = !1;
|
|
4764
4762
|
}, 50);
|
|
4765
4763
|
return;
|
|
4766
4764
|
}
|
|
4767
4765
|
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
4768
|
-
if (n =
|
|
4766
|
+
if (n = it(l, v.value), n) {
|
|
4769
4767
|
const d = JSON.stringify({ startDate: n, endDate: null });
|
|
4770
|
-
d !== L.value && (mt = !0, L.value = d,
|
|
4768
|
+
d !== L.value && (mt = !0, L.value = d, G.value = l);
|
|
4771
4769
|
} else {
|
|
4772
|
-
|
|
4773
|
-
|
|
4770
|
+
G.value = l, setTimeout(() => {
|
|
4771
|
+
De = !1;
|
|
4774
4772
|
}, 50);
|
|
4775
4773
|
return;
|
|
4776
4774
|
}
|
|
4777
4775
|
else {
|
|
4778
|
-
|
|
4779
|
-
|
|
4776
|
+
G.value = l, setTimeout(() => {
|
|
4777
|
+
De = !1;
|
|
4780
4778
|
}, 50);
|
|
4781
4779
|
return;
|
|
4782
4780
|
}
|
|
4783
4781
|
else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
4784
|
-
n =
|
|
4782
|
+
n = it(l, v.value), n && n !== L.value && (mt = !0, L.value = n, G.value = l);
|
|
4785
4783
|
else {
|
|
4786
4784
|
setTimeout(() => {
|
|
4787
|
-
|
|
4785
|
+
De = !1;
|
|
4788
4786
|
}, 50);
|
|
4789
4787
|
return;
|
|
4790
4788
|
}
|
|
4791
4789
|
else
|
|
4792
|
-
n =
|
|
4790
|
+
n = it(l, v.value), n && n !== L.value && (mt = !0, L.value = n, G.value = l);
|
|
4793
4791
|
setTimeout(() => {
|
|
4794
|
-
|
|
4792
|
+
De = !1;
|
|
4795
4793
|
}, 50);
|
|
4796
4794
|
}, Ba = (t) => {
|
|
4797
|
-
|
|
4795
|
+
T("changed-complete", t), T("current-value-complete", t);
|
|
4798
4796
|
}, ta = (t) => {
|
|
4799
4797
|
var s;
|
|
4800
|
-
if (!
|
|
4798
|
+
if (!ae.value || !Y.value || !_.value)
|
|
4801
4799
|
return;
|
|
4802
|
-
const l = t.target, n = (s =
|
|
4803
|
-
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))
|
|
4804
4802
|
return;
|
|
4805
|
-
let
|
|
4806
|
-
for (;
|
|
4807
|
-
if (
|
|
4803
|
+
let u = l;
|
|
4804
|
+
for (; u && u !== document.body; ) {
|
|
4805
|
+
if (u === Y.value || Y.value && Y.value.contains(u))
|
|
4808
4806
|
return;
|
|
4809
|
-
|
|
4807
|
+
u = u.parentElement;
|
|
4810
4808
|
}
|
|
4811
4809
|
setTimeout(() => {
|
|
4812
|
-
if (!
|
|
4810
|
+
if (!ae.value || !Y.value || Y.value && Y.value.contains(l))
|
|
4813
4811
|
return;
|
|
4814
|
-
for (
|
|
4815
|
-
if (
|
|
4812
|
+
for (u = l; u && u !== document.body; ) {
|
|
4813
|
+
if (u === Y.value || Y.value && Y.value.contains(u))
|
|
4816
4814
|
return;
|
|
4817
|
-
|
|
4815
|
+
u = u.parentElement;
|
|
4818
4816
|
}
|
|
4819
4817
|
if (!document.body.contains(l))
|
|
4820
4818
|
return;
|
|
4821
|
-
const d =
|
|
4822
|
-
!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));
|
|
4823
4821
|
}, 50);
|
|
4824
4822
|
}, wa = () => {
|
|
4825
|
-
|
|
4823
|
+
ae.value && z.value && Rt();
|
|
4826
4824
|
}, Da = () => {
|
|
4827
|
-
|
|
4825
|
+
ae.value && z.value && (ae.value = !1);
|
|
4828
4826
|
};
|
|
4829
4827
|
let It = null, aa = null, qt = { top: 0, left: 0 };
|
|
4830
4828
|
const Ra = () => {
|
|
4831
|
-
if (!
|
|
4829
|
+
if (!ae.value || !z.value || !_.value)
|
|
4832
4830
|
return;
|
|
4833
|
-
const t = 4, l =
|
|
4834
|
-
(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 = {
|
|
4835
4833
|
top: n,
|
|
4836
|
-
left:
|
|
4834
|
+
left: u
|
|
4837
4835
|
}), aa = requestAnimationFrame(Ra);
|
|
4838
4836
|
}, _a = () => {
|
|
4839
|
-
if (!
|
|
4837
|
+
if (!_.value || !z.value)
|
|
4840
4838
|
return;
|
|
4841
4839
|
qt = { top: 0, left: 0 }, Ra(), It = new ResizeObserver(() => {
|
|
4842
|
-
|
|
4843
|
-
}), It.observe(
|
|
4844
|
-
const t =
|
|
4840
|
+
ae.value && Rt();
|
|
4841
|
+
}), It.observe(_.value);
|
|
4842
|
+
const t = _.value.closest(".component");
|
|
4845
4843
|
t && It.observe(t);
|
|
4846
4844
|
}, Ma = () => {
|
|
4847
4845
|
aa !== null && (cancelAnimationFrame(aa), aa = null), It && (It.disconnect(), It = null);
|
|
4848
4846
|
};
|
|
4849
|
-
|
|
4847
|
+
ne(ae, (t) => {
|
|
4850
4848
|
t && z.value ? la(() => {
|
|
4851
4849
|
_a();
|
|
4852
4850
|
}) : Ma();
|
|
4853
4851
|
}), Aa(() => {
|
|
4854
4852
|
var l;
|
|
4855
|
-
let t =
|
|
4853
|
+
let t = h.value;
|
|
4856
4854
|
if (v.value === "date")
|
|
4857
|
-
t = _t(
|
|
4855
|
+
t = _t(h.value);
|
|
4858
4856
|
else if (v.value === "datetime-local")
|
|
4859
|
-
if (
|
|
4857
|
+
if (h.value === null || h.value === void 0 || h.value === "")
|
|
4860
4858
|
t = "";
|
|
4861
|
-
else if (typeof
|
|
4862
|
-
const n = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/,
|
|
4863
|
-
if (n.test(
|
|
4864
|
-
t =
|
|
4865
|
-
else if (
|
|
4866
|
-
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);
|
|
4867
4865
|
if (isNaN(s.getTime()))
|
|
4868
4866
|
t = "";
|
|
4869
4867
|
else {
|
|
4870
|
-
const d = s.getFullYear(), f = String(s.getMonth() + 1).padStart(2, "0"), p = String(s.getDate()).padStart(2, "0"),
|
|
4871
|
-
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}:${$}`;
|
|
4872
4870
|
}
|
|
4873
4871
|
} else
|
|
4874
4872
|
t = "";
|
|
4875
4873
|
} else
|
|
4876
4874
|
t = "";
|
|
4877
|
-
L.value = t,
|
|
4878
|
-
|
|
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();
|
|
4879
4877
|
});
|
|
4880
4878
|
}), Ya(() => {
|
|
4881
4879
|
Zt(), Ma(), document.removeEventListener("click", ta), window.removeEventListener("scroll", wa, { capture: !0, passive: !0 }), window.removeEventListener("resize", Da);
|
|
4882
|
-
}),
|
|
4883
|
-
|
|
4884
|
-
}, { immediate: !0 }),
|
|
4885
|
-
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));
|
|
4886
4884
|
});
|
|
4887
4885
|
const Ha = (t) => gn(t, {
|
|
4888
4886
|
inputType: v.value,
|
|
4889
|
-
hasSeconds:
|
|
4890
|
-
allowRange:
|
|
4891
|
-
timezoneFormat:
|
|
4892
|
-
locale:
|
|
4887
|
+
hasSeconds: I.hasSeconds,
|
|
4888
|
+
allowRange: $e.value,
|
|
4889
|
+
timezoneFormat: I.calendarIsoStringTimezoneFormat,
|
|
4890
|
+
locale: I.calendarLocale
|
|
4893
4891
|
});
|
|
4894
|
-
|
|
4892
|
+
ne(h, (t) => {
|
|
4895
4893
|
var l;
|
|
4896
4894
|
if (t !== L.value) {
|
|
4897
4895
|
let n = t;
|
|
@@ -4909,37 +4907,37 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4909
4907
|
if (isNaN(p.getTime()))
|
|
4910
4908
|
n = "";
|
|
4911
4909
|
else {
|
|
4912
|
-
const
|
|
4913
|
-
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}`;
|
|
4914
4912
|
}
|
|
4915
4913
|
} else
|
|
4916
4914
|
n = "";
|
|
4917
4915
|
} else
|
|
4918
4916
|
n = "";
|
|
4919
4917
|
L.value = n;
|
|
4920
|
-
const
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
}),
|
|
4918
|
+
const u = re(t, v.value);
|
|
4919
|
+
O.value = u, la(() => {
|
|
4920
|
+
Lt();
|
|
4921
|
+
}), G.value = u;
|
|
4924
4922
|
const s = Ha(n);
|
|
4925
|
-
s && (
|
|
4923
|
+
s && (T("changed-complete", s), T("current-value-complete", s));
|
|
4926
4924
|
}
|
|
4927
4925
|
}, { immediate: !0 });
|
|
4928
|
-
let
|
|
4926
|
+
let De = !1;
|
|
4929
4927
|
const qa = () => {
|
|
4930
|
-
|
|
4931
|
-
|
|
4928
|
+
De = !0, setTimeout(() => {
|
|
4929
|
+
De = !1;
|
|
4932
4930
|
}, 100);
|
|
4933
4931
|
};
|
|
4934
4932
|
let mt = !1;
|
|
4935
|
-
return
|
|
4936
|
-
if (z.value && !mt &&
|
|
4937
|
-
const l =
|
|
4938
|
-
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);
|
|
4939
4937
|
}
|
|
4940
4938
|
mt = !1;
|
|
4941
|
-
}),
|
|
4942
|
-
if (
|
|
4939
|
+
}), ne(L, (t) => {
|
|
4940
|
+
if (X.value && (t = t.trim()), $e.value && typeof t == "string" && t.startsWith("{"))
|
|
4943
4941
|
try {
|
|
4944
4942
|
const l = JSON.parse(t);
|
|
4945
4943
|
if (l && (l.startDate || l.endDate)) {
|
|
@@ -4947,118 +4945,118 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
4947
4945
|
if (!d)
|
|
4948
4946
|
return null;
|
|
4949
4947
|
if (/^\d{4}-\d{2}-\d{2}$/.test(d)) {
|
|
4950
|
-
const [f, p,
|
|
4951
|
-
return new Date(f, p - 1,
|
|
4948
|
+
const [f, p, V] = d.split("-").map(Number);
|
|
4949
|
+
return new Date(f, p - 1, V);
|
|
4952
4950
|
}
|
|
4953
4951
|
return new Date(d);
|
|
4954
|
-
},
|
|
4955
|
-
|
|
4952
|
+
}, u = l.startDate ? n(l.startDate) : null, s = l.endDate ? n(l.endDate) : null;
|
|
4953
|
+
T("changed", { startDate: u, endDate: s });
|
|
4956
4954
|
return;
|
|
4957
4955
|
}
|
|
4958
4956
|
} catch {
|
|
4959
4957
|
}
|
|
4960
|
-
|
|
4961
|
-
}),
|
|
4962
|
-
|
|
4963
|
-
}),
|
|
4964
|
-
|
|
4965
|
-
|
|
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();
|
|
4966
4964
|
});
|
|
4967
|
-
}),
|
|
4965
|
+
}), ne([Ge, ge], () => {
|
|
4968
4966
|
la(() => {
|
|
4969
|
-
|
|
4967
|
+
Lt();
|
|
4970
4968
|
});
|
|
4971
|
-
}), (t, l) =>
|
|
4969
|
+
}), (t, l) => r(de) ? (H(), K("div", $a({
|
|
4972
4970
|
key: 0,
|
|
4973
|
-
class: ["nb-wrapper",
|
|
4974
|
-
style: [
|
|
4971
|
+
class: ["nb-wrapper", Bt.value],
|
|
4972
|
+
style: [Dt.value, Kt.value, Ft.value],
|
|
4975
4973
|
role: "input",
|
|
4976
4974
|
title: e.title
|
|
4977
4975
|
}, i.value), [
|
|
4978
|
-
|
|
4979
|
-
id:
|
|
4980
|
-
class:
|
|
4981
|
-
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]),
|
|
4982
4980
|
onClick: l[2] || (l[2] = (n) => ga(n))
|
|
4983
4981
|
}, [
|
|
4984
|
-
|
|
4982
|
+
r(We) ? (H(), K("label", {
|
|
4985
4983
|
key: 0,
|
|
4986
4984
|
for: zt.value,
|
|
4987
4985
|
class: "component__label",
|
|
4988
|
-
style:
|
|
4986
|
+
style: Fe([Ye.value]),
|
|
4989
4987
|
onClick: ya
|
|
4990
4988
|
}, [
|
|
4991
|
-
jt(
|
|
4992
|
-
|
|
4993
|
-
], 12, mn)) :
|
|
4994
|
-
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", {
|
|
4995
4993
|
ref_key: "inputRef",
|
|
4996
|
-
ref:
|
|
4997
|
-
"onUpdate:modelValue": l[0] || (l[0] = (n) =>
|
|
4994
|
+
ref: _,
|
|
4995
|
+
"onUpdate:modelValue": l[0] || (l[0] = (n) => O.value = n),
|
|
4998
4996
|
onInput: nt,
|
|
4999
4997
|
onKeydown: [
|
|
5000
4998
|
qa,
|
|
5001
|
-
l[1] || (l[1] = na((n) => !
|
|
4999
|
+
l[1] || (l[1] = na((n) => !r(k) && r(D) && ba(), ["enter"]))
|
|
5002
5000
|
],
|
|
5003
5001
|
id: zt.value,
|
|
5004
5002
|
name: zt.value,
|
|
5005
|
-
type: z.value ? "text" :
|
|
5006
|
-
class:
|
|
5003
|
+
type: z.value ? "text" : j.value,
|
|
5004
|
+
class: Ue(["component__input", [
|
|
5007
5005
|
pa.value,
|
|
5008
5006
|
ca.value,
|
|
5009
|
-
|
|
5007
|
+
ue.value
|
|
5010
5008
|
]]),
|
|
5011
5009
|
placeholder: c.value,
|
|
5012
|
-
disabled:
|
|
5013
|
-
required:
|
|
5014
|
-
readonly:
|
|
5010
|
+
disabled: r(k) || r(ie),
|
|
5011
|
+
required: r(kt),
|
|
5012
|
+
readonly: y.value,
|
|
5015
5013
|
autocomplete: e.inputAutocomplete,
|
|
5016
5014
|
min: ka.value,
|
|
5017
5015
|
max: o.value,
|
|
5018
|
-
step: z.value ? void 0 :
|
|
5019
|
-
tabindex:
|
|
5016
|
+
step: z.value ? void 0 : r(pt),
|
|
5017
|
+
tabindex: r(k) || r(ie) ? -1 : r(xt),
|
|
5020
5018
|
role: "input",
|
|
5021
|
-
style:
|
|
5019
|
+
style: Fe([Ft.value]),
|
|
5022
5020
|
onFocus: Sa,
|
|
5023
5021
|
onBlur: xa,
|
|
5024
5022
|
onClick: Ca,
|
|
5025
5023
|
onPaste: ma
|
|
5026
5024
|
}, null, 46, Sn), [
|
|
5027
|
-
[ml,
|
|
5025
|
+
[ml, O.value]
|
|
5028
5026
|
])
|
|
5029
5027
|
], 14, bn),
|
|
5030
|
-
Ot.value ? (
|
|
5028
|
+
Ot.value ? (H(), K("div", {
|
|
5031
5029
|
key: 0,
|
|
5032
|
-
class:
|
|
5030
|
+
class: Ue(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
5033
5031
|
}, [
|
|
5034
5032
|
La(t.$slots, "message", {}, () => [
|
|
5035
|
-
jt(
|
|
5033
|
+
jt(Mt(e.message), 1)
|
|
5036
5034
|
], !0)
|
|
5037
|
-
], 2)) :
|
|
5038
|
-
(
|
|
5039
|
-
z.value &&
|
|
5035
|
+
], 2)) : xe("", !0),
|
|
5036
|
+
(H(), Ll(Al, { to: "body" }, [
|
|
5037
|
+
z.value && ae.value ? (H(), K("div", {
|
|
5040
5038
|
key: 0,
|
|
5041
5039
|
ref_key: "calendarRef",
|
|
5042
|
-
ref:
|
|
5040
|
+
ref: Y,
|
|
5043
5041
|
class: "datepicker__custom-calendar-wrapper",
|
|
5044
|
-
style:
|
|
5042
|
+
style: Fe(ha.value),
|
|
5045
5043
|
onClick: l[5] || (l[5] = Ia((n) => M.value = !0, ["stop"])),
|
|
5046
5044
|
onMousedown: l[6] || (l[6] = Ia((n) => M.value = !0, ["stop"]))
|
|
5047
5045
|
}, [
|
|
5048
|
-
$l(
|
|
5049
|
-
"nb-id": `${
|
|
5050
|
-
value:
|
|
5051
|
-
"input-type":
|
|
5052
|
-
"has-seconds":
|
|
5053
|
-
min:
|
|
5054
|
-
max:
|
|
5055
|
-
step:
|
|
5056
|
-
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),
|
|
5057
5055
|
width: Wt.value,
|
|
5058
|
-
locale:
|
|
5059
|
-
theme:
|
|
5060
|
-
"allow-range":
|
|
5061
|
-
"block-clicks-without-events":
|
|
5056
|
+
locale: r(ot),
|
|
5057
|
+
theme: r(Ie),
|
|
5058
|
+
"allow-range": r($e),
|
|
5059
|
+
"block-clicks-without-events": r(St),
|
|
5062
5060
|
"font-family": e.calendarFontFamily,
|
|
5063
5061
|
"font-size": e.calendarFontSize,
|
|
5064
5062
|
"font-weight": e.calendarFontWeight,
|
|
@@ -5117,16 +5115,16 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
5117
5115
|
"clear-button-title": e.calendarClearButtonTitle,
|
|
5118
5116
|
"clear-button-symbol": e.calendarClearButtonSymbol,
|
|
5119
5117
|
"iso-string-timezone-format": e.calendarIsoStringTimezoneFormat,
|
|
5120
|
-
onChanged:
|
|
5118
|
+
onChanged: Te,
|
|
5121
5119
|
onDateSelected: Ba,
|
|
5122
5120
|
onMonthChanged: Ta,
|
|
5123
5121
|
onValid: Va,
|
|
5124
5122
|
onMousedown: l[3] || (l[3] = (n) => M.value = !0),
|
|
5125
5123
|
onClick: l[4] || (l[4] = (n) => M.value = !0)
|
|
5126
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"])
|
|
5127
|
-
], 36)) :
|
|
5125
|
+
], 36)) : xe("", !0)
|
|
5128
5126
|
]))
|
|
5129
|
-
], 16, yn)) :
|
|
5127
|
+
], 16, yn)) : xe("", !0);
|
|
5130
5128
|
}
|
|
5131
5129
|
}), Cn = /* @__PURE__ */ Oa(xn, [["__scopeId", "data-v-0ae3635e"]]), pl = {
|
|
5132
5130
|
NbInputRadio: Fl,
|
|
@@ -5137,10 +5135,10 @@ const yn = ["title"], bn = ["id"], mn = ["for"], hn = {
|
|
|
5137
5135
|
NbDatePicker: Cn
|
|
5138
5136
|
}, Tn = {
|
|
5139
5137
|
install(e) {
|
|
5140
|
-
for (const
|
|
5141
|
-
if (Object.prototype.hasOwnProperty.call(pl,
|
|
5142
|
-
const
|
|
5143
|
-
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);
|
|
5144
5142
|
}
|
|
5145
5143
|
}
|
|
5146
5144
|
};
|