@vlalg-nimbus/nb-inputs 9.1.0 → 9.3.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 +1796 -1726
- package/dist/nb-inputs.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/nb-inputs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useCssVars as Wa, onMounted as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
1
|
+
import { useCssVars as Wa, onMounted as Aa, ref as oe, toRefs as Ea, computed as a, watch as re, openBlock as O, createElementBlock as K, normalizeClass as Ye, normalizeStyle as Ne, createElementVNode as xe, mergeProps as $a, Fragment as gl, renderList as yl, unref as u, withDirectives as Pa, vModelRadio as Tl, withKeys as na, withModifiers as Ia, toDisplayString as Rt, createCommentVNode as ye, 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, y) => {
|
|
3
|
+
const g = e.__vccOpts || e;
|
|
4
|
+
for (const [h, F] of y)
|
|
5
|
+
g[h] = F;
|
|
6
|
+
return g;
|
|
7
7
|
}, wl = ["id"], Dl = ["id", "disabled", "value", "name"], Rl = ["for", "tabindex"], Ml = /* @__PURE__ */ Object.assign({
|
|
8
8
|
name: "NbInputRadio",
|
|
9
9
|
inheritAttrs: !1
|
|
@@ -18,14 +18,14 @@ const _a = (e, g) => {
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: "b",
|
|
20
20
|
validator: (e = "b") => {
|
|
21
|
-
const
|
|
22
|
-
return ["b", "ib"].includes(
|
|
21
|
+
const y = e ? e.toLowerCase() : "";
|
|
22
|
+
return ["b", "ib"].includes(y);
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
tabIndex: {
|
|
26
26
|
type: [Number, Array],
|
|
27
27
|
default: 0,
|
|
28
|
-
validator: (e,
|
|
28
|
+
validator: (e, y) => Array.isArray(e) ? e.length === y.options.length : !0
|
|
29
29
|
},
|
|
30
30
|
hasTabIndexEnter: {
|
|
31
31
|
type: Boolean,
|
|
@@ -56,12 +56,12 @@ const _a = (e, g) => {
|
|
|
56
56
|
validator: (e) => {
|
|
57
57
|
if (!e.length)
|
|
58
58
|
return !1;
|
|
59
|
-
let
|
|
60
|
-
for (const
|
|
61
|
-
const
|
|
62
|
-
|
|
59
|
+
let y = !1;
|
|
60
|
+
for (const g of e) {
|
|
61
|
+
const h = Object.keys(g);
|
|
62
|
+
h.length !== 2 && (y = !0), h.every((Q) => ["value", "text"].includes(Q)) || (y = !0);
|
|
63
63
|
}
|
|
64
|
-
if (!
|
|
64
|
+
if (!y)
|
|
65
65
|
return e;
|
|
66
66
|
}
|
|
67
67
|
},
|
|
@@ -78,8 +78,8 @@ const _a = (e, g) => {
|
|
|
78
78
|
type: String,
|
|
79
79
|
default: "light",
|
|
80
80
|
validator: (e) => {
|
|
81
|
-
const
|
|
82
|
-
return ["light", "dark"].includes(
|
|
81
|
+
const y = e ? e.toLowerCase() : "";
|
|
82
|
+
return ["light", "dark"].includes(y);
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
// Cores do tema light
|
|
@@ -151,142 +151,142 @@ const _a = (e, g) => {
|
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
emits: ["current-value", "changed", "clicked"],
|
|
154
|
-
setup(e, { emit:
|
|
154
|
+
setup(e, { emit: y }) {
|
|
155
155
|
Wa((T) => ({
|
|
156
|
-
"0fd48d29":
|
|
157
|
-
"50426c15":
|
|
158
|
-
"5fa7628c":
|
|
159
|
-
"5949c3d2":
|
|
160
|
-
91322790:
|
|
161
|
-
"6750fc92":
|
|
162
|
-
"8c592938":
|
|
163
|
-
c11d4680:
|
|
164
|
-
"35b74fa6":
|
|
165
|
-
"7dd5f889":
|
|
166
|
-
"5cb21b36":
|
|
167
|
-
})),
|
|
168
|
-
|
|
156
|
+
"0fd48d29": Ue.value,
|
|
157
|
+
"50426c15": xt.value,
|
|
158
|
+
"5fa7628c": St.value,
|
|
159
|
+
"5949c3d2": ot.value,
|
|
160
|
+
91322790: ht.value,
|
|
161
|
+
"6750fc92": ve.value,
|
|
162
|
+
"8c592938": vt.value,
|
|
163
|
+
c11d4680: pt.value,
|
|
164
|
+
"35b74fa6": Lt.value,
|
|
165
|
+
"7dd5f889": ze.value,
|
|
166
|
+
"5cb21b36": ke.value
|
|
167
|
+
})), Aa(() => {
|
|
168
|
+
gt();
|
|
169
169
|
});
|
|
170
|
-
const
|
|
171
|
-
ariaLabel:
|
|
172
|
-
ariaAttrs:
|
|
173
|
-
currentOption:
|
|
174
|
-
valueType:
|
|
175
|
-
display:
|
|
176
|
-
options:
|
|
177
|
-
theme:
|
|
178
|
-
lightTextColor:
|
|
179
|
-
lightColor:
|
|
180
|
-
lightColorHover:
|
|
181
|
-
darkTextColor:
|
|
182
|
-
darkColor:
|
|
183
|
-
darkColorHover:
|
|
184
|
-
hoverEffect:
|
|
185
|
-
activeHoverEffect:
|
|
186
|
-
itemGap:
|
|
187
|
-
internalGap:
|
|
188
|
-
scale:
|
|
189
|
-
disabled:
|
|
190
|
-
fontFamily:
|
|
191
|
-
fontSize:
|
|
192
|
-
fontWeight:
|
|
193
|
-
} = Ea(
|
|
194
|
-
const T =
|
|
170
|
+
const g = y, h = e, F = oe(null), {
|
|
171
|
+
ariaLabel: Q,
|
|
172
|
+
ariaAttrs: ce,
|
|
173
|
+
currentOption: D,
|
|
174
|
+
valueType: k,
|
|
175
|
+
display: x,
|
|
176
|
+
options: I,
|
|
177
|
+
theme: ae,
|
|
178
|
+
lightTextColor: le,
|
|
179
|
+
lightColor: X,
|
|
180
|
+
lightColorHover: _,
|
|
181
|
+
darkTextColor: $,
|
|
182
|
+
darkColor: H,
|
|
183
|
+
darkColorHover: ie,
|
|
184
|
+
hoverEffect: q,
|
|
185
|
+
activeHoverEffect: Fe,
|
|
186
|
+
itemGap: be,
|
|
187
|
+
internalGap: ee,
|
|
188
|
+
scale: Ce,
|
|
189
|
+
disabled: fe,
|
|
190
|
+
fontFamily: Ae,
|
|
191
|
+
fontSize: Ve,
|
|
192
|
+
fontWeight: Te
|
|
193
|
+
} = Ea(h), j = a(() => {
|
|
194
|
+
const T = fe.value ? "component-disabled" : "", R = x.value !== "b" ? "inline-block" : "block", me = Ae.value ? Ae.value : "'Lato', sans-serif", te = Ve.value ? Ve.value : "1.6em", he = Te.value !== 0 && !Te.value || Te.value < 0 ? 200 : Te.value, tt = [!1, !0].includes(q.value) ? q.value : !1, Ge = [!1, !0].includes(Fe.value) ? Fe.value : !1, Ie = be.value !== 0 && !be.value || be.value < 0 ? 15 : be.value, b = ee.value !== 0 && !ee.value || ee.value < 0 ? 6 : ee.value, A = Ce.value !== 0 && !Ce.value || Ce.value < 0 ? 1 : Ce.value;
|
|
195
195
|
return {
|
|
196
196
|
disabled: T,
|
|
197
|
-
display:
|
|
197
|
+
display: R,
|
|
198
198
|
hoverEffect: tt,
|
|
199
|
-
activeHoverEffect:
|
|
200
|
-
itemGap:
|
|
199
|
+
activeHoverEffect: Ge,
|
|
200
|
+
itemGap: Ie,
|
|
201
201
|
internalGap: b,
|
|
202
|
-
scale:
|
|
203
|
-
font:
|
|
202
|
+
scale: A,
|
|
203
|
+
font: me,
|
|
204
204
|
fontSize: te,
|
|
205
|
-
fontWeight:
|
|
205
|
+
fontWeight: he
|
|
206
206
|
};
|
|
207
|
-
}),
|
|
208
|
-
display:
|
|
209
|
-
})),
|
|
210
|
-
const T =
|
|
207
|
+
}), Qe = a(() => j.value.disabled), v = a(() => ({
|
|
208
|
+
display: j.value.display
|
|
209
|
+
})), se = a(() => j.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), Oe = a(() => {
|
|
210
|
+
const T = j.value;
|
|
211
211
|
return {
|
|
212
212
|
fontSize: T.fontSize,
|
|
213
213
|
fontWeight: T.fontWeight
|
|
214
214
|
};
|
|
215
|
-
}),
|
|
216
|
-
const
|
|
217
|
-
return !
|
|
218
|
-
}),
|
|
219
|
-
const
|
|
220
|
-
return !
|
|
221
|
-
}),
|
|
222
|
-
zoom:
|
|
223
|
-
})),
|
|
215
|
+
}), Xe = a(() => Array.isArray(I.value) && I.value.constructor === Array && I.value.length > 0), S = a(() => ae.value === "dark" ? "component__theme--dark" : "component__theme--light"), Ue = a(() => j.value.font), ve = a(() => le.value), vt = a(() => X.value), ht = a(() => j.value.hoverEffect ? _.value : X.value), ot = a(() => j.value.activeHoverEffect ? _.value : X.value), ze = a(() => $.value), ke = a(() => H.value), Lt = a(() => j.value.hoverEffect ? ie.value : H.value), pt = a(() => j.value.activeHoverEffect ? ie.value : H.value), St = a(() => {
|
|
216
|
+
const R = j.value.internalGap;
|
|
217
|
+
return !R || R < 0 ? 0 : `${R}px`;
|
|
218
|
+
}), xt = a(() => {
|
|
219
|
+
const R = j.value.itemGap;
|
|
220
|
+
return !R || R < 0 ? 0 : `${R}px`;
|
|
221
|
+
}), Ct = a(() => ({
|
|
222
|
+
zoom: j.value.scale
|
|
223
|
+
})), Be = a(() => {
|
|
224
224
|
const T = {};
|
|
225
|
-
|
|
226
|
-
const
|
|
227
|
-
"aria-label":
|
|
228
|
-
"aria-disabled":
|
|
225
|
+
ce.value && Object.keys(ce.value).forEach((te) => T[`aria-${te}`] = ce.value[te]);
|
|
226
|
+
const R = {
|
|
227
|
+
"aria-label": Q.value,
|
|
228
|
+
"aria-disabled": fe.value,
|
|
229
229
|
...T
|
|
230
230
|
};
|
|
231
231
|
return Object.fromEntries(
|
|
232
|
-
Object.entries(
|
|
232
|
+
Object.entries(R).filter(([me, te]) => te != null)
|
|
233
233
|
);
|
|
234
|
-
}),
|
|
235
|
-
const T =
|
|
236
|
-
T && ["string"].includes(
|
|
237
|
-
},
|
|
238
|
-
|
|
234
|
+
}), gt = () => {
|
|
235
|
+
const T = D.value;
|
|
236
|
+
T && ["string"].includes(k.value) ? F.value = T.toString().toLowerCase() : F.value = T;
|
|
237
|
+
}, et = () => {
|
|
238
|
+
g("clicked");
|
|
239
239
|
};
|
|
240
|
-
return
|
|
241
|
-
T !==
|
|
242
|
-
}),
|
|
243
|
-
T !==
|
|
244
|
-
}), (T,
|
|
240
|
+
return re(D, (T, R) => {
|
|
241
|
+
T !== R && gt();
|
|
242
|
+
}), re(F, (T, R) => {
|
|
243
|
+
T !== R && (g("current-value", T), g("changed", T));
|
|
244
|
+
}), (T, R) => e.nbId && Xe.value ? (O(), K("div", {
|
|
245
245
|
key: 0,
|
|
246
|
-
class:
|
|
247
|
-
style:
|
|
246
|
+
class: Ye(["nb-wrapper", Qe.value]),
|
|
247
|
+
style: Ne([v.value, Ct.value])
|
|
248
248
|
}, [
|
|
249
|
-
|
|
249
|
+
xe("div", $a({
|
|
250
250
|
id: e.nbId,
|
|
251
251
|
role: "radiogroup"
|
|
252
|
-
},
|
|
253
|
-
class: ["nb-reset", "component",
|
|
252
|
+
}, Be.value, {
|
|
253
|
+
class: ["nb-reset", "component", se.value, S.value]
|
|
254
254
|
}), [
|
|
255
|
-
(O(!0),
|
|
255
|
+
(O(!0), K(gl, null, yl(u(I), (me, te) => (O(), K("div", {
|
|
256
256
|
key: te,
|
|
257
257
|
class: "component-radio__item"
|
|
258
258
|
}, [
|
|
259
|
-
Pa(
|
|
260
|
-
id: `${e.nbId}-${
|
|
261
|
-
"onUpdate:modelValue":
|
|
259
|
+
Pa(xe("input", {
|
|
260
|
+
id: `${e.nbId}-${me.value}`,
|
|
261
|
+
"onUpdate:modelValue": R[0] || (R[0] = (he) => F.value = he),
|
|
262
262
|
type: "radio",
|
|
263
263
|
class: "component-radio__item--input",
|
|
264
|
-
disabled: u(
|
|
265
|
-
value:
|
|
264
|
+
disabled: u(fe),
|
|
265
|
+
value: me.value,
|
|
266
266
|
name: e.groupName,
|
|
267
|
-
onClick:
|
|
267
|
+
onClick: et
|
|
268
268
|
}, null, 8, Dl), [
|
|
269
|
-
[Tl,
|
|
269
|
+
[Tl, F.value]
|
|
270
270
|
]),
|
|
271
|
-
|
|
272
|
-
for: `${e.nbId}-${
|
|
273
|
-
tabindex: u(
|
|
271
|
+
xe("label", {
|
|
272
|
+
for: `${e.nbId}-${me.value}`,
|
|
273
|
+
tabindex: u(fe) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[te] : e.tabIndex >= 0 ? e.tabIndex : te + 1,
|
|
274
274
|
class: "component-radio__item--label",
|
|
275
275
|
onKeydown: [
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
R[1] || (R[1] = na(Ia((he) => !u(fe) && e.hasTabIndexEnter && he.target.click(), ["prevent"]), ["enter"])),
|
|
277
|
+
R[2] || (R[2] = na(Ia((he) => !u(fe) && e.hasTabIndexSpace && he.target.click(), ["prevent"]), ["space"]))
|
|
278
278
|
]
|
|
279
279
|
}, [
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
style:
|
|
283
|
-
},
|
|
280
|
+
R[3] || (R[3] = xe("div", null, null, -1)),
|
|
281
|
+
xe("span", {
|
|
282
|
+
style: Ne([Oe.value])
|
|
283
|
+
}, Rt(me.text), 5)
|
|
284
284
|
], 40, Rl)
|
|
285
285
|
]))), 128))
|
|
286
286
|
], 16, wl)
|
|
287
|
-
], 6)) :
|
|
287
|
+
], 6)) : ye("", !0);
|
|
288
288
|
}
|
|
289
|
-
}), Nl = /* @__PURE__ */
|
|
289
|
+
}), Nl = /* @__PURE__ */ Oa(Ml, [["__scopeId", "data-v-a95f65ea"]]);
|
|
290
290
|
const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabindex"], Wl = /* @__PURE__ */ Object.assign({
|
|
291
291
|
name: "NbInputCheckbox",
|
|
292
292
|
inheritAttrs: !1
|
|
@@ -301,14 +301,14 @@ const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabin
|
|
|
301
301
|
type: String,
|
|
302
302
|
default: "b",
|
|
303
303
|
validator: (e = "b") => {
|
|
304
|
-
const
|
|
305
|
-
return ["b", "ib"].includes(
|
|
304
|
+
const y = e ? e.toLowerCase() : "";
|
|
305
|
+
return ["b", "ib"].includes(y);
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
308
|
tabIndex: {
|
|
309
309
|
type: [Number, Array],
|
|
310
310
|
default: 0,
|
|
311
|
-
validator: (e,
|
|
311
|
+
validator: (e, y) => Array.isArray(e) ? e.length === y.options.length : !0
|
|
312
312
|
},
|
|
313
313
|
hasTabIndexEnter: {
|
|
314
314
|
type: Boolean,
|
|
@@ -339,12 +339,12 @@ const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabin
|
|
|
339
339
|
validator: (e) => {
|
|
340
340
|
if (!e.length)
|
|
341
341
|
return !1;
|
|
342
|
-
let
|
|
343
|
-
for (const
|
|
344
|
-
const
|
|
345
|
-
|
|
342
|
+
let y = !1;
|
|
343
|
+
for (const g of e) {
|
|
344
|
+
const h = Object.keys(g);
|
|
345
|
+
h.length !== 2 && (y = !0), h.every((Q) => ["value", "text"].includes(Q)) || (y = !0);
|
|
346
346
|
}
|
|
347
|
-
if (!
|
|
347
|
+
if (!y)
|
|
348
348
|
return e;
|
|
349
349
|
}
|
|
350
350
|
},
|
|
@@ -356,8 +356,8 @@ const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabin
|
|
|
356
356
|
type: String,
|
|
357
357
|
default: "light",
|
|
358
358
|
validator: (e) => {
|
|
359
|
-
const
|
|
360
|
-
return ["light", "dark"].includes(
|
|
359
|
+
const y = e ? e.toLowerCase() : "";
|
|
360
|
+
return ["light", "dark"].includes(y);
|
|
361
361
|
}
|
|
362
362
|
},
|
|
363
363
|
// Cores do tema light
|
|
@@ -447,167 +447,167 @@ const Fl = ["id"], zl = ["id", "disabled", "value", "name"], Il = ["for", "tabin
|
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
449
|
emits: ["current-value", "changed", "clicked"],
|
|
450
|
-
setup(e, { emit:
|
|
450
|
+
setup(e, { emit: y }) {
|
|
451
451
|
Wa((b) => ({
|
|
452
|
-
"49e2c63f":
|
|
453
|
-
"107babaa":
|
|
454
|
-
"3c7cc5ce":
|
|
452
|
+
"49e2c63f": vt.value,
|
|
453
|
+
"107babaa": me.value,
|
|
454
|
+
"3c7cc5ce": R.value,
|
|
455
455
|
"16d311d0": T.value,
|
|
456
|
-
"3f8b2f30":
|
|
457
|
-
"53078d64":
|
|
458
|
-
"537834e6":
|
|
459
|
-
fbc86ee4:
|
|
460
|
-
"517939e1":
|
|
461
|
-
"3faff29d":
|
|
462
|
-
"302ecd6a":
|
|
463
|
-
"8a4df060":
|
|
464
|
-
"0a99dbe2":
|
|
465
|
-
d6971e68:
|
|
466
|
-
ca30d9c2:
|
|
467
|
-
})),
|
|
468
|
-
|
|
456
|
+
"3f8b2f30": ke.value,
|
|
457
|
+
"53078d64": ze.value,
|
|
458
|
+
"537834e6": Lt.value,
|
|
459
|
+
fbc86ee4: ot.value,
|
|
460
|
+
"517939e1": ht.value,
|
|
461
|
+
"3faff29d": et.value,
|
|
462
|
+
"302ecd6a": Ct.value,
|
|
463
|
+
"8a4df060": xt.value,
|
|
464
|
+
"0a99dbe2": Be.value,
|
|
465
|
+
d6971e68: St.value,
|
|
466
|
+
ca30d9c2: pt.value
|
|
467
|
+
})), Aa(() => {
|
|
468
|
+
Ge();
|
|
469
469
|
});
|
|
470
|
-
const
|
|
471
|
-
ariaLabel:
|
|
472
|
-
ariaAttrs:
|
|
473
|
-
currentOption:
|
|
474
|
-
display:
|
|
475
|
-
options:
|
|
476
|
-
theme:
|
|
477
|
-
lightTextColor:
|
|
478
|
-
lightColor:
|
|
479
|
-
lightColorHover:
|
|
480
|
-
darkTextColor:
|
|
481
|
-
darkColor:
|
|
482
|
-
darkColorHover:
|
|
483
|
-
boxRadius:
|
|
484
|
-
hoverEffect:
|
|
485
|
-
activeHoverEffect:
|
|
486
|
-
itemGap:
|
|
487
|
-
internalGap:
|
|
488
|
-
scale:
|
|
489
|
-
type:
|
|
490
|
-
background:
|
|
491
|
-
disabled:
|
|
492
|
-
fontFamily:
|
|
493
|
-
fontSize:
|
|
494
|
-
fontWeight:
|
|
495
|
-
} = Ea(
|
|
496
|
-
const b =
|
|
470
|
+
const g = y, h = e, F = oe(null), {
|
|
471
|
+
ariaLabel: Q,
|
|
472
|
+
ariaAttrs: ce,
|
|
473
|
+
currentOption: D,
|
|
474
|
+
display: k,
|
|
475
|
+
options: x,
|
|
476
|
+
theme: I,
|
|
477
|
+
lightTextColor: ae,
|
|
478
|
+
lightColor: le,
|
|
479
|
+
lightColorHover: X,
|
|
480
|
+
darkTextColor: _,
|
|
481
|
+
darkColor: $,
|
|
482
|
+
darkColorHover: H,
|
|
483
|
+
boxRadius: ie,
|
|
484
|
+
hoverEffect: q,
|
|
485
|
+
activeHoverEffect: Fe,
|
|
486
|
+
itemGap: be,
|
|
487
|
+
internalGap: ee,
|
|
488
|
+
scale: Ce,
|
|
489
|
+
type: fe,
|
|
490
|
+
background: Ae,
|
|
491
|
+
disabled: Ve,
|
|
492
|
+
fontFamily: Te,
|
|
493
|
+
fontSize: j,
|
|
494
|
+
fontWeight: Qe
|
|
495
|
+
} = Ea(h), v = a(() => {
|
|
496
|
+
const b = Ve.value ? "component-disabled" : "", A = k.value !== "b" ? "inline-block" : "block", de = Te.value ? Te.value : "'Lato', sans-serif", ge = j.value ? j.value : "1.6em", Se = Qe.value !== 0 && !Qe.value || Qe.value < 0 ? 200 : Qe.value, _e = ie.value !== 0 && !ie.value || ie.value < 0 ? 0 : ie.value, We = [!1, !0].includes(q.value) ? q.value : !1, Ee = [!1, !0].includes(Fe.value) ? Fe.value : !1, He = be.value !== 0 && !be.value || be.value < 0 ? 15 : be.value, qe = ee.value !== 0 && !ee.value || ee.value < 0 ? 6 : ee.value, Ke = ["box", "circle"].includes(fe.value) ? fe.value : "box", at = Ce.value !== 0 && !Ce.value || Ce.value < 0 ? 1 : Ce.value, yt = [!1, !0].includes(Ae.value) ? Ae.value : !1;
|
|
497
497
|
return {
|
|
498
498
|
disabled: b,
|
|
499
|
-
display:
|
|
500
|
-
boxRadius:
|
|
501
|
-
hoverEffect:
|
|
502
|
-
activeHoverEffect:
|
|
503
|
-
itemGap:
|
|
499
|
+
display: A,
|
|
500
|
+
boxRadius: _e,
|
|
501
|
+
hoverEffect: We,
|
|
502
|
+
activeHoverEffect: Ee,
|
|
503
|
+
itemGap: He,
|
|
504
504
|
internalGap: qe,
|
|
505
|
-
scale:
|
|
506
|
-
type:
|
|
507
|
-
font:
|
|
508
|
-
background:
|
|
509
|
-
fontSize:
|
|
510
|
-
fontWeight:
|
|
505
|
+
scale: at,
|
|
506
|
+
type: Ke,
|
|
507
|
+
font: de,
|
|
508
|
+
background: yt,
|
|
509
|
+
fontSize: ge,
|
|
510
|
+
fontWeight: Se
|
|
511
511
|
};
|
|
512
|
-
}),
|
|
512
|
+
}), se = a(() => v.value.disabled), Oe = a(() => ({
|
|
513
513
|
display: v.value.display
|
|
514
|
-
})),
|
|
514
|
+
})), Xe = a(() => v.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), S = a(() => {
|
|
515
515
|
const b = v.value;
|
|
516
516
|
return {
|
|
517
517
|
fontSize: b.fontSize,
|
|
518
518
|
fontWeight: b.fontWeight
|
|
519
519
|
};
|
|
520
|
-
}),
|
|
520
|
+
}), Ue = a(() => Array.isArray(x.value) && x.value.constructor === Array && x.value.length > 0), ve = a(() => I.value === "dark" ? "component__theme--dark" : "component__theme--light"), vt = a(() => v.value.font), ht = a(() => ae.value), ot = a(() => le.value), ze = a(() => v.value.hoverEffect ? X.value : le.value), ke = a(() => v.value.activeHoverEffect ? X.value : le.value), Lt = a(() => {
|
|
521
521
|
const b = v.value;
|
|
522
|
-
return b.activeHoverEffect && b.background ? `${
|
|
523
|
-
}),
|
|
522
|
+
return b.activeHoverEffect && b.background ? `${X.value}80` : X.value;
|
|
523
|
+
}), pt = a(() => _.value), St = a(() => $.value), xt = a(() => v.value.hoverEffect ? H.value : $.value), Ct = a(() => v.value.activeHoverEffect ? H.value : $.value), Be = a(() => {
|
|
524
524
|
const b = v.value;
|
|
525
|
-
return b.activeHoverEffect && b.background ? `${
|
|
526
|
-
}),
|
|
527
|
-
const b = v.value,
|
|
528
|
-
return b.background ? "#ffffff" :
|
|
525
|
+
return b.activeHoverEffect && b.background ? `${H.value}80` : H.value;
|
|
526
|
+
}), gt = a(() => v.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), et = a(() => {
|
|
527
|
+
const b = v.value, A = I.value === "dark" ? _.value : ae.value;
|
|
528
|
+
return b.background ? "#ffffff" : A;
|
|
529
529
|
});
|
|
530
530
|
a(() => v.value.background ? "19px" : "auto");
|
|
531
531
|
const T = a(() => {
|
|
532
|
-
const
|
|
533
|
-
return !
|
|
534
|
-
}),
|
|
532
|
+
const A = v.value.internalGap;
|
|
533
|
+
return !A || A < 0 ? 0 : `${A}px`;
|
|
534
|
+
}), R = a(() => {
|
|
535
535
|
const b = v.value;
|
|
536
536
|
return `${b.boxRadius > 7 ? 7 : b.boxRadius}px`;
|
|
537
|
-
}),
|
|
538
|
-
const
|
|
539
|
-
return !
|
|
540
|
-
}), te = a(() => v.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""),
|
|
537
|
+
}), me = a(() => {
|
|
538
|
+
const A = v.value.itemGap;
|
|
539
|
+
return !A || A < 0 ? 0 : `${A}px`;
|
|
540
|
+
}), te = a(() => v.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), he = a(() => ({
|
|
541
541
|
zoom: v.value.scale
|
|
542
542
|
})), tt = a(() => {
|
|
543
543
|
const b = {};
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
"aria-label":
|
|
547
|
-
"aria-disabled":
|
|
544
|
+
ce.value && Object.keys(ce.value).forEach((ge) => b[`aria-${ge}`] = ce.value[ge]);
|
|
545
|
+
const A = {
|
|
546
|
+
"aria-label": Q.value,
|
|
547
|
+
"aria-disabled": Ve.value,
|
|
548
548
|
...b
|
|
549
549
|
};
|
|
550
550
|
return Object.fromEntries(
|
|
551
|
-
Object.entries(
|
|
551
|
+
Object.entries(A).filter(([de, ge]) => ge != null)
|
|
552
552
|
);
|
|
553
|
-
}),
|
|
554
|
-
|
|
555
|
-
},
|
|
556
|
-
|
|
553
|
+
}), Ge = () => {
|
|
554
|
+
F.value = D.value;
|
|
555
|
+
}, Ie = () => {
|
|
556
|
+
g("clicked");
|
|
557
557
|
};
|
|
558
|
-
return
|
|
559
|
-
b !==
|
|
560
|
-
}),
|
|
561
|
-
b !==
|
|
562
|
-
}), (b,
|
|
558
|
+
return re(D, (b, A) => {
|
|
559
|
+
b !== A && Ge();
|
|
560
|
+
}), re(F, (b, A) => {
|
|
561
|
+
b !== A && (g("current-value", b), g("changed", b));
|
|
562
|
+
}), (b, A) => e.nbId && Ue.value ? (O(), K("div", {
|
|
563
563
|
key: 0,
|
|
564
|
-
class:
|
|
565
|
-
style:
|
|
564
|
+
class: Ye(["nb-wrapper", se.value]),
|
|
565
|
+
style: Ne([Oe.value, he.value])
|
|
566
566
|
}, [
|
|
567
|
-
|
|
567
|
+
xe("div", $a({
|
|
568
568
|
id: e.nbId,
|
|
569
569
|
role: "group"
|
|
570
570
|
}, tt.value, {
|
|
571
|
-
class: ["nb-reset", "component",
|
|
571
|
+
class: ["nb-reset", "component", Xe.value, ve.value]
|
|
572
572
|
}), [
|
|
573
|
-
(O(!0),
|
|
574
|
-
key:
|
|
573
|
+
(O(!0), K(gl, null, yl(u(x), (de, ge) => (O(), K("div", {
|
|
574
|
+
key: ge,
|
|
575
575
|
class: "component-checkbox__item"
|
|
576
576
|
}, [
|
|
577
|
-
Pa(
|
|
578
|
-
id: `${e.nbId}-${
|
|
579
|
-
"onUpdate:modelValue":
|
|
577
|
+
Pa(xe("input", {
|
|
578
|
+
id: `${e.nbId}-${de.value}`,
|
|
579
|
+
"onUpdate:modelValue": A[0] || (A[0] = (Se) => F.value = Se),
|
|
580
580
|
type: "checkbox",
|
|
581
581
|
class: "component-checkbox__item--input",
|
|
582
|
-
disabled: u(
|
|
583
|
-
value:
|
|
582
|
+
disabled: u(Ve),
|
|
583
|
+
value: de.value,
|
|
584
584
|
name: e.groupName,
|
|
585
|
-
onClick:
|
|
585
|
+
onClick: Ie
|
|
586
586
|
}, null, 8, zl), [
|
|
587
|
-
[kl,
|
|
587
|
+
[kl, F.value]
|
|
588
588
|
]),
|
|
589
|
-
|
|
590
|
-
for: `${e.nbId}-${
|
|
591
|
-
class:
|
|
592
|
-
tabindex: u(
|
|
589
|
+
xe("label", {
|
|
590
|
+
for: `${e.nbId}-${de.value}`,
|
|
591
|
+
class: Ye([[te.value], "component-checkbox__item--label"]),
|
|
592
|
+
tabindex: u(Ve) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[ge] : e.tabIndex >= 0 ? e.tabIndex : ge + 1,
|
|
593
593
|
onKeydown: [
|
|
594
|
-
|
|
595
|
-
|
|
594
|
+
A[1] || (A[1] = na(Ia((Se) => !u(Ve) && e.hasTabIndexEnter && Se.target.click(), ["prevent"]), ["enter"])),
|
|
595
|
+
A[2] || (A[2] = na(Ia((Se) => !u(Ve) && e.hasTabIndexSpace && Se.target.click(), ["prevent"]), ["space"]))
|
|
596
596
|
]
|
|
597
597
|
}, [
|
|
598
|
-
|
|
599
|
-
class:
|
|
598
|
+
xe("div", {
|
|
599
|
+
class: Ye([gt.value])
|
|
600
600
|
}, null, 2),
|
|
601
|
-
|
|
602
|
-
style:
|
|
603
|
-
},
|
|
601
|
+
xe("span", {
|
|
602
|
+
style: Ne([S.value])
|
|
603
|
+
}, Rt(de.text), 5)
|
|
604
604
|
], 42, Il)
|
|
605
605
|
]))), 128))
|
|
606
606
|
], 16, Fl)
|
|
607
|
-
], 6)) :
|
|
607
|
+
], 6)) : ye("", !0);
|
|
608
608
|
}
|
|
609
|
-
}), El = /* @__PURE__ */
|
|
610
|
-
const Pl = ["id"],
|
|
609
|
+
}), El = /* @__PURE__ */ Oa(Wl, [["__scopeId", "data-v-1c6afddc"]]);
|
|
610
|
+
const Pl = ["id"], Ol = ["for"], _l = {
|
|
611
611
|
key: 0,
|
|
612
612
|
class: "component__label--required"
|
|
613
613
|
}, Hl = ["for"], ql = { key: 0 }, jl = { key: 1 }, Yl = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex", "min", "max", "step"], Ul = ["for"], Gl = /* @__PURE__ */ Object.assign({
|
|
@@ -624,8 +624,8 @@ const Pl = ["id"], _l = ["for"], Ol = {
|
|
|
624
624
|
type: String,
|
|
625
625
|
default: "b",
|
|
626
626
|
validator: (e = "b") => {
|
|
627
|
-
const
|
|
628
|
-
return ["b", "ib"].includes(
|
|
627
|
+
const y = e.toLowerCase();
|
|
628
|
+
return ["b", "ib"].includes(y);
|
|
629
629
|
}
|
|
630
630
|
},
|
|
631
631
|
tabIndex: {
|
|
@@ -1062,211 +1062,214 @@ const Pl = ["id"], _l = ["for"], Ol = {
|
|
|
1062
1062
|
"entered",
|
|
1063
1063
|
"paste"
|
|
1064
1064
|
],
|
|
1065
|
-
setup(e, { emit:
|
|
1065
|
+
setup(e, { emit: y }) {
|
|
1066
1066
|
Wa((o) => ({
|
|
1067
|
-
"
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
"
|
|
1071
|
-
|
|
1072
|
-
"
|
|
1073
|
-
|
|
1074
|
-
"
|
|
1075
|
-
"
|
|
1076
|
-
|
|
1077
|
-
"
|
|
1078
|
-
"
|
|
1079
|
-
"
|
|
1080
|
-
"
|
|
1081
|
-
"
|
|
1082
|
-
|
|
1083
|
-
"
|
|
1084
|
-
"
|
|
1085
|
-
"
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
"
|
|
1089
|
-
"
|
|
1090
|
-
"
|
|
1091
|
-
"
|
|
1092
|
-
"
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
"
|
|
1096
|
-
"
|
|
1097
|
-
"
|
|
1098
|
-
"
|
|
1099
|
-
"
|
|
1100
|
-
"
|
|
1101
|
-
"
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
})),
|
|
1105
|
-
|
|
1067
|
+
"342644d9": Et.value,
|
|
1068
|
+
"3f4c6557": ra.value,
|
|
1069
|
+
"1ede05ca": u(Ct),
|
|
1070
|
+
"4f7ccf67": ca.value,
|
|
1071
|
+
"69eb990e": fa.value,
|
|
1072
|
+
"6f6d3e5e": va.value,
|
|
1073
|
+
57352616: u(me),
|
|
1074
|
+
"28a6c9c6": u(Ee),
|
|
1075
|
+
"28d88a69": u(te),
|
|
1076
|
+
"072e58ae": u(Mt),
|
|
1077
|
+
"31d17fe2": u(R),
|
|
1078
|
+
"04d07ecd": u(et),
|
|
1079
|
+
"4aebdc33": u(T),
|
|
1080
|
+
"5394bb04": dt.value,
|
|
1081
|
+
"4e4085fe": u(Be),
|
|
1082
|
+
"43c7ed7a": u(gt),
|
|
1083
|
+
"195531a3": u(We),
|
|
1084
|
+
"3b5e1535": u(he),
|
|
1085
|
+
"396824a2": u(yt),
|
|
1086
|
+
"5af8c896": u(xt),
|
|
1087
|
+
32439599: u(pt),
|
|
1088
|
+
"46ada9ff": u(St),
|
|
1089
|
+
"0245c2b2": u(ke),
|
|
1090
|
+
"3e5efd74": u(Lt),
|
|
1091
|
+
"05615226": ha.value,
|
|
1092
|
+
"9b486f1e": xa.value,
|
|
1093
|
+
d5642564: Ca.value,
|
|
1094
|
+
"79afa904": _t.value,
|
|
1095
|
+
"086cafa1": Dt.value,
|
|
1096
|
+
"1127238e": u(tt),
|
|
1097
|
+
"6445d91e": ya.value,
|
|
1098
|
+
"6f07dcee": Pt.value,
|
|
1099
|
+
"4678f62d": ia.value,
|
|
1100
|
+
"15cf1bd4": Ut.value,
|
|
1101
|
+
"1161f5f0": da.value,
|
|
1102
|
+
c3b37b2c: Gt.value,
|
|
1103
|
+
"19529b8f": sa.value
|
|
1104
|
+
})), Aa(() => {
|
|
1105
|
+
ve.value != null ? se.value === "number" && typeof ve.value == "number" ? z.value = ve.value : z.value = String(ve.value) : z.value = "";
|
|
1106
1106
|
}), Ya(() => {
|
|
1107
|
-
|
|
1107
|
+
Ht();
|
|
1108
1108
|
});
|
|
1109
|
-
const
|
|
1110
|
-
nbId:
|
|
1111
|
-
display:
|
|
1112
|
-
hasTabIndexEnter:
|
|
1113
|
-
ariaLabel:
|
|
1114
|
-
ariaAttrs:
|
|
1115
|
-
textColor:
|
|
1116
|
-
caretColor:
|
|
1117
|
-
selectionBgColor:
|
|
1118
|
-
selectionTextColor:
|
|
1119
|
-
hasBorderRadius:
|
|
1120
|
-
borderRadius:
|
|
1121
|
-
disabled:
|
|
1122
|
-
fontFamily:
|
|
1123
|
-
fontSize:
|
|
1124
|
-
fontWeight:
|
|
1125
|
-
fontFamilyMsg:
|
|
1126
|
-
fontSizeMsg:
|
|
1127
|
-
fontWeightMsg:
|
|
1128
|
-
textMessageColor:
|
|
1129
|
-
inputWidth:
|
|
1130
|
-
inputStyle:
|
|
1131
|
-
activeTextStyle:
|
|
1132
|
-
sizeMediaQuery:
|
|
1133
|
-
inputReadonly:
|
|
1134
|
-
blockPaste:
|
|
1109
|
+
const g = y, h = e, {
|
|
1110
|
+
nbId: F,
|
|
1111
|
+
display: Q,
|
|
1112
|
+
hasTabIndexEnter: ce,
|
|
1113
|
+
ariaLabel: D,
|
|
1114
|
+
ariaAttrs: k,
|
|
1115
|
+
textColor: x,
|
|
1116
|
+
caretColor: I,
|
|
1117
|
+
selectionBgColor: ae,
|
|
1118
|
+
selectionTextColor: le,
|
|
1119
|
+
hasBorderRadius: X,
|
|
1120
|
+
borderRadius: _,
|
|
1121
|
+
disabled: $,
|
|
1122
|
+
fontFamily: H,
|
|
1123
|
+
fontSize: ie,
|
|
1124
|
+
fontWeight: q,
|
|
1125
|
+
fontFamilyMsg: Fe,
|
|
1126
|
+
fontSizeMsg: be,
|
|
1127
|
+
fontWeightMsg: ee,
|
|
1128
|
+
textMessageColor: Ce,
|
|
1129
|
+
inputWidth: fe,
|
|
1130
|
+
inputStyle: Ae,
|
|
1131
|
+
activeTextStyle: Ve,
|
|
1132
|
+
sizeMediaQuery: Te,
|
|
1133
|
+
inputReadonly: j,
|
|
1134
|
+
blockPaste: Qe,
|
|
1135
1135
|
showInputEye: v,
|
|
1136
|
-
inputType:
|
|
1137
|
-
hasTrim:
|
|
1138
|
-
inputUppercase:
|
|
1139
|
-
inputName:
|
|
1140
|
-
inputPlaceholder:
|
|
1141
|
-
inputText:
|
|
1142
|
-
theme:
|
|
1143
|
-
inputEyeIcon:
|
|
1144
|
-
tabindex:
|
|
1145
|
-
inputEyeIconHidden:
|
|
1146
|
-
lightBgColor:
|
|
1147
|
-
lightBgColorFocus:
|
|
1148
|
-
lightEyeBgColor:
|
|
1149
|
-
lightEyeBgColorActive:
|
|
1150
|
-
lightDisabledBgColor:
|
|
1151
|
-
lightTextColor:
|
|
1152
|
-
darkBgColor:
|
|
1153
|
-
darkBgColorFocus:
|
|
1154
|
-
darkEyeBgColor:
|
|
1136
|
+
inputType: se,
|
|
1137
|
+
hasTrim: Oe,
|
|
1138
|
+
inputUppercase: Xe,
|
|
1139
|
+
inputName: S,
|
|
1140
|
+
inputPlaceholder: Ue,
|
|
1141
|
+
inputText: ve,
|
|
1142
|
+
theme: vt,
|
|
1143
|
+
inputEyeIcon: ht,
|
|
1144
|
+
tabindex: ot,
|
|
1145
|
+
inputEyeIconHidden: ze,
|
|
1146
|
+
lightBgColor: ke,
|
|
1147
|
+
lightBgColorFocus: Lt,
|
|
1148
|
+
lightEyeBgColor: pt,
|
|
1149
|
+
lightEyeBgColorActive: St,
|
|
1150
|
+
lightDisabledBgColor: xt,
|
|
1151
|
+
lightTextColor: Ct,
|
|
1152
|
+
darkBgColor: Be,
|
|
1153
|
+
darkBgColorFocus: gt,
|
|
1154
|
+
darkEyeBgColor: et,
|
|
1155
1155
|
darkEyeBgColorActive: T,
|
|
1156
|
-
darkDisabledBgColor:
|
|
1157
|
-
darkTextColor:
|
|
1156
|
+
darkDisabledBgColor: R,
|
|
1157
|
+
darkTextColor: me,
|
|
1158
1158
|
darkDisabledEyeBgColor: te,
|
|
1159
|
-
lightDisabledEyeBgColor:
|
|
1159
|
+
lightDisabledEyeBgColor: he,
|
|
1160
1160
|
textAlign: tt,
|
|
1161
|
-
showMsg:
|
|
1162
|
-
hasMsg:
|
|
1161
|
+
showMsg: Ge,
|
|
1162
|
+
hasMsg: Ie,
|
|
1163
1163
|
hasIcon: b,
|
|
1164
|
-
iconDirection:
|
|
1165
|
-
iconPadding:
|
|
1166
|
-
iconPaddingInput:
|
|
1167
|
-
iconMargin:
|
|
1168
|
-
iconBorderRadius:
|
|
1169
|
-
iconLightTextColor:
|
|
1170
|
-
iconDarkTextColor:
|
|
1171
|
-
iconLightBgColor:
|
|
1164
|
+
iconDirection: A,
|
|
1165
|
+
iconPadding: de,
|
|
1166
|
+
iconPaddingInput: ge,
|
|
1167
|
+
iconMargin: Se,
|
|
1168
|
+
iconBorderRadius: _e,
|
|
1169
|
+
iconLightTextColor: We,
|
|
1170
|
+
iconDarkTextColor: Ee,
|
|
1171
|
+
iconLightBgColor: He,
|
|
1172
1172
|
iconDarkBgColor: qe,
|
|
1173
|
-
iconLightBgColorActive:
|
|
1174
|
-
iconDarkBgColorActive:
|
|
1175
|
-
iconLightDisabledBgColor:
|
|
1176
|
-
iconDarkDisabledBgColor:
|
|
1177
|
-
iconWidth:
|
|
1178
|
-
iconSize:
|
|
1179
|
-
showLabel:
|
|
1180
|
-
label:
|
|
1181
|
-
labelBreakOnActive:
|
|
1182
|
-
labelBackground:
|
|
1183
|
-
labelPadding:
|
|
1184
|
-
labelBorderRadius:
|
|
1185
|
-
labelLeft:
|
|
1186
|
-
inputLabelMarginActive:
|
|
1187
|
-
labelActiveTop:
|
|
1188
|
-
labelActiveLeft:
|
|
1189
|
-
labelRight:
|
|
1190
|
-
labelActiveRight:
|
|
1191
|
-
fontFamilyLabel:
|
|
1192
|
-
fontSizeLabel:
|
|
1193
|
-
fontSizeLabelActive:
|
|
1194
|
-
fontWeightLabel:
|
|
1195
|
-
lightTextColorLabel:
|
|
1173
|
+
iconLightBgColorActive: Ke,
|
|
1174
|
+
iconDarkBgColorActive: at,
|
|
1175
|
+
iconLightDisabledBgColor: yt,
|
|
1176
|
+
iconDarkDisabledBgColor: Mt,
|
|
1177
|
+
iconWidth: Vt,
|
|
1178
|
+
iconSize: bt,
|
|
1179
|
+
showLabel: lt,
|
|
1180
|
+
label: Nt,
|
|
1181
|
+
labelBreakOnActive: rt,
|
|
1182
|
+
labelBackground: Tt,
|
|
1183
|
+
labelPadding: B,
|
|
1184
|
+
labelBorderRadius: E,
|
|
1185
|
+
labelLeft: Z,
|
|
1186
|
+
inputLabelMarginActive: Y,
|
|
1187
|
+
labelActiveTop: $e,
|
|
1188
|
+
labelActiveLeft: M,
|
|
1189
|
+
labelRight: Wt,
|
|
1190
|
+
labelActiveRight: we,
|
|
1191
|
+
fontFamilyLabel: At,
|
|
1192
|
+
fontSizeLabel: ue,
|
|
1193
|
+
fontSizeLabelActive: ut,
|
|
1194
|
+
fontWeightLabel: ne,
|
|
1195
|
+
lightTextColorLabel: $t,
|
|
1196
1196
|
lightTextColorLabelActive: P,
|
|
1197
1197
|
darkTextColorLabel: U,
|
|
1198
|
-
darkTextColorLabelActive:
|
|
1199
|
-
} = Ea(
|
|
1200
|
-
const o =
|
|
1198
|
+
darkTextColorLabelActive: Yt
|
|
1199
|
+
} = Ea(h), z = oe(""), G = oe(null), kt = oe(""), wt = oe(!1), it = oe(!1), N = a(() => {
|
|
1200
|
+
const o = $.value ? "component-disabled" : "", m = Q.value !== "b" ? "inline-block" : "block", Re = x ? x.value : "#ffffff", nt = I.value ? I.value : "", Ba = ae.value ? ae.value : "", ta = le.value ? le.value : "", wa = X.value ? X.value : !1, Da = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, It = H.value ? H.value : "'Lato', sans-serif", aa = ie.value ? ie.value : null, qt = q.value !== 0 && !q.value || q.value < 0 ? 100 : q.value, Ra = Fe.value ? Fe.value : "'Lato', sans-serif", _a = be.value ? be.value : "1em", Ma = ee.value !== 0 && !ee.value || ee.value < 0 ? 100 : ee.value, Ha = Ce.value ? Ce.value : "#f15574", Le = fe.value ? fe.value : 200, qa = Ve.value ? Ve.value : "normal", mt = Te.value ? Te.value : "xs", t = j.value ? j.value : !1, l = v.value ? v.value : !1, n = se.value ? se.value : "text", r = Xe.value ? Xe.value : !1, s = vt.value ? vt.value : "normal", d = tt.value ? tt.value : "left", f = Ae.value ? Ae.value : "background", p = de.value ? de.value : "5px 10px", V = Se.value ? Se.value : "0", L = ge.value ? ge.value : 10, W = We.value ? We.value : "#000000", J = Ee.value ? Ee.value : "#000000", Me = He.value ? He.value : "transparent", ft = qe.value ? qe.value : "transparent", Pe = _e.value !== 0 && !_e.value || _e.value < 0 ? 0 : _e.value, Je = Ke.value ? Ke.value : "transparent", Ua = at.value ? at.value : "transparent", Ga = Vt.value ? Vt.value : 32, Ka = bt.value ? bt.value : 1, Za = lt.value ? lt.value : !1, Ja = Z.value !== 0 && !Z.value || Z.value < 0 ? 5 : Z.value, Qa = Tt.value ? Tt.value : "transparent", Xa = Y.value !== 0 && !Y.value || Y.value < 0 ? 15 : Y.value, el = B.value ? B.value : "1px 5px", tl = E.value !== 0 && !E.value || E.value < 0 ? 0 : E.value, al = $e.value === null || $e.value === void 0 ? -13 : $e.value, ll = M.value === null || M.value === void 0 ? 5 : M.value, nl = Wt.value === null || Wt.value === void 0 ? 0 : Wt.value, ol = we.value === null || we.value === void 0 ? 0 : we.value, rl = At.value ? At.value : "'Lato', sans-serif", ul = ue.value ? ue.value : "1em", il = ut.value ? ut.value : "0.8em", sl = ne.value ? ne.value : 400, dl = $t.value ? $t.value : "#ffffff", cl = U.value ? U.value : "#000000", fl = P.value ? P.value : "#ffffff", vl = Yt.value ? Yt.value : "#000000";
|
|
1201
1201
|
return {
|
|
1202
1202
|
disabled: o,
|
|
1203
|
-
display:
|
|
1204
|
-
font:
|
|
1205
|
-
fontSize:
|
|
1206
|
-
fontWeight:
|
|
1207
|
-
fontFamilyMsg:
|
|
1208
|
-
fontSizeMsg:
|
|
1209
|
-
fontWeightMsg:
|
|
1210
|
-
textMessageColor:
|
|
1211
|
-
textColor:
|
|
1212
|
-
caretColor:
|
|
1213
|
-
selectionBgColor:
|
|
1214
|
-
selectionTextColor:
|
|
1215
|
-
hasBorderRadius:
|
|
1216
|
-
borderRadius:
|
|
1217
|
-
textAlign:
|
|
1218
|
-
inputWidth:
|
|
1219
|
-
activeTextStyle:
|
|
1220
|
-
sizeMediaQuery:
|
|
1221
|
-
inputReadonly:
|
|
1222
|
-
showInputEye:
|
|
1223
|
-
inputType:
|
|
1224
|
-
inputUppercase:
|
|
1225
|
-
theme:
|
|
1226
|
-
inputStyle:
|
|
1227
|
-
iconPadding:
|
|
1228
|
-
iconMargin:
|
|
1229
|
-
iconPaddingInput:
|
|
1230
|
-
iconLightTextColor:
|
|
1231
|
-
iconDarkTextColor:
|
|
1232
|
-
iconLightBgColor:
|
|
1233
|
-
iconDarkBgColor:
|
|
1234
|
-
iconBorderRadius:
|
|
1235
|
-
iconLightBgColorActive:
|
|
1236
|
-
iconDarkBgColorActive:
|
|
1237
|
-
iconWidth:
|
|
1238
|
-
iconSize:
|
|
1239
|
-
showLabel:
|
|
1240
|
-
labelBackground:
|
|
1241
|
-
labelPadding:
|
|
1242
|
-
labelBorderRadius:
|
|
1243
|
-
labelLeft:
|
|
1244
|
-
inputLabelMarginActive:
|
|
1245
|
-
labelActiveTop:
|
|
1246
|
-
labelActiveLeft:
|
|
1247
|
-
labelRight:
|
|
1248
|
-
labelActiveRight:
|
|
1249
|
-
fontFamilyLabel:
|
|
1250
|
-
fontSizeLabel:
|
|
1251
|
-
fontSizeLabelActive:
|
|
1252
|
-
fontWeightLabel:
|
|
1253
|
-
lightTextColorLabel:
|
|
1254
|
-
darkTextColorLabel:
|
|
1255
|
-
lightTextColorLabelActive:
|
|
1256
|
-
darkTextColorLabelActive:
|
|
1203
|
+
display: m,
|
|
1204
|
+
font: It,
|
|
1205
|
+
fontSize: aa,
|
|
1206
|
+
fontWeight: qt,
|
|
1207
|
+
fontFamilyMsg: Ra,
|
|
1208
|
+
fontSizeMsg: _a,
|
|
1209
|
+
fontWeightMsg: Ma,
|
|
1210
|
+
textMessageColor: Ha,
|
|
1211
|
+
textColor: Re,
|
|
1212
|
+
caretColor: nt,
|
|
1213
|
+
selectionBgColor: Ba,
|
|
1214
|
+
selectionTextColor: ta,
|
|
1215
|
+
hasBorderRadius: wa,
|
|
1216
|
+
borderRadius: Da,
|
|
1217
|
+
textAlign: d,
|
|
1218
|
+
inputWidth: Le,
|
|
1219
|
+
activeTextStyle: qa,
|
|
1220
|
+
sizeMediaQuery: mt,
|
|
1221
|
+
inputReadonly: t,
|
|
1222
|
+
showInputEye: l,
|
|
1223
|
+
inputType: n,
|
|
1224
|
+
inputUppercase: r,
|
|
1225
|
+
theme: s,
|
|
1226
|
+
inputStyle: f,
|
|
1227
|
+
iconPadding: p,
|
|
1228
|
+
iconMargin: V,
|
|
1229
|
+
iconPaddingInput: L,
|
|
1230
|
+
iconLightTextColor: W,
|
|
1231
|
+
iconDarkTextColor: J,
|
|
1232
|
+
iconLightBgColor: Me,
|
|
1233
|
+
iconDarkBgColor: ft,
|
|
1234
|
+
iconBorderRadius: Pe,
|
|
1235
|
+
iconLightBgColorActive: Je,
|
|
1236
|
+
iconDarkBgColorActive: Ua,
|
|
1237
|
+
iconWidth: Ga,
|
|
1238
|
+
iconSize: Ka,
|
|
1239
|
+
showLabel: Za,
|
|
1240
|
+
labelBackground: Qa,
|
|
1241
|
+
labelPadding: el,
|
|
1242
|
+
labelBorderRadius: tl,
|
|
1243
|
+
labelLeft: Ja,
|
|
1244
|
+
inputLabelMarginActive: Xa,
|
|
1245
|
+
labelActiveTop: al,
|
|
1246
|
+
labelActiveLeft: ll,
|
|
1247
|
+
labelRight: nl,
|
|
1248
|
+
labelActiveRight: ol,
|
|
1249
|
+
fontFamilyLabel: rl,
|
|
1250
|
+
fontSizeLabel: ul,
|
|
1251
|
+
fontSizeLabelActive: il,
|
|
1252
|
+
fontWeightLabel: sl,
|
|
1253
|
+
lightTextColorLabel: dl,
|
|
1254
|
+
darkTextColorLabel: cl,
|
|
1255
|
+
lightTextColorLabelActive: fl,
|
|
1256
|
+
darkTextColorLabelActive: vl
|
|
1257
1257
|
};
|
|
1258
|
-
}),
|
|
1259
|
-
const o =
|
|
1258
|
+
}), Ft = a(() => N.value.disabled), oa = a(() => {
|
|
1259
|
+
const o = N.value, m = je.value;
|
|
1260
1260
|
return {
|
|
1261
1261
|
display: o.display,
|
|
1262
1262
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
1263
|
-
paddingTop:
|
|
1263
|
+
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
1264
|
+
paddingTop: "0px",
|
|
1265
|
+
// Esconde o label quando não está ativo usando overflow hidden
|
|
1266
|
+
overflow: m && lt.value ? "visible" : "hidden"
|
|
1264
1267
|
};
|
|
1265
|
-
}),
|
|
1266
|
-
const o =
|
|
1268
|
+
}), ra = a(() => {
|
|
1269
|
+
const o = N.value;
|
|
1267
1270
|
if (o.fontSize)
|
|
1268
1271
|
return o.fontSize;
|
|
1269
|
-
let
|
|
1272
|
+
let m = "";
|
|
1270
1273
|
switch (o.sizeMediaQuery) {
|
|
1271
1274
|
case "sm":
|
|
1272
1275
|
return "1.2em";
|
|
@@ -1275,34 +1278,34 @@ const Pl = ["id"], _l = ["for"], Ol = {
|
|
|
1275
1278
|
case "lg":
|
|
1276
1279
|
return "2em";
|
|
1277
1280
|
default:
|
|
1278
|
-
|
|
1281
|
+
m = "1.2em";
|
|
1279
1282
|
}
|
|
1280
|
-
return
|
|
1281
|
-
}),
|
|
1282
|
-
const o =
|
|
1283
|
+
return m;
|
|
1284
|
+
}), ua = a(() => {
|
|
1285
|
+
const o = N.value, m = je.value;
|
|
1283
1286
|
return {
|
|
1284
1287
|
fontWeight: o.fontWeight,
|
|
1285
|
-
marginTop:
|
|
1288
|
+
marginTop: m && lt.value ? `${o.inputLabelMarginActive}px` : "0"
|
|
1286
1289
|
};
|
|
1287
|
-
}),
|
|
1288
|
-
const o =
|
|
1290
|
+
}), st = a(() => {
|
|
1291
|
+
const o = N.value;
|
|
1289
1292
|
return o.inputStyle !== "line" && o.hasBorderRadius ? { borderRadius: `${o.borderRadius}rem` } : {};
|
|
1290
|
-
}),
|
|
1291
|
-
const o =
|
|
1293
|
+
}), Et = a(() => N.value.font), Pt = a(() => N.value.fontFamilyMsg), ia = a(() => N.value.fontSizeMsg), Ut = a(() => N.value.fontWeightMsg), sa = a(() => N.value.textColor), Gt = a(() => N.value.theme === "dark" ? R.value : xt.value), da = a(() => N.value.textMessageColor), ca = a(() => {
|
|
1294
|
+
const o = N.value;
|
|
1292
1295
|
return o.caretColor || (o.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1293
|
-
}),
|
|
1294
|
-
const o =
|
|
1296
|
+
}), fa = a(() => {
|
|
1297
|
+
const o = N.value;
|
|
1295
1298
|
return o.selectionBgColor || (o.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1296
|
-
}),
|
|
1297
|
-
const o =
|
|
1299
|
+
}), va = a(() => {
|
|
1300
|
+
const o = N.value;
|
|
1298
1301
|
return o.selectionTextColor || (o.theme === "dark" ? "#000000" : "#ffffff");
|
|
1299
|
-
}),
|
|
1300
|
-
const o =
|
|
1302
|
+
}), Kt = a(() => {
|
|
1303
|
+
const o = N.value;
|
|
1301
1304
|
return o.display === "block" ? { width: "100%" } : {
|
|
1302
1305
|
width: `${o.inputWidth}px`
|
|
1303
1306
|
};
|
|
1304
|
-
}),
|
|
1305
|
-
switch (
|
|
1307
|
+
}), pa = a(() => {
|
|
1308
|
+
switch (Ae.value) {
|
|
1306
1309
|
case "line":
|
|
1307
1310
|
return "component__input--line";
|
|
1308
1311
|
case "border":
|
|
@@ -1310,8 +1313,8 @@ const Pl = ["id"], _l = ["for"], Ol = {
|
|
|
1310
1313
|
default:
|
|
1311
1314
|
return "component__input--background";
|
|
1312
1315
|
}
|
|
1313
|
-
}),
|
|
1314
|
-
switch (
|
|
1316
|
+
}), zt = a(() => {
|
|
1317
|
+
switch (N.value.activeTextStyle) {
|
|
1315
1318
|
case "italic":
|
|
1316
1319
|
return "component__input--active--italic";
|
|
1317
1320
|
case "oblique":
|
|
@@ -1320,7 +1323,7 @@ const Pl = ["id"], _l = ["for"], Ol = {
|
|
|
1320
1323
|
return "component__input--active--normal";
|
|
1321
1324
|
}
|
|
1322
1325
|
}), c = a(() => {
|
|
1323
|
-
switch (
|
|
1326
|
+
switch (N.value.sizeMediaQuery) {
|
|
1324
1327
|
case "sm":
|
|
1325
1328
|
return "component__sm";
|
|
1326
1329
|
case "md":
|
|
@@ -1330,221 +1333,221 @@ const Pl = ["id"], _l = ["for"], Ol = {
|
|
|
1330
1333
|
default:
|
|
1331
1334
|
return "";
|
|
1332
1335
|
}
|
|
1333
|
-
}),
|
|
1334
|
-
switch (
|
|
1336
|
+
}), w = a(() => {
|
|
1337
|
+
switch (N.value.theme) {
|
|
1335
1338
|
case "dark":
|
|
1336
1339
|
return "component__theme--dark";
|
|
1337
1340
|
default:
|
|
1338
1341
|
return "component__theme--light";
|
|
1339
1342
|
}
|
|
1340
|
-
}),
|
|
1341
|
-
const o =
|
|
1343
|
+
}), pe = a(() => N.value.inputReadonly ? "component__input--read-only" : ""), Ze = a(() => N.value.inputUppercase ? "component__input--uppercase" : ""), Ot = a(() => {
|
|
1344
|
+
const o = N.value;
|
|
1342
1345
|
return !!(o.showInputEye && o.inputType === "password");
|
|
1343
|
-
}),
|
|
1344
|
-
const o =
|
|
1345
|
-
return
|
|
1346
|
-
}),
|
|
1346
|
+
}), i = a(() => wt.value ? ht.value : ze.value), C = a(() => S.value ? S.value : `${F.value}-name-label`), De = a(() => lt.value ? it.value ? Ue.value : "" : Ue.value), je = a(() => {
|
|
1347
|
+
const o = z.value;
|
|
1348
|
+
return it.value || o != null && String(o).trim().length > 0;
|
|
1349
|
+
}), Zt = a(() => N.value.inputType === "password" ? "component__input__eye-default--hidden" : ""), ga = a(() => it.value ? "component__input--active" : "component__input--no-active"), ya = a(() => Ot.value ? "6px 50px 6px 10px" : "6px 10px"), ba = a(() => !!(Ge.value && Ie.value)), ma = a(() => {
|
|
1347
1350
|
const o = {};
|
|
1348
|
-
|
|
1349
|
-
const
|
|
1350
|
-
"aria-label":
|
|
1351
|
-
"aria-disabled":
|
|
1351
|
+
k.value && Object.keys(k.value).forEach((nt) => o[`aria-${nt}`] = k.value[nt]);
|
|
1352
|
+
const m = {
|
|
1353
|
+
"aria-label": D.value,
|
|
1354
|
+
"aria-disabled": $.value,
|
|
1352
1355
|
...o
|
|
1353
1356
|
};
|
|
1354
1357
|
return Object.fromEntries(
|
|
1355
|
-
Object.entries(
|
|
1358
|
+
Object.entries(m).filter(([Re, nt]) => nt != null)
|
|
1356
1359
|
);
|
|
1357
|
-
}),
|
|
1358
|
-
const o =
|
|
1360
|
+
}), Dt = a(() => b.value ? `${bt.value}rem` : "0"), ha = a(() => b.value ? `${Vt.value}px` : "0"), Sa = a(() => b.value ? `component__icon--${A.value}` : ""), xa = a(() => {
|
|
1361
|
+
const o = N.value;
|
|
1359
1362
|
return b.value ? o.iconPadding : "0";
|
|
1360
|
-
}),
|
|
1361
|
-
const o =
|
|
1363
|
+
}), Ca = a(() => {
|
|
1364
|
+
const o = N.value;
|
|
1362
1365
|
return b.value ? o.iconMargin : "0";
|
|
1363
|
-
}),
|
|
1364
|
-
const o =
|
|
1366
|
+
}), dt = a(() => {
|
|
1367
|
+
const o = N.value;
|
|
1365
1368
|
return b.value ? o.theme === "dark" ? o.iconDarkBgColor : o.iconLightBgColor : "transparent";
|
|
1366
|
-
}), nt = a(() => {
|
|
1367
|
-
const o = M.value;
|
|
1368
|
-
return b.value ? `${o.iconBorderRadius}rem` : "0";
|
|
1369
1369
|
}), _t = a(() => {
|
|
1370
|
-
const o =
|
|
1371
|
-
return b.value ?
|
|
1370
|
+
const o = N.value;
|
|
1371
|
+
return b.value ? `${o.iconBorderRadius}rem` : "0";
|
|
1372
1372
|
}), Jt = a(() => {
|
|
1373
|
-
const o =
|
|
1373
|
+
const o = N.value;
|
|
1374
|
+
return b.value ? A.value === "left" ? { paddingLeft: `${o.iconPaddingInput}px` } : { paddingRight: `${o.iconPaddingInput}px` } : {};
|
|
1375
|
+
}), Qt = a(() => {
|
|
1376
|
+
const o = N.value, m = je.value, Re = m ? o.lightTextColorLabelActive : o.lightTextColorLabel, nt = m ? o.darkTextColorLabelActive : o.darkTextColorLabel;
|
|
1374
1377
|
return {
|
|
1375
1378
|
fontFamily: o.fontFamilyLabel,
|
|
1376
|
-
fontSize:
|
|
1379
|
+
fontSize: m ? o.fontSizeLabelActive : o.fontSizeLabel,
|
|
1377
1380
|
fontWeight: o.fontWeightLabel,
|
|
1378
|
-
color: o.theme === "dark" ?
|
|
1379
|
-
top:
|
|
1380
|
-
left:
|
|
1381
|
-
right:
|
|
1382
|
-
transform:
|
|
1381
|
+
color: o.theme === "dark" ? nt : Re,
|
|
1382
|
+
top: m ? `${o.labelActiveTop}px` : "50%",
|
|
1383
|
+
left: m ? `${o.labelActiveLeft}px` : `${o.labelLeft}px`,
|
|
1384
|
+
right: m ? `${o.labelActiveRight}px` : `${o.labelRight}px`,
|
|
1385
|
+
transform: m ? "translateY(0)" : "translateY(-50%)",
|
|
1383
1386
|
transition: "all 0.2s ease",
|
|
1384
|
-
backgroundColor:
|
|
1385
|
-
padding:
|
|
1386
|
-
borderRadius:
|
|
1387
|
+
backgroundColor: m ? o.labelBackground : "transparent",
|
|
1388
|
+
padding: m ? o.labelPadding : "0",
|
|
1389
|
+
borderRadius: m ? `${o.labelBorderRadius}rem` : "0",
|
|
1387
1390
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
1388
|
-
...
|
|
1389
|
-
whiteSpace:
|
|
1390
|
-
wordWrap:
|
|
1391
|
-
overflowWrap:
|
|
1391
|
+
...m ? {
|
|
1392
|
+
whiteSpace: rt.value ? "nowrap" : "normal",
|
|
1393
|
+
wordWrap: rt.value ? "normal" : "break-word",
|
|
1394
|
+
overflowWrap: rt.value ? "normal" : "break-word",
|
|
1392
1395
|
maxWidth: "100%",
|
|
1393
|
-
textOverflow:
|
|
1394
|
-
overflow:
|
|
1396
|
+
textOverflow: rt.value ? "ellipsis" : "clip",
|
|
1397
|
+
overflow: rt.value ? "hidden" : "visible"
|
|
1395
1398
|
} : {}
|
|
1396
1399
|
};
|
|
1397
1400
|
});
|
|
1398
1401
|
a(() => {
|
|
1399
|
-
const o =
|
|
1402
|
+
const o = N.value;
|
|
1400
1403
|
return o.theme === "dark" ? o.darkTextColorLabelActive : o.lightTextColorLabelActive;
|
|
1401
1404
|
});
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1404
|
-
},
|
|
1405
|
-
const o =
|
|
1405
|
+
const Ht = () => {
|
|
1406
|
+
ve.value != null ? se.value === "number" && typeof ve.value == "number" ? z.value = ve.value : z.value = String(ve.value) : z.value = "", kt.value = se.value;
|
|
1407
|
+
}, Xt = () => {
|
|
1408
|
+
const o = N.value;
|
|
1406
1409
|
if (o.inputReadonly || o.disabled)
|
|
1407
1410
|
return;
|
|
1408
|
-
const
|
|
1409
|
-
|
|
1410
|
-
},
|
|
1411
|
-
if (
|
|
1411
|
+
const m = !wt.value;
|
|
1412
|
+
m ? kt.value = "text" : kt.value = se.value, wt.value = m;
|
|
1413
|
+
}, ct = a(() => kt.value === "number"), Bt = (o) => {
|
|
1414
|
+
if (se.value === "number") {
|
|
1412
1415
|
if (o === "" || o === null || o === void 0)
|
|
1413
1416
|
return "";
|
|
1414
1417
|
{
|
|
1415
|
-
const
|
|
1416
|
-
return isNaN(
|
|
1418
|
+
const m = typeof o == "number" ? o : Number(o);
|
|
1419
|
+
return isNaN(m) ? o : m;
|
|
1417
1420
|
}
|
|
1418
1421
|
}
|
|
1419
1422
|
return o;
|
|
1420
|
-
}, zt = () => {
|
|
1421
|
-
p("clicked");
|
|
1422
|
-
}, Ca = (o) => {
|
|
1423
|
-
o.stopPropagation(), !(A.value || M.value.inputReadonly) && _.value && _.value.focus();
|
|
1424
1423
|
}, Va = () => {
|
|
1425
|
-
|
|
1426
|
-
},
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1424
|
+
g("clicked");
|
|
1425
|
+
}, Ta = (o) => {
|
|
1426
|
+
o.stopPropagation(), !($.value || N.value.inputReadonly) && G.value && G.value.focus();
|
|
1427
|
+
}, ea = () => {
|
|
1428
|
+
$.value || N.value.inputReadonly || !ce.value || g("entered", Bt(z.value));
|
|
1429
|
+
}, ka = async (o) => {
|
|
1430
|
+
var Re;
|
|
1431
|
+
const m = ((Re = o.clipboardData) == null ? void 0 : Re.getData("text")) || "";
|
|
1432
|
+
g("paste", m), Qe.value && o.preventDefault();
|
|
1430
1433
|
};
|
|
1431
|
-
return
|
|
1432
|
-
|
|
1433
|
-
}, { immediate: !0 }),
|
|
1434
|
+
return re(se, (o) => {
|
|
1435
|
+
kt.value = o;
|
|
1436
|
+
}, { immediate: !0 }), re(ve, (o) => {
|
|
1434
1437
|
if (o != null)
|
|
1435
|
-
if (
|
|
1436
|
-
o !==
|
|
1438
|
+
if (se.value === "number" && typeof o == "number")
|
|
1439
|
+
o !== z.value && (z.value = o);
|
|
1437
1440
|
else {
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1441
|
+
const m = String(o);
|
|
1442
|
+
m !== z.value && (z.value = m);
|
|
1440
1443
|
}
|
|
1441
1444
|
else
|
|
1442
|
-
|
|
1443
|
-
}, { immediate: !0 }),
|
|
1444
|
-
|
|
1445
|
-
}),
|
|
1446
|
-
|
|
1447
|
-
}),
|
|
1448
|
-
|
|
1449
|
-
}, { immediate: !0 }),
|
|
1450
|
-
|
|
1451
|
-
}),
|
|
1445
|
+
z.value !== "" && (z.value = "");
|
|
1446
|
+
}, { immediate: !0 }), re(z, (o) => {
|
|
1447
|
+
Oe.value && typeof o == "string" && (o = o.trim()), g("changed", Bt(o));
|
|
1448
|
+
}), re(it, (o) => {
|
|
1449
|
+
g(o ? "focused" : "blurred");
|
|
1450
|
+
}), re(wt, (o) => {
|
|
1451
|
+
g("show-input-eye", o);
|
|
1452
|
+
}, { immediate: !0 }), re(z, (o) => {
|
|
1453
|
+
Oe.value && typeof o == "string" && (o = o.trim()), g("current-value", Bt(o));
|
|
1454
|
+
}), re(se, (o) => {
|
|
1452
1455
|
o === "password" && nextTick(() => {
|
|
1453
|
-
const
|
|
1454
|
-
|
|
1456
|
+
const m = document.getElementById(S.value);
|
|
1457
|
+
m && (m.type = "password", m.removeAttribute("autocomplete"));
|
|
1455
1458
|
});
|
|
1456
|
-
}), (o,
|
|
1459
|
+
}), (o, m) => u(F) ? (O(), K("div", $a({
|
|
1457
1460
|
key: 0,
|
|
1458
|
-
class: ["nb-wrapper",
|
|
1459
|
-
style: [
|
|
1461
|
+
class: ["nb-wrapper", Ft.value],
|
|
1462
|
+
style: [oa.value, Kt.value, st.value],
|
|
1460
1463
|
role: "input"
|
|
1461
|
-
},
|
|
1462
|
-
|
|
1463
|
-
id: u(
|
|
1464
|
-
class:
|
|
1465
|
-
style:
|
|
1466
|
-
onClick:
|
|
1464
|
+
}, ma.value), [
|
|
1465
|
+
xe("div", {
|
|
1466
|
+
id: u(F),
|
|
1467
|
+
class: Ye(["nb-reset", "component", c.value, w.value, pe.value, pa.value]),
|
|
1468
|
+
style: Ne([ua.value, Kt.value, st.value]),
|
|
1469
|
+
onClick: Va
|
|
1467
1470
|
}, [
|
|
1468
|
-
u(
|
|
1471
|
+
u(lt) ? (O(), K("label", {
|
|
1469
1472
|
key: 0,
|
|
1470
|
-
for:
|
|
1473
|
+
for: C.value,
|
|
1471
1474
|
class: "component__label",
|
|
1472
|
-
style:
|
|
1473
|
-
onClick:
|
|
1475
|
+
style: Ne([Qt.value]),
|
|
1476
|
+
onClick: Ta
|
|
1474
1477
|
}, [
|
|
1475
|
-
|
|
1476
|
-
e.required ? (O(),
|
|
1477
|
-
], 12,
|
|
1478
|
-
|
|
1478
|
+
jt(Rt(u(Nt)), 1),
|
|
1479
|
+
e.required ? (O(), K("span", _l, "*")) : ye("", !0)
|
|
1480
|
+
], 12, Ol)) : ye("", !0),
|
|
1481
|
+
Ot.value ? (O(), K("div", {
|
|
1479
1482
|
key: 1,
|
|
1480
|
-
class:
|
|
1481
|
-
style:
|
|
1482
|
-
onClick:
|
|
1483
|
+
class: Ye(["component__eye", ga.value]),
|
|
1484
|
+
style: Ne([st.value]),
|
|
1485
|
+
onClick: Xt
|
|
1483
1486
|
}, [
|
|
1484
|
-
|
|
1485
|
-
for:
|
|
1486
|
-
class:
|
|
1487
|
+
xe("label", {
|
|
1488
|
+
for: C.value,
|
|
1489
|
+
class: Ye(["component__eye-icon", "fas"])
|
|
1487
1490
|
}, [
|
|
1488
|
-
e.inputEyeCustomIcon ? (O(),
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
], !0) :
|
|
1492
|
-
|
|
1491
|
+
e.inputEyeCustomIcon ? (O(), K("span", jl, [
|
|
1492
|
+
wt.value ? La(o.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
1493
|
+
m[4] || (m[4] = jt("show"))
|
|
1494
|
+
], !0) : La(o.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1495
|
+
m[5] || (m[5] = jt("hidden"))
|
|
1493
1496
|
], !0)
|
|
1494
|
-
])) : (O(),
|
|
1497
|
+
])) : (O(), K("span", ql, Rt(i.value), 1))
|
|
1495
1498
|
], 8, Hl)
|
|
1496
|
-
], 6)) :
|
|
1497
|
-
Pa(
|
|
1499
|
+
], 6)) : ye("", !0),
|
|
1500
|
+
Pa(xe("input", {
|
|
1498
1501
|
ref_key: "inputRef",
|
|
1499
|
-
ref:
|
|
1500
|
-
"onUpdate:modelValue":
|
|
1501
|
-
id:
|
|
1502
|
-
name:
|
|
1503
|
-
type:
|
|
1504
|
-
class:
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1502
|
+
ref: G,
|
|
1503
|
+
"onUpdate:modelValue": m[0] || (m[0] = (Re) => z.value = Re),
|
|
1504
|
+
id: C.value,
|
|
1505
|
+
name: C.value,
|
|
1506
|
+
type: kt.value,
|
|
1507
|
+
class: Ye(["component__input", [
|
|
1508
|
+
Ze.value,
|
|
1509
|
+
Zt.value,
|
|
1510
|
+
zt.value
|
|
1508
1511
|
]]),
|
|
1509
|
-
placeholder:
|
|
1510
|
-
disabled: u(
|
|
1512
|
+
placeholder: De.value,
|
|
1513
|
+
disabled: u($) || u(j),
|
|
1511
1514
|
required: e.required,
|
|
1512
|
-
readonly: u(
|
|
1515
|
+
readonly: u(j),
|
|
1513
1516
|
autocomplete: e.inputAutocomplete,
|
|
1514
|
-
tabindex: u(
|
|
1515
|
-
min:
|
|
1516
|
-
max:
|
|
1517
|
-
step:
|
|
1517
|
+
tabindex: u($) || u(j) ? -1 : u(ot),
|
|
1518
|
+
min: ct.value ? e.min : void 0,
|
|
1519
|
+
max: ct.value ? e.max : void 0,
|
|
1520
|
+
step: ct.value ? e.step : void 0,
|
|
1518
1521
|
role: "input",
|
|
1519
|
-
style:
|
|
1520
|
-
onFocus:
|
|
1521
|
-
onBlur:
|
|
1522
|
-
onKeydown:
|
|
1523
|
-
onPaste:
|
|
1522
|
+
style: Ne([st.value, Jt.value]),
|
|
1523
|
+
onFocus: m[1] || (m[1] = (Re) => it.value = !0),
|
|
1524
|
+
onBlur: m[2] || (m[2] = (Re) => it.value = !1),
|
|
1525
|
+
onKeydown: m[3] || (m[3] = na((Re) => !u($) && u(ce) && ea(), ["enter"])),
|
|
1526
|
+
onPaste: ka
|
|
1524
1527
|
}, null, 46, Yl), [
|
|
1525
|
-
[
|
|
1528
|
+
[ml, z.value]
|
|
1526
1529
|
]),
|
|
1527
|
-
u(b) ? (O(),
|
|
1530
|
+
u(b) ? (O(), K("label", {
|
|
1528
1531
|
key: 2,
|
|
1529
|
-
for:
|
|
1530
|
-
class:
|
|
1532
|
+
for: C.value,
|
|
1533
|
+
class: Ye(["component__icon", Sa.value])
|
|
1531
1534
|
}, [
|
|
1532
|
-
|
|
1533
|
-
|
|
1535
|
+
La(o.$slots, "icon", {}, () => [
|
|
1536
|
+
m[6] || (m[6] = xe("span", null, "♥", -1))
|
|
1534
1537
|
], !0)
|
|
1535
|
-
], 10, Ul)) :
|
|
1538
|
+
], 10, Ul)) : ye("", !0)
|
|
1536
1539
|
], 14, Pl),
|
|
1537
|
-
|
|
1540
|
+
ba.value ? (O(), K("div", {
|
|
1538
1541
|
key: 0,
|
|
1539
|
-
class:
|
|
1542
|
+
class: Ye(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
1540
1543
|
}, [
|
|
1541
|
-
|
|
1542
|
-
|
|
1544
|
+
La(o.$slots, "message", {}, () => [
|
|
1545
|
+
jt(Rt(e.message), 1)
|
|
1543
1546
|
], !0)
|
|
1544
|
-
], 2)) :
|
|
1545
|
-
], 16)) :
|
|
1547
|
+
], 2)) : ye("", !0)
|
|
1548
|
+
], 16)) : ye("", !0);
|
|
1546
1549
|
}
|
|
1547
|
-
}), Kl = /* @__PURE__ */
|
|
1550
|
+
}), Kl = /* @__PURE__ */ Oa(Gl, [["__scopeId", "data-v-bc390fa8"]]);
|
|
1548
1551
|
const Zl = ["for"], Jl = {
|
|
1549
1552
|
key: 0,
|
|
1550
1553
|
class: "component__label--required"
|
|
@@ -1562,8 +1565,8 @@ const Zl = ["for"], Jl = {
|
|
|
1562
1565
|
type: String,
|
|
1563
1566
|
default: "b",
|
|
1564
1567
|
validator: (e = "b") => {
|
|
1565
|
-
const
|
|
1566
|
-
return ["b", "ib"].includes(
|
|
1568
|
+
const y = e.toLowerCase();
|
|
1569
|
+
return ["b", "ib"].includes(y);
|
|
1567
1570
|
}
|
|
1568
1571
|
},
|
|
1569
1572
|
tabIndex: {
|
|
@@ -1823,6 +1826,11 @@ const Zl = ["for"], Jl = {
|
|
|
1823
1826
|
type: Number,
|
|
1824
1827
|
default: 0
|
|
1825
1828
|
},
|
|
1829
|
+
labelBreakOnActive: {
|
|
1830
|
+
type: Boolean,
|
|
1831
|
+
default: !0,
|
|
1832
|
+
validator: (e) => typeof e == "boolean" && [!0, !1].includes(e)
|
|
1833
|
+
},
|
|
1826
1834
|
labelLeft: {
|
|
1827
1835
|
type: Number,
|
|
1828
1836
|
default: 5
|
|
@@ -1889,169 +1897,178 @@ const Zl = ["for"], Jl = {
|
|
|
1889
1897
|
}
|
|
1890
1898
|
},
|
|
1891
1899
|
emits: ["clicked", "changed", "removed", "added", "input-changed", "focused", "blurred", "paste"],
|
|
1892
|
-
setup(e, { emit:
|
|
1900
|
+
setup(e, { emit: y }) {
|
|
1893
1901
|
Wa((c) => ({
|
|
1894
|
-
"
|
|
1895
|
-
"
|
|
1896
|
-
"
|
|
1897
|
-
"
|
|
1898
|
-
"
|
|
1899
|
-
|
|
1900
|
-
"
|
|
1901
|
-
"
|
|
1902
|
-
"
|
|
1903
|
-
"
|
|
1904
|
-
|
|
1905
|
-
"
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
"
|
|
1909
|
-
"
|
|
1910
|
-
"
|
|
1911
|
-
|
|
1912
|
-
"
|
|
1913
|
-
|
|
1914
|
-
"
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
"
|
|
1919
|
-
|
|
1920
|
-
})),
|
|
1921
|
-
|
|
1902
|
+
"4b2d2ea2": z.value,
|
|
1903
|
+
"0ac199f5": kt.value,
|
|
1904
|
+
"96b3ef5a": u(ht),
|
|
1905
|
+
"660ed37b": u(Xe),
|
|
1906
|
+
"47d24d74": u(Ue),
|
|
1907
|
+
eec899e2: u(ot),
|
|
1908
|
+
"677952e7": u(ze),
|
|
1909
|
+
"54dbb5b0": u(ke),
|
|
1910
|
+
"6c8e2e6d": u(gt),
|
|
1911
|
+
"33c48fd6": u(pt),
|
|
1912
|
+
b36d55e4: u(xt),
|
|
1913
|
+
"31da8aae": u(et),
|
|
1914
|
+
"044cdc01": u(T),
|
|
1915
|
+
"0af1604a": u(R),
|
|
1916
|
+
"0ad34078": u(ve),
|
|
1917
|
+
"0736086a": u(Ct),
|
|
1918
|
+
"54a56dae": $t.value,
|
|
1919
|
+
"72b51dfe": it.value,
|
|
1920
|
+
"03c61660": N.value,
|
|
1921
|
+
fc9daf30: Ft.value,
|
|
1922
|
+
"3c10729a": c.styleButtonColor,
|
|
1923
|
+
a1cac3d0: G.value,
|
|
1924
|
+
d325ff42: u(vt),
|
|
1925
|
+
dc712f50: u(Lt),
|
|
1926
|
+
"4c82aaf9": u(Be),
|
|
1927
|
+
cd1b941c: u(me)
|
|
1928
|
+
})), Aa(() => {
|
|
1929
|
+
_.value.length > 0 && (we.value = _.value);
|
|
1922
1930
|
});
|
|
1923
|
-
const
|
|
1924
|
-
nbId:
|
|
1925
|
-
display:
|
|
1926
|
-
textColor:
|
|
1927
|
-
paddingX:
|
|
1928
|
-
paddingY:
|
|
1929
|
-
borderRadius:
|
|
1930
|
-
disabled:
|
|
1931
|
-
fontFamily:
|
|
1932
|
-
fontSize:
|
|
1933
|
-
fontWeight:
|
|
1934
|
-
currentList:
|
|
1935
|
-
allowDuplicates:
|
|
1936
|
-
minChips:
|
|
1937
|
-
maxChips:
|
|
1938
|
-
inputPosition:
|
|
1939
|
-
width:
|
|
1940
|
-
inputName:
|
|
1941
|
-
inputPlaceholder:
|
|
1942
|
-
inputUppercase:
|
|
1943
|
-
inputReadonly:
|
|
1944
|
-
blockPaste:
|
|
1945
|
-
inputAutocomplete:
|
|
1946
|
-
required:
|
|
1947
|
-
textAlign:
|
|
1948
|
-
hasBorderRadius:
|
|
1931
|
+
const g = y, h = e, {
|
|
1932
|
+
nbId: F,
|
|
1933
|
+
display: Q,
|
|
1934
|
+
textColor: ce,
|
|
1935
|
+
paddingX: D,
|
|
1936
|
+
paddingY: k,
|
|
1937
|
+
borderRadius: x,
|
|
1938
|
+
disabled: I,
|
|
1939
|
+
fontFamily: ae,
|
|
1940
|
+
fontSize: le,
|
|
1941
|
+
fontWeight: X,
|
|
1942
|
+
currentList: _,
|
|
1943
|
+
allowDuplicates: $,
|
|
1944
|
+
minChips: H,
|
|
1945
|
+
maxChips: ie,
|
|
1946
|
+
inputPosition: q,
|
|
1947
|
+
width: Fe,
|
|
1948
|
+
inputName: be,
|
|
1949
|
+
inputPlaceholder: ee,
|
|
1950
|
+
inputUppercase: Ce,
|
|
1951
|
+
inputReadonly: fe,
|
|
1952
|
+
blockPaste: Ae,
|
|
1953
|
+
inputAutocomplete: Ve,
|
|
1954
|
+
required: Te,
|
|
1955
|
+
textAlign: j,
|
|
1956
|
+
hasBorderRadius: Qe,
|
|
1949
1957
|
activeTextStyle: v,
|
|
1950
|
-
theme:
|
|
1951
|
-
inputStyle:
|
|
1952
|
-
lightBgColor:
|
|
1953
|
-
lightBgColorFocus:
|
|
1954
|
-
lightBorderColor:
|
|
1955
|
-
lightBorderColorFocus:
|
|
1956
|
-
lightDisabledBgColor:
|
|
1957
|
-
lightTextColor:
|
|
1958
|
-
lightChipBgColor:
|
|
1959
|
-
lightChipTextColor:
|
|
1960
|
-
lightChipRemoveColor:
|
|
1961
|
-
lightDisabledBorderColor:
|
|
1962
|
-
darkBgColor:
|
|
1963
|
-
darkBgColorFocus:
|
|
1964
|
-
darkBorderColor:
|
|
1965
|
-
darkBorderColorFocus:
|
|
1966
|
-
darkDisabledBgColor:
|
|
1967
|
-
darkTextColor:
|
|
1968
|
-
darkChipBgColor:
|
|
1958
|
+
theme: se,
|
|
1959
|
+
inputStyle: Oe,
|
|
1960
|
+
lightBgColor: Xe,
|
|
1961
|
+
lightBgColorFocus: S,
|
|
1962
|
+
lightBorderColor: Ue,
|
|
1963
|
+
lightBorderColorFocus: ve,
|
|
1964
|
+
lightDisabledBgColor: vt,
|
|
1965
|
+
lightTextColor: ht,
|
|
1966
|
+
lightChipBgColor: ot,
|
|
1967
|
+
lightChipTextColor: ze,
|
|
1968
|
+
lightChipRemoveColor: ke,
|
|
1969
|
+
lightDisabledBorderColor: Lt,
|
|
1970
|
+
darkBgColor: pt,
|
|
1971
|
+
darkBgColorFocus: St,
|
|
1972
|
+
darkBorderColor: xt,
|
|
1973
|
+
darkBorderColorFocus: Ct,
|
|
1974
|
+
darkDisabledBgColor: Be,
|
|
1975
|
+
darkTextColor: gt,
|
|
1976
|
+
darkChipBgColor: et,
|
|
1969
1977
|
darkChipTextColor: T,
|
|
1970
|
-
darkChipRemoveColor:
|
|
1971
|
-
darkDisabledBorderColor:
|
|
1978
|
+
darkChipRemoveColor: R,
|
|
1979
|
+
darkDisabledBorderColor: me,
|
|
1972
1980
|
tabIndex: te,
|
|
1973
|
-
hasTabIndexEnter:
|
|
1981
|
+
hasTabIndexEnter: he,
|
|
1974
1982
|
ariaLabel: tt,
|
|
1975
|
-
ariaAttrs:
|
|
1976
|
-
caretColor:
|
|
1983
|
+
ariaAttrs: Ge,
|
|
1984
|
+
caretColor: Ie,
|
|
1977
1985
|
selectionBgColor: b,
|
|
1978
|
-
selectionTextColor:
|
|
1979
|
-
showLabel:
|
|
1980
|
-
label:
|
|
1981
|
-
labelBackground:
|
|
1982
|
-
labelPadding:
|
|
1983
|
-
labelBorderRadius:
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
1986
|
+
selectionTextColor: A,
|
|
1987
|
+
showLabel: de,
|
|
1988
|
+
label: ge,
|
|
1989
|
+
labelBackground: Se,
|
|
1990
|
+
labelPadding: _e,
|
|
1991
|
+
labelBorderRadius: We,
|
|
1992
|
+
labelBreakOnActive: Ee,
|
|
1993
|
+
labelLeft: He,
|
|
1994
|
+
inputLabelMarginActive: qe,
|
|
1995
|
+
labelActiveTop: Ke,
|
|
1996
|
+
labelActiveLeft: at,
|
|
1997
|
+
fontFamilyLabel: yt,
|
|
1998
|
+
fontSizeLabel: Mt,
|
|
1999
|
+
fontSizeLabelActive: Vt,
|
|
2000
|
+
fontWeightLabel: bt,
|
|
2001
|
+
lightTextColorLabel: lt,
|
|
2002
|
+
lightTextColorLabelActive: Nt,
|
|
2003
|
+
darkTextColorLabel: rt,
|
|
2004
|
+
darkTextColorLabelActive: Tt,
|
|
2005
|
+
fontFamilyChip: B,
|
|
2006
|
+
fontSizeChip: E,
|
|
2007
|
+
fontWeightChip: Z
|
|
2008
|
+
} = Ea(h), Y = oe(""), $e = oe(null), M = oe(null), Wt = oe(null), we = oe([]), At = oe(!1), ue = a(() => {
|
|
2009
|
+
const c = I.value ? "component-disabled" : "", w = Q.value !== "b" ? "inline-block" : "block", pe = !Fe.value || Fe.value < 185 ? 185 : Fe.value, Ze = ce ? ce.value : "ffffff", Ot = Ie.value ? Ie.value : "", i = b.value ? b.value : "", C = A.value ? A.value : "", De = D.value !== 0 && !D.value || D.value < 0 ? 1 : D.value, je = k.value !== 0 && !k.value || k.value < 0 ? 0.2 : k.value, Zt = x.value !== 0 && !x.value || x.value < 0 ? 0 : x.value, ga = ae.value ? ae.value : "'Lato', sans-serif", ya = le.value ? le.value : "1.2em", ba = X.value !== 0 && !X.value || X.value < 0 ? 100 : X.value, ma = H.value !== 0 && !H.value || H.value < 0 ? 0 : H.value, Dt = ie.value !== 0 && !ie.value || ie.value < 0 ? 10 : ie.value, ha = !q.value || !["top", "bottom"].includes(q.value) ? "bottom" : q.value, Sa = !Oe.value || !["background", "line", "border"].includes(Oe.value) ? "background" : Oe.value, xa = se.value ? se.value : "light", Ca = de.value ? de.value : !1, dt = He.value !== 0 && !He.value || He.value < 0 ? 5 : He.value, _t = Se.value ? Se.value : "transparent", Jt = qe.value !== 0 && !qe.value || qe.value < 0 ? 15 : qe.value, Qt = _e.value ? _e.value : "1px 5px", Ht = We.value !== 0 && !We.value || We.value < 0 ? 0 : We.value, Xt = Ke.value === null || Ke.value === void 0 ? -13 : Ke.value, ct = at.value === null || at.value === void 0 ? 5 : at.value, Bt = yt.value ? yt.value : "'Lato', sans-serif", Va = Mt.value ? Mt.value : "1em", Ta = Vt.value ? Vt.value : "0.8em", ea = bt.value ? bt.value : 400, ka = lt.value ? lt.value : "#333333", o = rt.value ? rt.value : "#ffffff", m = Nt.value ? Nt.value : "#333333", Re = Tt.value ? Tt.value : "#ffffff", nt = B.value ? B.value : "'Lato', sans-serif", Ba = E.value ? E.value : "1.2em", ta = Z.value ? Z.value : 400;
|
|
2001
2010
|
return {
|
|
2002
2011
|
disabled: c,
|
|
2003
|
-
display:
|
|
2004
|
-
width:
|
|
2005
|
-
font:
|
|
2006
|
-
fontSize:
|
|
2007
|
-
fontWeight:
|
|
2008
|
-
textColor:
|
|
2009
|
-
caretColor:
|
|
2010
|
-
selectionBgColor:
|
|
2011
|
-
selectionTextColor:
|
|
2012
|
-
paddingX:
|
|
2013
|
-
paddingY:
|
|
2014
|
-
borderRadius:
|
|
2015
|
-
minChips:
|
|
2016
|
-
maxChips:
|
|
2017
|
-
inputPosition:
|
|
2018
|
-
inputStyle:
|
|
2019
|
-
theme:
|
|
2020
|
-
showLabel:
|
|
2021
|
-
labelLeft:
|
|
2022
|
-
labelBackground:
|
|
2023
|
-
inputLabelMarginActive:
|
|
2024
|
-
labelPadding:
|
|
2025
|
-
labelBorderRadius:
|
|
2026
|
-
labelActiveTop:
|
|
2027
|
-
labelActiveLeft:
|
|
2028
|
-
fontFamilyLabel:
|
|
2029
|
-
fontSizeLabel:
|
|
2030
|
-
fontSizeLabelActive:
|
|
2031
|
-
fontWeightLabel:
|
|
2032
|
-
lightTextColorLabel:
|
|
2012
|
+
display: w,
|
|
2013
|
+
width: pe,
|
|
2014
|
+
font: ga,
|
|
2015
|
+
fontSize: ya,
|
|
2016
|
+
fontWeight: ba,
|
|
2017
|
+
textColor: Ze,
|
|
2018
|
+
caretColor: Ot,
|
|
2019
|
+
selectionBgColor: i,
|
|
2020
|
+
selectionTextColor: C,
|
|
2021
|
+
paddingX: De,
|
|
2022
|
+
paddingY: je,
|
|
2023
|
+
borderRadius: Zt,
|
|
2024
|
+
minChips: ma,
|
|
2025
|
+
maxChips: Dt,
|
|
2026
|
+
inputPosition: ha,
|
|
2027
|
+
inputStyle: Sa,
|
|
2028
|
+
theme: xa,
|
|
2029
|
+
showLabel: Ca,
|
|
2030
|
+
labelLeft: dt,
|
|
2031
|
+
labelBackground: _t,
|
|
2032
|
+
inputLabelMarginActive: Jt,
|
|
2033
|
+
labelPadding: Qt,
|
|
2034
|
+
labelBorderRadius: Ht,
|
|
2035
|
+
labelActiveTop: Xt,
|
|
2036
|
+
labelActiveLeft: ct,
|
|
2037
|
+
fontFamilyLabel: Bt,
|
|
2038
|
+
fontSizeLabel: Va,
|
|
2039
|
+
fontSizeLabelActive: Ta,
|
|
2040
|
+
fontWeightLabel: ea,
|
|
2041
|
+
lightTextColorLabel: ka,
|
|
2033
2042
|
darkTextColorLabel: o,
|
|
2034
|
-
lightTextColorLabelActive:
|
|
2035
|
-
darkTextColorLabelActive:
|
|
2036
|
-
fontFamilyChip:
|
|
2037
|
-
fontSizeChip:
|
|
2038
|
-
fontWeightChip:
|
|
2043
|
+
lightTextColorLabelActive: m,
|
|
2044
|
+
darkTextColorLabelActive: Re,
|
|
2045
|
+
fontFamilyChip: nt,
|
|
2046
|
+
fontSizeChip: Ba,
|
|
2047
|
+
fontWeightChip: ta
|
|
2039
2048
|
};
|
|
2040
|
-
}),
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2049
|
+
}), ut = a(() => ue.value.disabled), ne = a(() => {
|
|
2050
|
+
const c = ue.value, w = Et.value;
|
|
2051
|
+
return {
|
|
2052
|
+
display: c.display,
|
|
2053
|
+
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
2054
|
+
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
2055
|
+
paddingTop: "0px",
|
|
2056
|
+
// Esconde o label quando não está ativo usando overflow hidden
|
|
2057
|
+
overflow: w && de.value ? "visible" : "hidden"
|
|
2058
|
+
};
|
|
2059
|
+
}), $t = a(() => {
|
|
2060
|
+
const c = ue.value;
|
|
2044
2061
|
return c.fontSize ? c.fontSize : "1.2em";
|
|
2045
|
-
}),
|
|
2046
|
-
const c =
|
|
2062
|
+
}), P = a(() => {
|
|
2063
|
+
const c = ue.value, w = Et.value;
|
|
2047
2064
|
return {
|
|
2048
2065
|
color: c.textColor,
|
|
2049
2066
|
padding: `${c.paddingY}rem ${c.paddingX}rem`,
|
|
2050
2067
|
fontWeight: c.fontWeight,
|
|
2051
|
-
textAlign:
|
|
2052
|
-
marginTop:
|
|
2068
|
+
textAlign: j.value,
|
|
2069
|
+
marginTop: w && de.value ? `${c.inputLabelMarginActive}px` : "0"
|
|
2053
2070
|
};
|
|
2054
|
-
}),
|
|
2071
|
+
}), U = a(() => {
|
|
2055
2072
|
switch (v.value) {
|
|
2056
2073
|
case "italic":
|
|
2057
2074
|
return "component__text--italic";
|
|
@@ -2060,70 +2077,79 @@ const Zl = ["for"], Jl = {
|
|
|
2060
2077
|
default:
|
|
2061
2078
|
return "component__text--normal";
|
|
2062
2079
|
}
|
|
2063
|
-
}),
|
|
2064
|
-
const c =
|
|
2065
|
-
return c.inputStyle !== "line" &&
|
|
2066
|
-
}),
|
|
2080
|
+
}), Yt = a(() => {
|
|
2081
|
+
const c = ue.value;
|
|
2082
|
+
return c.inputStyle !== "line" && Qe.value ? { borderRadius: `${c.borderRadius}rem` } : {};
|
|
2083
|
+
}), z = a(() => ue.value.font), G = a(() => ue.value.textColor), kt = a(() => ue.value.inputPosition === "top" ? "column" : "column-reverse"), wt = a(() => {
|
|
2067
2084
|
const c = {};
|
|
2068
|
-
|
|
2069
|
-
const
|
|
2085
|
+
Ge.value && Object.keys(Ge.value).forEach((Ze) => c[`aria-${Ze}`] = Ge.value[Ze]);
|
|
2086
|
+
const w = {
|
|
2070
2087
|
"aria-label": tt.value,
|
|
2071
|
-
"aria-disabled":
|
|
2088
|
+
"aria-disabled": I.value,
|
|
2072
2089
|
...c
|
|
2073
2090
|
};
|
|
2074
2091
|
return Object.fromEntries(
|
|
2075
|
-
Object.entries(
|
|
2092
|
+
Object.entries(w).filter(([pe, Ze]) => Ze != null)
|
|
2076
2093
|
);
|
|
2077
|
-
}),
|
|
2078
|
-
const c =
|
|
2094
|
+
}), it = a(() => {
|
|
2095
|
+
const c = ue.value;
|
|
2079
2096
|
return c.caretColor || (c.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2080
|
-
}),
|
|
2081
|
-
const c =
|
|
2097
|
+
}), N = a(() => {
|
|
2098
|
+
const c = ue.value;
|
|
2082
2099
|
return c.selectionBgColor || (c.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2083
|
-
}),
|
|
2084
|
-
const c =
|
|
2100
|
+
}), Ft = a(() => {
|
|
2101
|
+
const c = ue.value;
|
|
2085
2102
|
return c.selectionTextColor || (c.theme === "dark" ? "#000000" : "#ffffff");
|
|
2086
|
-
}),
|
|
2087
|
-
caretColor:
|
|
2088
|
-
})),
|
|
2089
|
-
"--selection-bg-color":
|
|
2090
|
-
"--selection-text-color":
|
|
2091
|
-
})),
|
|
2092
|
-
const c =
|
|
2103
|
+
}), oa = a(() => ({
|
|
2104
|
+
caretColor: it.value
|
|
2105
|
+
})), ra = a(() => ({
|
|
2106
|
+
"--selection-bg-color": N.value,
|
|
2107
|
+
"--selection-text-color": Ft.value
|
|
2108
|
+
})), ua = a(() => {
|
|
2109
|
+
const c = ue.value, w = {
|
|
2093
2110
|
width: `${c.width}px`
|
|
2094
2111
|
};
|
|
2095
|
-
return c.display === "block" ? { width: "auto" } :
|
|
2096
|
-
}),
|
|
2097
|
-
const c =
|
|
2112
|
+
return c.display === "block" ? { width: "auto" } : w;
|
|
2113
|
+
}), st = a(() => be.value ? be.value : `${F.value}-name-label`), Et = a(() => At.value || we.value.length > 0 || Y.value && Y.value.trim().length > 0), Pt = a(() => de.value ? At.value || we.value.length > 0 ? ee.value : "" : ee.value), ia = a(() => {
|
|
2114
|
+
const c = ue.value, w = Et.value, pe = w ? c.lightTextColorLabelActive : c.lightTextColorLabel, Ze = w ? c.darkTextColorLabelActive : c.darkTextColorLabel;
|
|
2098
2115
|
return {
|
|
2099
2116
|
fontFamily: c.fontFamilyLabel,
|
|
2100
|
-
fontSize:
|
|
2117
|
+
fontSize: w ? c.fontSizeLabelActive : c.fontSizeLabel,
|
|
2101
2118
|
fontWeight: c.fontWeightLabel,
|
|
2102
|
-
color: c.theme === "dark" ?
|
|
2103
|
-
top:
|
|
2104
|
-
left:
|
|
2105
|
-
transform:
|
|
2119
|
+
color: c.theme === "dark" ? Ze : pe,
|
|
2120
|
+
top: w ? `${c.labelActiveTop}px` : "50%",
|
|
2121
|
+
left: w ? `${c.labelActiveLeft}px` : `${c.labelLeft}px`,
|
|
2122
|
+
transform: w ? "translateY(0)" : "translateY(-50%)",
|
|
2106
2123
|
transition: "all 0.2s ease",
|
|
2107
|
-
backgroundColor:
|
|
2108
|
-
padding:
|
|
2109
|
-
borderRadius:
|
|
2124
|
+
backgroundColor: w ? c.labelBackground : "transparent",
|
|
2125
|
+
padding: w ? c.labelPadding : "0",
|
|
2126
|
+
borderRadius: w ? `${c.labelBorderRadius}rem` : "0",
|
|
2127
|
+
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
2128
|
+
...w ? {
|
|
2129
|
+
whiteSpace: Ee.value ? "nowrap" : "normal",
|
|
2130
|
+
wordWrap: Ee.value ? "normal" : "break-word",
|
|
2131
|
+
overflowWrap: Ee.value ? "normal" : "break-word",
|
|
2132
|
+
maxWidth: "100%",
|
|
2133
|
+
textOverflow: Ee.value ? "ellipsis" : "clip",
|
|
2134
|
+
overflow: Ee.value ? "hidden" : "visible"
|
|
2135
|
+
} : {}
|
|
2110
2136
|
};
|
|
2111
|
-
}),
|
|
2112
|
-
const c =
|
|
2137
|
+
}), Ut = a(() => {
|
|
2138
|
+
const c = ue.value;
|
|
2113
2139
|
return {
|
|
2114
2140
|
fontSize: c.fontSizeChip,
|
|
2115
2141
|
fontWeight: c.fontWeightChip,
|
|
2116
2142
|
fontFamily: c.fontFamilyChip
|
|
2117
2143
|
};
|
|
2118
|
-
}),
|
|
2119
|
-
switch (
|
|
2144
|
+
}), sa = a(() => {
|
|
2145
|
+
switch (se.value) {
|
|
2120
2146
|
case "dark":
|
|
2121
2147
|
return "component__theme--dark";
|
|
2122
2148
|
default:
|
|
2123
2149
|
return "component__theme--light";
|
|
2124
2150
|
}
|
|
2125
|
-
}),
|
|
2126
|
-
switch (
|
|
2151
|
+
}), Gt = a(() => {
|
|
2152
|
+
switch (Oe.value) {
|
|
2127
2153
|
case "line":
|
|
2128
2154
|
return "component__input--line";
|
|
2129
2155
|
case "border":
|
|
@@ -2131,106 +2157,106 @@ const Zl = ["for"], Jl = {
|
|
|
2131
2157
|
default:
|
|
2132
2158
|
return "component__input--background";
|
|
2133
2159
|
}
|
|
2134
|
-
}),
|
|
2135
|
-
|
|
2136
|
-
},
|
|
2137
|
-
|
|
2138
|
-
},
|
|
2139
|
-
|
|
2140
|
-
},
|
|
2141
|
-
var
|
|
2142
|
-
const
|
|
2143
|
-
|
|
2144
|
-
},
|
|
2145
|
-
if (!(
|
|
2160
|
+
}), da = () => {
|
|
2161
|
+
g("clicked");
|
|
2162
|
+
}, ca = () => {
|
|
2163
|
+
At.value = !0, g("focused");
|
|
2164
|
+
}, fa = () => {
|
|
2165
|
+
At.value = !1, g("blurred");
|
|
2166
|
+
}, va = async (c) => {
|
|
2167
|
+
var pe;
|
|
2168
|
+
const w = ((pe = c.clipboardData) == null ? void 0 : pe.getData("text")) || "";
|
|
2169
|
+
g("paste", w), Ae.value && c.preventDefault();
|
|
2170
|
+
}, Kt = (c) => {
|
|
2171
|
+
if (!(I.value || fe.value) && c.key === "Enter" && Y.value.trim() !== "") {
|
|
2146
2172
|
c.preventDefault();
|
|
2147
|
-
let
|
|
2148
|
-
|
|
2173
|
+
let w = Y.value.trim();
|
|
2174
|
+
Ce.value && (w = w.toUpperCase()), ($.value || !we.value.includes(w)) && pa(w), Y.value = "";
|
|
2149
2175
|
}
|
|
2150
|
-
},
|
|
2151
|
-
|
|
2152
|
-
},
|
|
2153
|
-
|
|
2176
|
+
}, pa = (c) => {
|
|
2177
|
+
we.value.push(c), g("added", c);
|
|
2178
|
+
}, zt = (c) => {
|
|
2179
|
+
we.value = we.value.filter((w) => w !== c), g("removed", c);
|
|
2154
2180
|
};
|
|
2155
|
-
return
|
|
2156
|
-
|
|
2157
|
-
}),
|
|
2158
|
-
|
|
2159
|
-
}), (c,
|
|
2181
|
+
return re(_, (c) => {
|
|
2182
|
+
we.value = c, g("changed", c);
|
|
2183
|
+
}), re(Y, (c) => {
|
|
2184
|
+
g("input-changed", c);
|
|
2185
|
+
}), (c, w) => u(F) ? (O(), K("div", $a({
|
|
2160
2186
|
key: 0,
|
|
2161
|
-
class: ["nb-wrapper",
|
|
2162
|
-
style: [
|
|
2187
|
+
class: ["nb-wrapper", ut.value],
|
|
2188
|
+
style: [ne.value],
|
|
2163
2189
|
role: "input"
|
|
2164
|
-
},
|
|
2165
|
-
u(
|
|
2190
|
+
}, wt.value, { onClick: da }), [
|
|
2191
|
+
u(de) ? (O(), K("label", {
|
|
2166
2192
|
key: 0,
|
|
2167
|
-
for:
|
|
2193
|
+
for: st.value,
|
|
2168
2194
|
class: "component__label",
|
|
2169
|
-
style:
|
|
2195
|
+
style: Ne([ia.value])
|
|
2170
2196
|
}, [
|
|
2171
|
-
|
|
2172
|
-
u(
|
|
2173
|
-
], 12, Zl)) :
|
|
2174
|
-
|
|
2175
|
-
id: u(
|
|
2197
|
+
jt(Rt(u(ge)), 1),
|
|
2198
|
+
u(Te) ? (O(), K("span", Jl, "*")) : ye("", !0)
|
|
2199
|
+
], 12, Zl)) : ye("", !0),
|
|
2200
|
+
xe("div", {
|
|
2201
|
+
id: u(F),
|
|
2176
2202
|
ref_key: "chipsContainer",
|
|
2177
|
-
ref:
|
|
2178
|
-
class:
|
|
2179
|
-
style:
|
|
2203
|
+
ref: $e,
|
|
2204
|
+
class: Ye(["nb-reset", "component", sa.value, Gt.value]),
|
|
2205
|
+
style: Ne([P.value, ua.value, Yt.value])
|
|
2180
2206
|
}, [
|
|
2181
|
-
|
|
2207
|
+
we.value.length > 0 ? (O(), K("div", {
|
|
2182
2208
|
key: 0,
|
|
2183
2209
|
ref_key: "chips",
|
|
2184
|
-
ref:
|
|
2210
|
+
ref: Wt,
|
|
2185
2211
|
class: "chips"
|
|
2186
2212
|
}, [
|
|
2187
|
-
(O(!0),
|
|
2188
|
-
key:
|
|
2213
|
+
(O(!0), K(gl, null, yl(we.value, (pe) => (O(), K("div", {
|
|
2214
|
+
key: pe,
|
|
2189
2215
|
class: "chip"
|
|
2190
2216
|
}, [
|
|
2191
|
-
|
|
2192
|
-
chips:
|
|
2193
|
-
chip:
|
|
2194
|
-
removeChip:
|
|
2217
|
+
La(c.$slots, "chip", {
|
|
2218
|
+
chips: we.value,
|
|
2219
|
+
chip: pe,
|
|
2220
|
+
removeChip: zt
|
|
2195
2221
|
}, () => [
|
|
2196
|
-
|
|
2222
|
+
xe("span", {
|
|
2197
2223
|
class: "chip-text",
|
|
2198
|
-
style:
|
|
2199
|
-
},
|
|
2200
|
-
!u(
|
|
2224
|
+
style: Ne([Ut.value])
|
|
2225
|
+
}, Rt(pe), 5),
|
|
2226
|
+
!u(I) && !u(fe) ? (O(), K("span", {
|
|
2201
2227
|
key: 0,
|
|
2202
2228
|
class: "chip-remove",
|
|
2203
|
-
style:
|
|
2204
|
-
onClick: (
|
|
2205
|
-
}, "×", 12, Xl)) :
|
|
2229
|
+
style: Ne([Ut.value]),
|
|
2230
|
+
onClick: (Ze) => zt(pe)
|
|
2231
|
+
}, "×", 12, Xl)) : ye("", !0)
|
|
2206
2232
|
], !0)
|
|
2207
2233
|
]))), 128))
|
|
2208
|
-
], 512)) :
|
|
2209
|
-
Pa(
|
|
2234
|
+
], 512)) : ye("", !0),
|
|
2235
|
+
Pa(xe("input", {
|
|
2210
2236
|
ref_key: "chipInput",
|
|
2211
|
-
ref:
|
|
2237
|
+
ref: M,
|
|
2212
2238
|
type: "text",
|
|
2213
|
-
"onUpdate:modelValue":
|
|
2214
|
-
id:
|
|
2215
|
-
name:
|
|
2216
|
-
placeholder:
|
|
2217
|
-
readonly: u(
|
|
2218
|
-
autocomplete: u(
|
|
2219
|
-
required: u(
|
|
2220
|
-
tabindex: u(
|
|
2221
|
-
class:
|
|
2222
|
-
style:
|
|
2223
|
-
onKeydown:
|
|
2224
|
-
onFocus:
|
|
2225
|
-
onBlur:
|
|
2226
|
-
onPaste:
|
|
2239
|
+
"onUpdate:modelValue": w[0] || (w[0] = (pe) => Y.value = pe),
|
|
2240
|
+
id: st.value,
|
|
2241
|
+
name: st.value,
|
|
2242
|
+
placeholder: Pt.value,
|
|
2243
|
+
readonly: u(fe),
|
|
2244
|
+
autocomplete: u(Ve),
|
|
2245
|
+
required: u(Te),
|
|
2246
|
+
tabindex: u(I) || u(fe) ? -1 : u(te),
|
|
2247
|
+
class: Ye(["chips-input", U.value]),
|
|
2248
|
+
style: Ne([oa.value, ra.value]),
|
|
2249
|
+
onKeydown: w[1] || (w[1] = na((pe) => !u(I) && u(he) && Kt(pe), ["enter"])),
|
|
2250
|
+
onFocus: ca,
|
|
2251
|
+
onBlur: fa,
|
|
2252
|
+
onPaste: va
|
|
2227
2253
|
}, null, 46, en), [
|
|
2228
|
-
[
|
|
2254
|
+
[hl, Y.value]
|
|
2229
2255
|
])
|
|
2230
2256
|
], 14, Ql)
|
|
2231
|
-
], 16)) :
|
|
2257
|
+
], 16)) : ye("", !0);
|
|
2232
2258
|
}
|
|
2233
|
-
}), an = /* @__PURE__ */
|
|
2259
|
+
}), an = /* @__PURE__ */ Oa(tn, [["__scopeId", "data-v-5e4299e4"]]);
|
|
2234
2260
|
const ln = ["id"], nn = ["for"], on = {
|
|
2235
2261
|
key: 0,
|
|
2236
2262
|
class: "component__label--required"
|
|
@@ -2248,8 +2274,8 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2248
2274
|
type: String,
|
|
2249
2275
|
default: "b",
|
|
2250
2276
|
validator: (e = "b") => {
|
|
2251
|
-
const
|
|
2252
|
-
return ["b", "ib"].includes(
|
|
2277
|
+
const y = e.toLowerCase();
|
|
2278
|
+
return ["b", "ib"].includes(y);
|
|
2253
2279
|
}
|
|
2254
2280
|
},
|
|
2255
2281
|
tabIndex: {
|
|
@@ -2479,6 +2505,11 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2479
2505
|
type: Number,
|
|
2480
2506
|
default: 0
|
|
2481
2507
|
},
|
|
2508
|
+
labelBreakOnActive: {
|
|
2509
|
+
type: Boolean,
|
|
2510
|
+
default: !0,
|
|
2511
|
+
validator: (e) => typeof e == "boolean" && [!0, !1].includes(e)
|
|
2512
|
+
},
|
|
2482
2513
|
labelLeft: {
|
|
2483
2514
|
type: Number,
|
|
2484
2515
|
default: 5
|
|
@@ -2495,6 +2526,14 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2495
2526
|
type: Number,
|
|
2496
2527
|
default: 5
|
|
2497
2528
|
},
|
|
2529
|
+
labelRight: {
|
|
2530
|
+
type: Number,
|
|
2531
|
+
default: 0
|
|
2532
|
+
},
|
|
2533
|
+
labelActiveRight: {
|
|
2534
|
+
type: Number,
|
|
2535
|
+
default: 0
|
|
2536
|
+
},
|
|
2498
2537
|
fontFamilyLabel: {
|
|
2499
2538
|
type: String,
|
|
2500
2539
|
default: "'Lato', sans-serif"
|
|
@@ -2627,195 +2666,213 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2627
2666
|
"entered",
|
|
2628
2667
|
"paste"
|
|
2629
2668
|
],
|
|
2630
|
-
setup(e, { emit:
|
|
2669
|
+
setup(e, { emit: y }) {
|
|
2631
2670
|
Wa((i) => ({
|
|
2632
|
-
|
|
2633
|
-
"
|
|
2634
|
-
"
|
|
2635
|
-
"
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
"
|
|
2639
|
-
"
|
|
2640
|
-
"
|
|
2641
|
-
|
|
2642
|
-
"
|
|
2643
|
-
|
|
2644
|
-
"
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
"
|
|
2648
|
-
"
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
})),
|
|
2654
|
-
|
|
2671
|
+
"8275e69e": ne.value,
|
|
2672
|
+
"383240bc": u(ot),
|
|
2673
|
+
"2b8f308f": G.value,
|
|
2674
|
+
"520916a1": kt.value,
|
|
2675
|
+
e9c7cc0e: wt.value,
|
|
2676
|
+
"133db13e": u(pt),
|
|
2677
|
+
"0dff0d0a": u(Lt),
|
|
2678
|
+
"347c89b4": u(ze),
|
|
2679
|
+
"2bfc9d5c": u(ke),
|
|
2680
|
+
"047ce06e": u(ht),
|
|
2681
|
+
"5aeb328a": u(ve),
|
|
2682
|
+
"01cf386e": u(vt),
|
|
2683
|
+
"09561f02": At.value,
|
|
2684
|
+
"7e4382b6": u(St),
|
|
2685
|
+
26828349: ia.value,
|
|
2686
|
+
"06891216": $t.value,
|
|
2687
|
+
"228b5755": P.value,
|
|
2688
|
+
"1617293e": U.value,
|
|
2689
|
+
cf3e4dd0: z.value,
|
|
2690
|
+
44600642: i.styleButtonColor,
|
|
2691
|
+
43491532: Yt.value
|
|
2692
|
+
})), Aa(() => {
|
|
2693
|
+
Y.value = Xe.value;
|
|
2655
2694
|
}), Ya(() => {
|
|
2656
|
-
|
|
2695
|
+
c();
|
|
2657
2696
|
});
|
|
2658
|
-
const
|
|
2659
|
-
nbId:
|
|
2660
|
-
display:
|
|
2661
|
-
hasTabIndexEnter:
|
|
2662
|
-
ariaLabel:
|
|
2663
|
-
ariaAttrs:
|
|
2664
|
-
textColor:
|
|
2665
|
-
caretColor:
|
|
2666
|
-
selectionBgColor:
|
|
2667
|
-
selectionTextColor:
|
|
2668
|
-
hasBorderRadius:
|
|
2669
|
-
borderRadius:
|
|
2670
|
-
disabled:
|
|
2671
|
-
fontFamily:
|
|
2672
|
-
fontSize:
|
|
2673
|
-
fontWeight:
|
|
2674
|
-
fontFamilyMsg:
|
|
2675
|
-
fontSizeMsg:
|
|
2676
|
-
fontWeightMsg:
|
|
2677
|
-
textMessageColor:
|
|
2678
|
-
inputWidth:
|
|
2679
|
-
inputStyle:
|
|
2680
|
-
activeTextStyle:
|
|
2681
|
-
inputReadonly:
|
|
2682
|
-
blockPaste:
|
|
2683
|
-
hasTrim:
|
|
2697
|
+
const g = y, h = e, {
|
|
2698
|
+
nbId: F,
|
|
2699
|
+
display: Q,
|
|
2700
|
+
hasTabIndexEnter: ce,
|
|
2701
|
+
ariaLabel: D,
|
|
2702
|
+
ariaAttrs: k,
|
|
2703
|
+
textColor: x,
|
|
2704
|
+
caretColor: I,
|
|
2705
|
+
selectionBgColor: ae,
|
|
2706
|
+
selectionTextColor: le,
|
|
2707
|
+
hasBorderRadius: X,
|
|
2708
|
+
borderRadius: _,
|
|
2709
|
+
disabled: $,
|
|
2710
|
+
fontFamily: H,
|
|
2711
|
+
fontSize: ie,
|
|
2712
|
+
fontWeight: q,
|
|
2713
|
+
fontFamilyMsg: Fe,
|
|
2714
|
+
fontSizeMsg: be,
|
|
2715
|
+
fontWeightMsg: ee,
|
|
2716
|
+
textMessageColor: Ce,
|
|
2717
|
+
inputWidth: fe,
|
|
2718
|
+
inputStyle: Ae,
|
|
2719
|
+
activeTextStyle: Ve,
|
|
2720
|
+
inputReadonly: Te,
|
|
2721
|
+
blockPaste: j,
|
|
2722
|
+
hasTrim: Qe,
|
|
2684
2723
|
inputUppercase: v,
|
|
2685
|
-
inputName:
|
|
2686
|
-
inputPlaceholder:
|
|
2687
|
-
inputText:
|
|
2688
|
-
theme:
|
|
2689
|
-
tabindex:
|
|
2690
|
-
lightBgColor:
|
|
2691
|
-
lightBgColorFocus:
|
|
2692
|
-
lightDisabledBgColor:
|
|
2693
|
-
lightTextColor:
|
|
2694
|
-
darkBgColor:
|
|
2695
|
-
darkBgColorFocus:
|
|
2696
|
-
darkDisabledBgColor:
|
|
2697
|
-
darkTextColor:
|
|
2698
|
-
textAlign:
|
|
2699
|
-
showMsg:
|
|
2700
|
-
hasMsg:
|
|
2701
|
-
showLabel:
|
|
2702
|
-
labelBackground:
|
|
2703
|
-
labelPadding:
|
|
2724
|
+
inputName: se,
|
|
2725
|
+
inputPlaceholder: Oe,
|
|
2726
|
+
inputText: Xe,
|
|
2727
|
+
theme: S,
|
|
2728
|
+
tabindex: Ue,
|
|
2729
|
+
lightBgColor: ve,
|
|
2730
|
+
lightBgColorFocus: vt,
|
|
2731
|
+
lightDisabledBgColor: ht,
|
|
2732
|
+
lightTextColor: ot,
|
|
2733
|
+
darkBgColor: ze,
|
|
2734
|
+
darkBgColorFocus: ke,
|
|
2735
|
+
darkDisabledBgColor: Lt,
|
|
2736
|
+
darkTextColor: pt,
|
|
2737
|
+
textAlign: St,
|
|
2738
|
+
showMsg: xt,
|
|
2739
|
+
hasMsg: Ct,
|
|
2740
|
+
showLabel: Be,
|
|
2741
|
+
labelBackground: gt,
|
|
2742
|
+
labelPadding: et,
|
|
2704
2743
|
labelBorderRadius: T,
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2744
|
+
labelBreakOnActive: R,
|
|
2745
|
+
labelLeft: me,
|
|
2746
|
+
inputLabelMarginActive: te,
|
|
2747
|
+
labelActiveTop: he,
|
|
2748
|
+
labelActiveLeft: tt,
|
|
2749
|
+
labelRight: Ge,
|
|
2750
|
+
labelActiveRight: Ie,
|
|
2751
|
+
fontFamilyLabel: b,
|
|
2752
|
+
fontSizeLabel: A,
|
|
2753
|
+
fontSizeLabelActive: de,
|
|
2754
|
+
fontWeightLabel: ge,
|
|
2755
|
+
lightTextColorLabel: Se,
|
|
2756
|
+
lightTextColorLabelActive: _e,
|
|
2757
|
+
darkTextColorLabel: We,
|
|
2758
|
+
darkTextColorLabelActive: Ee,
|
|
2759
|
+
rows: He,
|
|
2760
|
+
cols: qe,
|
|
2761
|
+
maxlength: Ke,
|
|
2762
|
+
minlength: at,
|
|
2763
|
+
wrap: yt,
|
|
2764
|
+
spellcheck: Mt,
|
|
2765
|
+
autofocus: Vt,
|
|
2766
|
+
resize: bt,
|
|
2767
|
+
minWidth: lt,
|
|
2768
|
+
maxWidth: Nt,
|
|
2769
|
+
minHeight: rt,
|
|
2770
|
+
maxHeight: Tt,
|
|
2771
|
+
autoResize: B,
|
|
2772
|
+
minRows: E,
|
|
2773
|
+
maxRows: Z
|
|
2774
|
+
} = Ea(h), Y = oe(""), $e = oe(!1), M = a(() => {
|
|
2775
|
+
const i = $.value ? "component-disabled" : "", C = Q.value !== "b" ? "inline-block" : "block", De = x ? x.value : "ffffff", je = I.value ? I.value : "", Zt = ae.value ? ae.value : "", ga = le.value ? le.value : "", ya = X.value ? X.value : !1, ba = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, ma = H.value ? H.value : "'Lato', sans-serif", Dt = ie.value ? ie.value : "1.4em", ha = q.value !== 0 && !q.value || q.value < 0 ? 100 : q.value, Sa = Fe.value ? Fe.value : "'Lato', sans-serif", xa = be.value ? be.value : "1em", Ca = ee.value !== 0 && !ee.value || ee.value < 0 ? 100 : ee.value, dt = Ce.value ? Ce.value : "#f15574", _t = fe.value ? fe.value : 200, Jt = Ve.value ? Ve.value : "normal", Qt = Te.value ? Te.value : !1, Ht = v.value ? v.value : !1, Xt = S.value ? S.value : "normal", ct = St.value ? St.value : "left", Bt = Ae.value ? Ae.value : "background", Va = Be.value ? Be.value : !1, Ta = me.value !== 0 && !me.value || me.value < 0 ? 5 : me.value, ea = gt.value ? gt.value : "transparent", ka = te.value !== 0 && !te.value || te.value < 0 ? 15 : te.value, o = et.value ? et.value : "1px 5px", m = T.value !== 0 && !T.value || T.value < 0 ? 0 : T.value, Re = he.value === null || he.value === void 0 ? -13 : he.value, nt = tt.value === null || tt.value === void 0 ? 5 : tt.value, Ba = Ge.value === null || Ge.value === void 0 ? 0 : Ge.value, ta = Ie.value === null || Ie.value === void 0 ? 0 : Ie.value, wa = b.value ? b.value : "'Lato', sans-serif", Da = A.value ? A.value : "1em", It = de.value ? de.value : "0.8em", aa = ge.value ? ge.value : 400, qt = Se.value ? Se.value : "#ffffff", Ra = We.value ? We.value : "#000000", _a = _e.value ? _e.value : "#ffffff", Ma = Ee.value ? Ee.value : "#000000", Ha = He.value && He.value > 0 ? He.value : 2, Le = qe.value && qe.value > 0 ? qe.value : 20, qa = Ke.value !== null && Ke.value >= 0 ? Ke.value : null, mt = at.value !== null && at.value >= 0 ? at.value : null, t = yt.value && ["soft", "hard", "off"].includes(yt.value) ? yt.value : "soft", l = Mt.value !== void 0 ? Mt.value : "default", n = Vt.value !== void 0 ? Vt.value : !1, r = bt.value && ["none", "both", "vertical", "horizontal"].includes(bt.value) ? bt.value : "vertical", s = lt.value ? lt.value : "auto", d = Nt.value ? Nt.value : "auto", f = rt.value ? rt.value : "auto", p = Tt.value ? Tt.value : "auto", V = B.value !== void 0 ? B.value : !1, L = E.value !== null && E.value > 0 ? E.value : null, W = Z.value !== null && Z.value > 0 ? Z.value : null;
|
|
2734
2776
|
return {
|
|
2735
2777
|
disabled: i,
|
|
2736
|
-
display:
|
|
2737
|
-
font:
|
|
2738
|
-
fontSize:
|
|
2739
|
-
fontWeight:
|
|
2740
|
-
fontFamilyMsg:
|
|
2741
|
-
fontSizeMsg:
|
|
2742
|
-
fontWeightMsg:
|
|
2743
|
-
textMessageColor:
|
|
2744
|
-
textColor:
|
|
2745
|
-
caretColor:
|
|
2746
|
-
selectionBgColor:
|
|
2747
|
-
selectionTextColor:
|
|
2748
|
-
hasBorderRadius:
|
|
2749
|
-
borderRadius:
|
|
2750
|
-
textAlign:
|
|
2751
|
-
inputWidth:
|
|
2752
|
-
activeTextStyle:
|
|
2753
|
-
inputReadonly:
|
|
2754
|
-
inputUppercase:
|
|
2755
|
-
theme:
|
|
2756
|
-
inputStyle:
|
|
2757
|
-
showLabel:
|
|
2758
|
-
labelBackground:
|
|
2759
|
-
labelPadding:
|
|
2760
|
-
labelBorderRadius:
|
|
2761
|
-
labelLeft:
|
|
2762
|
-
inputLabelMarginActive:
|
|
2763
|
-
labelActiveTop:
|
|
2764
|
-
labelActiveLeft:
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2778
|
+
display: C,
|
|
2779
|
+
font: ma,
|
|
2780
|
+
fontSize: Dt,
|
|
2781
|
+
fontWeight: ha,
|
|
2782
|
+
fontFamilyMsg: Sa,
|
|
2783
|
+
fontSizeMsg: xa,
|
|
2784
|
+
fontWeightMsg: Ca,
|
|
2785
|
+
textMessageColor: dt,
|
|
2786
|
+
textColor: De,
|
|
2787
|
+
caretColor: je,
|
|
2788
|
+
selectionBgColor: Zt,
|
|
2789
|
+
selectionTextColor: ga,
|
|
2790
|
+
hasBorderRadius: ya,
|
|
2791
|
+
borderRadius: ba,
|
|
2792
|
+
textAlign: ct,
|
|
2793
|
+
inputWidth: _t,
|
|
2794
|
+
activeTextStyle: Jt,
|
|
2795
|
+
inputReadonly: Qt,
|
|
2796
|
+
inputUppercase: Ht,
|
|
2797
|
+
theme: Xt,
|
|
2798
|
+
inputStyle: Bt,
|
|
2799
|
+
showLabel: Va,
|
|
2800
|
+
labelBackground: ea,
|
|
2801
|
+
labelPadding: o,
|
|
2802
|
+
labelBorderRadius: m,
|
|
2803
|
+
labelLeft: Ta,
|
|
2804
|
+
inputLabelMarginActive: ka,
|
|
2805
|
+
labelActiveTop: Re,
|
|
2806
|
+
labelActiveLeft: nt,
|
|
2807
|
+
labelRight: Ba,
|
|
2808
|
+
labelActiveRight: ta,
|
|
2809
|
+
fontFamilyLabel: wa,
|
|
2810
|
+
fontSizeLabel: Da,
|
|
2811
|
+
fontSizeLabelActive: It,
|
|
2812
|
+
fontWeightLabel: aa,
|
|
2813
|
+
lightTextColorLabel: qt,
|
|
2814
|
+
darkTextColorLabel: Ra,
|
|
2815
|
+
lightTextColorLabelActive: _a,
|
|
2816
|
+
darkTextColorLabelActive: Ma,
|
|
2817
|
+
rows: Ha,
|
|
2818
|
+
cols: Le,
|
|
2819
|
+
maxlength: qa,
|
|
2820
|
+
minlength: mt,
|
|
2821
|
+
wrap: t,
|
|
2822
|
+
spellcheck: l,
|
|
2823
|
+
autofocus: n,
|
|
2824
|
+
resize: r,
|
|
2825
|
+
minWidth: s,
|
|
2826
|
+
maxWidth: d,
|
|
2827
|
+
minHeight: f,
|
|
2828
|
+
maxHeight: p,
|
|
2829
|
+
autoResize: V,
|
|
2830
|
+
minRows: L,
|
|
2831
|
+
maxRows: W
|
|
2788
2832
|
};
|
|
2789
|
-
}),
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2833
|
+
}), Wt = a(() => M.value.disabled), we = a(() => {
|
|
2834
|
+
const i = M.value, C = Pt.value;
|
|
2835
|
+
return {
|
|
2836
|
+
display: i.display,
|
|
2837
|
+
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
2838
|
+
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
2839
|
+
paddingTop: "0px",
|
|
2840
|
+
// Esconde o label quando não está ativo usando overflow hidden
|
|
2841
|
+
overflow: C && Be.value ? "visible" : "hidden"
|
|
2842
|
+
};
|
|
2843
|
+
}), At = a(() => {
|
|
2844
|
+
const i = M.value;
|
|
2793
2845
|
return i.fontSize ? i.fontSize : "1.4em";
|
|
2794
|
-
}),
|
|
2795
|
-
const i =
|
|
2846
|
+
}), ue = a(() => {
|
|
2847
|
+
const i = M.value, C = Pt.value;
|
|
2796
2848
|
return {
|
|
2797
2849
|
fontWeight: i.fontWeight,
|
|
2798
|
-
marginTop:
|
|
2850
|
+
marginTop: C && Be.value ? `${i.inputLabelMarginActive}px` : "0",
|
|
2851
|
+
// Quando o label está ativo, define altura mínima igual ao input para alinhar baseline
|
|
2852
|
+
// Mas permite que o textarea cresça quando há conteúdo
|
|
2853
|
+
minHeight: (C && Be.value, "28px"),
|
|
2854
|
+
height: C && Be.value ? "auto" : "28px",
|
|
2855
|
+
maxHeight: C && Be.value ? void 0 : "28px"
|
|
2799
2856
|
};
|
|
2800
|
-
}),
|
|
2801
|
-
const i =
|
|
2857
|
+
}), ut = a(() => {
|
|
2858
|
+
const i = M.value;
|
|
2802
2859
|
return i.inputStyle !== "line" && i.hasBorderRadius ? { borderRadius: `${i.borderRadius}rem` } : {};
|
|
2803
|
-
}),
|
|
2804
|
-
const i =
|
|
2860
|
+
}), ne = a(() => M.value.font), $t = a(() => M.value.fontFamilyMsg), P = a(() => M.value.fontSizeMsg), U = a(() => M.value.fontWeightMsg), Yt = a(() => M.value.textColor), z = a(() => M.value.textMessageColor), G = a(() => {
|
|
2861
|
+
const i = M.value;
|
|
2805
2862
|
return i.caretColor || (i.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2806
|
-
}),
|
|
2807
|
-
const i =
|
|
2863
|
+
}), kt = a(() => {
|
|
2864
|
+
const i = M.value;
|
|
2808
2865
|
return i.selectionBgColor || (i.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2809
|
-
}),
|
|
2810
|
-
const i =
|
|
2866
|
+
}), wt = a(() => {
|
|
2867
|
+
const i = M.value;
|
|
2811
2868
|
return i.selectionTextColor || (i.theme === "dark" ? "#000000" : "#ffffff");
|
|
2812
|
-
}),
|
|
2813
|
-
const i =
|
|
2869
|
+
}), it = a(() => {
|
|
2870
|
+
const i = M.value;
|
|
2814
2871
|
return i.display === "block" ? { width: "100%" } : {
|
|
2815
2872
|
width: `${i.inputWidth}px`
|
|
2816
2873
|
};
|
|
2817
|
-
}),
|
|
2818
|
-
switch (
|
|
2874
|
+
}), N = a(() => {
|
|
2875
|
+
switch (Ae.value) {
|
|
2819
2876
|
case "line":
|
|
2820
2877
|
return "component__input--line";
|
|
2821
2878
|
case "border":
|
|
@@ -2823,8 +2880,8 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2823
2880
|
default:
|
|
2824
2881
|
return "component__input--background";
|
|
2825
2882
|
}
|
|
2826
|
-
}),
|
|
2827
|
-
switch (
|
|
2883
|
+
}), Ft = a(() => {
|
|
2884
|
+
switch (M.value.activeTextStyle) {
|
|
2828
2885
|
case "italic":
|
|
2829
2886
|
return "component__input--active--italic";
|
|
2830
2887
|
case "oblique":
|
|
@@ -2832,208 +2889,218 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2832
2889
|
default:
|
|
2833
2890
|
return "component__input--active--normal";
|
|
2834
2891
|
}
|
|
2835
|
-
}),
|
|
2836
|
-
switch (
|
|
2892
|
+
}), oa = a(() => {
|
|
2893
|
+
switch (M.value.theme) {
|
|
2837
2894
|
case "dark":
|
|
2838
2895
|
return "component__theme--dark";
|
|
2839
2896
|
default:
|
|
2840
2897
|
return "component__theme--light";
|
|
2841
2898
|
}
|
|
2842
|
-
}),
|
|
2843
|
-
a(() =>
|
|
2844
|
-
const
|
|
2899
|
+
}), ra = a(() => M.value.inputReadonly ? "component__input--read-only" : ""), ua = a(() => M.value.inputUppercase ? "component__input--uppercase" : ""), st = a(() => se.value ? se.value : `${F.value}-name-label`), Et = a(() => Be.value ? $e.value ? Oe.value : "" : Oe.value), Pt = a(() => $e.value || Y.value && Y.value.trim().length > 0);
|
|
2900
|
+
a(() => $e.value ? "component__input--active" : "component__input--no-active");
|
|
2901
|
+
const ia = a(() => "6px 10px"), Ut = a(() => !!(xt.value && Ct.value)), sa = a(() => {
|
|
2845
2902
|
const i = {};
|
|
2846
|
-
|
|
2847
|
-
const
|
|
2848
|
-
"aria-label":
|
|
2849
|
-
"aria-disabled":
|
|
2903
|
+
k.value && Object.keys(k.value).forEach((je) => i[`aria-${je}`] = k.value[je]);
|
|
2904
|
+
const C = {
|
|
2905
|
+
"aria-label": D.value,
|
|
2906
|
+
"aria-disabled": $.value,
|
|
2850
2907
|
...i
|
|
2851
2908
|
};
|
|
2852
2909
|
return Object.fromEntries(
|
|
2853
|
-
Object.entries(
|
|
2910
|
+
Object.entries(C).filter(([De, je]) => je != null)
|
|
2854
2911
|
);
|
|
2855
|
-
}),
|
|
2856
|
-
const i =
|
|
2912
|
+
}), Gt = a(() => {
|
|
2913
|
+
const i = M.value, C = Pt.value, De = C ? i.lightTextColorLabelActive : i.lightTextColorLabel, je = C ? i.darkTextColorLabelActive : i.darkTextColorLabel;
|
|
2857
2914
|
return {
|
|
2858
2915
|
fontFamily: i.fontFamilyLabel,
|
|
2859
|
-
fontSize:
|
|
2916
|
+
fontSize: C ? i.fontSizeLabelActive : i.fontSizeLabel,
|
|
2860
2917
|
fontWeight: i.fontWeightLabel,
|
|
2861
|
-
color: i.theme === "dark" ?
|
|
2862
|
-
top:
|
|
2863
|
-
|
|
2864
|
-
|
|
2918
|
+
color: i.theme === "dark" ? je : De,
|
|
2919
|
+
top: C ? `${i.labelActiveTop}px` : "50%",
|
|
2920
|
+
transform: C ? "translateY(0)" : "translateY(-50%)",
|
|
2921
|
+
left: C ? `${i.labelActiveLeft}px` : `${i.labelLeft}px`,
|
|
2922
|
+
right: C ? `${i.labelActiveRight}px` : `${i.labelRight}px`,
|
|
2865
2923
|
transition: "all 0.2s ease",
|
|
2866
|
-
backgroundColor:
|
|
2867
|
-
padding:
|
|
2868
|
-
borderRadius:
|
|
2924
|
+
backgroundColor: C ? i.labelBackground : "transparent",
|
|
2925
|
+
padding: C ? i.labelPadding : "0",
|
|
2926
|
+
borderRadius: C ? `${i.labelBorderRadius}rem` : "0",
|
|
2927
|
+
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
2928
|
+
...C ? {
|
|
2929
|
+
whiteSpace: R.value ? "nowrap" : "normal",
|
|
2930
|
+
wordWrap: R.value ? "normal" : "break-word",
|
|
2931
|
+
overflowWrap: R.value ? "normal" : "break-word",
|
|
2932
|
+
maxWidth: "100%",
|
|
2933
|
+
textOverflow: R.value ? "ellipsis" : "clip",
|
|
2934
|
+
overflow: R.value ? "hidden" : "visible"
|
|
2935
|
+
} : {}
|
|
2869
2936
|
};
|
|
2870
2937
|
});
|
|
2871
2938
|
a(() => {
|
|
2872
|
-
const i =
|
|
2939
|
+
const i = M.value;
|
|
2873
2940
|
return i.theme === "dark" ? i.darkTextColorLabelActive : i.lightTextColorLabelActive;
|
|
2874
2941
|
});
|
|
2875
|
-
const
|
|
2876
|
-
const i =
|
|
2942
|
+
const da = a(() => {
|
|
2943
|
+
const i = M.value, C = {
|
|
2877
2944
|
rows: i.rows,
|
|
2878
2945
|
cols: i.cols,
|
|
2879
2946
|
wrap: i.wrap,
|
|
2880
2947
|
spellcheck: i.spellcheck === "default" ? void 0 : i.spellcheck,
|
|
2881
2948
|
autofocus: i.autofocus || void 0
|
|
2882
2949
|
};
|
|
2883
|
-
return i.maxlength !== null && (
|
|
2884
|
-
}),
|
|
2885
|
-
resize:
|
|
2886
|
-
})),
|
|
2950
|
+
return i.maxlength !== null && (C.maxlength = i.maxlength), i.minlength !== null && (C.minlength = i.minlength), C;
|
|
2951
|
+
}), ca = a(() => ({
|
|
2952
|
+
resize: M.value.resize
|
|
2953
|
+
})), fa = a(() => M.value.wrap === "off" ? {
|
|
2887
2954
|
whiteSpace: "nowrap",
|
|
2888
2955
|
overflowX: "auto"
|
|
2889
|
-
} : {}),
|
|
2890
|
-
const i =
|
|
2956
|
+
} : {}), va = a(() => {
|
|
2957
|
+
const i = M.value;
|
|
2891
2958
|
return i.minWidth === "auto" ? {} : {
|
|
2892
2959
|
minWidth: i.minWidth
|
|
2893
2960
|
};
|
|
2894
|
-
}),
|
|
2895
|
-
const i =
|
|
2961
|
+
}), Kt = a(() => {
|
|
2962
|
+
const i = M.value;
|
|
2896
2963
|
return i.maxWidth === "auto" ? {} : {
|
|
2897
2964
|
maxWidth: i.maxWidth
|
|
2898
2965
|
};
|
|
2899
|
-
}),
|
|
2900
|
-
const i =
|
|
2966
|
+
}), pa = a(() => {
|
|
2967
|
+
const i = M.value;
|
|
2901
2968
|
return i.minHeight === "auto" ? {} : {
|
|
2902
2969
|
minHeight: i.minHeight
|
|
2903
2970
|
};
|
|
2904
|
-
}),
|
|
2905
|
-
const i =
|
|
2971
|
+
}), zt = a(() => {
|
|
2972
|
+
const i = M.value;
|
|
2906
2973
|
return i.maxHeight === "auto" ? {} : {
|
|
2907
2974
|
maxHeight: i.maxHeight
|
|
2908
2975
|
};
|
|
2909
|
-
}),
|
|
2910
|
-
|
|
2911
|
-
},
|
|
2912
|
-
|
|
2913
|
-
},
|
|
2914
|
-
|
|
2915
|
-
},
|
|
2916
|
-
var
|
|
2917
|
-
const
|
|
2918
|
-
|
|
2919
|
-
},
|
|
2920
|
-
let i =
|
|
2921
|
-
|
|
2976
|
+
}), c = () => {
|
|
2977
|
+
Y.value = Xe.value;
|
|
2978
|
+
}, w = () => {
|
|
2979
|
+
g("clicked");
|
|
2980
|
+
}, pe = () => {
|
|
2981
|
+
$.value || M.value.inputReadonly || !ce.value || g("entered", Y.value);
|
|
2982
|
+
}, Ze = async (i) => {
|
|
2983
|
+
var De;
|
|
2984
|
+
const C = ((De = i.clipboardData) == null ? void 0 : De.getData("text")) || "";
|
|
2985
|
+
g("paste", C), j.value && i.preventDefault();
|
|
2986
|
+
}, Ot = () => {
|
|
2987
|
+
let i = Y.value;
|
|
2988
|
+
Qe.value && (i = i.trim()), g("current-value", i);
|
|
2922
2989
|
};
|
|
2923
|
-
return
|
|
2924
|
-
i !==
|
|
2925
|
-
}, { immediate: !0 }),
|
|
2926
|
-
|
|
2927
|
-
}),
|
|
2928
|
-
|
|
2929
|
-
}),
|
|
2930
|
-
|
|
2931
|
-
}, { immediate: !0 }), (i,
|
|
2990
|
+
return re(Xe, (i) => {
|
|
2991
|
+
i !== Y.value && (Y.value = i);
|
|
2992
|
+
}, { immediate: !0 }), re(Y, (i) => {
|
|
2993
|
+
Qe.value && (i = i.trim()), g("changed", i);
|
|
2994
|
+
}), re($e, (i) => {
|
|
2995
|
+
g(i ? "focused" : "blurred");
|
|
2996
|
+
}), re(Y, () => {
|
|
2997
|
+
Ot();
|
|
2998
|
+
}, { immediate: !0 }), (i, C) => u(F) ? (O(), K("div", $a({
|
|
2932
2999
|
key: 0,
|
|
2933
|
-
class: ["nb-wrapper",
|
|
2934
|
-
style: [
|
|
3000
|
+
class: ["nb-wrapper", Wt.value],
|
|
3001
|
+
style: [we.value, it.value, ut.value],
|
|
2935
3002
|
role: "input"
|
|
2936
|
-
},
|
|
2937
|
-
|
|
2938
|
-
id: u(
|
|
2939
|
-
class:
|
|
2940
|
-
style:
|
|
2941
|
-
onClick:
|
|
3003
|
+
}, sa.value), [
|
|
3004
|
+
xe("div", {
|
|
3005
|
+
id: u(F),
|
|
3006
|
+
class: Ye(["nb-reset", "component", oa.value, ra.value, N.value]),
|
|
3007
|
+
style: Ne([ue.value, it.value, ut.value]),
|
|
3008
|
+
onClick: w
|
|
2942
3009
|
}, [
|
|
2943
|
-
u(
|
|
3010
|
+
u(Be) ? (O(), K("label", {
|
|
2944
3011
|
key: 0,
|
|
2945
|
-
for:
|
|
3012
|
+
for: st.value,
|
|
2946
3013
|
class: "component__label",
|
|
2947
|
-
style:
|
|
3014
|
+
style: Ne([Gt.value])
|
|
2948
3015
|
}, [
|
|
2949
|
-
|
|
2950
|
-
e.required ? (O(),
|
|
2951
|
-
], 12, nn)) :
|
|
2952
|
-
Pa(
|
|
2953
|
-
"onUpdate:modelValue":
|
|
2954
|
-
id:
|
|
2955
|
-
name:
|
|
2956
|
-
},
|
|
3016
|
+
jt(Rt(e.label), 1),
|
|
3017
|
+
e.required ? (O(), K("span", on, "*")) : ye("", !0)
|
|
3018
|
+
], 12, nn)) : ye("", !0),
|
|
3019
|
+
Pa(xe("textarea", $a({
|
|
3020
|
+
"onUpdate:modelValue": C[0] || (C[0] = (De) => Y.value = De),
|
|
3021
|
+
id: st.value,
|
|
3022
|
+
name: st.value
|
|
3023
|
+
}, da.value, {
|
|
2957
3024
|
class: ["component__input", [
|
|
2958
|
-
|
|
2959
|
-
|
|
3025
|
+
ua.value,
|
|
3026
|
+
Ft.value
|
|
2960
3027
|
]],
|
|
2961
|
-
placeholder:
|
|
2962
|
-
disabled: u(
|
|
3028
|
+
placeholder: Et.value,
|
|
3029
|
+
disabled: u($) || u(Te),
|
|
2963
3030
|
required: e.required,
|
|
2964
|
-
readonly: u(
|
|
3031
|
+
readonly: u(Te),
|
|
2965
3032
|
autocomplete: e.inputAutocomplete,
|
|
2966
|
-
tabindex: u(
|
|
3033
|
+
tabindex: u($) || u(Te) ? -1 : u(Ue),
|
|
2967
3034
|
role: "textbox",
|
|
2968
|
-
style: [
|
|
2969
|
-
onFocus:
|
|
2970
|
-
onBlur:
|
|
2971
|
-
onInput:
|
|
2972
|
-
onKeydown:
|
|
2973
|
-
onPaste:
|
|
3035
|
+
style: [ut.value, ca.value, fa.value, va.value, Kt.value, pa.value, zt.value],
|
|
3036
|
+
onFocus: C[1] || (C[1] = (De) => $e.value = !0),
|
|
3037
|
+
onBlur: C[2] || (C[2] = (De) => $e.value = !1),
|
|
3038
|
+
onInput: Ot,
|
|
3039
|
+
onKeydown: C[3] || (C[3] = na((De) => !u($) && u(ce) && pe(), ["enter"])),
|
|
3040
|
+
onPaste: Ze
|
|
2974
3041
|
}), null, 16, rn), [
|
|
2975
|
-
[
|
|
3042
|
+
[hl, Y.value]
|
|
2976
3043
|
])
|
|
2977
3044
|
], 14, ln),
|
|
2978
|
-
|
|
3045
|
+
Ut.value ? (O(), K("div", {
|
|
2979
3046
|
key: 0,
|
|
2980
|
-
class:
|
|
3047
|
+
class: Ye(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
2981
3048
|
}, [
|
|
2982
|
-
|
|
2983
|
-
|
|
3049
|
+
La(i.$slots, "message", {}, () => [
|
|
3050
|
+
jt(Rt(e.message), 1)
|
|
2984
3051
|
], !0)
|
|
2985
|
-
], 2)) :
|
|
2986
|
-
], 16)) :
|
|
3052
|
+
], 2)) : ye("", !0)
|
|
3053
|
+
], 16)) : ye("", !0);
|
|
2987
3054
|
}
|
|
2988
|
-
}), sn = /* @__PURE__ */
|
|
3055
|
+
}), sn = /* @__PURE__ */ Oa(un, [["__scopeId", "data-v-32bd91a4"]]), za = (e) => String(e).padStart(2, "0"), Na = (e) => {
|
|
2989
3056
|
if (!e || !(e instanceof Date))
|
|
2990
3057
|
return null;
|
|
2991
|
-
const
|
|
2992
|
-
return `${
|
|
2993
|
-
}, Fa = (e,
|
|
3058
|
+
const y = e.getFullYear(), g = za(e.getMonth() + 1), h = za(e.getDate()), F = za(e.getHours()), Q = za(e.getMinutes()), ce = za(e.getSeconds());
|
|
3059
|
+
return `${y}-${g}-${h}T${F}:${Q}:${ce}`;
|
|
3060
|
+
}, Fa = (e, y = "Z") => {
|
|
2994
3061
|
if (!e || !(e instanceof Date))
|
|
2995
3062
|
return null;
|
|
2996
|
-
const
|
|
2997
|
-
return
|
|
2998
|
-
},
|
|
2999
|
-
e.getMonth() ===
|
|
3000
|
-
e.getDate() ===
|
|
3063
|
+
const g = e.toISOString();
|
|
3064
|
+
return y === "+00:00" ? g.replace("Z", "+00:00") : g;
|
|
3065
|
+
}, bl = (e, y) => !e || !y ? !1 : e.getFullYear() === y.getFullYear() && // Verificar se o ano é o mesmo
|
|
3066
|
+
e.getMonth() === y.getMonth() && // Verificar se o mês é o mesmo
|
|
3067
|
+
e.getDate() === y.getDate(), ja = (e) => {
|
|
3001
3068
|
if (!e)
|
|
3002
3069
|
return null;
|
|
3003
3070
|
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
3004
|
-
const [
|
|
3005
|
-
return new Date(
|
|
3071
|
+
const [g, h, F] = e.split("-").map(Number);
|
|
3072
|
+
return new Date(g, h - 1, F);
|
|
3006
3073
|
}
|
|
3007
|
-
const
|
|
3008
|
-
return isNaN(
|
|
3009
|
-
}, dn = (e,
|
|
3074
|
+
const y = new Date(e);
|
|
3075
|
+
return isNaN(y.getTime()) ? null : y;
|
|
3076
|
+
}, dn = (e, y = {}) => {
|
|
3010
3077
|
const {
|
|
3011
|
-
inputType:
|
|
3012
|
-
hasSeconds:
|
|
3013
|
-
allowRange:
|
|
3014
|
-
timezoneFormat:
|
|
3015
|
-
locale:
|
|
3016
|
-
} =
|
|
3078
|
+
inputType: g,
|
|
3079
|
+
hasSeconds: h = !1,
|
|
3080
|
+
allowRange: F = !1,
|
|
3081
|
+
timezoneFormat: Q = "Z",
|
|
3082
|
+
locale: ce = "en-US"
|
|
3083
|
+
} = y;
|
|
3017
3084
|
if (!e || e === "" || e === null || e === void 0)
|
|
3018
|
-
return
|
|
3085
|
+
return g === "date" ? { date: null, dateString: null, isoString: null, isoStringLocal: null, day: null } : g === "time" ? { hour: 0, minute: 0, second: void 0, timeString: "" } : g === "datetime-local" ? { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null } : g === "week" ? { weekString: null, weekStartDate: null, weekEndDate: null, weekNumber: null, weekYear: null, isoString: null, isoStringLocal: null } : g === "month" ? { date: null, dateString: null, month: null, year: null, monthName: null, isoString: null, isoStringLocal: null } : F ? { startDate: null, endDate: null, isRange: !0, isoString: null, isoStringLocal: null } : null;
|
|
3019
3086
|
try {
|
|
3020
|
-
if (
|
|
3021
|
-
const
|
|
3022
|
-
if (!
|
|
3087
|
+
if (g === "date") {
|
|
3088
|
+
const D = ja(e);
|
|
3089
|
+
if (!D)
|
|
3023
3090
|
return { date: null, dateString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3024
|
-
const
|
|
3025
|
-
|
|
3026
|
-
const
|
|
3027
|
-
return
|
|
3028
|
-
date:
|
|
3091
|
+
const k = /* @__PURE__ */ new Date();
|
|
3092
|
+
k.setHours(0, 0, 0, 0);
|
|
3093
|
+
const x = new Date(D.getTime());
|
|
3094
|
+
return x.setHours(0, 0, 0, 0), {
|
|
3095
|
+
date: x,
|
|
3029
3096
|
dateString: e,
|
|
3030
|
-
isoString: Fa(
|
|
3031
|
-
isoStringLocal: Na(
|
|
3097
|
+
isoString: Fa(x, Q),
|
|
3098
|
+
isoStringLocal: Na(x),
|
|
3032
3099
|
day: {
|
|
3033
|
-
date:
|
|
3034
|
-
fullDate:
|
|
3100
|
+
date: x.getDate(),
|
|
3101
|
+
fullDate: x,
|
|
3035
3102
|
isOtherMonth: !1,
|
|
3036
|
-
isToday:
|
|
3103
|
+
isToday: bl(x, k),
|
|
3037
3104
|
isSelected: !0,
|
|
3038
3105
|
isInRange: !1,
|
|
3039
3106
|
isRangeStart: !1,
|
|
@@ -3042,45 +3109,45 @@ e.getDate() === g.getDate(), ja = (e) => {
|
|
|
3042
3109
|
events: []
|
|
3043
3110
|
}
|
|
3044
3111
|
};
|
|
3045
|
-
} else if (
|
|
3046
|
-
const
|
|
3047
|
-
if (!
|
|
3112
|
+
} else if (g === "time") {
|
|
3113
|
+
const D = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, k = e.match(D);
|
|
3114
|
+
if (!k)
|
|
3048
3115
|
return { hour: 0, minute: 0, second: void 0, timeString: "" };
|
|
3049
|
-
const
|
|
3116
|
+
const x = parseInt(k[1], 10), I = parseInt(k[2], 10), ae = k[3] ? parseInt(k[3], 10) : void 0;
|
|
3050
3117
|
return {
|
|
3051
|
-
hour:
|
|
3052
|
-
minute:
|
|
3053
|
-
second:
|
|
3118
|
+
hour: x,
|
|
3119
|
+
minute: I,
|
|
3120
|
+
second: h ? ae : void 0,
|
|
3054
3121
|
timeString: e
|
|
3055
3122
|
};
|
|
3056
|
-
} else if (
|
|
3057
|
-
const
|
|
3058
|
-
if (
|
|
3123
|
+
} else if (g === "datetime-local") {
|
|
3124
|
+
const D = e.split("T");
|
|
3125
|
+
if (D.length !== 2)
|
|
3059
3126
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3060
|
-
const
|
|
3061
|
-
if (!
|
|
3127
|
+
const k = D[0], x = D[1], I = ja(k);
|
|
3128
|
+
if (!I)
|
|
3062
3129
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3063
|
-
const
|
|
3064
|
-
if (!
|
|
3130
|
+
const ae = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, le = x.match(ae);
|
|
3131
|
+
if (!le)
|
|
3065
3132
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3066
|
-
const
|
|
3067
|
-
|
|
3068
|
-
const
|
|
3069
|
-
|
|
3070
|
-
const
|
|
3071
|
-
return
|
|
3072
|
-
date:
|
|
3073
|
-
hour:
|
|
3074
|
-
minute:
|
|
3075
|
-
second:
|
|
3133
|
+
const X = parseInt(le[1], 10), _ = parseInt(le[2], 10), $ = le[3] ? parseInt(le[3], 10) : void 0, H = new Date(I.getTime());
|
|
3134
|
+
H.setHours(X, _, $ || 0, 0);
|
|
3135
|
+
const ie = /* @__PURE__ */ new Date();
|
|
3136
|
+
ie.setHours(0, 0, 0, 0);
|
|
3137
|
+
const q = new Date(I.getTime());
|
|
3138
|
+
return q.setHours(0, 0, 0, 0), {
|
|
3139
|
+
date: q,
|
|
3140
|
+
hour: X,
|
|
3141
|
+
minute: _,
|
|
3142
|
+
second: h ? $ : void 0,
|
|
3076
3143
|
datetimeString: e,
|
|
3077
|
-
isoString: Fa(
|
|
3078
|
-
isoStringLocal: Na(
|
|
3144
|
+
isoString: Fa(H, Q),
|
|
3145
|
+
isoStringLocal: Na(H),
|
|
3079
3146
|
day: {
|
|
3080
|
-
date:
|
|
3081
|
-
fullDate:
|
|
3147
|
+
date: q.getDate(),
|
|
3148
|
+
fullDate: q,
|
|
3082
3149
|
isOtherMonth: !1,
|
|
3083
|
-
isToday:
|
|
3150
|
+
isToday: bl(q, ie),
|
|
3084
3151
|
isSelected: !0,
|
|
3085
3152
|
isInRange: !1,
|
|
3086
3153
|
isRangeStart: !1,
|
|
@@ -3089,58 +3156,58 @@ e.getDate() === g.getDate(), ja = (e) => {
|
|
|
3089
3156
|
events: []
|
|
3090
3157
|
}
|
|
3091
3158
|
};
|
|
3092
|
-
} else if (
|
|
3093
|
-
const
|
|
3094
|
-
if (!
|
|
3159
|
+
} else if (g === "week") {
|
|
3160
|
+
const D = /^(\d{4})-W(\d{2})$/, k = e.match(D);
|
|
3161
|
+
if (!k)
|
|
3095
3162
|
return { weekString: null, weekStartDate: null, weekEndDate: null, weekNumber: null, weekYear: null, isoString: null, isoStringLocal: null };
|
|
3096
|
-
const
|
|
3097
|
-
|
|
3098
|
-
const
|
|
3099
|
-
return
|
|
3163
|
+
const x = parseInt(k[1], 10), I = parseInt(k[2], 10), X = (8 - (new Date(x, 0, 4).getDay() || 7)) % 7, _ = new Date(x, 0, 4 + X), $ = new Date(_.getTime());
|
|
3164
|
+
$.setDate(_.getDate() + (I - 1) * 7), $.setHours(0, 0, 0, 0);
|
|
3165
|
+
const H = new Date($.getTime());
|
|
3166
|
+
return H.setDate($.getDate() + 6), H.setHours(23, 59, 59, 999), {
|
|
3100
3167
|
weekString: e,
|
|
3101
|
-
weekStartDate:
|
|
3102
|
-
weekEndDate:
|
|
3103
|
-
weekNumber:
|
|
3104
|
-
weekYear:
|
|
3105
|
-
isoString: Fa(
|
|
3106
|
-
isoStringLocal: Na(
|
|
3168
|
+
weekStartDate: $,
|
|
3169
|
+
weekEndDate: H,
|
|
3170
|
+
weekNumber: I,
|
|
3171
|
+
weekYear: x,
|
|
3172
|
+
isoString: Fa($, Q),
|
|
3173
|
+
isoStringLocal: Na($)
|
|
3107
3174
|
};
|
|
3108
|
-
} else if (
|
|
3109
|
-
const
|
|
3110
|
-
if (!
|
|
3175
|
+
} else if (g === "month") {
|
|
3176
|
+
const D = /^(\d{4})-(\d{2})$/, k = e.match(D);
|
|
3177
|
+
if (!k)
|
|
3111
3178
|
return { date: null, dateString: null, month: null, year: null, monthName: null, isoString: null, isoStringLocal: null };
|
|
3112
|
-
const
|
|
3113
|
-
|
|
3114
|
-
const
|
|
3179
|
+
const x = parseInt(k[1], 10), I = parseInt(k[2], 10) - 1, ae = new Date(x, I, 1);
|
|
3180
|
+
ae.setHours(0, 0, 0, 0);
|
|
3181
|
+
const le = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
3115
3182
|
return {
|
|
3116
|
-
date:
|
|
3117
|
-
dateString: `${
|
|
3118
|
-
month:
|
|
3119
|
-
year:
|
|
3120
|
-
monthName:
|
|
3121
|
-
isoString: Fa(
|
|
3122
|
-
isoStringLocal: Na(
|
|
3183
|
+
date: ae,
|
|
3184
|
+
dateString: `${x}-${za(I + 1)}-01`,
|
|
3185
|
+
month: I,
|
|
3186
|
+
year: x,
|
|
3187
|
+
monthName: le[I],
|
|
3188
|
+
isoString: Fa(ae, Q),
|
|
3189
|
+
isoStringLocal: Na(ae)
|
|
3123
3190
|
};
|
|
3124
|
-
} else if (
|
|
3191
|
+
} else if (F && typeof e == "string" && e.startsWith("{"))
|
|
3125
3192
|
try {
|
|
3126
|
-
const
|
|
3127
|
-
if (
|
|
3128
|
-
const
|
|
3129
|
-
return
|
|
3130
|
-
startDate:
|
|
3131
|
-
endDate:
|
|
3193
|
+
const D = JSON.parse(e);
|
|
3194
|
+
if (D && (D.startDate || D.endDate)) {
|
|
3195
|
+
const k = D.startDate ? ja(D.startDate) : null, x = D.endDate ? ja(D.endDate) : null;
|
|
3196
|
+
return k && x ? (k.setHours(0, 0, 0, 0), x.setHours(0, 0, 0, 0), {
|
|
3197
|
+
startDate: k,
|
|
3198
|
+
endDate: x,
|
|
3132
3199
|
isRange: !0,
|
|
3133
3200
|
isoString: {
|
|
3134
|
-
start: Fa(
|
|
3135
|
-
end: Fa(
|
|
3201
|
+
start: Fa(k, Q),
|
|
3202
|
+
end: Fa(x, Q)
|
|
3136
3203
|
},
|
|
3137
3204
|
isoStringLocal: {
|
|
3138
|
-
start: Na(
|
|
3139
|
-
end: Na(
|
|
3205
|
+
start: Na(k),
|
|
3206
|
+
end: Na(x)
|
|
3140
3207
|
}
|
|
3141
3208
|
}) : {
|
|
3142
|
-
startDate:
|
|
3143
|
-
endDate:
|
|
3209
|
+
startDate: k,
|
|
3210
|
+
endDate: x,
|
|
3144
3211
|
isRange: !0,
|
|
3145
3212
|
isoString: null,
|
|
3146
3213
|
isoStringLocal: null
|
|
@@ -3149,8 +3216,8 @@ e.getDate() === g.getDate(), ja = (e) => {
|
|
|
3149
3216
|
} catch {
|
|
3150
3217
|
return { startDate: null, endDate: null, isRange: !0, isoString: null, isoStringLocal: null };
|
|
3151
3218
|
}
|
|
3152
|
-
} catch (
|
|
3153
|
-
console.error("Error building complete data from inputText:",
|
|
3219
|
+
} catch (D) {
|
|
3220
|
+
console.error("Error building complete data from inputText:", D);
|
|
3154
3221
|
}
|
|
3155
3222
|
return null;
|
|
3156
3223
|
};
|
|
@@ -3171,8 +3238,8 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3171
3238
|
type: String,
|
|
3172
3239
|
default: "b",
|
|
3173
3240
|
validator: (e = "b") => {
|
|
3174
|
-
const
|
|
3175
|
-
return ["b", "ib"].includes(
|
|
3241
|
+
const y = e.toLowerCase();
|
|
3242
|
+
return ["b", "ib"].includes(y);
|
|
3176
3243
|
}
|
|
3177
3244
|
},
|
|
3178
3245
|
tabIndex: {
|
|
@@ -3563,7 +3630,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3563
3630
|
calendarEvents: {
|
|
3564
3631
|
type: Array,
|
|
3565
3632
|
default: () => [],
|
|
3566
|
-
validator: (e) => Array.isArray(e) && e.every((
|
|
3633
|
+
validator: (e) => Array.isArray(e) && e.every((y) => y && y.date && (y.color || !0))
|
|
3567
3634
|
},
|
|
3568
3635
|
// Calendar props - Text
|
|
3569
3636
|
calendarSelectMonthText: {
|
|
@@ -3807,116 +3874,116 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3807
3874
|
"date-selected",
|
|
3808
3875
|
"month-changed"
|
|
3809
3876
|
],
|
|
3810
|
-
setup(e, { emit:
|
|
3877
|
+
setup(e, { emit: y }) {
|
|
3811
3878
|
Wa((t) => ({
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
"
|
|
3815
|
-
"
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
"
|
|
3819
|
-
"
|
|
3820
|
-
"
|
|
3821
|
-
"
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
"
|
|
3825
|
-
"
|
|
3826
|
-
|
|
3827
|
-
"
|
|
3828
|
-
"
|
|
3829
|
-
"
|
|
3830
|
-
"
|
|
3831
|
-
"
|
|
3832
|
-
"
|
|
3833
|
-
"
|
|
3834
|
-
"
|
|
3879
|
+
fec94d28: oa.value,
|
|
3880
|
+
"2979c624": it.value,
|
|
3881
|
+
"7a5cbe9d": u(et),
|
|
3882
|
+
"63d530f4": ia.value,
|
|
3883
|
+
c6b71174: Ut.value,
|
|
3884
|
+
c73c3544: sa.value,
|
|
3885
|
+
"416286e3": u(te),
|
|
3886
|
+
"8e575a22": u(me),
|
|
3887
|
+
"41f9b60b": u(T),
|
|
3888
|
+
"3403c07e": Et.value,
|
|
3889
|
+
"8b0884e6": u(R),
|
|
3890
|
+
ab4a5c7a: C.value,
|
|
3891
|
+
"98e19656": De.value,
|
|
3892
|
+
"975f51ae": u(gt),
|
|
3893
|
+
f49ad776: u(Ct),
|
|
3894
|
+
"4096b393": u(Be),
|
|
3895
|
+
"6196f2db": u(he),
|
|
3896
|
+
"5149e504": Ze.value,
|
|
3897
|
+
"62c10cfb": ra.value,
|
|
3898
|
+
"5ad157ba": ua.value,
|
|
3899
|
+
"54dea463": st.value,
|
|
3900
|
+
"3a078c86": Pt.value,
|
|
3901
|
+
"14da127d": t.styleButtonColor
|
|
3835
3902
|
}));
|
|
3836
|
-
const
|
|
3903
|
+
const g = Bl(
|
|
3837
3904
|
() => import("@vlalg-nimbus/nb-calendar").then((t) => t.Calendar ? t.Calendar : t.default && t.default.Calendar ? t.default.Calendar : t.default)
|
|
3838
3905
|
);
|
|
3839
|
-
|
|
3840
|
-
|
|
3906
|
+
Aa(() => {
|
|
3907
|
+
B.value = S.value;
|
|
3841
3908
|
}), Ya(() => {
|
|
3842
3909
|
Zt();
|
|
3843
3910
|
});
|
|
3844
|
-
const
|
|
3845
|
-
nbId:
|
|
3846
|
-
display:
|
|
3847
|
-
hasTabIndexEnter:
|
|
3848
|
-
ariaLabel:
|
|
3849
|
-
ariaAttrs:
|
|
3850
|
-
caretColor:
|
|
3851
|
-
selectionBgColor:
|
|
3852
|
-
selectionTextColor:
|
|
3853
|
-
hasBorderRadius:
|
|
3854
|
-
borderRadius:
|
|
3855
|
-
disabled:
|
|
3856
|
-
fontFamily:
|
|
3857
|
-
fontSize:
|
|
3858
|
-
fontWeight:
|
|
3859
|
-
fontFamilyMsg:
|
|
3860
|
-
fontSizeMsg:
|
|
3861
|
-
fontWeightMsg:
|
|
3862
|
-
textMessageColor:
|
|
3863
|
-
inputWidth:
|
|
3864
|
-
inputStyle:
|
|
3865
|
-
activeTextStyle:
|
|
3866
|
-
sizeMediaQuery:
|
|
3867
|
-
inputReadonly:
|
|
3868
|
-
blockPaste:
|
|
3911
|
+
const h = y, F = e, {
|
|
3912
|
+
nbId: Q,
|
|
3913
|
+
display: ce,
|
|
3914
|
+
hasTabIndexEnter: D,
|
|
3915
|
+
ariaLabel: k,
|
|
3916
|
+
ariaAttrs: x,
|
|
3917
|
+
caretColor: I,
|
|
3918
|
+
selectionBgColor: ae,
|
|
3919
|
+
selectionTextColor: le,
|
|
3920
|
+
hasBorderRadius: X,
|
|
3921
|
+
borderRadius: _,
|
|
3922
|
+
disabled: $,
|
|
3923
|
+
fontFamily: H,
|
|
3924
|
+
fontSize: ie,
|
|
3925
|
+
fontWeight: q,
|
|
3926
|
+
fontFamilyMsg: Fe,
|
|
3927
|
+
fontSizeMsg: be,
|
|
3928
|
+
fontWeightMsg: ee,
|
|
3929
|
+
textMessageColor: Ce,
|
|
3930
|
+
inputWidth: fe,
|
|
3931
|
+
inputStyle: Ae,
|
|
3932
|
+
activeTextStyle: Ve,
|
|
3933
|
+
sizeMediaQuery: Te,
|
|
3934
|
+
inputReadonly: j,
|
|
3935
|
+
blockPaste: Qe,
|
|
3869
3936
|
inputType: v,
|
|
3870
|
-
hasTrim:
|
|
3871
|
-
inputUppercase:
|
|
3872
|
-
inputName:
|
|
3873
|
-
inputText:
|
|
3874
|
-
min:
|
|
3875
|
-
max:
|
|
3876
|
-
step:
|
|
3877
|
-
hasSeconds:
|
|
3878
|
-
locale:
|
|
3879
|
-
theme:
|
|
3880
|
-
allowRange:
|
|
3881
|
-
calendarZIndex:
|
|
3882
|
-
calendarWidth:
|
|
3883
|
-
blockClicksWithoutEvents:
|
|
3884
|
-
tabindex:
|
|
3885
|
-
lightBgColor:
|
|
3886
|
-
lightBgColorFocus:
|
|
3887
|
-
lightDisabledBgColor:
|
|
3888
|
-
lightTextColor:
|
|
3937
|
+
hasTrim: se,
|
|
3938
|
+
inputUppercase: Oe,
|
|
3939
|
+
inputName: Xe,
|
|
3940
|
+
inputText: S,
|
|
3941
|
+
min: Ue,
|
|
3942
|
+
max: ve,
|
|
3943
|
+
step: vt,
|
|
3944
|
+
hasSeconds: ht,
|
|
3945
|
+
locale: ot,
|
|
3946
|
+
theme: ze,
|
|
3947
|
+
allowRange: ke,
|
|
3948
|
+
calendarZIndex: Lt,
|
|
3949
|
+
calendarWidth: pt,
|
|
3950
|
+
blockClicksWithoutEvents: St,
|
|
3951
|
+
tabindex: xt,
|
|
3952
|
+
lightBgColor: Ct,
|
|
3953
|
+
lightBgColorFocus: Be,
|
|
3954
|
+
lightDisabledBgColor: gt,
|
|
3955
|
+
lightTextColor: et,
|
|
3889
3956
|
darkBgColor: T,
|
|
3890
|
-
darkBgColorFocus:
|
|
3891
|
-
darkDisabledBgColor:
|
|
3957
|
+
darkBgColorFocus: R,
|
|
3958
|
+
darkDisabledBgColor: me,
|
|
3892
3959
|
darkTextColor: te,
|
|
3893
|
-
textAlign:
|
|
3960
|
+
textAlign: he,
|
|
3894
3961
|
showMsg: tt,
|
|
3895
|
-
hasMsg:
|
|
3896
|
-
showLabel:
|
|
3962
|
+
hasMsg: Ge,
|
|
3963
|
+
showLabel: Ie,
|
|
3897
3964
|
label: b,
|
|
3898
|
-
labelBreakOnActive:
|
|
3899
|
-
labelBackground:
|
|
3900
|
-
labelPadding:
|
|
3901
|
-
labelBorderRadius:
|
|
3902
|
-
labelLeft:
|
|
3903
|
-
inputLabelMarginActive:
|
|
3904
|
-
labelActiveTop:
|
|
3905
|
-
labelActiveLeft:
|
|
3965
|
+
labelBreakOnActive: A,
|
|
3966
|
+
labelBackground: de,
|
|
3967
|
+
labelPadding: ge,
|
|
3968
|
+
labelBorderRadius: Se,
|
|
3969
|
+
labelLeft: _e,
|
|
3970
|
+
inputLabelMarginActive: We,
|
|
3971
|
+
labelActiveTop: Ee,
|
|
3972
|
+
labelActiveLeft: He,
|
|
3906
3973
|
labelRight: qe,
|
|
3907
|
-
labelActiveRight:
|
|
3908
|
-
fontFamilyLabel:
|
|
3909
|
-
fontSizeLabel:
|
|
3910
|
-
fontSizeLabelActive:
|
|
3911
|
-
fontWeightLabel:
|
|
3912
|
-
lightTextColorLabel:
|
|
3913
|
-
lightTextColorLabelActive:
|
|
3914
|
-
darkTextColorLabel:
|
|
3915
|
-
darkTextColorLabelActive:
|
|
3916
|
-
required:
|
|
3917
|
-
} = Ea(
|
|
3918
|
-
if (
|
|
3919
|
-
return
|
|
3974
|
+
labelActiveRight: Ke,
|
|
3975
|
+
fontFamilyLabel: at,
|
|
3976
|
+
fontSizeLabel: yt,
|
|
3977
|
+
fontSizeLabelActive: Mt,
|
|
3978
|
+
fontWeightLabel: Vt,
|
|
3979
|
+
lightTextColorLabel: bt,
|
|
3980
|
+
lightTextColorLabelActive: lt,
|
|
3981
|
+
darkTextColorLabel: Nt,
|
|
3982
|
+
darkTextColorLabelActive: rt,
|
|
3983
|
+
required: Tt
|
|
3984
|
+
} = Ea(F), B = oe(""), E = oe(""), Z = oe(""), Y = oe(""), $e = oe(!1), M = oe(!1), Wt = a(() => !pt.value || pt.value < 280 ? 280 : parseInt(pt.value, 10)), we = a(() => {
|
|
3985
|
+
if (ht.value !== null)
|
|
3986
|
+
return ht.value;
|
|
3920
3987
|
if (v.value === "time" || v.value === "datetime-local") {
|
|
3921
3988
|
const t = (l) => {
|
|
3922
3989
|
if (!l || typeof l != "string")
|
|
@@ -3924,16 +3991,16 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3924
3991
|
let n = l;
|
|
3925
3992
|
return v.value === "datetime-local" && (n = l.split("T")[1] || "", n = n.split(/[Z+-]/)[0] || ""), n.split(":").length >= 3;
|
|
3926
3993
|
};
|
|
3927
|
-
if (t(
|
|
3994
|
+
if (t(B.value) || t(S.value))
|
|
3928
3995
|
return !0;
|
|
3929
3996
|
}
|
|
3930
3997
|
return !1;
|
|
3931
|
-
}),
|
|
3932
|
-
if (!
|
|
3998
|
+
}), At = a(() => {
|
|
3999
|
+
if (!B.value)
|
|
3933
4000
|
return null;
|
|
3934
|
-
if (
|
|
4001
|
+
if (ke.value && typeof B.value == "string" && B.value.startsWith("{"))
|
|
3935
4002
|
try {
|
|
3936
|
-
const t = JSON.parse(
|
|
4003
|
+
const t = JSON.parse(B.value);
|
|
3937
4004
|
if (t && (t.startDate || t.endDate)) {
|
|
3938
4005
|
const l = (n) => {
|
|
3939
4006
|
if (!n)
|
|
@@ -3951,48 +4018,48 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3951
4018
|
}
|
|
3952
4019
|
} catch {
|
|
3953
4020
|
}
|
|
3954
|
-
if (v.value === "date" && typeof
|
|
3955
|
-
const [t, l, n] =
|
|
4021
|
+
if (v.value === "date" && typeof B.value == "string" && /^\d{4}-\d{2}-\d{2}$/.test(B.value)) {
|
|
4022
|
+
const [t, l, n] = B.value.split("-").map(Number);
|
|
3956
4023
|
return new Date(t, l - 1, n);
|
|
3957
4024
|
}
|
|
3958
|
-
return
|
|
3959
|
-
}),
|
|
4025
|
+
return B.value;
|
|
4026
|
+
}), ue = (t, l, n) => {
|
|
3960
4027
|
if (!t)
|
|
3961
4028
|
return "";
|
|
3962
|
-
const r = n ||
|
|
4029
|
+
const r = n || ot.value;
|
|
3963
4030
|
if (l === "date") {
|
|
3964
|
-
if (
|
|
4031
|
+
if (ke.value && typeof t == "string" && t.startsWith("{"))
|
|
3965
4032
|
try {
|
|
3966
4033
|
const s = JSON.parse(t);
|
|
3967
4034
|
if (s && (s.startDate || s.endDate)) {
|
|
3968
|
-
const d = (
|
|
3969
|
-
if (!
|
|
4035
|
+
const d = (V) => {
|
|
4036
|
+
if (!V)
|
|
3970
4037
|
return "";
|
|
3971
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
3972
|
-
const [
|
|
3973
|
-
return r === "pt-BR" ? `${
|
|
4038
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(V)) {
|
|
4039
|
+
const [L, W, J] = V.split("-");
|
|
4040
|
+
return r === "pt-BR" ? `${J}/${W}/${L}` : `${W}/${J}/${L}`;
|
|
3974
4041
|
}
|
|
3975
|
-
return
|
|
3976
|
-
}, f = d(s.startDate),
|
|
3977
|
-
if (f &&
|
|
3978
|
-
return `${f} - ${
|
|
4042
|
+
return V;
|
|
4043
|
+
}, f = d(s.startDate), p = d(s.endDate);
|
|
4044
|
+
if (f && p)
|
|
4045
|
+
return `${f} - ${p}`;
|
|
3979
4046
|
if (f)
|
|
3980
4047
|
return f;
|
|
3981
|
-
if (
|
|
3982
|
-
return
|
|
4048
|
+
if (p)
|
|
4049
|
+
return p;
|
|
3983
4050
|
}
|
|
3984
4051
|
} catch {
|
|
3985
4052
|
}
|
|
3986
4053
|
if (typeof t == "string") {
|
|
3987
4054
|
if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
3988
|
-
const [d, f,
|
|
3989
|
-
return r === "pt-BR" ? `${
|
|
4055
|
+
const [d, f, p] = t.split("-");
|
|
4056
|
+
return r === "pt-BR" ? `${p}/${f}/${d}` : `${f}/${p}/${d}`;
|
|
3990
4057
|
}
|
|
3991
4058
|
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")) {
|
|
3992
4059
|
const d = new Date(t);
|
|
3993
4060
|
if (!isNaN(d.getTime())) {
|
|
3994
|
-
const f = d.getFullYear(),
|
|
3995
|
-
return r === "pt-BR" ? `${
|
|
4061
|
+
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"), V = String(d.getDate()).padStart(2, "0");
|
|
4062
|
+
return r === "pt-BR" ? `${V}/${p}/${f}` : `${p}/${V}/${f}`;
|
|
3996
4063
|
}
|
|
3997
4064
|
}
|
|
3998
4065
|
} else if (t instanceof Date && !isNaN(t.getTime())) {
|
|
@@ -4003,14 +4070,14 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4003
4070
|
} else if (l === "datetime-local") {
|
|
4004
4071
|
if (typeof t == "string") {
|
|
4005
4072
|
if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/.test(t)) {
|
|
4006
|
-
const [d, f] = t.split("T"), [
|
|
4007
|
-
return r === "pt-BR" ? `${
|
|
4073
|
+
const [d, f] = t.split("T"), [p, V, L] = d.split("-");
|
|
4074
|
+
return r === "pt-BR" ? `${L}/${V}/${p} ${f}` : `${V}/${L}/${p} ${f}`;
|
|
4008
4075
|
}
|
|
4009
4076
|
if (/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)(?:Z|[+-]\d{2}:\d{2})?$/.test(t)) {
|
|
4010
4077
|
const d = new Date(t);
|
|
4011
4078
|
if (!isNaN(d.getTime())) {
|
|
4012
|
-
const f = d.getFullYear(),
|
|
4013
|
-
return r === "pt-BR" ? `${
|
|
4079
|
+
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"), V = String(d.getDate()).padStart(2, "0"), L = String(d.getHours()).padStart(2, "0"), W = String(d.getMinutes()).padStart(2, "0"), J = String(d.getSeconds()).padStart(2, "0");
|
|
4080
|
+
return r === "pt-BR" ? `${V}/${p}/${f} ${L}:${W}:${J}` : `${p}/${V}/${f} ${L}:${W}:${J}`;
|
|
4014
4081
|
}
|
|
4015
4082
|
}
|
|
4016
4083
|
}
|
|
@@ -4030,78 +4097,78 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4030
4097
|
return t;
|
|
4031
4098
|
}
|
|
4032
4099
|
return t;
|
|
4033
|
-
},
|
|
4100
|
+
}, ut = (t, l, n) => {
|
|
4034
4101
|
if (!t || !t.trim())
|
|
4035
4102
|
return "";
|
|
4036
|
-
const r = t.trim(), s = n ||
|
|
4103
|
+
const r = t.trim(), s = n || ot.value;
|
|
4037
4104
|
if (l === "date") {
|
|
4038
|
-
if (
|
|
4039
|
-
const d = r.split(/\s*-\s*/).map((
|
|
4040
|
-
if (
|
|
4105
|
+
if (ke.value && r.includes("-")) {
|
|
4106
|
+
const d = r.split(/\s*-\s*/).map((L) => L.trim()), f = (L) => {
|
|
4107
|
+
if (!L)
|
|
4041
4108
|
return null;
|
|
4042
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(
|
|
4043
|
-
const
|
|
4109
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(L)) {
|
|
4110
|
+
const W = L.split("/");
|
|
4044
4111
|
if (s === "pt-BR") {
|
|
4045
|
-
const [
|
|
4046
|
-
return `${
|
|
4112
|
+
const [J, Me, ft] = W, Pe = J.padStart(2, "0"), Je = Me.padStart(2, "0");
|
|
4113
|
+
return `${ft}-${Je}-${Pe}`;
|
|
4047
4114
|
} else {
|
|
4048
|
-
const [
|
|
4049
|
-
return `${
|
|
4115
|
+
const [J, Me, ft] = W, Pe = Me.padStart(2, "0"), Je = J.padStart(2, "0");
|
|
4116
|
+
return `${ft}-${Je}-${Pe}`;
|
|
4050
4117
|
}
|
|
4051
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
4052
|
-
const
|
|
4053
|
-
return `${
|
|
4118
|
+
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(L)) {
|
|
4119
|
+
const W = L.split("-"), [J, Me, ft] = W, Pe = ft.padStart(2, "0"), Je = Me.padStart(2, "0");
|
|
4120
|
+
return `${J}-${Je}-${Pe}`;
|
|
4054
4121
|
}
|
|
4055
4122
|
return null;
|
|
4056
4123
|
};
|
|
4057
|
-
let
|
|
4058
|
-
if (
|
|
4059
|
-
const
|
|
4060
|
-
if (new Date(
|
|
4061
|
-
const
|
|
4062
|
-
|
|
4124
|
+
let p = f(d[0]), V = d[1] ? f(d[1]) : null;
|
|
4125
|
+
if (p && V) {
|
|
4126
|
+
const L = new Date(p);
|
|
4127
|
+
if (new Date(V) < L) {
|
|
4128
|
+
const J = p;
|
|
4129
|
+
p = V, V = J;
|
|
4063
4130
|
}
|
|
4064
|
-
return JSON.stringify({ startDate:
|
|
4065
|
-
} else if (
|
|
4066
|
-
return JSON.stringify({ startDate:
|
|
4131
|
+
return JSON.stringify({ startDate: p, endDate: V });
|
|
4132
|
+
} else if (p)
|
|
4133
|
+
return JSON.stringify({ startDate: p, endDate: null });
|
|
4067
4134
|
return "";
|
|
4068
4135
|
}
|
|
4069
4136
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(r)) {
|
|
4070
4137
|
const d = r.split("/");
|
|
4071
4138
|
if (s === "pt-BR") {
|
|
4072
|
-
const [f,
|
|
4073
|
-
return `${
|
|
4139
|
+
const [f, p, V] = d, L = f.padStart(2, "0"), W = p.padStart(2, "0");
|
|
4140
|
+
return `${V}-${W}-${L}`;
|
|
4074
4141
|
} else {
|
|
4075
|
-
const [f,
|
|
4076
|
-
return `${
|
|
4142
|
+
const [f, p, V] = d, L = p.padStart(2, "0"), W = f.padStart(2, "0");
|
|
4143
|
+
return `${V}-${W}-${L}`;
|
|
4077
4144
|
}
|
|
4078
4145
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)) {
|
|
4079
|
-
const d = r.split("-"), [f,
|
|
4080
|
-
return `${f}-${
|
|
4146
|
+
const d = r.split("-"), [f, p, V] = d, L = V.padStart(2, "0"), W = p.padStart(2, "0");
|
|
4147
|
+
return `${f}-${W}-${L}`;
|
|
4081
4148
|
}
|
|
4082
4149
|
return "";
|
|
4083
4150
|
} else if (l === "datetime-local") {
|
|
4084
4151
|
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(r)) {
|
|
4085
|
-
const [d, f] = r.split(" "),
|
|
4152
|
+
const [d, f] = r.split(" "), p = d.split("/");
|
|
4086
4153
|
if (s === "pt-BR") {
|
|
4087
|
-
const [
|
|
4088
|
-
return `${
|
|
4154
|
+
const [V, L, W] = p, J = V.padStart(2, "0"), Me = L.padStart(2, "0"), Pe = f.split(":").map((Je) => Je.padStart(2, "0")).join(":");
|
|
4155
|
+
return `${W}-${Me}-${J}T${Pe}`;
|
|
4089
4156
|
} else {
|
|
4090
|
-
const [
|
|
4091
|
-
return `${
|
|
4157
|
+
const [V, L, W] = p, J = L.padStart(2, "0"), Me = V.padStart(2, "0"), Pe = f.split(":").map((Je) => Je.padStart(2, "0")).join(":");
|
|
4158
|
+
return `${W}-${Me}-${J}T${Pe}`;
|
|
4092
4159
|
}
|
|
4093
4160
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(r)) {
|
|
4094
|
-
const [d, f] = r.split("T"),
|
|
4095
|
-
return `${
|
|
4161
|
+
const [d, f] = r.split("T"), p = d.split("-"), [V, L, W] = p, J = W.padStart(2, "0"), Me = L.padStart(2, "0"), Pe = f.split(":").map((Je) => Je.padStart(2, "0")).join(":");
|
|
4162
|
+
return `${V}-${Me}-${J}T${Pe}`;
|
|
4096
4163
|
}
|
|
4097
4164
|
return "";
|
|
4098
4165
|
} else if (l === "month") {
|
|
4099
4166
|
if (/^\d{1,2}\/\d{4}$/.test(r)) {
|
|
4100
|
-
const [d, f] = r.split("/"),
|
|
4101
|
-
return `${f}-${
|
|
4167
|
+
const [d, f] = r.split("/"), p = d.padStart(2, "0");
|
|
4168
|
+
return `${f}-${p}`;
|
|
4102
4169
|
} else if (/^\d{4}-\d{1,2}$/.test(r)) {
|
|
4103
|
-
const [d, f] = r.split("-"),
|
|
4104
|
-
return `${d}-${
|
|
4170
|
+
const [d, f] = r.split("-"), p = f.padStart(2, "0");
|
|
4171
|
+
return `${d}-${p}`;
|
|
4105
4172
|
}
|
|
4106
4173
|
return "";
|
|
4107
4174
|
} else if (l === "week") {
|
|
@@ -4114,26 +4181,26 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4114
4181
|
return f ? `${f[2]}-W${f[1]}` : "";
|
|
4115
4182
|
}
|
|
4116
4183
|
return r;
|
|
4117
|
-
},
|
|
4118
|
-
const t =
|
|
4184
|
+
}, ne = oe(!1), $t = oe({ top: 0, left: 0 }), P = oe(null), U = oe(null), Yt = oe(!0), z = a(() => Yt.value === !0), G = a(() => {
|
|
4185
|
+
const t = $.value ? "component-disabled" : "", l = ce.value !== "b" ? "inline-block" : "block", n = I.value ? I.value : "", r = ae.value ? ae.value : "", s = le.value ? le.value : "", d = X.value ? X.value : !1, f = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, p = H.value ? H.value : "'Lato', sans-serif", V = ie.value ? ie.value : "1.4em", L = q.value !== 0 && !q.value || q.value < 0 ? 100 : q.value, W = Fe.value ? Fe.value : "'Lato', sans-serif", J = be.value ? be.value : "1em", Me = ee.value !== 0 && !ee.value || ee.value < 0 ? 100 : ee.value, ft = Ce.value ? Ce.value : "#f15574", Pe = fe.value ? fe.value : 200, Je = Ve.value ? Ve.value : "normal", Ua = "sm", Ga = j.value ? j.value : !1, Ka = v.value ? v.value : "date", Za = Oe.value ? Oe.value : !1, Ja = ze.value ? ze.value : "normal", Qa = he.value ? he.value : "left", Xa = Ae.value ? Ae.value : "background", el = Ie.value ? Ie.value : !1, tl = _e.value !== 0 && !_e.value || _e.value < 0 ? 5 : _e.value, al = de.value ? de.value : "transparent", ll = We.value !== 0 && !We.value || We.value < 0 ? 15 : We.value, nl = ge.value ? ge.value : "1px 5px", ol = Se.value !== 0 && !Se.value || Se.value < 0 ? 0 : Se.value, rl = Ee.value === null || Ee.value === void 0 ? -13 : Ee.value, ul = He.value === null || He.value === void 0 ? 5 : He.value, il = qe.value === null || qe.value === void 0 ? 0 : qe.value, sl = Ke.value === null || Ke.value === void 0 ? 0 : Ke.value, dl = at.value ? at.value : "'Lato', sans-serif", cl = yt.value ? yt.value : "1em", fl = Mt.value ? Mt.value : "0.8em", vl = Vt.value ? Vt.value : 400, Sl = bt.value ? bt.value : "#ffffff", xl = Nt.value ? Nt.value : "#000000", Cl = lt.value ? lt.value : "#ffffff", Vl = rt.value ? rt.value : "#000000";
|
|
4119
4186
|
return {
|
|
4120
4187
|
disabled: t,
|
|
4121
4188
|
display: l,
|
|
4122
|
-
font:
|
|
4123
|
-
fontSize:
|
|
4124
|
-
fontWeight:
|
|
4125
|
-
fontFamilyMsg:
|
|
4126
|
-
fontSizeMsg:
|
|
4127
|
-
fontWeightMsg:
|
|
4128
|
-
textMessageColor:
|
|
4189
|
+
font: p,
|
|
4190
|
+
fontSize: V,
|
|
4191
|
+
fontWeight: L,
|
|
4192
|
+
fontFamilyMsg: W,
|
|
4193
|
+
fontSizeMsg: J,
|
|
4194
|
+
fontWeightMsg: Me,
|
|
4195
|
+
textMessageColor: ft,
|
|
4129
4196
|
caretColor: n,
|
|
4130
4197
|
selectionBgColor: r,
|
|
4131
4198
|
selectionTextColor: s,
|
|
4132
4199
|
hasBorderRadius: d,
|
|
4133
4200
|
borderRadius: f,
|
|
4134
4201
|
textAlign: Qa,
|
|
4135
|
-
inputWidth:
|
|
4136
|
-
activeTextStyle:
|
|
4202
|
+
inputWidth: Pe,
|
|
4203
|
+
activeTextStyle: Je,
|
|
4137
4204
|
sizeMediaQuery: Ua,
|
|
4138
4205
|
inputReadonly: Ga,
|
|
4139
4206
|
inputType: Ka,
|
|
@@ -4153,47 +4220,50 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4153
4220
|
fontFamilyLabel: dl,
|
|
4154
4221
|
fontSizeLabel: cl,
|
|
4155
4222
|
fontSizeLabelActive: fl,
|
|
4156
|
-
fontWeightLabel:
|
|
4223
|
+
fontWeightLabel: vl,
|
|
4157
4224
|
lightTextColorLabel: Sl,
|
|
4158
4225
|
darkTextColorLabel: xl,
|
|
4159
4226
|
lightTextColorLabelActive: Cl,
|
|
4160
4227
|
darkTextColorLabelActive: Vl
|
|
4161
4228
|
};
|
|
4162
|
-
}),
|
|
4163
|
-
const t =
|
|
4229
|
+
}), kt = a(() => G.value.disabled), wt = a(() => {
|
|
4230
|
+
const t = G.value, l = w.value;
|
|
4164
4231
|
return {
|
|
4165
4232
|
display: t.display,
|
|
4166
4233
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
4167
|
-
paddingTop:
|
|
4234
|
+
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
4235
|
+
paddingTop: "0px",
|
|
4236
|
+
// Esconde o label quando não está ativo usando overflow hidden
|
|
4237
|
+
overflow: l && Ie.value ? "visible" : "hidden"
|
|
4168
4238
|
};
|
|
4169
|
-
}),
|
|
4170
|
-
const t =
|
|
4239
|
+
}), it = a(() => {
|
|
4240
|
+
const t = G.value;
|
|
4171
4241
|
return t.fontSize ? t.fontSize : "1.4em";
|
|
4172
|
-
}),
|
|
4173
|
-
const t =
|
|
4242
|
+
}), N = a(() => {
|
|
4243
|
+
const t = G.value, l = w.value;
|
|
4174
4244
|
return {
|
|
4175
4245
|
fontWeight: t.fontWeight,
|
|
4176
|
-
marginTop: l &&
|
|
4246
|
+
marginTop: l && Ie.value ? `${t.inputLabelMarginActive}px` : "0"
|
|
4177
4247
|
};
|
|
4178
|
-
}),
|
|
4179
|
-
const t =
|
|
4248
|
+
}), Ft = a(() => {
|
|
4249
|
+
const t = G.value;
|
|
4180
4250
|
return t.inputStyle !== "line" && t.hasBorderRadius ? { borderRadius: `${t.borderRadius}rem` } : {};
|
|
4181
|
-
}),
|
|
4182
|
-
const t =
|
|
4251
|
+
}), oa = a(() => G.value.font), ra = a(() => G.value.fontFamilyMsg), ua = a(() => G.value.fontSizeMsg), st = a(() => G.value.fontWeightMsg), Et = a(() => ze.value === "dark" ? te.value : et.value), Pt = a(() => G.value.textMessageColor), ia = a(() => {
|
|
4252
|
+
const t = G.value;
|
|
4183
4253
|
return t.caretColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
4184
|
-
}),
|
|
4185
|
-
const t =
|
|
4254
|
+
}), Ut = a(() => {
|
|
4255
|
+
const t = G.value;
|
|
4186
4256
|
return t.selectionBgColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
4187
|
-
}),
|
|
4188
|
-
const t =
|
|
4257
|
+
}), sa = a(() => {
|
|
4258
|
+
const t = G.value;
|
|
4189
4259
|
return t.selectionTextColor || (t.theme === "dark" ? "#000000" : "#ffffff");
|
|
4190
|
-
}),
|
|
4191
|
-
const t =
|
|
4260
|
+
}), Gt = a(() => {
|
|
4261
|
+
const t = G.value;
|
|
4192
4262
|
return t.display === "block" ? { width: "100%" } : {
|
|
4193
4263
|
width: `${t.inputWidth}px`
|
|
4194
4264
|
};
|
|
4195
|
-
}),
|
|
4196
|
-
switch (
|
|
4265
|
+
}), da = a(() => {
|
|
4266
|
+
switch (Ae.value) {
|
|
4197
4267
|
case "line":
|
|
4198
4268
|
return "component__input--line";
|
|
4199
4269
|
case "border":
|
|
@@ -4201,8 +4271,8 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4201
4271
|
default:
|
|
4202
4272
|
return "component__input--background";
|
|
4203
4273
|
}
|
|
4204
|
-
}),
|
|
4205
|
-
switch (
|
|
4274
|
+
}), ca = a(() => {
|
|
4275
|
+
switch (G.value.activeTextStyle) {
|
|
4206
4276
|
case "italic":
|
|
4207
4277
|
return "component__input--active--italic";
|
|
4208
4278
|
case "oblique":
|
|
@@ -4210,34 +4280,34 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4210
4280
|
default:
|
|
4211
4281
|
return "component__input--active--normal";
|
|
4212
4282
|
}
|
|
4213
|
-
}),
|
|
4214
|
-
switch (
|
|
4283
|
+
}), fa = a(() => "component__sm"), va = a(() => {
|
|
4284
|
+
switch (G.value.theme) {
|
|
4215
4285
|
case "dark":
|
|
4216
4286
|
return "component__theme--dark";
|
|
4217
4287
|
default:
|
|
4218
4288
|
return "component__theme--light";
|
|
4219
4289
|
}
|
|
4220
|
-
}),
|
|
4221
|
-
a(() =>
|
|
4222
|
-
const
|
|
4290
|
+
}), Kt = a(() => G.value.inputReadonly ? "component__input--read-only" : ""), pa = a(() => G.value.inputUppercase ? "component__input--uppercase" : ""), zt = a(() => Xe.value ? Xe.value : `${Q.value}-name-label`), c = a(() => ""), w = a(() => $e.value || E.value && E.value.trim().length > 0), pe = a(() => !E.value || E.value.trim().length === 0 ? "component__input--empty" : "");
|
|
4291
|
+
a(() => $e.value ? "component__input--active" : "component__input--no-active");
|
|
4292
|
+
const Ze = a(() => "6px 10px"), Ot = a(() => !!(tt.value && Ge.value)), i = a(() => {
|
|
4223
4293
|
const t = {};
|
|
4224
|
-
|
|
4294
|
+
x.value && Object.keys(x.value).forEach((r) => t[`aria-${r}`] = x.value[r]);
|
|
4225
4295
|
const l = {
|
|
4226
|
-
"aria-label":
|
|
4227
|
-
"aria-disabled":
|
|
4296
|
+
"aria-label": k.value,
|
|
4297
|
+
"aria-disabled": $.value,
|
|
4228
4298
|
...t
|
|
4229
4299
|
};
|
|
4230
4300
|
return Object.fromEntries(
|
|
4231
4301
|
Object.entries(l).filter(([n, r]) => r != null)
|
|
4232
4302
|
);
|
|
4233
|
-
}),
|
|
4234
|
-
const t =
|
|
4303
|
+
}), C = a(() => {
|
|
4304
|
+
const t = ze.value === "dark" ? T.value : Ct.value, l = ze.value === "dark" ? te.value : et.value;
|
|
4235
4305
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
4236
|
-
}),
|
|
4237
|
-
const t =
|
|
4306
|
+
}), De = a(() => {
|
|
4307
|
+
const t = ze.value === "dark" ? R.value : Be.value, l = ze.value === "dark" ? te.value : et.value;
|
|
4238
4308
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
4239
|
-
}),
|
|
4240
|
-
const t =
|
|
4309
|
+
}), je = a(() => {
|
|
4310
|
+
const t = G.value, l = w.value, n = l ? t.lightTextColorLabelActive : t.lightTextColorLabel, r = l ? t.darkTextColorLabelActive : t.darkTextColorLabel;
|
|
4241
4311
|
return {
|
|
4242
4312
|
fontFamily: t.fontFamilyLabel,
|
|
4243
4313
|
fontSize: l ? t.fontSizeLabelActive : t.fontSizeLabel,
|
|
@@ -4254,55 +4324,55 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4254
4324
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
4255
4325
|
...l ? {
|
|
4256
4326
|
width: "fit-content",
|
|
4257
|
-
whiteSpace:
|
|
4258
|
-
wordWrap:
|
|
4259
|
-
overflowWrap:
|
|
4327
|
+
whiteSpace: A.value ? "nowrap" : "normal",
|
|
4328
|
+
wordWrap: A.value ? "normal" : "break-word",
|
|
4329
|
+
overflowWrap: A.value ? "normal" : "break-word",
|
|
4260
4330
|
maxWidth: "100%",
|
|
4261
|
-
textOverflow:
|
|
4262
|
-
overflow:
|
|
4331
|
+
textOverflow: A.value ? "ellipsis" : "clip",
|
|
4332
|
+
overflow: A.value ? "hidden" : "visible"
|
|
4263
4333
|
} : {}
|
|
4264
4334
|
};
|
|
4265
4335
|
});
|
|
4266
4336
|
a(() => {
|
|
4267
|
-
const t =
|
|
4337
|
+
const t = G.value;
|
|
4268
4338
|
return t.theme === "dark" ? t.darkTextColorLabelActive : t.lightTextColorLabelActive;
|
|
4269
4339
|
});
|
|
4270
4340
|
const Zt = () => {
|
|
4271
|
-
|
|
4272
|
-
},
|
|
4273
|
-
|
|
4274
|
-
},
|
|
4275
|
-
t.stopPropagation(), !(
|
|
4276
|
-
|
|
4341
|
+
B.value = S.value, Y.value = v.value;
|
|
4342
|
+
}, ga = () => {
|
|
4343
|
+
h("clicked");
|
|
4344
|
+
}, ya = (t) => {
|
|
4345
|
+
t.stopPropagation(), !($.value || G.value.inputReadonly) && P.value && (P.value.focus(), z.value && (ne.value = !1, requestAnimationFrame(() => {
|
|
4346
|
+
Dt(), ne.value = !0;
|
|
4277
4347
|
})));
|
|
4278
|
-
},
|
|
4279
|
-
|
|
4280
|
-
},
|
|
4348
|
+
}, ba = () => {
|
|
4349
|
+
$.value || G.value.inputReadonly || !D.value || h("entered", B.value);
|
|
4350
|
+
}, ma = async (t) => {
|
|
4281
4351
|
var n;
|
|
4282
4352
|
const l = ((n = t.clipboardData) == null ? void 0 : n.getData("text")) || "";
|
|
4283
|
-
|
|
4284
|
-
},
|
|
4285
|
-
P.value &&
|
|
4353
|
+
h("paste", l), Qe.value && t.preventDefault();
|
|
4354
|
+
}, Dt = () => {
|
|
4355
|
+
P.value && la(() => {
|
|
4286
4356
|
const t = P.value.getBoundingClientRect(), l = 4;
|
|
4287
|
-
|
|
4357
|
+
$t.value = {
|
|
4288
4358
|
top: `${t.bottom + l}px`,
|
|
4289
4359
|
left: `${t.left}px`
|
|
4290
4360
|
};
|
|
4291
4361
|
});
|
|
4292
|
-
},
|
|
4362
|
+
}, ha = a(() => ({
|
|
4293
4363
|
position: "fixed",
|
|
4294
|
-
top:
|
|
4295
|
-
left:
|
|
4296
|
-
zIndex:
|
|
4297
|
-
})),
|
|
4298
|
-
|
|
4299
|
-
|
|
4364
|
+
top: $t.value.top,
|
|
4365
|
+
left: $t.value.left,
|
|
4366
|
+
zIndex: Lt.value
|
|
4367
|
+
})), Sa = () => {
|
|
4368
|
+
$e.value = !0, h("focused"), z.value && (ne.value = !1, requestAnimationFrame(() => {
|
|
4369
|
+
Dt(), ne.value = !0;
|
|
4300
4370
|
}));
|
|
4301
|
-
},
|
|
4371
|
+
}, xa = (t) => {
|
|
4302
4372
|
t.relatedTarget && U.value && U.value.contains(t.relatedTarget) || setTimeout(() => {
|
|
4303
4373
|
var r;
|
|
4304
4374
|
const l = document.activeElement;
|
|
4305
|
-
if (
|
|
4375
|
+
if (ne.value) {
|
|
4306
4376
|
if (U.value && U.value.contains(l) || t.relatedTarget && U.value && U.value.contains(t.relatedTarget))
|
|
4307
4377
|
return;
|
|
4308
4378
|
if (l === document.body && U.value) {
|
|
@@ -4312,13 +4382,13 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4312
4382
|
}
|
|
4313
4383
|
}
|
|
4314
4384
|
const n = (r = P.value) == null ? void 0 : r.closest(".component");
|
|
4315
|
-
n && n.contains(l) || P.value !== l && (
|
|
4385
|
+
n && n.contains(l) || P.value !== l && ($e.value = !1, ne.value = !1, h("blurred"));
|
|
4316
4386
|
}, 200);
|
|
4317
|
-
},
|
|
4318
|
-
|
|
4319
|
-
|
|
4387
|
+
}, Ca = () => {
|
|
4388
|
+
z.value && (ne.value, ne.value = !1, requestAnimationFrame(() => {
|
|
4389
|
+
Dt(), ne.value = !0;
|
|
4320
4390
|
}));
|
|
4321
|
-
},
|
|
4391
|
+
}, dt = (t) => {
|
|
4322
4392
|
if (!t || !(t instanceof Date))
|
|
4323
4393
|
return null;
|
|
4324
4394
|
const l = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0");
|
|
@@ -4327,7 +4397,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4327
4397
|
if (t == null || t === "")
|
|
4328
4398
|
return "";
|
|
4329
4399
|
if (t instanceof Date)
|
|
4330
|
-
return isNaN(t.getTime()) ? "" :
|
|
4400
|
+
return isNaN(t.getTime()) ? "" : dt(t);
|
|
4331
4401
|
if (typeof t == "string") {
|
|
4332
4402
|
if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
4333
4403
|
const [n, r, s] = t.split("-").map(Number), d = new Date(n, r - 1, s);
|
|
@@ -4335,7 +4405,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4335
4405
|
}
|
|
4336
4406
|
if (/^(\d{4}-\d{2}-\d{2})(T\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})?)?$/.test(t)) {
|
|
4337
4407
|
const n = new Date(t);
|
|
4338
|
-
return isNaN(n.getTime()) ? "" :
|
|
4408
|
+
return isNaN(n.getTime()) ? "" : dt(n);
|
|
4339
4409
|
}
|
|
4340
4410
|
}
|
|
4341
4411
|
return "";
|
|
@@ -4378,7 +4448,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4378
4448
|
}
|
|
4379
4449
|
}
|
|
4380
4450
|
return null;
|
|
4381
|
-
},
|
|
4451
|
+
}, Ht = (t) => {
|
|
4382
4452
|
if (!t)
|
|
4383
4453
|
return !1;
|
|
4384
4454
|
let l = null;
|
|
@@ -4394,34 +4464,34 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4394
4464
|
return !0;
|
|
4395
4465
|
if (!l || isNaN(l.getTime()))
|
|
4396
4466
|
return !0;
|
|
4397
|
-
const n = Jt(
|
|
4467
|
+
const n = Jt(Ue.value);
|
|
4398
4468
|
if (n) {
|
|
4399
4469
|
const s = new Date(n.getTime());
|
|
4400
4470
|
if (s.setHours(0, 0, 0, 0), l < s)
|
|
4401
4471
|
return !0;
|
|
4402
4472
|
}
|
|
4403
|
-
const r = Jt(
|
|
4473
|
+
const r = Jt(ve.value);
|
|
4404
4474
|
if (r) {
|
|
4405
4475
|
const s = new Date(r.getTime());
|
|
4406
4476
|
if (s.setHours(0, 0, 0, 0), l > s)
|
|
4407
4477
|
return !0;
|
|
4408
4478
|
}
|
|
4409
4479
|
return !1;
|
|
4410
|
-
},
|
|
4411
|
-
const r = t * 3600 + l * 60 + n, s = Qt(
|
|
4480
|
+
}, Xt = (t, l, n = 0) => {
|
|
4481
|
+
const r = t * 3600 + l * 60 + n, s = Qt(Ue.value);
|
|
4412
4482
|
if (s) {
|
|
4413
4483
|
const f = s.hour * 3600 + s.minute * 60 + (s.second || 0);
|
|
4414
4484
|
if (r < f)
|
|
4415
4485
|
return !0;
|
|
4416
4486
|
}
|
|
4417
|
-
const d = Qt(
|
|
4487
|
+
const d = Qt(ve.value);
|
|
4418
4488
|
if (d) {
|
|
4419
4489
|
const f = d.hour * 3600 + d.minute * 60 + (d.second || 0);
|
|
4420
4490
|
if (r > f)
|
|
4421
4491
|
return !0;
|
|
4422
4492
|
}
|
|
4423
4493
|
return !1;
|
|
4424
|
-
},
|
|
4494
|
+
}, ct = (t, l) => {
|
|
4425
4495
|
if (!t || t === "")
|
|
4426
4496
|
return !0;
|
|
4427
4497
|
if (l === "date") {
|
|
@@ -4440,7 +4510,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4440
4510
|
if (n.length !== 2)
|
|
4441
4511
|
return !1;
|
|
4442
4512
|
const r = n[0], s = n[1];
|
|
4443
|
-
return
|
|
4513
|
+
return ct(r, "date") && ct(s, "time");
|
|
4444
4514
|
} else if (l === "month") {
|
|
4445
4515
|
if (!/^\d{4}-\d{2}$/.test(t))
|
|
4446
4516
|
return !1;
|
|
@@ -4453,176 +4523,176 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4453
4523
|
return n >= 1900 && n <= 2100 && r >= 1 && r <= 53;
|
|
4454
4524
|
}
|
|
4455
4525
|
return !1;
|
|
4456
|
-
},
|
|
4526
|
+
}, Bt = () => {
|
|
4457
4527
|
let t = !0;
|
|
4458
|
-
if (
|
|
4459
|
-
t = !
|
|
4528
|
+
if (S.value === null || S.value === void 0 || S.value === "") {
|
|
4529
|
+
t = !Tt.value, h("valid", t);
|
|
4460
4530
|
return;
|
|
4461
4531
|
}
|
|
4462
4532
|
if (v.value === "date") {
|
|
4463
|
-
const n = _t(
|
|
4464
|
-
if (n === "" &&
|
|
4465
|
-
|
|
4533
|
+
const n = _t(S.value);
|
|
4534
|
+
if (n === "" && S.value !== "" && S.value !== null && S.value !== void 0) {
|
|
4535
|
+
h("valid", !1);
|
|
4466
4536
|
return;
|
|
4467
4537
|
}
|
|
4468
4538
|
if (n === "") {
|
|
4469
|
-
|
|
4539
|
+
h("valid", !0);
|
|
4470
4540
|
return;
|
|
4471
4541
|
}
|
|
4472
|
-
if (!
|
|
4473
|
-
|
|
4542
|
+
if (!ct(n, v.value)) {
|
|
4543
|
+
h("valid", !1);
|
|
4474
4544
|
return;
|
|
4475
4545
|
}
|
|
4476
|
-
t = !
|
|
4546
|
+
t = !Ht(n);
|
|
4477
4547
|
} else if (v.value === "time") {
|
|
4478
|
-
if (!
|
|
4479
|
-
|
|
4548
|
+
if (!ct(S.value, v.value)) {
|
|
4549
|
+
h("valid", !1);
|
|
4480
4550
|
return;
|
|
4481
4551
|
}
|
|
4482
|
-
const n =
|
|
4552
|
+
const n = S.value.split(":");
|
|
4483
4553
|
if (n.length >= 2) {
|
|
4484
4554
|
const r = parseInt(n[0], 10) || 0, s = parseInt(n[1], 10) || 0, d = n[2] ? parseInt(n[2], 10) : 0;
|
|
4485
|
-
t = !
|
|
4555
|
+
t = !Xt(r, s, d);
|
|
4486
4556
|
}
|
|
4487
4557
|
} else if (v.value === "datetime-local") {
|
|
4488
|
-
if (
|
|
4558
|
+
if (S.value, typeof S.value == "string") {
|
|
4489
4559
|
const n = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/, r = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)(?:Z|[+-]\d{2}:\d{2})?$/;
|
|
4490
|
-
if (!n.test(
|
|
4491
|
-
|
|
4560
|
+
if (!n.test(S.value) && !r.test(S.value)) {
|
|
4561
|
+
h("valid", !1);
|
|
4492
4562
|
return;
|
|
4493
4563
|
}
|
|
4494
|
-
if (r.test(
|
|
4495
|
-
const s = new Date(
|
|
4564
|
+
if (r.test(S.value)) {
|
|
4565
|
+
const s = new Date(S.value);
|
|
4496
4566
|
if (isNaN(s.getTime())) {
|
|
4497
|
-
|
|
4567
|
+
h("valid", !1);
|
|
4498
4568
|
return;
|
|
4499
4569
|
}
|
|
4500
4570
|
}
|
|
4501
|
-
} else if (
|
|
4502
|
-
|
|
4571
|
+
} else if (S.value !== null && S.value !== void 0 && S.value !== "") {
|
|
4572
|
+
h("valid", !1);
|
|
4503
4573
|
return;
|
|
4504
4574
|
}
|
|
4505
|
-
if (
|
|
4506
|
-
const n =
|
|
4575
|
+
if (B.value) {
|
|
4576
|
+
const n = B.value.split("T");
|
|
4507
4577
|
if (n.length === 2) {
|
|
4508
|
-
const r = n[0], s = n[1], d = !
|
|
4509
|
-
let
|
|
4578
|
+
const r = n[0], s = n[1], d = !Ht(r), f = s.split(":");
|
|
4579
|
+
let p = !0;
|
|
4510
4580
|
if (f.length >= 2) {
|
|
4511
|
-
const
|
|
4512
|
-
|
|
4581
|
+
const V = parseInt(f[0], 10) || 0, L = parseInt(f[1], 10) || 0, W = f[2] ? parseInt(f[2], 10) : 0;
|
|
4582
|
+
p = !Xt(V, L, W);
|
|
4513
4583
|
}
|
|
4514
|
-
t = d &&
|
|
4584
|
+
t = d && p;
|
|
4515
4585
|
}
|
|
4516
4586
|
}
|
|
4517
4587
|
} else if (v.value === "month") {
|
|
4518
|
-
if (!
|
|
4519
|
-
|
|
4588
|
+
if (!ct(S.value, v.value)) {
|
|
4589
|
+
h("valid", !1);
|
|
4520
4590
|
return;
|
|
4521
4591
|
}
|
|
4522
|
-
t = !
|
|
4592
|
+
t = !Ht(S.value + "-01");
|
|
4523
4593
|
} else if (v.value === "week") {
|
|
4524
|
-
if (!
|
|
4525
|
-
|
|
4594
|
+
if (!ct(S.value, v.value)) {
|
|
4595
|
+
h("valid", !1);
|
|
4526
4596
|
return;
|
|
4527
4597
|
}
|
|
4528
4598
|
t = !0;
|
|
4529
4599
|
}
|
|
4530
|
-
|
|
4531
|
-
}, Ca = (t) => {
|
|
4532
|
-
x("valid", t);
|
|
4600
|
+
h("valid", t);
|
|
4533
4601
|
}, Va = (t) => {
|
|
4534
|
-
|
|
4535
|
-
},
|
|
4602
|
+
h("valid", t);
|
|
4603
|
+
}, Ta = (t) => {
|
|
4604
|
+
h("month-changed", t);
|
|
4605
|
+
}, ea = (t, l) => {
|
|
4536
4606
|
if (!t || !(t instanceof Date))
|
|
4537
4607
|
return t || "";
|
|
4538
4608
|
if (l === "date")
|
|
4539
|
-
return
|
|
4609
|
+
return dt(t);
|
|
4540
4610
|
if (l === "time") {
|
|
4541
4611
|
const n = String(t.getHours()).padStart(2, "0"), r = String(t.getMinutes()).padStart(2, "0"), s = String(t.getSeconds()).padStart(2, "0");
|
|
4542
4612
|
return `${n}:${r}:${s}`;
|
|
4543
4613
|
} else if (l === "datetime-local") {
|
|
4544
|
-
const n =
|
|
4614
|
+
const n = dt(t), r = String(t.getHours()).padStart(2, "0"), s = String(t.getMinutes()).padStart(2, "0"), d = String(t.getSeconds()).padStart(2, "0");
|
|
4545
4615
|
return `${n}T${r}:${s}:${d}`;
|
|
4546
4616
|
} else if (l === "month") {
|
|
4547
4617
|
const n = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0");
|
|
4548
4618
|
return `${n}-${r}`;
|
|
4549
4619
|
} else if (l === "week")
|
|
4550
|
-
return
|
|
4620
|
+
return dt(t);
|
|
4551
4621
|
return "";
|
|
4552
|
-
},
|
|
4553
|
-
if (!
|
|
4554
|
-
return
|
|
4555
|
-
}),
|
|
4556
|
-
if (!
|
|
4557
|
-
return
|
|
4558
|
-
}),
|
|
4622
|
+
}, ka = a(() => {
|
|
4623
|
+
if (!z.value)
|
|
4624
|
+
return ea(Ue.value, v.value);
|
|
4625
|
+
}), o = a(() => {
|
|
4626
|
+
if (!z.value)
|
|
4627
|
+
return ea(ve.value, v.value);
|
|
4628
|
+
}), m = a(() => !0), Re = (t) => {
|
|
4559
4629
|
let l = "";
|
|
4560
4630
|
if (!t)
|
|
4561
4631
|
l = "";
|
|
4562
|
-
else if (
|
|
4632
|
+
else if (ke.value && typeof t == "object" && !(t instanceof Date)) {
|
|
4563
4633
|
if (t.startDate === null && t.endDate === null)
|
|
4564
4634
|
l = "";
|
|
4565
4635
|
else if (t.startDate || t.endDate) {
|
|
4566
4636
|
const r = {
|
|
4567
4637
|
// Converter startDate para string ISO se existir
|
|
4568
|
-
startDate: t.startDate ?
|
|
4638
|
+
startDate: t.startDate ? dt(t.startDate) : null,
|
|
4569
4639
|
// Converter endDate para string ISO se existir
|
|
4570
|
-
endDate: t.endDate ?
|
|
4640
|
+
endDate: t.endDate ? dt(t.endDate) : null
|
|
4571
4641
|
};
|
|
4572
4642
|
l = JSON.stringify(r);
|
|
4573
4643
|
}
|
|
4574
4644
|
} else
|
|
4575
|
-
v.value === "date" ? t instanceof Date ? l =
|
|
4576
|
-
|
|
4577
|
-
const n = l ?
|
|
4578
|
-
|
|
4579
|
-
},
|
|
4580
|
-
if (!
|
|
4581
|
-
|
|
4645
|
+
v.value === "date" ? t instanceof Date ? l = dt(t) : typeof t == "string" && (l = t) : (v.value === "month" || v.value === "time" || v.value === "datetime-local" || v.value === "week") && (l = typeof t == "string" ? t : "");
|
|
4646
|
+
mt = !0, B.value = l;
|
|
4647
|
+
const n = l ? ue(l, v.value) : "";
|
|
4648
|
+
E.value = n, Z.value = n;
|
|
4649
|
+
}, nt = () => {
|
|
4650
|
+
if (!z.value) {
|
|
4651
|
+
B.value = E.value;
|
|
4582
4652
|
return;
|
|
4583
4653
|
}
|
|
4584
|
-
|
|
4654
|
+
Le = !0;
|
|
4585
4655
|
const t = P.value ? {
|
|
4586
4656
|
start: P.value.selectionStart,
|
|
4587
4657
|
end: P.value.selectionEnd
|
|
4588
|
-
} : null, l =
|
|
4658
|
+
} : null, l = E.value.trim();
|
|
4589
4659
|
if (!l || l.length === 0) {
|
|
4590
|
-
|
|
4591
|
-
|
|
4660
|
+
mt = !0, B.value = "", E.value = "", Z.value = "", setTimeout(() => {
|
|
4661
|
+
Le = !1;
|
|
4592
4662
|
}, 50);
|
|
4593
4663
|
return;
|
|
4594
4664
|
}
|
|
4595
4665
|
if (v.value === "date") {
|
|
4596
|
-
const r =
|
|
4597
|
-
if (
|
|
4666
|
+
const r = ke.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}$/;
|
|
4667
|
+
if (ke.value) {
|
|
4598
4668
|
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/), l.length > 23 && !r.test(l)) {
|
|
4599
|
-
|
|
4600
|
-
const s = Math.min(t.start,
|
|
4669
|
+
E.value = Z.value, t && P.value && la(() => {
|
|
4670
|
+
const s = Math.min(t.start, Z.value.length);
|
|
4601
4671
|
P.value.setSelectionRange(s, s);
|
|
4602
4672
|
}), setTimeout(() => {
|
|
4603
|
-
|
|
4673
|
+
Le = !1;
|
|
4604
4674
|
}, 50);
|
|
4605
4675
|
return;
|
|
4606
4676
|
}
|
|
4607
4677
|
if (!r.test(l) && l.length <= 23) {
|
|
4608
4678
|
setTimeout(() => {
|
|
4609
|
-
|
|
4679
|
+
Le = !1;
|
|
4610
4680
|
}, 50);
|
|
4611
4681
|
return;
|
|
4612
4682
|
}
|
|
4613
4683
|
} else {
|
|
4614
4684
|
if (l.length > 10 && !r.test(l)) {
|
|
4615
|
-
|
|
4616
|
-
const s = Math.min(t.start,
|
|
4685
|
+
E.value = Z.value, t && P.value && la(() => {
|
|
4686
|
+
const s = Math.min(t.start, Z.value.length);
|
|
4617
4687
|
P.value.setSelectionRange(s, s);
|
|
4618
4688
|
}), setTimeout(() => {
|
|
4619
|
-
|
|
4689
|
+
Le = !1;
|
|
4620
4690
|
}, 50);
|
|
4621
4691
|
return;
|
|
4622
4692
|
}
|
|
4623
4693
|
if (!r.test(l) && l.length <= 10) {
|
|
4624
4694
|
setTimeout(() => {
|
|
4625
|
-
|
|
4695
|
+
Le = !1;
|
|
4626
4696
|
}, 50);
|
|
4627
4697
|
return;
|
|
4628
4698
|
}
|
|
@@ -4630,69 +4700,69 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4630
4700
|
}
|
|
4631
4701
|
let n = null;
|
|
4632
4702
|
if (v.value === "date")
|
|
4633
|
-
if (
|
|
4703
|
+
if (ke.value)
|
|
4634
4704
|
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/))
|
|
4635
|
-
if (n =
|
|
4636
|
-
|
|
4705
|
+
if (n = ut(l, v.value), n && n !== B.value)
|
|
4706
|
+
mt = !0, B.value = n, Z.value = l;
|
|
4637
4707
|
else {
|
|
4638
4708
|
setTimeout(() => {
|
|
4639
|
-
|
|
4709
|
+
Le = !1;
|
|
4640
4710
|
}, 50);
|
|
4641
4711
|
return;
|
|
4642
4712
|
}
|
|
4643
4713
|
else if (l.includes("-")) {
|
|
4644
4714
|
const s = l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*$/);
|
|
4645
4715
|
if (s) {
|
|
4646
|
-
const d = s[1], f =
|
|
4716
|
+
const d = s[1], f = ut(d, v.value);
|
|
4647
4717
|
if (f) {
|
|
4648
|
-
const
|
|
4649
|
-
|
|
4718
|
+
const p = JSON.stringify({ startDate: f, endDate: null });
|
|
4719
|
+
p !== B.value && (mt = !0, B.value = p, Z.value = l);
|
|
4650
4720
|
} else {
|
|
4651
|
-
|
|
4652
|
-
|
|
4721
|
+
Z.value = l, setTimeout(() => {
|
|
4722
|
+
Le = !1;
|
|
4653
4723
|
}, 50);
|
|
4654
4724
|
return;
|
|
4655
4725
|
}
|
|
4656
4726
|
} else {
|
|
4657
|
-
|
|
4658
|
-
|
|
4727
|
+
Z.value = l, setTimeout(() => {
|
|
4728
|
+
Le = !1;
|
|
4659
4729
|
}, 50);
|
|
4660
4730
|
return;
|
|
4661
4731
|
}
|
|
4662
4732
|
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
4663
|
-
if (n =
|
|
4733
|
+
if (n = ut(l, v.value), n) {
|
|
4664
4734
|
const d = JSON.stringify({ startDate: n, endDate: null });
|
|
4665
|
-
d !==
|
|
4735
|
+
d !== B.value && (mt = !0, B.value = d, Z.value = l);
|
|
4666
4736
|
} else {
|
|
4667
|
-
|
|
4668
|
-
|
|
4737
|
+
Z.value = l, setTimeout(() => {
|
|
4738
|
+
Le = !1;
|
|
4669
4739
|
}, 50);
|
|
4670
4740
|
return;
|
|
4671
4741
|
}
|
|
4672
4742
|
else {
|
|
4673
|
-
|
|
4674
|
-
|
|
4743
|
+
Z.value = l, setTimeout(() => {
|
|
4744
|
+
Le = !1;
|
|
4675
4745
|
}, 50);
|
|
4676
4746
|
return;
|
|
4677
4747
|
}
|
|
4678
4748
|
else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
4679
|
-
n =
|
|
4749
|
+
n = ut(l, v.value), n && n !== B.value && (mt = !0, B.value = n, Z.value = l);
|
|
4680
4750
|
else {
|
|
4681
4751
|
setTimeout(() => {
|
|
4682
|
-
|
|
4752
|
+
Le = !1;
|
|
4683
4753
|
}, 50);
|
|
4684
4754
|
return;
|
|
4685
4755
|
}
|
|
4686
4756
|
else
|
|
4687
|
-
n =
|
|
4757
|
+
n = ut(l, v.value), n && n !== B.value && (mt = !0, B.value = n, Z.value = l);
|
|
4688
4758
|
setTimeout(() => {
|
|
4689
|
-
|
|
4759
|
+
Le = !1;
|
|
4690
4760
|
}, 50);
|
|
4691
|
-
},
|
|
4692
|
-
|
|
4693
|
-
},
|
|
4761
|
+
}, Ba = (t) => {
|
|
4762
|
+
h("changed-complete", t), h("current-value-complete", t);
|
|
4763
|
+
}, ta = (t) => {
|
|
4694
4764
|
var s;
|
|
4695
|
-
if (!
|
|
4765
|
+
if (!ne.value || !U.value || !P.value)
|
|
4696
4766
|
return;
|
|
4697
4767
|
const l = t.target, n = (s = P.value) == null ? void 0 : s.closest(".nb-wrapper");
|
|
4698
4768
|
if (U.value && U.value.contains(l) || n && (l === n || n.contains(l)) || U.value && U.value.contains(l))
|
|
@@ -4704,7 +4774,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4704
4774
|
r = r.parentElement;
|
|
4705
4775
|
}
|
|
4706
4776
|
setTimeout(() => {
|
|
4707
|
-
if (!
|
|
4777
|
+
if (!ne.value || !U.value || U.value && U.value.contains(l))
|
|
4708
4778
|
return;
|
|
4709
4779
|
for (r = l; r && r !== document.body; ) {
|
|
4710
4780
|
if (r === U.value || U.value && U.value.contains(r))
|
|
@@ -4714,81 +4784,81 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4714
4784
|
if (!document.body.contains(l))
|
|
4715
4785
|
return;
|
|
4716
4786
|
const d = P.value && (l === P.value || P.value.contains(l)), f = n && (l === n || n.contains(l));
|
|
4717
|
-
!d && !f && (
|
|
4787
|
+
!d && !f && (ne.value = !1, (!E.value || E.value.trim().length === 0) && ($e.value = !1));
|
|
4718
4788
|
}, 50);
|
|
4719
4789
|
}, wa = () => {
|
|
4720
|
-
|
|
4790
|
+
ne.value && z.value && Dt();
|
|
4721
4791
|
}, Da = () => {
|
|
4722
|
-
|
|
4792
|
+
ne.value && z.value && (ne.value = !1);
|
|
4723
4793
|
};
|
|
4724
|
-
let It = null,
|
|
4794
|
+
let It = null, aa = null, qt = { top: 0, left: 0 };
|
|
4725
4795
|
const Ra = () => {
|
|
4726
|
-
if (!
|
|
4796
|
+
if (!ne.value || !z.value || !P.value)
|
|
4727
4797
|
return;
|
|
4728
4798
|
const t = 4, l = P.value.getBoundingClientRect(), n = `${l.bottom + t}px`, r = `${l.left}px`;
|
|
4729
|
-
(
|
|
4799
|
+
(qt.top !== n || qt.left !== r) && (qt.top = n, qt.left = r, $t.value = {
|
|
4730
4800
|
top: n,
|
|
4731
4801
|
left: r
|
|
4732
|
-
}),
|
|
4733
|
-
},
|
|
4734
|
-
if (!P.value || !
|
|
4802
|
+
}), aa = requestAnimationFrame(Ra);
|
|
4803
|
+
}, _a = () => {
|
|
4804
|
+
if (!P.value || !z.value)
|
|
4735
4805
|
return;
|
|
4736
|
-
|
|
4737
|
-
|
|
4806
|
+
qt = { top: 0, left: 0 }, Ra(), It = new ResizeObserver(() => {
|
|
4807
|
+
ne.value && Dt();
|
|
4738
4808
|
}), It.observe(P.value);
|
|
4739
4809
|
const t = P.value.closest(".component");
|
|
4740
4810
|
t && It.observe(t);
|
|
4741
4811
|
}, Ma = () => {
|
|
4742
|
-
|
|
4812
|
+
aa !== null && (cancelAnimationFrame(aa), aa = null), It && (It.disconnect(), It = null);
|
|
4743
4813
|
};
|
|
4744
|
-
|
|
4745
|
-
t &&
|
|
4746
|
-
|
|
4814
|
+
re(ne, (t) => {
|
|
4815
|
+
t && z.value ? la(() => {
|
|
4816
|
+
_a();
|
|
4747
4817
|
}) : Ma();
|
|
4748
|
-
}),
|
|
4818
|
+
}), Aa(() => {
|
|
4749
4819
|
var l;
|
|
4750
|
-
let t =
|
|
4820
|
+
let t = S.value;
|
|
4751
4821
|
if (v.value === "date")
|
|
4752
|
-
t = _t(
|
|
4822
|
+
t = _t(S.value);
|
|
4753
4823
|
else if (v.value === "datetime-local")
|
|
4754
|
-
if (
|
|
4824
|
+
if (S.value === null || S.value === void 0 || S.value === "")
|
|
4755
4825
|
t = "";
|
|
4756
|
-
else if (typeof
|
|
4826
|
+
else if (typeof S.value == "string") {
|
|
4757
4827
|
const n = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/, r = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)(?:Z|[+-]\d{2}:\d{2})?$/;
|
|
4758
|
-
if (n.test(
|
|
4759
|
-
t =
|
|
4760
|
-
else if (r.test(
|
|
4761
|
-
const s = new Date(
|
|
4828
|
+
if (n.test(S.value))
|
|
4829
|
+
t = S.value;
|
|
4830
|
+
else if (r.test(S.value)) {
|
|
4831
|
+
const s = new Date(S.value);
|
|
4762
4832
|
if (isNaN(s.getTime()))
|
|
4763
4833
|
t = "";
|
|
4764
4834
|
else {
|
|
4765
|
-
const d = s.getFullYear(), f = String(s.getMonth() + 1).padStart(2, "0"),
|
|
4766
|
-
t =
|
|
4835
|
+
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"), L = String(s.getMinutes()).padStart(2, "0"), W = String(s.getSeconds()).padStart(2, "0"), J = ((l = S.value.split("T")[1]) == null ? void 0 : l.split(/[Z+-]/)[0]) || "";
|
|
4836
|
+
t = J.includes(":") && J.split(":").length >= 3 ? `${d}-${f}-${p}T${V}:${L}:${W}` : `${d}-${f}-${p}T${V}:${L}`;
|
|
4767
4837
|
}
|
|
4768
4838
|
} else
|
|
4769
4839
|
t = "";
|
|
4770
4840
|
} else
|
|
4771
4841
|
t = "";
|
|
4772
|
-
|
|
4773
|
-
|
|
4842
|
+
B.value = t, E.value = ue(S.value, v.value), document.addEventListener("click", ta, !1), window.addEventListener("scroll", wa, { capture: !0, passive: !0 }), window.addEventListener("resize", Da), la(() => {
|
|
4843
|
+
Bt();
|
|
4774
4844
|
});
|
|
4775
4845
|
}), Ya(() => {
|
|
4776
|
-
Zt(), Ma(), document.removeEventListener("click",
|
|
4777
|
-
}),
|
|
4778
|
-
|
|
4779
|
-
}, { immediate: !0 }),
|
|
4780
|
-
|
|
4846
|
+
Zt(), Ma(), document.removeEventListener("click", ta), window.removeEventListener("scroll", wa, { capture: !0, passive: !0 }), window.removeEventListener("resize", Da);
|
|
4847
|
+
}), re(v, (t) => {
|
|
4848
|
+
Y.value = t;
|
|
4849
|
+
}, { immediate: !0 }), re(ot, () => {
|
|
4850
|
+
B.value && z.value && (E.value = ue(B.value, v.value));
|
|
4781
4851
|
});
|
|
4782
4852
|
const Ha = (t) => dn(t, {
|
|
4783
4853
|
inputType: v.value,
|
|
4784
|
-
hasSeconds:
|
|
4785
|
-
allowRange:
|
|
4786
|
-
timezoneFormat:
|
|
4787
|
-
locale:
|
|
4854
|
+
hasSeconds: F.hasSeconds,
|
|
4855
|
+
allowRange: ke.value,
|
|
4856
|
+
timezoneFormat: F.calendarIsoStringTimezoneFormat,
|
|
4857
|
+
locale: F.calendarLocale
|
|
4788
4858
|
});
|
|
4789
|
-
|
|
4859
|
+
re(S, (t) => {
|
|
4790
4860
|
var l;
|
|
4791
|
-
if (t !==
|
|
4861
|
+
if (t !== B.value) {
|
|
4792
4862
|
let n = t;
|
|
4793
4863
|
if (v.value === "date")
|
|
4794
4864
|
n = _t(t);
|
|
@@ -4800,41 +4870,41 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4800
4870
|
if (d.test(t))
|
|
4801
4871
|
n = t;
|
|
4802
4872
|
else if (f.test(t)) {
|
|
4803
|
-
const
|
|
4804
|
-
if (isNaN(
|
|
4873
|
+
const p = new Date(t);
|
|
4874
|
+
if (isNaN(p.getTime()))
|
|
4805
4875
|
n = "";
|
|
4806
4876
|
else {
|
|
4807
|
-
const
|
|
4808
|
-
n =
|
|
4877
|
+
const V = p.getFullYear(), L = String(p.getMonth() + 1).padStart(2, "0"), W = String(p.getDate()).padStart(2, "0"), J = String(p.getHours()).padStart(2, "0"), Me = String(p.getMinutes()).padStart(2, "0"), ft = String(p.getSeconds()).padStart(2, "0"), Pe = ((l = t.split("T")[1]) == null ? void 0 : l.split(/[Z+-]/)[0]) || "";
|
|
4878
|
+
n = Pe.includes(":") && Pe.split(":").length >= 3 ? `${V}-${L}-${W}T${J}:${Me}:${ft}` : `${V}-${L}-${W}T${J}:${Me}`;
|
|
4809
4879
|
}
|
|
4810
4880
|
} else
|
|
4811
4881
|
n = "";
|
|
4812
4882
|
} else
|
|
4813
4883
|
n = "";
|
|
4814
|
-
|
|
4815
|
-
const r =
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
}),
|
|
4884
|
+
B.value = n;
|
|
4885
|
+
const r = ue(t, v.value);
|
|
4886
|
+
E.value = r, la(() => {
|
|
4887
|
+
Bt();
|
|
4888
|
+
}), Z.value = r;
|
|
4819
4889
|
const s = Ha(n);
|
|
4820
|
-
s && (
|
|
4890
|
+
s && (h("changed-complete", s), h("current-value-complete", s));
|
|
4821
4891
|
}
|
|
4822
4892
|
}, { immediate: !0 });
|
|
4823
|
-
let
|
|
4893
|
+
let Le = !1;
|
|
4824
4894
|
const qa = () => {
|
|
4825
|
-
|
|
4826
|
-
|
|
4895
|
+
Le = !0, setTimeout(() => {
|
|
4896
|
+
Le = !1;
|
|
4827
4897
|
}, 100);
|
|
4828
4898
|
};
|
|
4829
|
-
let
|
|
4830
|
-
return
|
|
4831
|
-
if (
|
|
4832
|
-
const l =
|
|
4833
|
-
l !==
|
|
4899
|
+
let mt = !1;
|
|
4900
|
+
return re(() => B.value, (t) => {
|
|
4901
|
+
if (z.value && !mt && !Le) {
|
|
4902
|
+
const l = ue(t, v.value);
|
|
4903
|
+
l !== E.value && (E.value = l, Z.value = l);
|
|
4834
4904
|
}
|
|
4835
|
-
|
|
4836
|
-
}),
|
|
4837
|
-
if (
|
|
4905
|
+
mt = !1;
|
|
4906
|
+
}), re(B, (t) => {
|
|
4907
|
+
if (se.value && (t = t.trim()), ke.value && typeof t == "string" && t.startsWith("{"))
|
|
4838
4908
|
try {
|
|
4839
4909
|
const l = JSON.parse(t);
|
|
4840
4910
|
if (l && (l.startDate || l.endDate)) {
|
|
@@ -4842,117 +4912,117 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4842
4912
|
if (!d)
|
|
4843
4913
|
return null;
|
|
4844
4914
|
if (/^\d{4}-\d{2}-\d{2}$/.test(d)) {
|
|
4845
|
-
const [f,
|
|
4846
|
-
return new Date(f,
|
|
4915
|
+
const [f, p, V] = d.split("-").map(Number);
|
|
4916
|
+
return new Date(f, p - 1, V);
|
|
4847
4917
|
}
|
|
4848
4918
|
return new Date(d);
|
|
4849
4919
|
}, r = l.startDate ? n(l.startDate) : null, s = l.endDate ? n(l.endDate) : null;
|
|
4850
|
-
|
|
4920
|
+
h("changed", { startDate: r, endDate: s });
|
|
4851
4921
|
return;
|
|
4852
4922
|
}
|
|
4853
4923
|
} catch {
|
|
4854
4924
|
}
|
|
4855
|
-
|
|
4856
|
-
}),
|
|
4857
|
-
|
|
4858
|
-
}),
|
|
4859
|
-
|
|
4860
|
-
|
|
4925
|
+
h("changed", t);
|
|
4926
|
+
}), re($e, (t) => {
|
|
4927
|
+
h(t ? "focused" : "blurred");
|
|
4928
|
+
}), re(B, (t) => {
|
|
4929
|
+
se.value && (t = t.trim()), h("current-value", t), la(() => {
|
|
4930
|
+
Bt();
|
|
4861
4931
|
});
|
|
4862
|
-
}),
|
|
4863
|
-
|
|
4864
|
-
|
|
4932
|
+
}), re([Ue, ve], () => {
|
|
4933
|
+
la(() => {
|
|
4934
|
+
Bt();
|
|
4865
4935
|
});
|
|
4866
|
-
}), (t, l) => u(
|
|
4936
|
+
}), (t, l) => u(Q) ? (O(), K("div", $a({
|
|
4867
4937
|
key: 0,
|
|
4868
|
-
class: ["nb-wrapper",
|
|
4869
|
-
style: [
|
|
4938
|
+
class: ["nb-wrapper", kt.value],
|
|
4939
|
+
style: [wt.value, Gt.value, Ft.value],
|
|
4870
4940
|
role: "input"
|
|
4871
|
-
},
|
|
4872
|
-
|
|
4873
|
-
id: u(
|
|
4874
|
-
class:
|
|
4875
|
-
style:
|
|
4876
|
-
onClick:
|
|
4941
|
+
}, i.value), [
|
|
4942
|
+
xe("div", {
|
|
4943
|
+
id: u(Q),
|
|
4944
|
+
class: Ye(["nb-reset", "component", fa.value, va.value, Kt.value, da.value]),
|
|
4945
|
+
style: Ne([N.value, Gt.value, Ft.value]),
|
|
4946
|
+
onClick: ga
|
|
4877
4947
|
}, [
|
|
4878
|
-
u(
|
|
4948
|
+
u(Ie) ? (O(), K("label", {
|
|
4879
4949
|
key: 0,
|
|
4880
|
-
for:
|
|
4950
|
+
for: zt.value,
|
|
4881
4951
|
class: "component__label",
|
|
4882
|
-
style:
|
|
4883
|
-
onClick:
|
|
4952
|
+
style: Ne([je.value]),
|
|
4953
|
+
onClick: ya
|
|
4884
4954
|
}, [
|
|
4885
|
-
|
|
4886
|
-
u(
|
|
4887
|
-
], 12, fn)) :
|
|
4888
|
-
Pa(
|
|
4955
|
+
jt(Rt(u(b)), 1),
|
|
4956
|
+
u(Tt) ? (O(), K("span", vn, "*")) : ye("", !0)
|
|
4957
|
+
], 12, fn)) : ye("", !0),
|
|
4958
|
+
Pa(xe("input", {
|
|
4889
4959
|
ref_key: "inputRef",
|
|
4890
4960
|
ref: P,
|
|
4891
|
-
"onUpdate:modelValue": l[0] || (l[0] = (n) =>
|
|
4892
|
-
onInput:
|
|
4961
|
+
"onUpdate:modelValue": l[0] || (l[0] = (n) => E.value = n),
|
|
4962
|
+
onInput: nt,
|
|
4893
4963
|
onKeydown: [
|
|
4894
4964
|
qa,
|
|
4895
|
-
l[1] || (l[1] =
|
|
4965
|
+
l[1] || (l[1] = na((n) => !u($) && u(D) && ba(), ["enter"]))
|
|
4896
4966
|
],
|
|
4897
|
-
id:
|
|
4898
|
-
name:
|
|
4899
|
-
type:
|
|
4900
|
-
class:
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4967
|
+
id: zt.value,
|
|
4968
|
+
name: zt.value,
|
|
4969
|
+
type: z.value ? "text" : Y.value,
|
|
4970
|
+
class: Ye(["component__input", [
|
|
4971
|
+
pa.value,
|
|
4972
|
+
ca.value,
|
|
4973
|
+
pe.value
|
|
4904
4974
|
]]),
|
|
4905
|
-
placeholder:
|
|
4906
|
-
disabled: u(
|
|
4907
|
-
required: u(
|
|
4908
|
-
readonly:
|
|
4975
|
+
placeholder: c.value,
|
|
4976
|
+
disabled: u($) || u(j),
|
|
4977
|
+
required: u(Tt),
|
|
4978
|
+
readonly: m.value,
|
|
4909
4979
|
autocomplete: e.inputAutocomplete,
|
|
4910
|
-
min:
|
|
4911
|
-
max:
|
|
4912
|
-
step:
|
|
4913
|
-
tabindex: u(
|
|
4980
|
+
min: ka.value,
|
|
4981
|
+
max: o.value,
|
|
4982
|
+
step: z.value ? void 0 : u(vt),
|
|
4983
|
+
tabindex: u($) || u(j) ? -1 : u(xt),
|
|
4914
4984
|
role: "input",
|
|
4915
|
-
style:
|
|
4916
|
-
onFocus:
|
|
4917
|
-
onBlur:
|
|
4918
|
-
onClick:
|
|
4919
|
-
onPaste:
|
|
4985
|
+
style: Ne([Ft.value]),
|
|
4986
|
+
onFocus: Sa,
|
|
4987
|
+
onBlur: xa,
|
|
4988
|
+
onClick: Ca,
|
|
4989
|
+
onPaste: ma
|
|
4920
4990
|
}, null, 46, pn), [
|
|
4921
|
-
[
|
|
4991
|
+
[ml, E.value]
|
|
4922
4992
|
])
|
|
4923
4993
|
], 14, cn),
|
|
4924
|
-
|
|
4994
|
+
Ot.value ? (O(), K("div", {
|
|
4925
4995
|
key: 0,
|
|
4926
|
-
class:
|
|
4996
|
+
class: Ye(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
4927
4997
|
}, [
|
|
4928
|
-
|
|
4929
|
-
|
|
4998
|
+
La(t.$slots, "message", {}, () => [
|
|
4999
|
+
jt(Rt(e.message), 1)
|
|
4930
5000
|
], !0)
|
|
4931
|
-
], 2)) :
|
|
5001
|
+
], 2)) : ye("", !0),
|
|
4932
5002
|
(O(), Ll(Al, { to: "body" }, [
|
|
4933
|
-
|
|
5003
|
+
z.value && ne.value ? (O(), K("div", {
|
|
4934
5004
|
key: 0,
|
|
4935
5005
|
ref_key: "calendarRef",
|
|
4936
5006
|
ref: U,
|
|
4937
5007
|
class: "datepicker__custom-calendar-wrapper",
|
|
4938
|
-
style:
|
|
4939
|
-
onClick: l[4] || (l[4] = Ia((n) =>
|
|
4940
|
-
onMousedown: l[5] || (l[5] = Ia((n) =>
|
|
5008
|
+
style: Ne(ha.value),
|
|
5009
|
+
onClick: l[4] || (l[4] = Ia((n) => M.value = !0, ["stop"])),
|
|
5010
|
+
onMousedown: l[5] || (l[5] = Ia((n) => M.value = !0, ["stop"]))
|
|
4941
5011
|
}, [
|
|
4942
|
-
$l(u(
|
|
4943
|
-
"nb-id": `${u(
|
|
4944
|
-
value:
|
|
5012
|
+
$l(u(g), {
|
|
5013
|
+
"nb-id": `${u(Q)}-calendar`,
|
|
5014
|
+
value: At.value,
|
|
4945
5015
|
"input-type": u(v),
|
|
4946
|
-
"has-seconds":
|
|
4947
|
-
min: u(
|
|
4948
|
-
max: u(
|
|
4949
|
-
step: u(
|
|
4950
|
-
disabled: u(
|
|
4951
|
-
width:
|
|
4952
|
-
locale: u(
|
|
4953
|
-
theme: u(
|
|
4954
|
-
"allow-range": u(
|
|
4955
|
-
"block-clicks-without-events": u(
|
|
5016
|
+
"has-seconds": we.value,
|
|
5017
|
+
min: u(Ue),
|
|
5018
|
+
max: u(ve),
|
|
5019
|
+
step: u(vt),
|
|
5020
|
+
disabled: u($),
|
|
5021
|
+
width: Wt.value,
|
|
5022
|
+
locale: u(ot),
|
|
5023
|
+
theme: u(ze),
|
|
5024
|
+
"allow-range": u(ke),
|
|
5025
|
+
"block-clicks-without-events": u(St),
|
|
4956
5026
|
"font-family": e.calendarFontFamily,
|
|
4957
5027
|
"font-size": e.calendarFontSize,
|
|
4958
5028
|
"font-weight": e.calendarFontWeight,
|
|
@@ -5011,18 +5081,18 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
5011
5081
|
"clear-button-title": e.calendarClearButtonTitle,
|
|
5012
5082
|
"clear-button-symbol": e.calendarClearButtonSymbol,
|
|
5013
5083
|
"iso-string-timezone-format": e.calendarIsoStringTimezoneFormat,
|
|
5014
|
-
onChanged:
|
|
5015
|
-
onDateSelected:
|
|
5016
|
-
onMonthChanged:
|
|
5017
|
-
onValid:
|
|
5018
|
-
onMousedown: l[2] || (l[2] = (n) =>
|
|
5019
|
-
onClick: l[3] || (l[3] = (n) =>
|
|
5084
|
+
onChanged: Re,
|
|
5085
|
+
onDateSelected: Ba,
|
|
5086
|
+
onMonthChanged: Ta,
|
|
5087
|
+
onValid: Va,
|
|
5088
|
+
onMousedown: l[2] || (l[2] = (n) => M.value = !0),
|
|
5089
|
+
onClick: l[3] || (l[3] = (n) => M.value = !0)
|
|
5020
5090
|
}, 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"])
|
|
5021
|
-
], 36)) :
|
|
5091
|
+
], 36)) : ye("", !0)
|
|
5022
5092
|
]))
|
|
5023
|
-
], 16)) :
|
|
5093
|
+
], 16)) : ye("", !0);
|
|
5024
5094
|
}
|
|
5025
|
-
}), yn = /* @__PURE__ */
|
|
5095
|
+
}), yn = /* @__PURE__ */ Oa(gn, [["__scopeId", "data-v-8c15f0f4"]]), pl = {
|
|
5026
5096
|
NbInputRadio: Nl,
|
|
5027
5097
|
NbInputCheckbox: El,
|
|
5028
5098
|
NbInput: Kl,
|
|
@@ -5031,10 +5101,10 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
5031
5101
|
NbDatePicker: yn
|
|
5032
5102
|
}, mn = {
|
|
5033
5103
|
install(e) {
|
|
5034
|
-
for (const
|
|
5035
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
5036
|
-
const
|
|
5037
|
-
e.component(
|
|
5104
|
+
for (const y in pl)
|
|
5105
|
+
if (Object.prototype.hasOwnProperty.call(pl, y)) {
|
|
5106
|
+
const g = pl[y];
|
|
5107
|
+
e.component(g.name, g);
|
|
5038
5108
|
}
|
|
5039
5109
|
}
|
|
5040
5110
|
};
|