@vlalg-nimbus/nb-inputs 9.2.0 → 9.4.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 +1202 -1200
- 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,8 +1,8 @@
|
|
|
1
|
-
import { useCssVars as Wa, onMounted as Aa, ref as oe, toRefs as Ea, computed as a, watch as re, openBlock as O, createElementBlock as K, normalizeClass as Ye, normalizeStyle as Ne, createElementVNode as
|
|
2
|
-
const Oa = (e,
|
|
1
|
+
import { useCssVars as Wa, onMounted as Aa, ref as oe, toRefs as Ea, computed as a, watch as re, openBlock as O, createElementBlock as K, normalizeClass as Ye, normalizeStyle as Ne, createElementVNode as Ve, mergeProps as $a, Fragment as gl, renderList as yl, unref as u, withDirectives as Pa, vModelRadio as Tl, withKeys as na, withModifiers as Ia, toDisplayString as Rt, createCommentVNode as me, vModelCheckbox as kl, onUnmounted as Ya, createTextVNode as jt, renderSlot as La, vModelDynamic as ml, vModelText as hl, defineAsyncComponent as Bl, nextTick as la, createBlock as Ll, Teleport as Al, createVNode as $l } from "vue";
|
|
2
|
+
const Oa = (e, b) => {
|
|
3
3
|
const g = e.__vccOpts || e;
|
|
4
|
-
for (const [h,
|
|
5
|
-
g[h] =
|
|
4
|
+
for (const [h, F] of b)
|
|
5
|
+
g[h] = F;
|
|
6
6
|
return g;
|
|
7
7
|
}, wl = ["id"], Dl = ["id", "disabled", "value", "name"], Rl = ["for", "tabindex"], Ml = /* @__PURE__ */ Object.assign({
|
|
8
8
|
name: "NbInputRadio",
|
|
@@ -18,14 +18,14 @@ const Oa = (e, y) => {
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: "b",
|
|
20
20
|
validator: (e = "b") => {
|
|
21
|
-
const
|
|
22
|
-
return ["b", "ib"].includes(
|
|
21
|
+
const b = e ? e.toLowerCase() : "";
|
|
22
|
+
return ["b", "ib"].includes(b);
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
tabIndex: {
|
|
26
26
|
type: [Number, Array],
|
|
27
27
|
default: 0,
|
|
28
|
-
validator: (e,
|
|
28
|
+
validator: (e, b) => Array.isArray(e) ? e.length === b.options.length : !0
|
|
29
29
|
},
|
|
30
30
|
hasTabIndexEnter: {
|
|
31
31
|
type: Boolean,
|
|
@@ -56,12 +56,12 @@ const Oa = (e, y) => {
|
|
|
56
56
|
validator: (e) => {
|
|
57
57
|
if (!e.length)
|
|
58
58
|
return !1;
|
|
59
|
-
let
|
|
59
|
+
let b = !1;
|
|
60
60
|
for (const g of e) {
|
|
61
61
|
const h = Object.keys(g);
|
|
62
|
-
h.length !== 2 && (
|
|
62
|
+
h.length !== 2 && (b = !0), h.every((Q) => ["value", "text"].includes(Q)) || (b = !0);
|
|
63
63
|
}
|
|
64
|
-
if (!
|
|
64
|
+
if (!b)
|
|
65
65
|
return e;
|
|
66
66
|
}
|
|
67
67
|
},
|
|
@@ -78,8 +78,8 @@ const Oa = (e, y) => {
|
|
|
78
78
|
type: String,
|
|
79
79
|
default: "light",
|
|
80
80
|
validator: (e) => {
|
|
81
|
-
const
|
|
82
|
-
return ["light", "dark"].includes(
|
|
81
|
+
const b = e ? e.toLowerCase() : "";
|
|
82
|
+
return ["light", "dark"].includes(b);
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
// Cores do tema light
|
|
@@ -151,142 +151,142 @@ const Oa = (e, y) => {
|
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
emits: ["current-value", "changed", "clicked"],
|
|
154
|
-
setup(e, { emit:
|
|
154
|
+
setup(e, { emit: b }) {
|
|
155
155
|
Wa((V) => ({
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
"
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"
|
|
165
|
-
|
|
166
|
-
"
|
|
156
|
+
"4dae10f6": Ue.value,
|
|
157
|
+
"3aeb4162": xt.value,
|
|
158
|
+
"36c094f2": St.value,
|
|
159
|
+
ecf28042: ot.value,
|
|
160
|
+
b03d93f6: ht.value,
|
|
161
|
+
"47b64a4a": pe.value,
|
|
162
|
+
c9891512: vt.value,
|
|
163
|
+
"4a63a9da": pt.value,
|
|
164
|
+
"9dd3cf8e": Lt.value,
|
|
165
|
+
48025196: ze.value,
|
|
166
|
+
"21e702c3": Le.value
|
|
167
167
|
})), Aa(() => {
|
|
168
168
|
gt();
|
|
169
169
|
});
|
|
170
|
-
const g =
|
|
170
|
+
const g = b, h = e, F = oe(null), {
|
|
171
171
|
ariaLabel: Q,
|
|
172
|
-
ariaAttrs:
|
|
173
|
-
currentOption:
|
|
174
|
-
valueType:
|
|
175
|
-
display:
|
|
172
|
+
ariaAttrs: fe,
|
|
173
|
+
currentOption: R,
|
|
174
|
+
valueType: B,
|
|
175
|
+
display: C,
|
|
176
176
|
options: I,
|
|
177
177
|
theme: ae,
|
|
178
178
|
lightTextColor: le,
|
|
179
179
|
lightColor: X,
|
|
180
180
|
lightColorHover: _,
|
|
181
|
-
darkTextColor:
|
|
181
|
+
darkTextColor: w,
|
|
182
182
|
darkColor: H,
|
|
183
|
-
darkColorHover:
|
|
183
|
+
darkColorHover: se,
|
|
184
184
|
hoverEffect: q,
|
|
185
185
|
activeHoverEffect: Fe,
|
|
186
|
-
itemGap:
|
|
186
|
+
itemGap: he,
|
|
187
187
|
internalGap: ee,
|
|
188
|
-
scale:
|
|
189
|
-
disabled:
|
|
190
|
-
fontFamily:
|
|
191
|
-
fontSize:
|
|
192
|
-
fontWeight:
|
|
188
|
+
scale: Te,
|
|
189
|
+
disabled: ve,
|
|
190
|
+
fontFamily: we,
|
|
191
|
+
fontSize: ke,
|
|
192
|
+
fontWeight: Be
|
|
193
193
|
} = Ea(h), j = a(() => {
|
|
194
|
-
const V =
|
|
194
|
+
const V = ve.value ? "component-disabled" : "", D = C.value !== "b" ? "inline-block" : "block", Se = we.value ? we.value : "'Lato', sans-serif", te = ke.value ? ke.value : "1.6em", ge = Be.value !== 0 && !Be.value || Be.value < 0 ? 200 : Be.value, tt = [!1, !0].includes(q.value) ? q.value : !1, Ge = [!1, !0].includes(Fe.value) ? Fe.value : !1, Ie = he.value !== 0 && !he.value || he.value < 0 ? 15 : he.value, y = ee.value !== 0 && !ee.value || ee.value < 0 ? 6 : ee.value, k = Te.value !== 0 && !Te.value || Te.value < 0 ? 1 : Te.value;
|
|
195
195
|
return {
|
|
196
196
|
disabled: V,
|
|
197
|
-
display:
|
|
198
|
-
hoverEffect:
|
|
197
|
+
display: D,
|
|
198
|
+
hoverEffect: tt,
|
|
199
199
|
activeHoverEffect: Ge,
|
|
200
200
|
itemGap: Ie,
|
|
201
|
-
internalGap:
|
|
202
|
-
scale:
|
|
203
|
-
font:
|
|
201
|
+
internalGap: y,
|
|
202
|
+
scale: k,
|
|
203
|
+
font: Se,
|
|
204
204
|
fontSize: te,
|
|
205
|
-
fontWeight:
|
|
205
|
+
fontWeight: ge
|
|
206
206
|
};
|
|
207
|
-
}),
|
|
207
|
+
}), Qe = a(() => j.value.disabled), v = a(() => ({
|
|
208
208
|
display: j.value.display
|
|
209
|
-
})),
|
|
209
|
+
})), de = a(() => j.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), Oe = a(() => {
|
|
210
210
|
const V = j.value;
|
|
211
211
|
return {
|
|
212
212
|
fontSize: V.fontSize,
|
|
213
213
|
fontWeight: V.fontWeight
|
|
214
214
|
};
|
|
215
|
-
}),
|
|
216
|
-
const
|
|
217
|
-
return !
|
|
218
|
-
}),
|
|
219
|
-
const
|
|
220
|
-
return !
|
|
221
|
-
}),
|
|
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), pe = a(() => le.value), vt = a(() => X.value), ht = a(() => j.value.hoverEffect ? _.value : X.value), ot = a(() => j.value.activeHoverEffect ? _.value : X.value), ze = a(() => w.value), Le = a(() => H.value), Lt = a(() => j.value.hoverEffect ? se.value : H.value), pt = a(() => j.value.activeHoverEffect ? se.value : H.value), St = a(() => {
|
|
216
|
+
const D = j.value.internalGap;
|
|
217
|
+
return !D || D < 0 ? 0 : `${D}px`;
|
|
218
|
+
}), xt = a(() => {
|
|
219
|
+
const D = j.value.itemGap;
|
|
220
|
+
return !D || D < 0 ? 0 : `${D}px`;
|
|
221
|
+
}), Ct = a(() => ({
|
|
222
222
|
zoom: j.value.scale
|
|
223
|
-
})),
|
|
223
|
+
})), Ae = a(() => {
|
|
224
224
|
const V = {};
|
|
225
|
-
|
|
226
|
-
const
|
|
225
|
+
fe.value && Object.keys(fe.value).forEach((te) => V[`aria-${te}`] = fe.value[te]);
|
|
226
|
+
const D = {
|
|
227
227
|
"aria-label": Q.value,
|
|
228
|
-
"aria-disabled":
|
|
228
|
+
"aria-disabled": ve.value,
|
|
229
229
|
...V
|
|
230
230
|
};
|
|
231
231
|
return Object.fromEntries(
|
|
232
|
-
Object.entries(
|
|
232
|
+
Object.entries(D).filter(([Se, te]) => te != null)
|
|
233
233
|
);
|
|
234
234
|
}), gt = () => {
|
|
235
|
-
const V =
|
|
236
|
-
V && ["string"].includes(
|
|
237
|
-
},
|
|
238
|
-
g("clicked");
|
|
235
|
+
const V = R.value;
|
|
236
|
+
V && ["string"].includes(B.value) ? F.value = V.toString().toLowerCase() : F.value = V;
|
|
237
|
+
}, et = (V) => {
|
|
238
|
+
g("clicked", V);
|
|
239
239
|
};
|
|
240
|
-
return re(
|
|
241
|
-
V !==
|
|
242
|
-
}), re(
|
|
243
|
-
V !==
|
|
244
|
-
}), (V,
|
|
240
|
+
return re(R, (V, D) => {
|
|
241
|
+
V !== D && gt();
|
|
242
|
+
}), re(F, (V, D) => {
|
|
243
|
+
V !== D && (g("current-value", V), g("changed", V));
|
|
244
|
+
}), (V, D) => e.nbId && Xe.value ? (O(), K("div", {
|
|
245
245
|
key: 0,
|
|
246
|
-
class: Ye(["nb-wrapper",
|
|
247
|
-
style: Ne([v.value,
|
|
246
|
+
class: Ye(["nb-wrapper", Qe.value]),
|
|
247
|
+
style: Ne([v.value, Ct.value])
|
|
248
248
|
}, [
|
|
249
|
-
|
|
249
|
+
Ve("div", $a({
|
|
250
250
|
id: e.nbId,
|
|
251
251
|
role: "radiogroup"
|
|
252
|
-
},
|
|
253
|
-
class: ["nb-reset", "component",
|
|
252
|
+
}, Ae.value, {
|
|
253
|
+
class: ["nb-reset", "component", de.value, S.value]
|
|
254
254
|
}), [
|
|
255
|
-
(O(!0), K(
|
|
255
|
+
(O(!0), K(gl, null, yl(u(I), (Se, 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(Ve("input", {
|
|
260
|
+
id: `${e.nbId}-${Se.value}`,
|
|
261
|
+
"onUpdate:modelValue": D[0] || (D[0] = (ge) => F.value = ge),
|
|
262
262
|
type: "radio",
|
|
263
263
|
class: "component-radio__item--input",
|
|
264
|
-
disabled: u(
|
|
265
|
-
value:
|
|
264
|
+
disabled: u(ve),
|
|
265
|
+
value: Se.value,
|
|
266
266
|
name: e.groupName,
|
|
267
|
-
onClick:
|
|
267
|
+
onClick: D[1] || (D[1] = (ge) => et(ge))
|
|
268
268
|
}, null, 8, Dl), [
|
|
269
|
-
[Tl,
|
|
269
|
+
[Tl, F.value]
|
|
270
270
|
]),
|
|
271
|
-
|
|
272
|
-
for: `${e.nbId}-${
|
|
273
|
-
tabindex: u(
|
|
271
|
+
Ve("label", {
|
|
272
|
+
for: `${e.nbId}-${Se.value}`,
|
|
273
|
+
tabindex: u(ve) ? -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
|
+
D[2] || (D[2] = na(Ia((ge) => !u(ve) && e.hasTabIndexEnter && ge.target.click(), ["prevent"]), ["enter"])),
|
|
277
|
+
D[3] || (D[3] = na(Ia((ge) => !u(ve) && e.hasTabIndexSpace && ge.target.click(), ["prevent"]), ["space"]))
|
|
278
278
|
]
|
|
279
279
|
}, [
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
D[4] || (D[4] = Ve("div", null, null, -1)),
|
|
281
|
+
Ve("span", {
|
|
282
282
|
style: Ne([Oe.value])
|
|
283
|
-
},
|
|
283
|
+
}, Rt(Se.text), 5)
|
|
284
284
|
], 40, Rl)
|
|
285
285
|
]))), 128))
|
|
286
286
|
], 16, wl)
|
|
287
|
-
], 6)) :
|
|
287
|
+
], 6)) : me("", !0);
|
|
288
288
|
}
|
|
289
|
-
}), Nl = /* @__PURE__ */ Oa(Ml, [["__scopeId", "data-v-
|
|
289
|
+
}), Nl = /* @__PURE__ */ Oa(Ml, [["__scopeId", "data-v-4736d4fa"]]);
|
|
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 b = e ? e.toLowerCase() : "";
|
|
305
|
+
return ["b", "ib"].includes(b);
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
308
|
tabIndex: {
|
|
309
309
|
type: [Number, Array],
|
|
310
310
|
default: 0,
|
|
311
|
-
validator: (e,
|
|
311
|
+
validator: (e, b) => Array.isArray(e) ? e.length === b.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
|
|
342
|
+
let b = !1;
|
|
343
343
|
for (const g of e) {
|
|
344
344
|
const h = Object.keys(g);
|
|
345
|
-
h.length !== 2 && (
|
|
345
|
+
h.length !== 2 && (b = !0), h.every((Q) => ["value", "text"].includes(Q)) || (b = !0);
|
|
346
346
|
}
|
|
347
|
-
if (!
|
|
347
|
+
if (!b)
|
|
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 b = e ? e.toLowerCase() : "";
|
|
360
|
+
return ["light", "dark"].includes(b);
|
|
361
361
|
}
|
|
362
362
|
},
|
|
363
363
|
// Cores do tema light
|
|
@@ -447,166 +447,166 @@ 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:
|
|
451
|
-
Wa((
|
|
452
|
-
"
|
|
453
|
-
|
|
454
|
-
"
|
|
455
|
-
"
|
|
456
|
-
|
|
457
|
-
"
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
"
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
"
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
450
|
+
setup(e, { emit: b }) {
|
|
451
|
+
Wa((y) => ({
|
|
452
|
+
"7c68ff00": vt.value,
|
|
453
|
+
d1e7cb28: Se.value,
|
|
454
|
+
"48e2ad8f": D.value,
|
|
455
|
+
"2338f991": V.value,
|
|
456
|
+
d9a9ab2e: Le.value,
|
|
457
|
+
"35a2d00f": ze.value,
|
|
458
|
+
dfe7a964: Lt.value,
|
|
459
|
+
"48f03d2d": ot.value,
|
|
460
|
+
"0c977200": ht.value,
|
|
461
|
+
c252ed44: et.value,
|
|
462
|
+
cde5716e: Ct.value,
|
|
463
|
+
"631414ef": xt.value,
|
|
464
|
+
b44adfa4: Ae.value,
|
|
465
|
+
"1f3f6c4d": St.value,
|
|
466
|
+
aed233c0: pt.value
|
|
467
467
|
})), Aa(() => {
|
|
468
468
|
Ge();
|
|
469
469
|
});
|
|
470
|
-
const g =
|
|
470
|
+
const g = b, h = e, F = oe(null), {
|
|
471
471
|
ariaLabel: Q,
|
|
472
|
-
ariaAttrs:
|
|
473
|
-
currentOption:
|
|
474
|
-
display:
|
|
475
|
-
options:
|
|
472
|
+
ariaAttrs: fe,
|
|
473
|
+
currentOption: R,
|
|
474
|
+
display: B,
|
|
475
|
+
options: C,
|
|
476
476
|
theme: I,
|
|
477
477
|
lightTextColor: ae,
|
|
478
478
|
lightColor: le,
|
|
479
479
|
lightColorHover: X,
|
|
480
480
|
darkTextColor: _,
|
|
481
|
-
darkColor:
|
|
481
|
+
darkColor: w,
|
|
482
482
|
darkColorHover: H,
|
|
483
|
-
boxRadius:
|
|
483
|
+
boxRadius: se,
|
|
484
484
|
hoverEffect: q,
|
|
485
485
|
activeHoverEffect: Fe,
|
|
486
|
-
itemGap:
|
|
486
|
+
itemGap: he,
|
|
487
487
|
internalGap: ee,
|
|
488
|
-
scale:
|
|
489
|
-
type:
|
|
490
|
-
background:
|
|
491
|
-
disabled:
|
|
492
|
-
fontFamily:
|
|
488
|
+
scale: Te,
|
|
489
|
+
type: ve,
|
|
490
|
+
background: we,
|
|
491
|
+
disabled: ke,
|
|
492
|
+
fontFamily: Be,
|
|
493
493
|
fontSize: j,
|
|
494
|
-
fontWeight:
|
|
494
|
+
fontWeight: Qe
|
|
495
495
|
} = Ea(h), v = a(() => {
|
|
496
|
-
const
|
|
496
|
+
const y = ke.value ? "component-disabled" : "", k = B.value !== "b" ? "inline-block" : "block", ce = Be.value ? Be.value : "'Lato', sans-serif", be = j.value ? j.value : "1.6em", ye = Qe.value !== 0 && !Qe.value || Qe.value < 0 ? 200 : Qe.value, _e = se.value !== 0 && !se.value || se.value < 0 ? 0 : se.value, We = [!1, !0].includes(q.value) ? q.value : !1, Ee = [!1, !0].includes(Fe.value) ? Fe.value : !1, He = he.value !== 0 && !he.value || he.value < 0 ? 15 : he.value, qe = ee.value !== 0 && !ee.value || ee.value < 0 ? 6 : ee.value, Ke = ["box", "circle"].includes(ve.value) ? ve.value : "box", at = Te.value !== 0 && !Te.value || Te.value < 0 ? 1 : Te.value, yt = [!1, !0].includes(we.value) ? we.value : !1;
|
|
497
497
|
return {
|
|
498
|
-
disabled:
|
|
499
|
-
display:
|
|
498
|
+
disabled: y,
|
|
499
|
+
display: k,
|
|
500
500
|
boxRadius: _e,
|
|
501
501
|
hoverEffect: We,
|
|
502
502
|
activeHoverEffect: Ee,
|
|
503
503
|
itemGap: He,
|
|
504
504
|
internalGap: qe,
|
|
505
|
-
scale:
|
|
505
|
+
scale: at,
|
|
506
506
|
type: Ke,
|
|
507
|
-
font:
|
|
507
|
+
font: ce,
|
|
508
508
|
background: yt,
|
|
509
|
-
fontSize:
|
|
510
|
-
fontWeight:
|
|
509
|
+
fontSize: be,
|
|
510
|
+
fontWeight: ye
|
|
511
511
|
};
|
|
512
|
-
}),
|
|
512
|
+
}), de = a(() => v.value.disabled), Oe = a(() => ({
|
|
513
513
|
display: v.value.display
|
|
514
|
-
})),
|
|
515
|
-
const
|
|
514
|
+
})), Xe = a(() => v.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), S = a(() => {
|
|
515
|
+
const y = v.value;
|
|
516
516
|
return {
|
|
517
|
-
fontSize:
|
|
518
|
-
fontWeight:
|
|
517
|
+
fontSize: y.fontSize,
|
|
518
|
+
fontWeight: y.fontWeight
|
|
519
519
|
};
|
|
520
|
-
}), Ue = a(() => Array.isArray(
|
|
521
|
-
const
|
|
522
|
-
return
|
|
523
|
-
}), pt = a(() => _.value), St = a(() =>
|
|
524
|
-
const
|
|
525
|
-
return
|
|
526
|
-
}), gt = a(() => v.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"),
|
|
527
|
-
const
|
|
528
|
-
return
|
|
520
|
+
}), Ue = a(() => Array.isArray(C.value) && C.value.constructor === Array && C.value.length > 0), pe = a(() => I.value === "dark" ? "component__theme--dark" : "component__theme--light"), vt = a(() => v.value.font), ht = a(() => ae.value), ot = a(() => le.value), ze = a(() => v.value.hoverEffect ? X.value : le.value), Le = a(() => v.value.activeHoverEffect ? X.value : le.value), Lt = a(() => {
|
|
521
|
+
const y = v.value;
|
|
522
|
+
return y.activeHoverEffect && y.background ? `${X.value}80` : X.value;
|
|
523
|
+
}), pt = a(() => _.value), St = a(() => w.value), xt = a(() => v.value.hoverEffect ? H.value : w.value), Ct = a(() => v.value.activeHoverEffect ? H.value : w.value), Ae = a(() => {
|
|
524
|
+
const y = v.value;
|
|
525
|
+
return y.activeHoverEffect && y.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 y = v.value, k = I.value === "dark" ? _.value : ae.value;
|
|
528
|
+
return y.background ? "#ffffff" : k;
|
|
529
529
|
});
|
|
530
530
|
a(() => v.value.background ? "19px" : "auto");
|
|
531
531
|
const V = a(() => {
|
|
532
|
-
const
|
|
533
|
-
return !
|
|
534
|
-
}),
|
|
535
|
-
const
|
|
536
|
-
return `${
|
|
537
|
-
}),
|
|
538
|
-
const
|
|
539
|
-
return !
|
|
540
|
-
}), te = a(() => v.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""),
|
|
532
|
+
const k = v.value.internalGap;
|
|
533
|
+
return !k || k < 0 ? 0 : `${k}px`;
|
|
534
|
+
}), D = a(() => {
|
|
535
|
+
const y = v.value;
|
|
536
|
+
return `${y.boxRadius > 7 ? 7 : y.boxRadius}px`;
|
|
537
|
+
}), Se = a(() => {
|
|
538
|
+
const k = v.value.itemGap;
|
|
539
|
+
return !k || k < 0 ? 0 : `${k}px`;
|
|
540
|
+
}), te = a(() => v.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), ge = a(() => ({
|
|
541
541
|
zoom: v.value.scale
|
|
542
|
-
})),
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
const
|
|
542
|
+
})), tt = a(() => {
|
|
543
|
+
const y = {};
|
|
544
|
+
fe.value && Object.keys(fe.value).forEach((be) => y[`aria-${be}`] = fe.value[be]);
|
|
545
|
+
const k = {
|
|
546
546
|
"aria-label": Q.value,
|
|
547
|
-
"aria-disabled":
|
|
548
|
-
...
|
|
547
|
+
"aria-disabled": ke.value,
|
|
548
|
+
...y
|
|
549
549
|
};
|
|
550
550
|
return Object.fromEntries(
|
|
551
|
-
Object.entries(
|
|
551
|
+
Object.entries(k).filter(([ce, be]) => be != null)
|
|
552
552
|
);
|
|
553
553
|
}), Ge = () => {
|
|
554
|
-
|
|
555
|
-
}, Ie = () => {
|
|
556
|
-
g("clicked");
|
|
554
|
+
F.value = R.value;
|
|
555
|
+
}, Ie = (y) => {
|
|
556
|
+
g("clicked", y);
|
|
557
557
|
};
|
|
558
|
-
return re(
|
|
559
|
-
|
|
560
|
-
}), re(
|
|
561
|
-
|
|
562
|
-
}), (
|
|
558
|
+
return re(R, (y, k) => {
|
|
559
|
+
y !== k && Ge();
|
|
560
|
+
}), re(F, (y, k) => {
|
|
561
|
+
y !== k && (g("current-value", y), g("changed", y));
|
|
562
|
+
}), (y, k) => e.nbId && Ue.value ? (O(), K("div", {
|
|
563
563
|
key: 0,
|
|
564
|
-
class: Ye(["nb-wrapper",
|
|
565
|
-
style: Ne([Oe.value,
|
|
564
|
+
class: Ye(["nb-wrapper", de.value]),
|
|
565
|
+
style: Ne([Oe.value, ge.value])
|
|
566
566
|
}, [
|
|
567
|
-
|
|
567
|
+
Ve("div", $a({
|
|
568
568
|
id: e.nbId,
|
|
569
569
|
role: "group"
|
|
570
|
-
},
|
|
571
|
-
class: ["nb-reset", "component",
|
|
570
|
+
}, tt.value, {
|
|
571
|
+
class: ["nb-reset", "component", Xe.value, pe.value]
|
|
572
572
|
}), [
|
|
573
|
-
(O(!0), K(
|
|
574
|
-
key:
|
|
573
|
+
(O(!0), K(gl, null, yl(u(C), (ce, be) => (O(), K("div", {
|
|
574
|
+
key: be,
|
|
575
575
|
class: "component-checkbox__item"
|
|
576
576
|
}, [
|
|
577
|
-
Pa(
|
|
578
|
-
id: `${e.nbId}-${
|
|
579
|
-
"onUpdate:modelValue":
|
|
577
|
+
Pa(Ve("input", {
|
|
578
|
+
id: `${e.nbId}-${ce.value}`,
|
|
579
|
+
"onUpdate:modelValue": k[0] || (k[0] = (ye) => F.value = ye),
|
|
580
580
|
type: "checkbox",
|
|
581
581
|
class: "component-checkbox__item--input",
|
|
582
|
-
disabled: u(
|
|
583
|
-
value:
|
|
582
|
+
disabled: u(ke),
|
|
583
|
+
value: ce.value,
|
|
584
584
|
name: e.groupName,
|
|
585
|
-
onClick: Ie
|
|
585
|
+
onClick: k[1] || (k[1] = (ye) => Ie(ye))
|
|
586
586
|
}, null, 8, zl), [
|
|
587
|
-
[kl,
|
|
587
|
+
[kl, F.value]
|
|
588
588
|
]),
|
|
589
|
-
|
|
590
|
-
for: `${e.nbId}-${
|
|
589
|
+
Ve("label", {
|
|
590
|
+
for: `${e.nbId}-${ce.value}`,
|
|
591
591
|
class: Ye([[te.value], "component-checkbox__item--label"]),
|
|
592
|
-
tabindex: u(
|
|
592
|
+
tabindex: u(ke) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[be] : e.tabIndex >= 0 ? e.tabIndex : be + 1,
|
|
593
593
|
onKeydown: [
|
|
594
|
-
|
|
595
|
-
|
|
594
|
+
k[2] || (k[2] = na(Ia((ye) => !u(ke) && e.hasTabIndexEnter && ye.target.click(), ["prevent"]), ["enter"])),
|
|
595
|
+
k[3] || (k[3] = na(Ia((ye) => !u(ke) && e.hasTabIndexSpace && ye.target.click(), ["prevent"]), ["space"]))
|
|
596
596
|
]
|
|
597
597
|
}, [
|
|
598
|
-
|
|
598
|
+
Ve("div", {
|
|
599
599
|
class: Ye([gt.value])
|
|
600
600
|
}, null, 2),
|
|
601
|
-
|
|
601
|
+
Ve("span", {
|
|
602
602
|
style: Ne([S.value])
|
|
603
|
-
},
|
|
603
|
+
}, Rt(ce.text), 5)
|
|
604
604
|
], 42, Il)
|
|
605
605
|
]))), 128))
|
|
606
606
|
], 16, Fl)
|
|
607
|
-
], 6)) :
|
|
607
|
+
], 6)) : me("", !0);
|
|
608
608
|
}
|
|
609
|
-
}), El = /* @__PURE__ */ Oa(Wl, [["__scopeId", "data-v-
|
|
609
|
+
}), El = /* @__PURE__ */ Oa(Wl, [["__scopeId", "data-v-e89ba0b2"]]);
|
|
610
610
|
const Pl = ["id"], Ol = ["for"], _l = {
|
|
611
611
|
key: 0,
|
|
612
612
|
class: "component__label--required"
|
|
@@ -624,8 +624,8 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
624
624
|
type: String,
|
|
625
625
|
default: "b",
|
|
626
626
|
validator: (e = "b") => {
|
|
627
|
-
const
|
|
628
|
-
return ["b", "ib"].includes(
|
|
627
|
+
const b = e.toLowerCase();
|
|
628
|
+
return ["b", "ib"].includes(b);
|
|
629
629
|
}
|
|
630
630
|
},
|
|
631
631
|
tabIndex: {
|
|
@@ -1062,211 +1062,211 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1062
1062
|
"entered",
|
|
1063
1063
|
"paste"
|
|
1064
1064
|
],
|
|
1065
|
-
setup(e, { emit:
|
|
1065
|
+
setup(e, { emit: b }) {
|
|
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
|
-
"
|
|
1067
|
+
"08c38d9e": Et.value,
|
|
1068
|
+
32745802: ra.value,
|
|
1069
|
+
"66926c22": u(Ct),
|
|
1070
|
+
"035597e2": ca.value,
|
|
1071
|
+
c3c30bbe: fa.value,
|
|
1072
|
+
"27669d79": va.value,
|
|
1073
|
+
"02a2d684": u(Se),
|
|
1074
|
+
"45fe75c5": u(Ee),
|
|
1075
|
+
"8f65ce7e": u(te),
|
|
1076
|
+
"5b861051": u(Mt),
|
|
1077
|
+
"3f17508a": u(D),
|
|
1078
|
+
"4c84e525": u(et),
|
|
1079
|
+
"333fbeea": u(V),
|
|
1080
|
+
"0269d2d6": dt.value,
|
|
1081
|
+
"51d502b4": u(Ae),
|
|
1082
|
+
"6ffc1dd2": u(gt),
|
|
1083
|
+
"093eabfb": u(We),
|
|
1084
|
+
cb095c46: u(ge),
|
|
1085
|
+
"67d64607": u(yt),
|
|
1086
|
+
"1325e624": u(xt),
|
|
1087
|
+
"3dc80b7e": u(pt),
|
|
1088
|
+
"19c1f0a7": u(St),
|
|
1089
|
+
d7e041ec: u(Le),
|
|
1090
|
+
"3b225bee": u(Lt),
|
|
1091
|
+
"4d15b87e": ha.value,
|
|
1092
|
+
"42e00e6e": xa.value,
|
|
1093
|
+
"442651f6": Ca.value,
|
|
1094
|
+
d3871bb4: _t.value,
|
|
1095
|
+
a033c36e: Dt.value,
|
|
1096
|
+
"50b22636": u(tt),
|
|
1097
|
+
"5fa72fc9": ya.value,
|
|
1098
|
+
"104654d4": Pt.value,
|
|
1099
|
+
"155d4a56": ia.value,
|
|
1100
|
+
"4f6a4cbe": Ut.value,
|
|
1101
|
+
"371386d0": da.value,
|
|
1102
|
+
"6b4b1a7c": Gt.value,
|
|
1103
|
+
"610701e7": sa.value
|
|
1104
1104
|
})), Aa(() => {
|
|
1105
|
-
|
|
1105
|
+
pe.value != null ? de.value === "number" && typeof pe.value == "number" ? z.value = pe.value : z.value = String(pe.value) : z.value = "";
|
|
1106
1106
|
}), Ya(() => {
|
|
1107
|
-
|
|
1107
|
+
Ht();
|
|
1108
1108
|
});
|
|
1109
|
-
const g =
|
|
1110
|
-
nbId:
|
|
1109
|
+
const g = b, h = e, {
|
|
1110
|
+
nbId: F,
|
|
1111
1111
|
display: Q,
|
|
1112
|
-
hasTabIndexEnter:
|
|
1113
|
-
ariaLabel:
|
|
1114
|
-
ariaAttrs:
|
|
1115
|
-
textColor:
|
|
1112
|
+
hasTabIndexEnter: fe,
|
|
1113
|
+
ariaLabel: R,
|
|
1114
|
+
ariaAttrs: B,
|
|
1115
|
+
textColor: C,
|
|
1116
1116
|
caretColor: I,
|
|
1117
1117
|
selectionBgColor: ae,
|
|
1118
1118
|
selectionTextColor: le,
|
|
1119
1119
|
hasBorderRadius: X,
|
|
1120
1120
|
borderRadius: _,
|
|
1121
|
-
disabled:
|
|
1121
|
+
disabled: w,
|
|
1122
1122
|
fontFamily: H,
|
|
1123
|
-
fontSize:
|
|
1123
|
+
fontSize: se,
|
|
1124
1124
|
fontWeight: q,
|
|
1125
1125
|
fontFamilyMsg: Fe,
|
|
1126
|
-
fontSizeMsg:
|
|
1126
|
+
fontSizeMsg: he,
|
|
1127
1127
|
fontWeightMsg: ee,
|
|
1128
|
-
textMessageColor:
|
|
1129
|
-
inputWidth:
|
|
1130
|
-
inputStyle:
|
|
1131
|
-
activeTextStyle:
|
|
1132
|
-
sizeMediaQuery:
|
|
1128
|
+
textMessageColor: Te,
|
|
1129
|
+
inputWidth: ve,
|
|
1130
|
+
inputStyle: we,
|
|
1131
|
+
activeTextStyle: ke,
|
|
1132
|
+
sizeMediaQuery: Be,
|
|
1133
1133
|
inputReadonly: j,
|
|
1134
|
-
blockPaste:
|
|
1134
|
+
blockPaste: Qe,
|
|
1135
1135
|
showInputEye: v,
|
|
1136
|
-
inputType:
|
|
1136
|
+
inputType: de,
|
|
1137
1137
|
hasTrim: Oe,
|
|
1138
|
-
inputUppercase:
|
|
1138
|
+
inputUppercase: Xe,
|
|
1139
1139
|
inputName: S,
|
|
1140
1140
|
inputPlaceholder: Ue,
|
|
1141
|
-
inputText:
|
|
1141
|
+
inputText: pe,
|
|
1142
1142
|
theme: vt,
|
|
1143
1143
|
inputEyeIcon: ht,
|
|
1144
1144
|
tabindex: ot,
|
|
1145
1145
|
inputEyeIconHidden: ze,
|
|
1146
|
-
lightBgColor:
|
|
1147
|
-
lightBgColorFocus:
|
|
1146
|
+
lightBgColor: Le,
|
|
1147
|
+
lightBgColorFocus: Lt,
|
|
1148
1148
|
lightEyeBgColor: pt,
|
|
1149
1149
|
lightEyeBgColorActive: St,
|
|
1150
|
-
lightDisabledBgColor:
|
|
1151
|
-
lightTextColor:
|
|
1152
|
-
darkBgColor:
|
|
1150
|
+
lightDisabledBgColor: xt,
|
|
1151
|
+
lightTextColor: Ct,
|
|
1152
|
+
darkBgColor: Ae,
|
|
1153
1153
|
darkBgColorFocus: gt,
|
|
1154
|
-
darkEyeBgColor:
|
|
1154
|
+
darkEyeBgColor: et,
|
|
1155
1155
|
darkEyeBgColorActive: V,
|
|
1156
|
-
darkDisabledBgColor:
|
|
1157
|
-
darkTextColor:
|
|
1156
|
+
darkDisabledBgColor: D,
|
|
1157
|
+
darkTextColor: Se,
|
|
1158
1158
|
darkDisabledEyeBgColor: te,
|
|
1159
|
-
lightDisabledEyeBgColor:
|
|
1160
|
-
textAlign:
|
|
1159
|
+
lightDisabledEyeBgColor: ge,
|
|
1160
|
+
textAlign: tt,
|
|
1161
1161
|
showMsg: Ge,
|
|
1162
1162
|
hasMsg: Ie,
|
|
1163
|
-
hasIcon:
|
|
1164
|
-
iconDirection:
|
|
1165
|
-
iconPadding:
|
|
1166
|
-
iconPaddingInput:
|
|
1167
|
-
iconMargin:
|
|
1163
|
+
hasIcon: y,
|
|
1164
|
+
iconDirection: k,
|
|
1165
|
+
iconPadding: ce,
|
|
1166
|
+
iconPaddingInput: be,
|
|
1167
|
+
iconMargin: ye,
|
|
1168
1168
|
iconBorderRadius: _e,
|
|
1169
1169
|
iconLightTextColor: We,
|
|
1170
1170
|
iconDarkTextColor: Ee,
|
|
1171
1171
|
iconLightBgColor: He,
|
|
1172
1172
|
iconDarkBgColor: qe,
|
|
1173
1173
|
iconLightBgColorActive: Ke,
|
|
1174
|
-
iconDarkBgColorActive:
|
|
1174
|
+
iconDarkBgColorActive: at,
|
|
1175
1175
|
iconLightDisabledBgColor: yt,
|
|
1176
|
-
iconDarkDisabledBgColor:
|
|
1177
|
-
iconWidth:
|
|
1176
|
+
iconDarkDisabledBgColor: Mt,
|
|
1177
|
+
iconWidth: Vt,
|
|
1178
1178
|
iconSize: bt,
|
|
1179
|
-
showLabel:
|
|
1180
|
-
label:
|
|
1179
|
+
showLabel: lt,
|
|
1180
|
+
label: Nt,
|
|
1181
1181
|
labelBreakOnActive: rt,
|
|
1182
|
-
labelBackground:
|
|
1183
|
-
labelPadding:
|
|
1182
|
+
labelBackground: Tt,
|
|
1183
|
+
labelPadding: L,
|
|
1184
1184
|
labelBorderRadius: E,
|
|
1185
1185
|
labelLeft: Z,
|
|
1186
1186
|
inputLabelMarginActive: Y,
|
|
1187
|
-
labelActiveTop:
|
|
1188
|
-
labelActiveLeft:
|
|
1189
|
-
labelRight:
|
|
1190
|
-
labelActiveRight:
|
|
1191
|
-
fontFamilyLabel:
|
|
1187
|
+
labelActiveTop: De,
|
|
1188
|
+
labelActiveLeft: M,
|
|
1189
|
+
labelRight: Wt,
|
|
1190
|
+
labelActiveRight: Re,
|
|
1191
|
+
fontFamilyLabel: At,
|
|
1192
1192
|
fontSizeLabel: ue,
|
|
1193
1193
|
fontSizeLabelActive: ut,
|
|
1194
1194
|
fontWeightLabel: ne,
|
|
1195
|
-
lightTextColorLabel:
|
|
1195
|
+
lightTextColorLabel: $t,
|
|
1196
1196
|
lightTextColorLabelActive: P,
|
|
1197
1197
|
darkTextColorLabel: U,
|
|
1198
1198
|
darkTextColorLabelActive: Yt
|
|
1199
|
-
} = Ea(h),
|
|
1200
|
-
const o =
|
|
1199
|
+
} = Ea(h), z = oe(""), G = oe(null), kt = oe(""), wt = oe(!1), it = oe(!1), N = a(() => {
|
|
1200
|
+
const o = w.value ? "component-disabled" : "", m = Q.value !== "b" ? "inline-block" : "block", Ce = C ? C.value : "#ffffff", nt = I.value ? I.value : "", Ba = ae.value ? ae.value : "", ta = le.value ? le.value : "", wa = X.value ? X.value : !1, Da = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, It = H.value ? H.value : "'Lato', sans-serif", aa = se.value ? se.value : null, qt = q.value !== 0 && !q.value || q.value < 0 ? 100 : q.value, Ra = Fe.value ? Fe.value : "'Lato', sans-serif", _a = he.value ? he.value : "1em", Ma = ee.value !== 0 && !ee.value || ee.value < 0 ? 100 : ee.value, Ha = Te.value ? Te.value : "#f15574", $e = ve.value ? ve.value : 200, qa = ke.value ? ke.value : "normal", mt = Be.value ? Be.value : "xs", t = j.value ? j.value : !1, l = v.value ? v.value : !1, n = de.value ? de.value : "text", r = Xe.value ? Xe.value : !1, s = vt.value ? vt.value : "normal", d = tt.value ? tt.value : "left", f = we.value ? we.value : "background", p = ce.value ? ce.value : "5px 10px", T = ye.value ? ye.value : "0", $ = be.value ? be.value : 10, W = We.value ? We.value : "#000000", J = Ee.value ? Ee.value : "#000000", Me = He.value ? He.value : "transparent", ft = qe.value ? qe.value : "transparent", Pe = _e.value !== 0 && !_e.value || _e.value < 0 ? 0 : _e.value, Je = Ke.value ? Ke.value : "transparent", Ua = at.value ? at.value : "transparent", Ga = Vt.value ? Vt.value : 32, Ka = bt.value ? bt.value : 1, Za = lt.value ? lt.value : !1, Ja = Z.value !== 0 && !Z.value || Z.value < 0 ? 5 : Z.value, Qa = Tt.value ? Tt.value : "transparent", Xa = Y.value !== 0 && !Y.value || Y.value < 0 ? 15 : Y.value, el = L.value ? L.value : "1px 5px", tl = E.value !== 0 && !E.value || E.value < 0 ? 0 : E.value, al = De.value === null || De.value === void 0 ? -13 : De.value, ll = M.value === null || M.value === void 0 ? 5 : M.value, nl = Wt.value === null || Wt.value === void 0 ? 0 : Wt.value, ol = Re.value === null || Re.value === void 0 ? 0 : Re.value, rl = At.value ? At.value : "'Lato', sans-serif", ul = ue.value ? ue.value : "1em", il = ut.value ? ut.value : "0.8em", sl = ne.value ? ne.value : 400, dl = $t.value ? $t.value : "#ffffff", cl = U.value ? U.value : "#000000", fl = P.value ? P.value : "#ffffff", vl = Yt.value ? Yt.value : "#000000";
|
|
1201
1201
|
return {
|
|
1202
1202
|
disabled: o,
|
|
1203
1203
|
display: m,
|
|
1204
|
-
font:
|
|
1205
|
-
fontSize:
|
|
1206
|
-
fontWeight:
|
|
1207
|
-
fontFamilyMsg:
|
|
1208
|
-
fontSizeMsg:
|
|
1209
|
-
fontWeightMsg:
|
|
1210
|
-
textMessageColor:
|
|
1211
|
-
textColor:
|
|
1204
|
+
font: It,
|
|
1205
|
+
fontSize: aa,
|
|
1206
|
+
fontWeight: qt,
|
|
1207
|
+
fontFamilyMsg: Ra,
|
|
1208
|
+
fontSizeMsg: _a,
|
|
1209
|
+
fontWeightMsg: Ma,
|
|
1210
|
+
textMessageColor: Ha,
|
|
1211
|
+
textColor: Ce,
|
|
1212
1212
|
caretColor: nt,
|
|
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:
|
|
1213
|
+
selectionBgColor: Ba,
|
|
1214
|
+
selectionTextColor: ta,
|
|
1215
|
+
hasBorderRadius: wa,
|
|
1216
|
+
borderRadius: Da,
|
|
1217
|
+
textAlign: d,
|
|
1218
|
+
inputWidth: $e,
|
|
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: T,
|
|
1229
|
+
iconPaddingInput: $,
|
|
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
1263
|
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
1264
1264
|
paddingTop: "0px",
|
|
1265
1265
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
1266
|
-
overflow: m &&
|
|
1266
|
+
overflow: m && lt.value ? "visible" : "hidden"
|
|
1267
1267
|
};
|
|
1268
1268
|
}), ra = a(() => {
|
|
1269
|
-
const o =
|
|
1269
|
+
const o = N.value;
|
|
1270
1270
|
if (o.fontSize)
|
|
1271
1271
|
return o.fontSize;
|
|
1272
1272
|
let m = "";
|
|
@@ -1282,30 +1282,30 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
return m;
|
|
1284
1284
|
}), ua = a(() => {
|
|
1285
|
-
const o =
|
|
1285
|
+
const o = N.value, m = je.value;
|
|
1286
1286
|
return {
|
|
1287
1287
|
fontWeight: o.fontWeight,
|
|
1288
|
-
marginTop: m &&
|
|
1288
|
+
marginTop: m && lt.value ? `${o.inputLabelMarginActive}px` : "0"
|
|
1289
1289
|
};
|
|
1290
1290
|
}), st = a(() => {
|
|
1291
|
-
const o =
|
|
1291
|
+
const o = N.value;
|
|
1292
1292
|
return o.inputStyle !== "line" && o.hasBorderRadius ? { borderRadius: `${o.borderRadius}rem` } : {};
|
|
1293
|
-
}),
|
|
1294
|
-
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" ? D.value : xt.value), da = a(() => N.value.textMessageColor), ca = a(() => {
|
|
1294
|
+
const o = N.value;
|
|
1295
1295
|
return o.caretColor || (o.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1296
|
-
}), ca = a(() => {
|
|
1297
|
-
const o = z.value;
|
|
1298
|
-
return o.selectionBgColor || (o.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1299
1296
|
}), fa = a(() => {
|
|
1300
|
-
const o =
|
|
1297
|
+
const o = N.value;
|
|
1298
|
+
return o.selectionBgColor || (o.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1299
|
+
}), va = a(() => {
|
|
1300
|
+
const o = N.value;
|
|
1301
1301
|
return o.selectionTextColor || (o.theme === "dark" ? "#000000" : "#ffffff");
|
|
1302
1302
|
}), Kt = a(() => {
|
|
1303
|
-
const o =
|
|
1303
|
+
const o = N.value;
|
|
1304
1304
|
return o.display === "block" ? { width: "100%" } : {
|
|
1305
1305
|
width: `${o.inputWidth}px`
|
|
1306
1306
|
};
|
|
1307
|
-
}),
|
|
1308
|
-
switch (
|
|
1307
|
+
}), pa = a(() => {
|
|
1308
|
+
switch (we.value) {
|
|
1309
1309
|
case "line":
|
|
1310
1310
|
return "component__input--line";
|
|
1311
1311
|
case "border":
|
|
@@ -1313,8 +1313,8 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1313
1313
|
default:
|
|
1314
1314
|
return "component__input--background";
|
|
1315
1315
|
}
|
|
1316
|
-
}),
|
|
1317
|
-
switch (
|
|
1316
|
+
}), zt = a(() => {
|
|
1317
|
+
switch (N.value.activeTextStyle) {
|
|
1318
1318
|
case "italic":
|
|
1319
1319
|
return "component__input--active--italic";
|
|
1320
1320
|
case "oblique":
|
|
@@ -1322,8 +1322,8 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1322
1322
|
default:
|
|
1323
1323
|
return "component__input--active--normal";
|
|
1324
1324
|
}
|
|
1325
|
-
}),
|
|
1326
|
-
switch (
|
|
1325
|
+
}), c = a(() => {
|
|
1326
|
+
switch (N.value.sizeMediaQuery) {
|
|
1327
1327
|
case "sm":
|
|
1328
1328
|
return "component__sm";
|
|
1329
1329
|
case "md":
|
|
@@ -1333,52 +1333,52 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1333
1333
|
default:
|
|
1334
1334
|
return "";
|
|
1335
1335
|
}
|
|
1336
|
-
}),
|
|
1337
|
-
switch (
|
|
1336
|
+
}), A = a(() => {
|
|
1337
|
+
switch (N.value.theme) {
|
|
1338
1338
|
case "dark":
|
|
1339
1339
|
return "component__theme--dark";
|
|
1340
1340
|
default:
|
|
1341
1341
|
return "component__theme--light";
|
|
1342
1342
|
}
|
|
1343
|
-
}),
|
|
1344
|
-
const o =
|
|
1343
|
+
}), ie = a(() => N.value.inputReadonly ? "component__input--read-only" : ""), Ze = a(() => N.value.inputUppercase ? "component__input--uppercase" : ""), Ot = a(() => {
|
|
1344
|
+
const o = N.value;
|
|
1345
1345
|
return !!(o.showInputEye && o.inputType === "password");
|
|
1346
|
-
}),
|
|
1347
|
-
const o =
|
|
1346
|
+
}), i = a(() => wt.value ? ht.value : ze.value), x = a(() => S.value ? S.value : `${F.value}-name-label`), xe = a(() => lt.value ? it.value ? Ue.value : "" : Ue.value), je = a(() => {
|
|
1347
|
+
const o = z.value;
|
|
1348
1348
|
return it.value || o != null && String(o).trim().length > 0;
|
|
1349
|
-
}),
|
|
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(() => {
|
|
1350
1350
|
const o = {};
|
|
1351
|
-
|
|
1351
|
+
B.value && Object.keys(B.value).forEach((nt) => o[`aria-${nt}`] = B.value[nt]);
|
|
1352
1352
|
const m = {
|
|
1353
|
-
"aria-label":
|
|
1354
|
-
"aria-disabled":
|
|
1353
|
+
"aria-label": R.value,
|
|
1354
|
+
"aria-disabled": w.value,
|
|
1355
1355
|
...o
|
|
1356
1356
|
};
|
|
1357
1357
|
return Object.fromEntries(
|
|
1358
|
-
Object.entries(m).filter(([
|
|
1358
|
+
Object.entries(m).filter(([Ce, nt]) => nt != null)
|
|
1359
1359
|
);
|
|
1360
|
-
}),
|
|
1361
|
-
const o =
|
|
1362
|
-
return
|
|
1363
|
-
}), xa = a(() => {
|
|
1364
|
-
const o = z.value;
|
|
1365
|
-
return b.value ? o.iconMargin : "0";
|
|
1360
|
+
}), Dt = a(() => y.value ? `${bt.value}rem` : "0"), ha = a(() => y.value ? `${Vt.value}px` : "0"), Sa = a(() => y.value ? `component__icon--${k.value}` : ""), xa = a(() => {
|
|
1361
|
+
const o = N.value;
|
|
1362
|
+
return y.value ? o.iconPadding : "0";
|
|
1366
1363
|
}), Ca = a(() => {
|
|
1367
|
-
const o =
|
|
1368
|
-
return
|
|
1364
|
+
const o = N.value;
|
|
1365
|
+
return y.value ? o.iconMargin : "0";
|
|
1369
1366
|
}), dt = a(() => {
|
|
1370
|
-
const o =
|
|
1371
|
-
return
|
|
1367
|
+
const o = N.value;
|
|
1368
|
+
return y.value ? o.theme === "dark" ? o.iconDarkBgColor : o.iconLightBgColor : "transparent";
|
|
1372
1369
|
}), _t = a(() => {
|
|
1373
|
-
const o =
|
|
1374
|
-
return
|
|
1370
|
+
const o = N.value;
|
|
1371
|
+
return y.value ? `${o.iconBorderRadius}rem` : "0";
|
|
1372
|
+
}), Jt = a(() => {
|
|
1373
|
+
const o = N.value;
|
|
1374
|
+
return y.value ? k.value === "left" ? { paddingLeft: `${o.iconPaddingInput}px` } : { paddingRight: `${o.iconPaddingInput}px` } : {};
|
|
1375
1375
|
}), Qt = a(() => {
|
|
1376
|
-
const o =
|
|
1376
|
+
const o = N.value, m = je.value, Ce = m ? o.lightTextColorLabelActive : o.lightTextColorLabel, nt = m ? o.darkTextColorLabelActive : o.darkTextColorLabel;
|
|
1377
1377
|
return {
|
|
1378
1378
|
fontFamily: o.fontFamilyLabel,
|
|
1379
1379
|
fontSize: m ? o.fontSizeLabelActive : o.fontSizeLabel,
|
|
1380
1380
|
fontWeight: o.fontWeightLabel,
|
|
1381
|
-
color: o.theme === "dark" ? nt :
|
|
1381
|
+
color: o.theme === "dark" ? nt : Ce,
|
|
1382
1382
|
top: m ? `${o.labelActiveTop}px` : "50%",
|
|
1383
1383
|
left: m ? `${o.labelActiveLeft}px` : `${o.labelLeft}px`,
|
|
1384
1384
|
right: m ? `${o.labelActiveRight}px` : `${o.labelRight}px`,
|
|
@@ -1399,19 +1399,19 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1399
1399
|
};
|
|
1400
1400
|
});
|
|
1401
1401
|
a(() => {
|
|
1402
|
-
const o =
|
|
1402
|
+
const o = N.value;
|
|
1403
1403
|
return o.theme === "dark" ? o.darkTextColorLabelActive : o.lightTextColorLabelActive;
|
|
1404
1404
|
});
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1407
|
-
},
|
|
1408
|
-
const o =
|
|
1405
|
+
const Ht = () => {
|
|
1406
|
+
pe.value != null ? de.value === "number" && typeof pe.value == "number" ? z.value = pe.value : z.value = String(pe.value) : z.value = "", kt.value = de.value;
|
|
1407
|
+
}, Xt = () => {
|
|
1408
|
+
const o = N.value;
|
|
1409
1409
|
if (o.inputReadonly || o.disabled)
|
|
1410
1410
|
return;
|
|
1411
|
-
const m =
|
|
1412
|
-
m ?
|
|
1413
|
-
},
|
|
1414
|
-
if (
|
|
1411
|
+
const m = !wt.value;
|
|
1412
|
+
m ? kt.value = "text" : kt.value = de.value, wt.value = m;
|
|
1413
|
+
}, ct = a(() => kt.value === "number"), Bt = (o) => {
|
|
1414
|
+
if (de.value === "number") {
|
|
1415
1415
|
if (o === "" || o === null || o === void 0)
|
|
1416
1416
|
return "";
|
|
1417
1417
|
{
|
|
@@ -1420,134 +1420,134 @@ const Pl = ["id"], Ol = ["for"], _l = {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
1422
|
return o;
|
|
1423
|
-
}, It = () => {
|
|
1424
|
-
g("clicked");
|
|
1425
1423
|
}, Va = (o) => {
|
|
1426
|
-
|
|
1427
|
-
}, Ta = () => {
|
|
1428
|
-
|
|
1429
|
-
}, ea =
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1424
|
+
g("clicked", o);
|
|
1425
|
+
}, Ta = (o) => {
|
|
1426
|
+
o.stopPropagation(), !(w.value || N.value.inputReadonly) && G.value && G.value.focus();
|
|
1427
|
+
}, ea = () => {
|
|
1428
|
+
w.value || N.value.inputReadonly || !fe.value || g("entered", Bt(z.value));
|
|
1429
|
+
}, ka = async (o) => {
|
|
1430
|
+
var Ce;
|
|
1431
|
+
const m = ((Ce = o.clipboardData) == null ? void 0 : Ce.getData("text")) || "";
|
|
1432
|
+
g("paste", m), Qe.value && o.preventDefault();
|
|
1433
1433
|
};
|
|
1434
|
-
return re(
|
|
1435
|
-
|
|
1436
|
-
}, { immediate: !0 }), re(
|
|
1434
|
+
return re(de, (o) => {
|
|
1435
|
+
kt.value = o;
|
|
1436
|
+
}, { immediate: !0 }), re(pe, (o) => {
|
|
1437
1437
|
if (o != null)
|
|
1438
|
-
if (
|
|
1439
|
-
o !==
|
|
1438
|
+
if (de.value === "number" && typeof o == "number")
|
|
1439
|
+
o !== z.value && (z.value = o);
|
|
1440
1440
|
else {
|
|
1441
1441
|
const m = String(o);
|
|
1442
|
-
m !==
|
|
1442
|
+
m !== z.value && (z.value = m);
|
|
1443
1443
|
}
|
|
1444
1444
|
else
|
|
1445
|
-
|
|
1446
|
-
}, { immediate: !0 }), re(
|
|
1447
|
-
Oe.value && typeof o == "string" && (o = o.trim()), g("changed",
|
|
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
1448
|
}), re(it, (o) => {
|
|
1449
1449
|
g(o ? "focused" : "blurred");
|
|
1450
|
-
}), re(
|
|
1450
|
+
}), re(wt, (o) => {
|
|
1451
1451
|
g("show-input-eye", o);
|
|
1452
|
-
}, { immediate: !0 }), re(
|
|
1453
|
-
Oe.value && typeof o == "string" && (o = o.trim()), g("current-value",
|
|
1454
|
-
}), re(
|
|
1452
|
+
}, { immediate: !0 }), re(z, (o) => {
|
|
1453
|
+
Oe.value && typeof o == "string" && (o = o.trim()), g("current-value", Bt(o));
|
|
1454
|
+
}), re(de, (o) => {
|
|
1455
1455
|
o === "password" && nextTick(() => {
|
|
1456
1456
|
const m = document.getElementById(S.value);
|
|
1457
1457
|
m && (m.type = "password", m.removeAttribute("autocomplete"));
|
|
1458
1458
|
});
|
|
1459
|
-
}), (o, m) => u(
|
|
1459
|
+
}), (o, m) => u(F) ? (O(), K("div", $a({
|
|
1460
1460
|
key: 0,
|
|
1461
|
-
class: ["nb-wrapper",
|
|
1461
|
+
class: ["nb-wrapper", Ft.value],
|
|
1462
1462
|
style: [oa.value, Kt.value, st.value],
|
|
1463
1463
|
role: "input"
|
|
1464
|
-
},
|
|
1465
|
-
|
|
1466
|
-
id: u(
|
|
1467
|
-
class: Ye(["nb-reset", "component",
|
|
1464
|
+
}, ma.value), [
|
|
1465
|
+
Ve("div", {
|
|
1466
|
+
id: u(F),
|
|
1467
|
+
class: Ye(["nb-reset", "component", c.value, A.value, ie.value, pa.value]),
|
|
1468
1468
|
style: Ne([ua.value, Kt.value, st.value]),
|
|
1469
|
-
onClick:
|
|
1469
|
+
onClick: m[4] || (m[4] = (Ce) => Va(Ce))
|
|
1470
1470
|
}, [
|
|
1471
|
-
u(
|
|
1471
|
+
u(lt) ? (O(), K("label", {
|
|
1472
1472
|
key: 0,
|
|
1473
|
-
for:
|
|
1473
|
+
for: x.value,
|
|
1474
1474
|
class: "component__label",
|
|
1475
1475
|
style: Ne([Qt.value]),
|
|
1476
|
-
onClick:
|
|
1476
|
+
onClick: Ta
|
|
1477
1477
|
}, [
|
|
1478
|
-
jt(
|
|
1479
|
-
e.required ? (O(), K("span", _l, "*")) :
|
|
1480
|
-
], 12, Ol)) :
|
|
1481
|
-
|
|
1478
|
+
jt(Rt(u(Nt)), 1),
|
|
1479
|
+
e.required ? (O(), K("span", _l, "*")) : me("", !0)
|
|
1480
|
+
], 12, Ol)) : me("", !0),
|
|
1481
|
+
Ot.value ? (O(), K("div", {
|
|
1482
1482
|
key: 1,
|
|
1483
|
-
class: Ye(["component__eye",
|
|
1483
|
+
class: Ye(["component__eye", ga.value]),
|
|
1484
1484
|
style: Ne([st.value]),
|
|
1485
|
-
onClick:
|
|
1485
|
+
onClick: Xt
|
|
1486
1486
|
}, [
|
|
1487
|
-
|
|
1488
|
-
for:
|
|
1487
|
+
Ve("label", {
|
|
1488
|
+
for: x.value,
|
|
1489
1489
|
class: Ye(["component__eye-icon", "fas"])
|
|
1490
1490
|
}, [
|
|
1491
1491
|
e.inputEyeCustomIcon ? (O(), K("span", jl, [
|
|
1492
|
-
|
|
1493
|
-
m[
|
|
1492
|
+
wt.value ? La(o.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
1493
|
+
m[5] || (m[5] = jt("show"))
|
|
1494
1494
|
], !0) : La(o.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1495
|
-
m[
|
|
1495
|
+
m[6] || (m[6] = jt("hidden"))
|
|
1496
1496
|
], !0)
|
|
1497
|
-
])) : (O(), K("span", ql,
|
|
1497
|
+
])) : (O(), K("span", ql, Rt(i.value), 1))
|
|
1498
1498
|
], 8, Hl)
|
|
1499
|
-
], 6)) :
|
|
1500
|
-
Pa(
|
|
1499
|
+
], 6)) : me("", !0),
|
|
1500
|
+
Pa(Ve("input", {
|
|
1501
1501
|
ref_key: "inputRef",
|
|
1502
1502
|
ref: G,
|
|
1503
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
1504
|
-
id:
|
|
1505
|
-
name:
|
|
1506
|
-
type:
|
|
1503
|
+
"onUpdate:modelValue": m[0] || (m[0] = (Ce) => z.value = Ce),
|
|
1504
|
+
id: x.value,
|
|
1505
|
+
name: x.value,
|
|
1506
|
+
type: kt.value,
|
|
1507
1507
|
class: Ye(["component__input", [
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1508
|
+
Ze.value,
|
|
1509
|
+
Zt.value,
|
|
1510
|
+
zt.value
|
|
1511
1511
|
]]),
|
|
1512
|
-
placeholder:
|
|
1513
|
-
disabled: u(
|
|
1512
|
+
placeholder: xe.value,
|
|
1513
|
+
disabled: u(w) || u(j),
|
|
1514
1514
|
required: e.required,
|
|
1515
1515
|
readonly: u(j),
|
|
1516
1516
|
autocomplete: e.inputAutocomplete,
|
|
1517
|
-
tabindex: u(
|
|
1518
|
-
min:
|
|
1519
|
-
max:
|
|
1520
|
-
step:
|
|
1517
|
+
tabindex: u(w) || 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,
|
|
1521
1521
|
role: "input",
|
|
1522
|
-
style: Ne([st.value,
|
|
1523
|
-
onFocus: m[1] || (m[1] = (
|
|
1524
|
-
onBlur: m[2] || (m[2] = (
|
|
1525
|
-
onKeydown: m[3] || (m[3] = na((
|
|
1526
|
-
onPaste:
|
|
1522
|
+
style: Ne([st.value, Jt.value]),
|
|
1523
|
+
onFocus: m[1] || (m[1] = (Ce) => it.value = !0),
|
|
1524
|
+
onBlur: m[2] || (m[2] = (Ce) => it.value = !1),
|
|
1525
|
+
onKeydown: m[3] || (m[3] = na((Ce) => !u(w) && u(fe) && ea(), ["enter"])),
|
|
1526
|
+
onPaste: ka
|
|
1527
1527
|
}, null, 46, Yl), [
|
|
1528
|
-
[
|
|
1528
|
+
[ml, z.value]
|
|
1529
1529
|
]),
|
|
1530
|
-
u(
|
|
1530
|
+
u(y) ? (O(), K("label", {
|
|
1531
1531
|
key: 2,
|
|
1532
|
-
for:
|
|
1533
|
-
class: Ye(["component__icon",
|
|
1532
|
+
for: x.value,
|
|
1533
|
+
class: Ye(["component__icon", Sa.value])
|
|
1534
1534
|
}, [
|
|
1535
1535
|
La(o.$slots, "icon", {}, () => [
|
|
1536
|
-
m[
|
|
1536
|
+
m[7] || (m[7] = Ve("span", null, "♥", -1))
|
|
1537
1537
|
], !0)
|
|
1538
|
-
], 10, Ul)) :
|
|
1538
|
+
], 10, Ul)) : me("", !0)
|
|
1539
1539
|
], 14, Pl),
|
|
1540
|
-
|
|
1540
|
+
ba.value ? (O(), K("div", {
|
|
1541
1541
|
key: 0,
|
|
1542
1542
|
class: Ye(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
1543
1543
|
}, [
|
|
1544
1544
|
La(o.$slots, "message", {}, () => [
|
|
1545
|
-
jt(
|
|
1545
|
+
jt(Rt(e.message), 1)
|
|
1546
1546
|
], !0)
|
|
1547
|
-
], 2)) :
|
|
1548
|
-
], 16)) :
|
|
1547
|
+
], 2)) : me("", !0)
|
|
1548
|
+
], 16)) : me("", !0);
|
|
1549
1549
|
}
|
|
1550
|
-
}), Kl = /* @__PURE__ */ Oa(Gl, [["__scopeId", "data-v-
|
|
1550
|
+
}), Kl = /* @__PURE__ */ Oa(Gl, [["__scopeId", "data-v-9e792880"]]);
|
|
1551
1551
|
const Zl = ["for"], Jl = {
|
|
1552
1552
|
key: 0,
|
|
1553
1553
|
class: "component__label--required"
|
|
@@ -1565,8 +1565,8 @@ const Zl = ["for"], Jl = {
|
|
|
1565
1565
|
type: String,
|
|
1566
1566
|
default: "b",
|
|
1567
1567
|
validator: (e = "b") => {
|
|
1568
|
-
const
|
|
1569
|
-
return ["b", "ib"].includes(
|
|
1568
|
+
const b = e.toLowerCase();
|
|
1569
|
+
return ["b", "ib"].includes(b);
|
|
1570
1570
|
}
|
|
1571
1571
|
},
|
|
1572
1572
|
tabIndex: {
|
|
@@ -1897,176 +1897,176 @@ const Zl = ["for"], Jl = {
|
|
|
1897
1897
|
}
|
|
1898
1898
|
},
|
|
1899
1899
|
emits: ["clicked", "changed", "removed", "added", "input-changed", "focused", "blurred", "paste"],
|
|
1900
|
-
setup(e, { emit:
|
|
1900
|
+
setup(e, { emit: b }) {
|
|
1901
1901
|
Wa((c) => ({
|
|
1902
|
-
|
|
1903
|
-
"
|
|
1904
|
-
"
|
|
1905
|
-
"
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
"
|
|
1909
|
-
"
|
|
1910
|
-
"
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
"
|
|
1914
|
-
"
|
|
1915
|
-
"
|
|
1916
|
-
"
|
|
1917
|
-
"
|
|
1918
|
-
"
|
|
1919
|
-
|
|
1920
|
-
"
|
|
1921
|
-
|
|
1922
|
-
"
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1902
|
+
e08d2976: z.value,
|
|
1903
|
+
"0de97d58": kt.value,
|
|
1904
|
+
"21b51536": u(ht),
|
|
1905
|
+
"5f9c85c4": u(Xe),
|
|
1906
|
+
a55ca4d2: u(Ue),
|
|
1907
|
+
"23c9d99c": u(ot),
|
|
1908
|
+
"6aa1364a": u(ze),
|
|
1909
|
+
"2d984c53": u(Le),
|
|
1910
|
+
"46c8792a": u(gt),
|
|
1911
|
+
d214e3dc: u(pt),
|
|
1912
|
+
"49c836ea": u(xt),
|
|
1913
|
+
"1be54a26": u(et),
|
|
1914
|
+
"4eb9803e": u(V),
|
|
1915
|
+
"6cc5e947": u(D),
|
|
1916
|
+
"396c9d81": u(pe),
|
|
1917
|
+
"401ac1e6": u(Ct),
|
|
1918
|
+
"2edfb86b": $t.value,
|
|
1919
|
+
b0f0a50a: it.value,
|
|
1920
|
+
"3cf3328d": N.value,
|
|
1921
|
+
"63eeeae5": Ft.value,
|
|
1922
|
+
"477726d6": c.styleButtonColor,
|
|
1923
|
+
"1c29aafb": G.value,
|
|
1924
|
+
"6f299702": u(vt),
|
|
1925
|
+
"117c150a": u(Lt),
|
|
1926
|
+
a3519814: u(Ae),
|
|
1927
|
+
"7baff86f": u(Se)
|
|
1928
1928
|
})), Aa(() => {
|
|
1929
|
-
_.value.length > 0 && (
|
|
1929
|
+
_.value.length > 0 && (Re.value = _.value);
|
|
1930
1930
|
});
|
|
1931
|
-
const g =
|
|
1932
|
-
nbId:
|
|
1931
|
+
const g = b, h = e, {
|
|
1932
|
+
nbId: F,
|
|
1933
1933
|
display: Q,
|
|
1934
|
-
textColor:
|
|
1935
|
-
paddingX:
|
|
1936
|
-
paddingY:
|
|
1937
|
-
borderRadius:
|
|
1934
|
+
textColor: fe,
|
|
1935
|
+
paddingX: R,
|
|
1936
|
+
paddingY: B,
|
|
1937
|
+
borderRadius: C,
|
|
1938
1938
|
disabled: I,
|
|
1939
1939
|
fontFamily: ae,
|
|
1940
1940
|
fontSize: le,
|
|
1941
1941
|
fontWeight: X,
|
|
1942
1942
|
currentList: _,
|
|
1943
|
-
allowDuplicates:
|
|
1943
|
+
allowDuplicates: w,
|
|
1944
1944
|
minChips: H,
|
|
1945
|
-
maxChips:
|
|
1945
|
+
maxChips: se,
|
|
1946
1946
|
inputPosition: q,
|
|
1947
1947
|
width: Fe,
|
|
1948
|
-
inputName:
|
|
1948
|
+
inputName: he,
|
|
1949
1949
|
inputPlaceholder: ee,
|
|
1950
|
-
inputUppercase:
|
|
1951
|
-
inputReadonly:
|
|
1952
|
-
blockPaste:
|
|
1953
|
-
inputAutocomplete:
|
|
1954
|
-
required:
|
|
1950
|
+
inputUppercase: Te,
|
|
1951
|
+
inputReadonly: ve,
|
|
1952
|
+
blockPaste: we,
|
|
1953
|
+
inputAutocomplete: ke,
|
|
1954
|
+
required: Be,
|
|
1955
1955
|
textAlign: j,
|
|
1956
|
-
hasBorderRadius:
|
|
1956
|
+
hasBorderRadius: Qe,
|
|
1957
1957
|
activeTextStyle: v,
|
|
1958
|
-
theme:
|
|
1958
|
+
theme: de,
|
|
1959
1959
|
inputStyle: Oe,
|
|
1960
|
-
lightBgColor:
|
|
1960
|
+
lightBgColor: Xe,
|
|
1961
1961
|
lightBgColorFocus: S,
|
|
1962
1962
|
lightBorderColor: Ue,
|
|
1963
|
-
lightBorderColorFocus:
|
|
1963
|
+
lightBorderColorFocus: pe,
|
|
1964
1964
|
lightDisabledBgColor: vt,
|
|
1965
1965
|
lightTextColor: ht,
|
|
1966
1966
|
lightChipBgColor: ot,
|
|
1967
1967
|
lightChipTextColor: ze,
|
|
1968
|
-
lightChipRemoveColor:
|
|
1969
|
-
lightDisabledBorderColor:
|
|
1968
|
+
lightChipRemoveColor: Le,
|
|
1969
|
+
lightDisabledBorderColor: Lt,
|
|
1970
1970
|
darkBgColor: pt,
|
|
1971
1971
|
darkBgColorFocus: St,
|
|
1972
|
-
darkBorderColor:
|
|
1973
|
-
darkBorderColorFocus:
|
|
1974
|
-
darkDisabledBgColor:
|
|
1972
|
+
darkBorderColor: xt,
|
|
1973
|
+
darkBorderColorFocus: Ct,
|
|
1974
|
+
darkDisabledBgColor: Ae,
|
|
1975
1975
|
darkTextColor: gt,
|
|
1976
|
-
darkChipBgColor:
|
|
1976
|
+
darkChipBgColor: et,
|
|
1977
1977
|
darkChipTextColor: V,
|
|
1978
|
-
darkChipRemoveColor:
|
|
1979
|
-
darkDisabledBorderColor:
|
|
1978
|
+
darkChipRemoveColor: D,
|
|
1979
|
+
darkDisabledBorderColor: Se,
|
|
1980
1980
|
tabIndex: te,
|
|
1981
|
-
hasTabIndexEnter:
|
|
1982
|
-
ariaLabel:
|
|
1981
|
+
hasTabIndexEnter: ge,
|
|
1982
|
+
ariaLabel: tt,
|
|
1983
1983
|
ariaAttrs: Ge,
|
|
1984
1984
|
caretColor: Ie,
|
|
1985
|
-
selectionBgColor:
|
|
1986
|
-
selectionTextColor:
|
|
1987
|
-
showLabel:
|
|
1988
|
-
label:
|
|
1989
|
-
labelBackground:
|
|
1985
|
+
selectionBgColor: y,
|
|
1986
|
+
selectionTextColor: k,
|
|
1987
|
+
showLabel: ce,
|
|
1988
|
+
label: be,
|
|
1989
|
+
labelBackground: ye,
|
|
1990
1990
|
labelPadding: _e,
|
|
1991
1991
|
labelBorderRadius: We,
|
|
1992
1992
|
labelBreakOnActive: Ee,
|
|
1993
1993
|
labelLeft: He,
|
|
1994
1994
|
inputLabelMarginActive: qe,
|
|
1995
1995
|
labelActiveTop: Ke,
|
|
1996
|
-
labelActiveLeft:
|
|
1996
|
+
labelActiveLeft: at,
|
|
1997
1997
|
fontFamilyLabel: yt,
|
|
1998
|
-
fontSizeLabel:
|
|
1999
|
-
fontSizeLabelActive:
|
|
1998
|
+
fontSizeLabel: Mt,
|
|
1999
|
+
fontSizeLabelActive: Vt,
|
|
2000
2000
|
fontWeightLabel: bt,
|
|
2001
|
-
lightTextColorLabel:
|
|
2002
|
-
lightTextColorLabelActive:
|
|
2001
|
+
lightTextColorLabel: lt,
|
|
2002
|
+
lightTextColorLabelActive: Nt,
|
|
2003
2003
|
darkTextColorLabel: rt,
|
|
2004
|
-
darkTextColorLabelActive:
|
|
2005
|
-
fontFamilyChip:
|
|
2004
|
+
darkTextColorLabelActive: Tt,
|
|
2005
|
+
fontFamilyChip: L,
|
|
2006
2006
|
fontSizeChip: E,
|
|
2007
2007
|
fontWeightChip: Z
|
|
2008
|
-
} = Ea(h), Y = oe(""),
|
|
2009
|
-
const c = I.value ? "component-disabled" : "",
|
|
2008
|
+
} = Ea(h), Y = oe(""), De = oe(null), M = oe(null), Wt = oe(null), Re = oe([]), At = oe(!1), ue = a(() => {
|
|
2009
|
+
const c = I.value ? "component-disabled" : "", A = Q.value !== "b" ? "inline-block" : "block", ie = !Fe.value || Fe.value < 185 ? 185 : Fe.value, Ze = fe ? fe.value : "ffffff", Ot = Ie.value ? Ie.value : "", i = y.value ? y.value : "", x = k.value ? k.value : "", xe = R.value !== 0 && !R.value || R.value < 0 ? 1 : R.value, je = B.value !== 0 && !B.value || B.value < 0 ? 0.2 : B.value, Zt = C.value !== 0 && !C.value || C.value < 0 ? 0 : C.value, ga = ae.value ? ae.value : "'Lato', sans-serif", ya = le.value ? le.value : "1.2em", ba = X.value !== 0 && !X.value || X.value < 0 ? 100 : X.value, ma = H.value !== 0 && !H.value || H.value < 0 ? 0 : H.value, Dt = se.value !== 0 && !se.value || se.value < 0 ? 10 : se.value, ha = !q.value || !["top", "bottom"].includes(q.value) ? "bottom" : q.value, Sa = !Oe.value || !["background", "line", "border"].includes(Oe.value) ? "background" : Oe.value, xa = de.value ? de.value : "light", Ca = ce.value ? ce.value : !1, dt = He.value !== 0 && !He.value || He.value < 0 ? 5 : He.value, _t = ye.value ? ye.value : "transparent", Jt = qe.value !== 0 && !qe.value || qe.value < 0 ? 15 : qe.value, Qt = _e.value ? _e.value : "1px 5px", Ht = We.value !== 0 && !We.value || We.value < 0 ? 0 : We.value, Xt = Ke.value === null || Ke.value === void 0 ? -13 : Ke.value, ct = at.value === null || at.value === void 0 ? 5 : at.value, Bt = yt.value ? yt.value : "'Lato', sans-serif", Va = Mt.value ? Mt.value : "1em", Ta = Vt.value ? Vt.value : "0.8em", ea = bt.value ? bt.value : 400, ka = lt.value ? lt.value : "#333333", o = rt.value ? rt.value : "#ffffff", m = Nt.value ? Nt.value : "#333333", Ce = Tt.value ? Tt.value : "#ffffff", nt = L.value ? L.value : "'Lato', sans-serif", Ba = E.value ? E.value : "1.2em", ta = Z.value ? Z.value : 400;
|
|
2010
2010
|
return {
|
|
2011
2011
|
disabled: c,
|
|
2012
|
-
display:
|
|
2013
|
-
width:
|
|
2012
|
+
display: A,
|
|
2013
|
+
width: ie,
|
|
2014
2014
|
font: ga,
|
|
2015
2015
|
fontSize: ya,
|
|
2016
2016
|
fontWeight: ba,
|
|
2017
|
-
textColor:
|
|
2018
|
-
caretColor:
|
|
2017
|
+
textColor: Ze,
|
|
2018
|
+
caretColor: Ot,
|
|
2019
2019
|
selectionBgColor: i,
|
|
2020
|
-
selectionTextColor:
|
|
2020
|
+
selectionTextColor: x,
|
|
2021
2021
|
paddingX: xe,
|
|
2022
|
-
paddingY:
|
|
2023
|
-
borderRadius:
|
|
2022
|
+
paddingY: je,
|
|
2023
|
+
borderRadius: Zt,
|
|
2024
2024
|
minChips: ma,
|
|
2025
|
-
maxChips:
|
|
2025
|
+
maxChips: Dt,
|
|
2026
2026
|
inputPosition: ha,
|
|
2027
2027
|
inputStyle: Sa,
|
|
2028
2028
|
theme: xa,
|
|
2029
2029
|
showLabel: Ca,
|
|
2030
2030
|
labelLeft: dt,
|
|
2031
2031
|
labelBackground: _t,
|
|
2032
|
-
inputLabelMarginActive:
|
|
2033
|
-
labelPadding:
|
|
2032
|
+
inputLabelMarginActive: Jt,
|
|
2033
|
+
labelPadding: Qt,
|
|
2034
2034
|
labelBorderRadius: Ht,
|
|
2035
|
-
labelActiveTop:
|
|
2035
|
+
labelActiveTop: Xt,
|
|
2036
2036
|
labelActiveLeft: ct,
|
|
2037
|
-
fontFamilyLabel:
|
|
2037
|
+
fontFamilyLabel: Bt,
|
|
2038
2038
|
fontSizeLabel: Va,
|
|
2039
2039
|
fontSizeLabelActive: Ta,
|
|
2040
2040
|
fontWeightLabel: ea,
|
|
2041
|
-
lightTextColorLabel:
|
|
2042
|
-
darkTextColorLabel:
|
|
2043
|
-
lightTextColorLabelActive:
|
|
2044
|
-
darkTextColorLabelActive:
|
|
2045
|
-
fontFamilyChip:
|
|
2041
|
+
lightTextColorLabel: ka,
|
|
2042
|
+
darkTextColorLabel: o,
|
|
2043
|
+
lightTextColorLabelActive: m,
|
|
2044
|
+
darkTextColorLabelActive: Ce,
|
|
2045
|
+
fontFamilyChip: nt,
|
|
2046
2046
|
fontSizeChip: Ba,
|
|
2047
2047
|
fontWeightChip: ta
|
|
2048
2048
|
};
|
|
2049
2049
|
}), ut = a(() => ue.value.disabled), ne = a(() => {
|
|
2050
|
-
const c = ue.value,
|
|
2050
|
+
const c = ue.value, A = Et.value;
|
|
2051
2051
|
return {
|
|
2052
2052
|
display: c.display,
|
|
2053
2053
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
2054
2054
|
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
2055
2055
|
paddingTop: "0px",
|
|
2056
2056
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
2057
|
-
overflow:
|
|
2057
|
+
overflow: A && ce.value ? "visible" : "hidden"
|
|
2058
2058
|
};
|
|
2059
|
-
}),
|
|
2059
|
+
}), $t = a(() => {
|
|
2060
2060
|
const c = ue.value;
|
|
2061
2061
|
return c.fontSize ? c.fontSize : "1.2em";
|
|
2062
2062
|
}), P = a(() => {
|
|
2063
|
-
const c = ue.value,
|
|
2063
|
+
const c = ue.value, A = Et.value;
|
|
2064
2064
|
return {
|
|
2065
2065
|
color: c.textColor,
|
|
2066
2066
|
padding: `${c.paddingY}rem ${c.paddingX}rem`,
|
|
2067
2067
|
fontWeight: c.fontWeight,
|
|
2068
2068
|
textAlign: j.value,
|
|
2069
|
-
marginTop:
|
|
2069
|
+
marginTop: A && ce.value ? `${c.inputLabelMarginActive}px` : "0"
|
|
2070
2070
|
};
|
|
2071
2071
|
}), U = a(() => {
|
|
2072
2072
|
switch (v.value) {
|
|
@@ -2079,53 +2079,53 @@ const Zl = ["for"], Jl = {
|
|
|
2079
2079
|
}
|
|
2080
2080
|
}), Yt = a(() => {
|
|
2081
2081
|
const c = ue.value;
|
|
2082
|
-
return c.inputStyle !== "line" &&
|
|
2083
|
-
}),
|
|
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(() => {
|
|
2084
2084
|
const c = {};
|
|
2085
|
-
Ge.value && Object.keys(Ge.value).forEach((
|
|
2086
|
-
const
|
|
2087
|
-
"aria-label":
|
|
2085
|
+
Ge.value && Object.keys(Ge.value).forEach((Ze) => c[`aria-${Ze}`] = Ge.value[Ze]);
|
|
2086
|
+
const A = {
|
|
2087
|
+
"aria-label": tt.value,
|
|
2088
2088
|
"aria-disabled": I.value,
|
|
2089
2089
|
...c
|
|
2090
2090
|
};
|
|
2091
2091
|
return Object.fromEntries(
|
|
2092
|
-
Object.entries(
|
|
2092
|
+
Object.entries(A).filter(([ie, Ze]) => Ze != null)
|
|
2093
2093
|
);
|
|
2094
2094
|
}), it = a(() => {
|
|
2095
2095
|
const c = ue.value;
|
|
2096
2096
|
return c.caretColor || (c.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2097
|
-
}),
|
|
2097
|
+
}), N = a(() => {
|
|
2098
2098
|
const c = ue.value;
|
|
2099
2099
|
return c.selectionBgColor || (c.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2100
|
-
}),
|
|
2100
|
+
}), Ft = a(() => {
|
|
2101
2101
|
const c = ue.value;
|
|
2102
2102
|
return c.selectionTextColor || (c.theme === "dark" ? "#000000" : "#ffffff");
|
|
2103
2103
|
}), oa = a(() => ({
|
|
2104
2104
|
caretColor: it.value
|
|
2105
2105
|
})), ra = a(() => ({
|
|
2106
|
-
"--selection-bg-color":
|
|
2107
|
-
"--selection-text-color":
|
|
2106
|
+
"--selection-bg-color": N.value,
|
|
2107
|
+
"--selection-text-color": Ft.value
|
|
2108
2108
|
})), ua = a(() => {
|
|
2109
|
-
const c = ue.value,
|
|
2109
|
+
const c = ue.value, A = {
|
|
2110
2110
|
width: `${c.width}px`
|
|
2111
2111
|
};
|
|
2112
|
-
return c.display === "block" ? { width: "auto" } :
|
|
2113
|
-
}), st = a(() =>
|
|
2114
|
-
const c = ue.value,
|
|
2112
|
+
return c.display === "block" ? { width: "auto" } : A;
|
|
2113
|
+
}), st = a(() => he.value ? he.value : `${F.value}-name-label`), Et = a(() => At.value || Re.value.length > 0 || Y.value && Y.value.trim().length > 0), Pt = a(() => ce.value ? At.value || Re.value.length > 0 ? ee.value : "" : ee.value), ia = a(() => {
|
|
2114
|
+
const c = ue.value, A = Et.value, ie = A ? c.lightTextColorLabelActive : c.lightTextColorLabel, Ze = A ? c.darkTextColorLabelActive : c.darkTextColorLabel;
|
|
2115
2115
|
return {
|
|
2116
2116
|
fontFamily: c.fontFamilyLabel,
|
|
2117
|
-
fontSize:
|
|
2117
|
+
fontSize: A ? c.fontSizeLabelActive : c.fontSizeLabel,
|
|
2118
2118
|
fontWeight: c.fontWeightLabel,
|
|
2119
|
-
color: c.theme === "dark" ?
|
|
2120
|
-
top:
|
|
2121
|
-
left:
|
|
2122
|
-
transform:
|
|
2119
|
+
color: c.theme === "dark" ? Ze : ie,
|
|
2120
|
+
top: A ? `${c.labelActiveTop}px` : "50%",
|
|
2121
|
+
left: A ? `${c.labelActiveLeft}px` : `${c.labelLeft}px`,
|
|
2122
|
+
transform: A ? "translateY(0)" : "translateY(-50%)",
|
|
2123
2123
|
transition: "all 0.2s ease",
|
|
2124
|
-
backgroundColor:
|
|
2125
|
-
padding:
|
|
2126
|
-
borderRadius:
|
|
2124
|
+
backgroundColor: A ? c.labelBackground : "transparent",
|
|
2125
|
+
padding: A ? c.labelPadding : "0",
|
|
2126
|
+
borderRadius: A ? `${c.labelBorderRadius}rem` : "0",
|
|
2127
2127
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
2128
|
-
...
|
|
2128
|
+
...A ? {
|
|
2129
2129
|
whiteSpace: Ee.value ? "nowrap" : "normal",
|
|
2130
2130
|
wordWrap: Ee.value ? "normal" : "break-word",
|
|
2131
2131
|
overflowWrap: Ee.value ? "normal" : "break-word",
|
|
@@ -2142,7 +2142,7 @@ const Zl = ["for"], Jl = {
|
|
|
2142
2142
|
fontFamily: c.fontFamilyChip
|
|
2143
2143
|
};
|
|
2144
2144
|
}), sa = a(() => {
|
|
2145
|
-
switch (
|
|
2145
|
+
switch (de.value) {
|
|
2146
2146
|
case "dark":
|
|
2147
2147
|
return "component__theme--dark";
|
|
2148
2148
|
default:
|
|
@@ -2157,106 +2157,108 @@ const Zl = ["for"], Jl = {
|
|
|
2157
2157
|
default:
|
|
2158
2158
|
return "component__input--background";
|
|
2159
2159
|
}
|
|
2160
|
-
}), da = () => {
|
|
2161
|
-
g("clicked");
|
|
2160
|
+
}), da = (c) => {
|
|
2161
|
+
g("clicked", c);
|
|
2162
2162
|
}, ca = () => {
|
|
2163
|
-
|
|
2163
|
+
At.value = !0, g("focused");
|
|
2164
2164
|
}, fa = () => {
|
|
2165
|
-
|
|
2166
|
-
},
|
|
2167
|
-
var
|
|
2168
|
-
const
|
|
2169
|
-
g("paste",
|
|
2170
|
-
},
|
|
2171
|
-
if (!(I.value ||
|
|
2165
|
+
At.value = !1, g("blurred");
|
|
2166
|
+
}, va = async (c) => {
|
|
2167
|
+
var ie;
|
|
2168
|
+
const A = ((ie = c.clipboardData) == null ? void 0 : ie.getData("text")) || "";
|
|
2169
|
+
g("paste", A), we.value && c.preventDefault();
|
|
2170
|
+
}, Kt = (c) => {
|
|
2171
|
+
if (!(I.value || ve.value) && c.key === "Enter" && Y.value.trim() !== "") {
|
|
2172
2172
|
c.preventDefault();
|
|
2173
|
-
let
|
|
2174
|
-
|
|
2173
|
+
let A = Y.value.trim();
|
|
2174
|
+
Te.value && (A = A.toUpperCase()), (w.value || !Re.value.includes(A)) && pa(A), Y.value = "";
|
|
2175
2175
|
}
|
|
2176
2176
|
}, pa = (c) => {
|
|
2177
|
-
|
|
2178
|
-
},
|
|
2179
|
-
|
|
2177
|
+
Re.value.push(c), g("added", c);
|
|
2178
|
+
}, zt = (c) => {
|
|
2179
|
+
Re.value = Re.value.filter((A) => A !== c), g("removed", c);
|
|
2180
2180
|
};
|
|
2181
2181
|
return re(_, (c) => {
|
|
2182
|
-
|
|
2182
|
+
Re.value = c, g("changed", c);
|
|
2183
2183
|
}), re(Y, (c) => {
|
|
2184
2184
|
g("input-changed", c);
|
|
2185
|
-
}), (c,
|
|
2185
|
+
}), (c, A) => u(F) ? (O(), K("div", $a({
|
|
2186
2186
|
key: 0,
|
|
2187
2187
|
class: ["nb-wrapper", ut.value],
|
|
2188
2188
|
style: [ne.value],
|
|
2189
2189
|
role: "input"
|
|
2190
|
-
},
|
|
2191
|
-
|
|
2190
|
+
}, wt.value, {
|
|
2191
|
+
onClick: A[2] || (A[2] = (ie) => da(ie))
|
|
2192
|
+
}), [
|
|
2193
|
+
u(ce) ? (O(), K("label", {
|
|
2192
2194
|
key: 0,
|
|
2193
2195
|
for: st.value,
|
|
2194
2196
|
class: "component__label",
|
|
2195
2197
|
style: Ne([ia.value])
|
|
2196
2198
|
}, [
|
|
2197
|
-
jt(
|
|
2198
|
-
u(
|
|
2199
|
-
], 12, Zl)) :
|
|
2200
|
-
|
|
2201
|
-
id: u(
|
|
2199
|
+
jt(Rt(u(be)), 1),
|
|
2200
|
+
u(Be) ? (O(), K("span", Jl, "*")) : me("", !0)
|
|
2201
|
+
], 12, Zl)) : me("", !0),
|
|
2202
|
+
Ve("div", {
|
|
2203
|
+
id: u(F),
|
|
2202
2204
|
ref_key: "chipsContainer",
|
|
2203
|
-
ref:
|
|
2205
|
+
ref: De,
|
|
2204
2206
|
class: Ye(["nb-reset", "component", sa.value, Gt.value]),
|
|
2205
2207
|
style: Ne([P.value, ua.value, Yt.value])
|
|
2206
2208
|
}, [
|
|
2207
|
-
|
|
2209
|
+
Re.value.length > 0 ? (O(), K("div", {
|
|
2208
2210
|
key: 0,
|
|
2209
2211
|
ref_key: "chips",
|
|
2210
|
-
ref:
|
|
2212
|
+
ref: Wt,
|
|
2211
2213
|
class: "chips"
|
|
2212
2214
|
}, [
|
|
2213
|
-
(O(!0), K(
|
|
2214
|
-
key:
|
|
2215
|
+
(O(!0), K(gl, null, yl(Re.value, (ie) => (O(), K("div", {
|
|
2216
|
+
key: ie,
|
|
2215
2217
|
class: "chip"
|
|
2216
2218
|
}, [
|
|
2217
2219
|
La(c.$slots, "chip", {
|
|
2218
|
-
chips:
|
|
2219
|
-
chip:
|
|
2220
|
-
removeChip:
|
|
2220
|
+
chips: Re.value,
|
|
2221
|
+
chip: ie,
|
|
2222
|
+
removeChip: zt
|
|
2221
2223
|
}, () => [
|
|
2222
|
-
|
|
2224
|
+
Ve("span", {
|
|
2223
2225
|
class: "chip-text",
|
|
2224
2226
|
style: Ne([Ut.value])
|
|
2225
|
-
},
|
|
2226
|
-
!u(I) && !u(
|
|
2227
|
+
}, Rt(ie), 5),
|
|
2228
|
+
!u(I) && !u(ve) ? (O(), K("span", {
|
|
2227
2229
|
key: 0,
|
|
2228
2230
|
class: "chip-remove",
|
|
2229
2231
|
style: Ne([Ut.value]),
|
|
2230
|
-
onClick: (
|
|
2231
|
-
}, "×", 12, Xl)) :
|
|
2232
|
+
onClick: (Ze) => zt(ie)
|
|
2233
|
+
}, "×", 12, Xl)) : me("", !0)
|
|
2232
2234
|
], !0)
|
|
2233
2235
|
]))), 128))
|
|
2234
|
-
], 512)) :
|
|
2235
|
-
Pa(
|
|
2236
|
+
], 512)) : me("", !0),
|
|
2237
|
+
Pa(Ve("input", {
|
|
2236
2238
|
ref_key: "chipInput",
|
|
2237
|
-
ref:
|
|
2239
|
+
ref: M,
|
|
2238
2240
|
type: "text",
|
|
2239
|
-
"onUpdate:modelValue":
|
|
2241
|
+
"onUpdate:modelValue": A[0] || (A[0] = (ie) => Y.value = ie),
|
|
2240
2242
|
id: st.value,
|
|
2241
2243
|
name: st.value,
|
|
2242
|
-
placeholder:
|
|
2243
|
-
readonly: u(
|
|
2244
|
-
autocomplete: u(
|
|
2245
|
-
required: u(
|
|
2246
|
-
tabindex: u(I) || u(
|
|
2244
|
+
placeholder: Pt.value,
|
|
2245
|
+
readonly: u(ve),
|
|
2246
|
+
autocomplete: u(ke),
|
|
2247
|
+
required: u(Be),
|
|
2248
|
+
tabindex: u(I) || u(ve) ? -1 : u(te),
|
|
2247
2249
|
class: Ye(["chips-input", U.value]),
|
|
2248
2250
|
style: Ne([oa.value, ra.value]),
|
|
2249
|
-
onKeydown:
|
|
2251
|
+
onKeydown: A[1] || (A[1] = na((ie) => !u(I) && u(ge) && Kt(ie), ["enter"])),
|
|
2250
2252
|
onFocus: ca,
|
|
2251
2253
|
onBlur: fa,
|
|
2252
|
-
onPaste:
|
|
2254
|
+
onPaste: va
|
|
2253
2255
|
}, null, 46, en), [
|
|
2254
|
-
[
|
|
2256
|
+
[hl, Y.value]
|
|
2255
2257
|
])
|
|
2256
2258
|
], 14, Ql)
|
|
2257
|
-
], 16)) :
|
|
2259
|
+
], 16)) : me("", !0);
|
|
2258
2260
|
}
|
|
2259
|
-
}), an = /* @__PURE__ */ Oa(tn, [["__scopeId", "data-v-
|
|
2261
|
+
}), an = /* @__PURE__ */ Oa(tn, [["__scopeId", "data-v-fcb787c2"]]);
|
|
2260
2262
|
const ln = ["id"], nn = ["for"], on = {
|
|
2261
2263
|
key: 0,
|
|
2262
2264
|
class: "component__label--required"
|
|
@@ -2274,8 +2276,8 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2274
2276
|
type: String,
|
|
2275
2277
|
default: "b",
|
|
2276
2278
|
validator: (e = "b") => {
|
|
2277
|
-
const
|
|
2278
|
-
return ["b", "ib"].includes(
|
|
2279
|
+
const b = e.toLowerCase();
|
|
2280
|
+
return ["b", "ib"].includes(b);
|
|
2279
2281
|
}
|
|
2280
2282
|
},
|
|
2281
2283
|
tabIndex: {
|
|
@@ -2666,156 +2668,156 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2666
2668
|
"entered",
|
|
2667
2669
|
"paste"
|
|
2668
2670
|
],
|
|
2669
|
-
setup(e, { emit:
|
|
2671
|
+
setup(e, { emit: b }) {
|
|
2670
2672
|
Wa((i) => ({
|
|
2671
|
-
"
|
|
2672
|
-
"
|
|
2673
|
-
"
|
|
2674
|
-
"
|
|
2675
|
-
|
|
2676
|
-
"
|
|
2677
|
-
|
|
2678
|
-
"
|
|
2679
|
-
"
|
|
2680
|
-
"
|
|
2681
|
-
"
|
|
2682
|
-
|
|
2683
|
-
"
|
|
2684
|
-
"
|
|
2685
|
-
|
|
2686
|
-
"
|
|
2687
|
-
"
|
|
2688
|
-
"
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2673
|
+
"627b1b20": ne.value,
|
|
2674
|
+
"25e6215e": u(ot),
|
|
2675
|
+
"472b16c0": G.value,
|
|
2676
|
+
"06b1d412": kt.value,
|
|
2677
|
+
"8ee981ac": wt.value,
|
|
2678
|
+
"2c4f6faf": u(pt),
|
|
2679
|
+
e02b1a8a: u(Lt),
|
|
2680
|
+
"246261d7": u(ze),
|
|
2681
|
+
"41e29141": u(Le),
|
|
2682
|
+
"80039e46": u(ht),
|
|
2683
|
+
"1f413c0e": u(pe),
|
|
2684
|
+
b3eb5342: u(vt),
|
|
2685
|
+
"1466aef0": At.value,
|
|
2686
|
+
"5d9021a7": u(St),
|
|
2687
|
+
"88129a90": ia.value,
|
|
2688
|
+
"4529b8c7": $t.value,
|
|
2689
|
+
"3e273d86": P.value,
|
|
2690
|
+
"8b5b71a2": U.value,
|
|
2691
|
+
"4d099689": z.value,
|
|
2692
|
+
c77e339e: i.styleButtonColor,
|
|
2693
|
+
"30fcf5d4": Yt.value
|
|
2692
2694
|
})), Aa(() => {
|
|
2693
|
-
Y.value =
|
|
2695
|
+
Y.value = Xe.value;
|
|
2694
2696
|
}), Ya(() => {
|
|
2695
2697
|
c();
|
|
2696
2698
|
});
|
|
2697
|
-
const g =
|
|
2698
|
-
nbId:
|
|
2699
|
+
const g = b, h = e, {
|
|
2700
|
+
nbId: F,
|
|
2699
2701
|
display: Q,
|
|
2700
|
-
hasTabIndexEnter:
|
|
2701
|
-
ariaLabel:
|
|
2702
|
-
ariaAttrs:
|
|
2703
|
-
textColor:
|
|
2702
|
+
hasTabIndexEnter: fe,
|
|
2703
|
+
ariaLabel: R,
|
|
2704
|
+
ariaAttrs: B,
|
|
2705
|
+
textColor: C,
|
|
2704
2706
|
caretColor: I,
|
|
2705
2707
|
selectionBgColor: ae,
|
|
2706
2708
|
selectionTextColor: le,
|
|
2707
2709
|
hasBorderRadius: X,
|
|
2708
2710
|
borderRadius: _,
|
|
2709
|
-
disabled:
|
|
2711
|
+
disabled: w,
|
|
2710
2712
|
fontFamily: H,
|
|
2711
|
-
fontSize:
|
|
2713
|
+
fontSize: se,
|
|
2712
2714
|
fontWeight: q,
|
|
2713
2715
|
fontFamilyMsg: Fe,
|
|
2714
|
-
fontSizeMsg:
|
|
2716
|
+
fontSizeMsg: he,
|
|
2715
2717
|
fontWeightMsg: ee,
|
|
2716
|
-
textMessageColor:
|
|
2717
|
-
inputWidth:
|
|
2718
|
-
inputStyle:
|
|
2719
|
-
activeTextStyle:
|
|
2720
|
-
inputReadonly:
|
|
2718
|
+
textMessageColor: Te,
|
|
2719
|
+
inputWidth: ve,
|
|
2720
|
+
inputStyle: we,
|
|
2721
|
+
activeTextStyle: ke,
|
|
2722
|
+
inputReadonly: Be,
|
|
2721
2723
|
blockPaste: j,
|
|
2722
|
-
hasTrim:
|
|
2724
|
+
hasTrim: Qe,
|
|
2723
2725
|
inputUppercase: v,
|
|
2724
|
-
inputName:
|
|
2726
|
+
inputName: de,
|
|
2725
2727
|
inputPlaceholder: Oe,
|
|
2726
|
-
inputText:
|
|
2728
|
+
inputText: Xe,
|
|
2727
2729
|
theme: S,
|
|
2728
2730
|
tabindex: Ue,
|
|
2729
|
-
lightBgColor:
|
|
2731
|
+
lightBgColor: pe,
|
|
2730
2732
|
lightBgColorFocus: vt,
|
|
2731
2733
|
lightDisabledBgColor: ht,
|
|
2732
2734
|
lightTextColor: ot,
|
|
2733
2735
|
darkBgColor: ze,
|
|
2734
|
-
darkBgColorFocus:
|
|
2735
|
-
darkDisabledBgColor:
|
|
2736
|
+
darkBgColorFocus: Le,
|
|
2737
|
+
darkDisabledBgColor: Lt,
|
|
2736
2738
|
darkTextColor: pt,
|
|
2737
2739
|
textAlign: St,
|
|
2738
|
-
showMsg:
|
|
2739
|
-
hasMsg:
|
|
2740
|
-
showLabel:
|
|
2740
|
+
showMsg: xt,
|
|
2741
|
+
hasMsg: Ct,
|
|
2742
|
+
showLabel: Ae,
|
|
2741
2743
|
labelBackground: gt,
|
|
2742
|
-
labelPadding:
|
|
2744
|
+
labelPadding: et,
|
|
2743
2745
|
labelBorderRadius: V,
|
|
2744
|
-
labelBreakOnActive:
|
|
2745
|
-
labelLeft:
|
|
2746
|
+
labelBreakOnActive: D,
|
|
2747
|
+
labelLeft: Se,
|
|
2746
2748
|
inputLabelMarginActive: te,
|
|
2747
|
-
labelActiveTop:
|
|
2748
|
-
labelActiveLeft:
|
|
2749
|
+
labelActiveTop: ge,
|
|
2750
|
+
labelActiveLeft: tt,
|
|
2749
2751
|
labelRight: Ge,
|
|
2750
2752
|
labelActiveRight: Ie,
|
|
2751
|
-
fontFamilyLabel:
|
|
2752
|
-
fontSizeLabel:
|
|
2753
|
-
fontSizeLabelActive:
|
|
2754
|
-
fontWeightLabel:
|
|
2755
|
-
lightTextColorLabel:
|
|
2753
|
+
fontFamilyLabel: y,
|
|
2754
|
+
fontSizeLabel: k,
|
|
2755
|
+
fontSizeLabelActive: ce,
|
|
2756
|
+
fontWeightLabel: be,
|
|
2757
|
+
lightTextColorLabel: ye,
|
|
2756
2758
|
lightTextColorLabelActive: _e,
|
|
2757
2759
|
darkTextColorLabel: We,
|
|
2758
2760
|
darkTextColorLabelActive: Ee,
|
|
2759
2761
|
rows: He,
|
|
2760
2762
|
cols: qe,
|
|
2761
2763
|
maxlength: Ke,
|
|
2762
|
-
minlength:
|
|
2764
|
+
minlength: at,
|
|
2763
2765
|
wrap: yt,
|
|
2764
|
-
spellcheck:
|
|
2765
|
-
autofocus:
|
|
2766
|
+
spellcheck: Mt,
|
|
2767
|
+
autofocus: Vt,
|
|
2766
2768
|
resize: bt,
|
|
2767
|
-
minWidth:
|
|
2768
|
-
maxWidth:
|
|
2769
|
+
minWidth: lt,
|
|
2770
|
+
maxWidth: Nt,
|
|
2769
2771
|
minHeight: rt,
|
|
2770
|
-
maxHeight:
|
|
2771
|
-
autoResize:
|
|
2772
|
+
maxHeight: Tt,
|
|
2773
|
+
autoResize: L,
|
|
2772
2774
|
minRows: E,
|
|
2773
2775
|
maxRows: Z
|
|
2774
|
-
} = Ea(h), Y = oe(""),
|
|
2775
|
-
const i =
|
|
2776
|
+
} = Ea(h), Y = oe(""), De = oe(!1), M = a(() => {
|
|
2777
|
+
const i = w.value ? "component-disabled" : "", x = Q.value !== "b" ? "inline-block" : "block", xe = C ? C.value : "ffffff", je = I.value ? I.value : "", Zt = ae.value ? ae.value : "", ga = le.value ? le.value : "", ya = X.value ? X.value : !1, ba = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, ma = H.value ? H.value : "'Lato', sans-serif", Dt = se.value ? se.value : "1.4em", ha = q.value !== 0 && !q.value || q.value < 0 ? 100 : q.value, Sa = Fe.value ? Fe.value : "'Lato', sans-serif", xa = he.value ? he.value : "1em", Ca = ee.value !== 0 && !ee.value || ee.value < 0 ? 100 : ee.value, dt = Te.value ? Te.value : "#f15574", _t = ve.value ? ve.value : 200, Jt = ke.value ? ke.value : "normal", Qt = Be.value ? Be.value : !1, Ht = v.value ? v.value : !1, Xt = S.value ? S.value : "normal", ct = St.value ? St.value : "left", Bt = we.value ? we.value : "background", Va = Ae.value ? Ae.value : !1, Ta = Se.value !== 0 && !Se.value || Se.value < 0 ? 5 : Se.value, ea = gt.value ? gt.value : "transparent", ka = te.value !== 0 && !te.value || te.value < 0 ? 15 : te.value, o = et.value ? et.value : "1px 5px", m = V.value !== 0 && !V.value || V.value < 0 ? 0 : V.value, Ce = ge.value === null || ge.value === void 0 ? -13 : ge.value, nt = tt.value === null || tt.value === void 0 ? 5 : tt.value, Ba = Ge.value === null || Ge.value === void 0 ? 0 : Ge.value, ta = Ie.value === null || Ie.value === void 0 ? 0 : Ie.value, wa = y.value ? y.value : "'Lato', sans-serif", Da = k.value ? k.value : "1em", It = ce.value ? ce.value : "0.8em", aa = be.value ? be.value : 400, qt = ye.value ? ye.value : "#ffffff", Ra = We.value ? We.value : "#000000", _a = _e.value ? _e.value : "#ffffff", Ma = Ee.value ? Ee.value : "#000000", Ha = He.value && He.value > 0 ? He.value : 2, $e = qe.value && qe.value > 0 ? qe.value : 20, qa = Ke.value !== null && Ke.value >= 0 ? Ke.value : null, mt = at.value !== null && at.value >= 0 ? at.value : null, t = yt.value && ["soft", "hard", "off"].includes(yt.value) ? yt.value : "soft", l = Mt.value !== void 0 ? Mt.value : "default", n = Vt.value !== void 0 ? Vt.value : !1, r = bt.value && ["none", "both", "vertical", "horizontal"].includes(bt.value) ? bt.value : "vertical", s = lt.value ? lt.value : "auto", d = Nt.value ? Nt.value : "auto", f = rt.value ? rt.value : "auto", p = Tt.value ? Tt.value : "auto", T = L.value !== void 0 ? L.value : !1, $ = E.value !== null && E.value > 0 ? E.value : null, W = Z.value !== null && Z.value > 0 ? Z.value : null;
|
|
2776
2778
|
return {
|
|
2777
2779
|
disabled: i,
|
|
2778
|
-
display:
|
|
2780
|
+
display: x,
|
|
2779
2781
|
font: ma,
|
|
2780
|
-
fontSize:
|
|
2782
|
+
fontSize: Dt,
|
|
2781
2783
|
fontWeight: ha,
|
|
2782
2784
|
fontFamilyMsg: Sa,
|
|
2783
2785
|
fontSizeMsg: xa,
|
|
2784
2786
|
fontWeightMsg: Ca,
|
|
2785
2787
|
textMessageColor: dt,
|
|
2786
2788
|
textColor: xe,
|
|
2787
|
-
caretColor:
|
|
2788
|
-
selectionBgColor:
|
|
2789
|
+
caretColor: je,
|
|
2790
|
+
selectionBgColor: Zt,
|
|
2789
2791
|
selectionTextColor: ga,
|
|
2790
2792
|
hasBorderRadius: ya,
|
|
2791
2793
|
borderRadius: ba,
|
|
2792
2794
|
textAlign: ct,
|
|
2793
2795
|
inputWidth: _t,
|
|
2794
|
-
activeTextStyle:
|
|
2795
|
-
inputReadonly:
|
|
2796
|
+
activeTextStyle: Jt,
|
|
2797
|
+
inputReadonly: Qt,
|
|
2796
2798
|
inputUppercase: Ht,
|
|
2797
|
-
theme:
|
|
2798
|
-
inputStyle:
|
|
2799
|
+
theme: Xt,
|
|
2800
|
+
inputStyle: Bt,
|
|
2799
2801
|
showLabel: Va,
|
|
2800
2802
|
labelBackground: ea,
|
|
2801
|
-
labelPadding:
|
|
2802
|
-
labelBorderRadius:
|
|
2803
|
+
labelPadding: o,
|
|
2804
|
+
labelBorderRadius: m,
|
|
2803
2805
|
labelLeft: Ta,
|
|
2804
|
-
inputLabelMarginActive:
|
|
2805
|
-
labelActiveTop:
|
|
2806
|
-
labelActiveLeft:
|
|
2806
|
+
inputLabelMarginActive: ka,
|
|
2807
|
+
labelActiveTop: Ce,
|
|
2808
|
+
labelActiveLeft: nt,
|
|
2807
2809
|
labelRight: Ba,
|
|
2808
2810
|
labelActiveRight: ta,
|
|
2809
2811
|
fontFamilyLabel: wa,
|
|
2810
2812
|
fontSizeLabel: Da,
|
|
2811
|
-
fontSizeLabelActive:
|
|
2813
|
+
fontSizeLabelActive: It,
|
|
2812
2814
|
fontWeightLabel: aa,
|
|
2813
2815
|
lightTextColorLabel: qt,
|
|
2814
2816
|
darkTextColorLabel: Ra,
|
|
2815
2817
|
lightTextColorLabelActive: _a,
|
|
2816
2818
|
darkTextColorLabelActive: Ma,
|
|
2817
2819
|
rows: Ha,
|
|
2818
|
-
cols:
|
|
2820
|
+
cols: $e,
|
|
2819
2821
|
maxlength: qa,
|
|
2820
2822
|
minlength: mt,
|
|
2821
2823
|
wrap: t,
|
|
@@ -2826,53 +2828,53 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2826
2828
|
maxWidth: d,
|
|
2827
2829
|
minHeight: f,
|
|
2828
2830
|
maxHeight: p,
|
|
2829
|
-
autoResize:
|
|
2830
|
-
minRows:
|
|
2831
|
+
autoResize: T,
|
|
2832
|
+
minRows: $,
|
|
2831
2833
|
maxRows: W
|
|
2832
2834
|
};
|
|
2833
|
-
}),
|
|
2834
|
-
const i =
|
|
2835
|
+
}), Wt = a(() => M.value.disabled), Re = a(() => {
|
|
2836
|
+
const i = M.value, x = Pt.value;
|
|
2835
2837
|
return {
|
|
2836
2838
|
display: i.display,
|
|
2837
2839
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
2838
2840
|
// paddingTop: isActive && showLabel.value ? `${Math.abs(defaultValues.labelActiveTop)}px` : '0',
|
|
2839
2841
|
paddingTop: "0px",
|
|
2840
2842
|
// Esconde o label quando não está ativo usando overflow hidden
|
|
2841
|
-
overflow:
|
|
2843
|
+
overflow: x && Ae.value ? "visible" : "hidden"
|
|
2842
2844
|
};
|
|
2843
|
-
}),
|
|
2844
|
-
const i =
|
|
2845
|
+
}), At = a(() => {
|
|
2846
|
+
const i = M.value;
|
|
2845
2847
|
return i.fontSize ? i.fontSize : "1.4em";
|
|
2846
2848
|
}), ue = a(() => {
|
|
2847
|
-
const i =
|
|
2849
|
+
const i = M.value, x = Pt.value;
|
|
2848
2850
|
return {
|
|
2849
2851
|
fontWeight: i.fontWeight,
|
|
2850
|
-
marginTop:
|
|
2852
|
+
marginTop: x && Ae.value ? `${i.inputLabelMarginActive}px` : "0",
|
|
2851
2853
|
// Quando o label está ativo, define altura mínima igual ao input para alinhar baseline
|
|
2852
2854
|
// Mas permite que o textarea cresça quando há conteúdo
|
|
2853
|
-
minHeight: (
|
|
2854
|
-
height:
|
|
2855
|
-
maxHeight:
|
|
2855
|
+
minHeight: (x && Ae.value, "28px"),
|
|
2856
|
+
height: x && Ae.value ? "auto" : "28px",
|
|
2857
|
+
maxHeight: x && Ae.value ? void 0 : "28px"
|
|
2856
2858
|
};
|
|
2857
2859
|
}), ut = a(() => {
|
|
2858
|
-
const i =
|
|
2860
|
+
const i = M.value;
|
|
2859
2861
|
return i.inputStyle !== "line" && i.hasBorderRadius ? { borderRadius: `${i.borderRadius}rem` } : {};
|
|
2860
|
-
}), ne = a(() =>
|
|
2861
|
-
const i =
|
|
2862
|
+
}), 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(() => {
|
|
2863
|
+
const i = M.value;
|
|
2862
2864
|
return i.caretColor || (i.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2863
|
-
}),
|
|
2864
|
-
const i =
|
|
2865
|
+
}), kt = a(() => {
|
|
2866
|
+
const i = M.value;
|
|
2865
2867
|
return i.selectionBgColor || (i.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2866
|
-
}),
|
|
2867
|
-
const i =
|
|
2868
|
+
}), wt = a(() => {
|
|
2869
|
+
const i = M.value;
|
|
2868
2870
|
return i.selectionTextColor || (i.theme === "dark" ? "#000000" : "#ffffff");
|
|
2869
2871
|
}), it = a(() => {
|
|
2870
|
-
const i =
|
|
2872
|
+
const i = M.value;
|
|
2871
2873
|
return i.display === "block" ? { width: "100%" } : {
|
|
2872
2874
|
width: `${i.inputWidth}px`
|
|
2873
2875
|
};
|
|
2874
|
-
}),
|
|
2875
|
-
switch (
|
|
2876
|
+
}), N = a(() => {
|
|
2877
|
+
switch (we.value) {
|
|
2876
2878
|
case "line":
|
|
2877
2879
|
return "component__input--line";
|
|
2878
2880
|
case "border":
|
|
@@ -2880,8 +2882,8 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2880
2882
|
default:
|
|
2881
2883
|
return "component__input--background";
|
|
2882
2884
|
}
|
|
2883
|
-
}),
|
|
2884
|
-
switch (
|
|
2885
|
+
}), Ft = a(() => {
|
|
2886
|
+
switch (M.value.activeTextStyle) {
|
|
2885
2887
|
case "italic":
|
|
2886
2888
|
return "component__input--active--italic";
|
|
2887
2889
|
case "oblique":
|
|
@@ -2890,156 +2892,156 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
2890
2892
|
return "component__input--active--normal";
|
|
2891
2893
|
}
|
|
2892
2894
|
}), oa = a(() => {
|
|
2893
|
-
switch (
|
|
2895
|
+
switch (M.value.theme) {
|
|
2894
2896
|
case "dark":
|
|
2895
2897
|
return "component__theme--dark";
|
|
2896
2898
|
default:
|
|
2897
2899
|
return "component__theme--light";
|
|
2898
2900
|
}
|
|
2899
|
-
}), ra = a(() =>
|
|
2900
|
-
a(() =>
|
|
2901
|
-
const ia = a(() => "6px 10px"), Ut = a(() => !!(
|
|
2901
|
+
}), ra = a(() => M.value.inputReadonly ? "component__input--read-only" : ""), ua = a(() => M.value.inputUppercase ? "component__input--uppercase" : ""), st = a(() => de.value ? de.value : `${F.value}-name-label`), Et = a(() => Ae.value ? De.value ? Oe.value : "" : Oe.value), Pt = a(() => De.value || Y.value && Y.value.trim().length > 0);
|
|
2902
|
+
a(() => De.value ? "component__input--active" : "component__input--no-active");
|
|
2903
|
+
const ia = a(() => "6px 10px"), Ut = a(() => !!(xt.value && Ct.value)), sa = a(() => {
|
|
2902
2904
|
const i = {};
|
|
2903
|
-
|
|
2904
|
-
const
|
|
2905
|
-
"aria-label":
|
|
2906
|
-
"aria-disabled":
|
|
2905
|
+
B.value && Object.keys(B.value).forEach((je) => i[`aria-${je}`] = B.value[je]);
|
|
2906
|
+
const x = {
|
|
2907
|
+
"aria-label": R.value,
|
|
2908
|
+
"aria-disabled": w.value,
|
|
2907
2909
|
...i
|
|
2908
2910
|
};
|
|
2909
2911
|
return Object.fromEntries(
|
|
2910
|
-
Object.entries(
|
|
2912
|
+
Object.entries(x).filter(([xe, je]) => je != null)
|
|
2911
2913
|
);
|
|
2912
2914
|
}), Gt = a(() => {
|
|
2913
|
-
const i =
|
|
2915
|
+
const i = M.value, x = Pt.value, xe = x ? i.lightTextColorLabelActive : i.lightTextColorLabel, je = x ? i.darkTextColorLabelActive : i.darkTextColorLabel;
|
|
2914
2916
|
return {
|
|
2915
2917
|
fontFamily: i.fontFamilyLabel,
|
|
2916
|
-
fontSize:
|
|
2918
|
+
fontSize: x ? i.fontSizeLabelActive : i.fontSizeLabel,
|
|
2917
2919
|
fontWeight: i.fontWeightLabel,
|
|
2918
|
-
color: i.theme === "dark" ?
|
|
2919
|
-
top:
|
|
2920
|
-
transform:
|
|
2921
|
-
left:
|
|
2922
|
-
right:
|
|
2920
|
+
color: i.theme === "dark" ? je : xe,
|
|
2921
|
+
top: x ? `${i.labelActiveTop}px` : "50%",
|
|
2922
|
+
transform: x ? "translateY(0)" : "translateY(-50%)",
|
|
2923
|
+
left: x ? `${i.labelActiveLeft}px` : `${i.labelLeft}px`,
|
|
2924
|
+
right: x ? `${i.labelActiveRight}px` : `${i.labelRight}px`,
|
|
2923
2925
|
transition: "all 0.2s ease",
|
|
2924
|
-
backgroundColor:
|
|
2925
|
-
padding:
|
|
2926
|
-
borderRadius:
|
|
2926
|
+
backgroundColor: x ? i.labelBackground : "transparent",
|
|
2927
|
+
padding: x ? i.labelPadding : "0",
|
|
2928
|
+
borderRadius: x ? `${i.labelBorderRadius}rem` : "0",
|
|
2927
2929
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
2928
|
-
...
|
|
2929
|
-
whiteSpace:
|
|
2930
|
-
wordWrap:
|
|
2931
|
-
overflowWrap:
|
|
2930
|
+
...x ? {
|
|
2931
|
+
whiteSpace: D.value ? "nowrap" : "normal",
|
|
2932
|
+
wordWrap: D.value ? "normal" : "break-word",
|
|
2933
|
+
overflowWrap: D.value ? "normal" : "break-word",
|
|
2932
2934
|
maxWidth: "100%",
|
|
2933
|
-
textOverflow:
|
|
2934
|
-
overflow:
|
|
2935
|
+
textOverflow: D.value ? "ellipsis" : "clip",
|
|
2936
|
+
overflow: D.value ? "hidden" : "visible"
|
|
2935
2937
|
} : {}
|
|
2936
2938
|
};
|
|
2937
2939
|
});
|
|
2938
2940
|
a(() => {
|
|
2939
|
-
const i =
|
|
2941
|
+
const i = M.value;
|
|
2940
2942
|
return i.theme === "dark" ? i.darkTextColorLabelActive : i.lightTextColorLabelActive;
|
|
2941
2943
|
});
|
|
2942
2944
|
const da = a(() => {
|
|
2943
|
-
const i =
|
|
2945
|
+
const i = M.value, x = {
|
|
2944
2946
|
rows: i.rows,
|
|
2945
2947
|
cols: i.cols,
|
|
2946
2948
|
wrap: i.wrap,
|
|
2947
2949
|
spellcheck: i.spellcheck === "default" ? void 0 : i.spellcheck,
|
|
2948
2950
|
autofocus: i.autofocus || void 0
|
|
2949
2951
|
};
|
|
2950
|
-
return i.maxlength !== null && (
|
|
2952
|
+
return i.maxlength !== null && (x.maxlength = i.maxlength), i.minlength !== null && (x.minlength = i.minlength), x;
|
|
2951
2953
|
}), ca = a(() => ({
|
|
2952
|
-
resize:
|
|
2953
|
-
})), fa = a(() =>
|
|
2954
|
+
resize: M.value.resize
|
|
2955
|
+
})), fa = a(() => M.value.wrap === "off" ? {
|
|
2954
2956
|
whiteSpace: "nowrap",
|
|
2955
2957
|
overflowX: "auto"
|
|
2956
|
-
} : {}),
|
|
2957
|
-
const i =
|
|
2958
|
+
} : {}), va = a(() => {
|
|
2959
|
+
const i = M.value;
|
|
2958
2960
|
return i.minWidth === "auto" ? {} : {
|
|
2959
2961
|
minWidth: i.minWidth
|
|
2960
2962
|
};
|
|
2961
|
-
}),
|
|
2962
|
-
const i =
|
|
2963
|
+
}), Kt = a(() => {
|
|
2964
|
+
const i = M.value;
|
|
2963
2965
|
return i.maxWidth === "auto" ? {} : {
|
|
2964
2966
|
maxWidth: i.maxWidth
|
|
2965
2967
|
};
|
|
2966
2968
|
}), pa = a(() => {
|
|
2967
|
-
const i =
|
|
2969
|
+
const i = M.value;
|
|
2968
2970
|
return i.minHeight === "auto" ? {} : {
|
|
2969
2971
|
minHeight: i.minHeight
|
|
2970
2972
|
};
|
|
2971
|
-
}),
|
|
2972
|
-
const i =
|
|
2973
|
+
}), zt = a(() => {
|
|
2974
|
+
const i = M.value;
|
|
2973
2975
|
return i.maxHeight === "auto" ? {} : {
|
|
2974
2976
|
maxHeight: i.maxHeight
|
|
2975
2977
|
};
|
|
2976
2978
|
}), c = () => {
|
|
2977
|
-
Y.value =
|
|
2978
|
-
},
|
|
2979
|
-
g("clicked");
|
|
2980
|
-
},
|
|
2981
|
-
|
|
2982
|
-
},
|
|
2979
|
+
Y.value = Xe.value;
|
|
2980
|
+
}, A = (i) => {
|
|
2981
|
+
g("clicked", i);
|
|
2982
|
+
}, ie = () => {
|
|
2983
|
+
w.value || M.value.inputReadonly || !fe.value || g("entered", Y.value);
|
|
2984
|
+
}, Ze = async (i) => {
|
|
2983
2985
|
var xe;
|
|
2984
|
-
const
|
|
2985
|
-
g("paste",
|
|
2986
|
-
},
|
|
2986
|
+
const x = ((xe = i.clipboardData) == null ? void 0 : xe.getData("text")) || "";
|
|
2987
|
+
g("paste", x), j.value && i.preventDefault();
|
|
2988
|
+
}, Ot = () => {
|
|
2987
2989
|
let i = Y.value;
|
|
2988
|
-
|
|
2990
|
+
Qe.value && (i = i.trim()), g("current-value", i);
|
|
2989
2991
|
};
|
|
2990
|
-
return re(
|
|
2992
|
+
return re(Xe, (i) => {
|
|
2991
2993
|
i !== Y.value && (Y.value = i);
|
|
2992
2994
|
}, { immediate: !0 }), re(Y, (i) => {
|
|
2993
|
-
|
|
2994
|
-
}), re(
|
|
2995
|
+
Qe.value && (i = i.trim()), g("changed", i);
|
|
2996
|
+
}), re(De, (i) => {
|
|
2995
2997
|
g(i ? "focused" : "blurred");
|
|
2996
2998
|
}), re(Y, () => {
|
|
2997
|
-
|
|
2998
|
-
}, { immediate: !0 }), (i,
|
|
2999
|
+
Ot();
|
|
3000
|
+
}, { immediate: !0 }), (i, x) => u(F) ? (O(), K("div", $a({
|
|
2999
3001
|
key: 0,
|
|
3000
|
-
class: ["nb-wrapper",
|
|
3001
|
-
style: [
|
|
3002
|
+
class: ["nb-wrapper", Wt.value],
|
|
3003
|
+
style: [Re.value, it.value, ut.value],
|
|
3002
3004
|
role: "input"
|
|
3003
3005
|
}, sa.value), [
|
|
3004
|
-
|
|
3005
|
-
id: u(
|
|
3006
|
-
class: Ye(["nb-reset", "component", oa.value, ra.value,
|
|
3006
|
+
Ve("div", {
|
|
3007
|
+
id: u(F),
|
|
3008
|
+
class: Ye(["nb-reset", "component", oa.value, ra.value, N.value]),
|
|
3007
3009
|
style: Ne([ue.value, it.value, ut.value]),
|
|
3008
|
-
onClick:
|
|
3010
|
+
onClick: x[4] || (x[4] = (xe) => A(xe))
|
|
3009
3011
|
}, [
|
|
3010
|
-
u(
|
|
3012
|
+
u(Ae) ? (O(), K("label", {
|
|
3011
3013
|
key: 0,
|
|
3012
3014
|
for: st.value,
|
|
3013
3015
|
class: "component__label",
|
|
3014
3016
|
style: Ne([Gt.value])
|
|
3015
3017
|
}, [
|
|
3016
|
-
jt(
|
|
3017
|
-
e.required ? (O(), K("span", on, "*")) :
|
|
3018
|
-
], 12, nn)) :
|
|
3019
|
-
Pa(
|
|
3020
|
-
"onUpdate:modelValue":
|
|
3018
|
+
jt(Rt(e.label), 1),
|
|
3019
|
+
e.required ? (O(), K("span", on, "*")) : me("", !0)
|
|
3020
|
+
], 12, nn)) : me("", !0),
|
|
3021
|
+
Pa(Ve("textarea", $a({
|
|
3022
|
+
"onUpdate:modelValue": x[0] || (x[0] = (xe) => Y.value = xe),
|
|
3021
3023
|
id: st.value,
|
|
3022
3024
|
name: st.value
|
|
3023
3025
|
}, da.value, {
|
|
3024
3026
|
class: ["component__input", [
|
|
3025
3027
|
ua.value,
|
|
3026
|
-
|
|
3028
|
+
Ft.value
|
|
3027
3029
|
]],
|
|
3028
|
-
placeholder:
|
|
3029
|
-
disabled: u(
|
|
3030
|
+
placeholder: Et.value,
|
|
3031
|
+
disabled: u(w) || u(Be),
|
|
3030
3032
|
required: e.required,
|
|
3031
|
-
readonly: u(
|
|
3033
|
+
readonly: u(Be),
|
|
3032
3034
|
autocomplete: e.inputAutocomplete,
|
|
3033
|
-
tabindex: u(
|
|
3035
|
+
tabindex: u(w) || u(Be) ? -1 : u(Ue),
|
|
3034
3036
|
role: "textbox",
|
|
3035
|
-
style: [ut.value, ca.value, fa.value,
|
|
3036
|
-
onFocus:
|
|
3037
|
-
onBlur:
|
|
3038
|
-
onInput:
|
|
3039
|
-
onKeydown:
|
|
3040
|
-
onPaste:
|
|
3037
|
+
style: [ut.value, ca.value, fa.value, va.value, Kt.value, pa.value, zt.value],
|
|
3038
|
+
onFocus: x[1] || (x[1] = (xe) => De.value = !0),
|
|
3039
|
+
onBlur: x[2] || (x[2] = (xe) => De.value = !1),
|
|
3040
|
+
onInput: Ot,
|
|
3041
|
+
onKeydown: x[3] || (x[3] = na((xe) => !u(w) && u(fe) && ie(), ["enter"])),
|
|
3042
|
+
onPaste: Ze
|
|
3041
3043
|
}), null, 16, rn), [
|
|
3042
|
-
[
|
|
3044
|
+
[hl, Y.value]
|
|
3043
3045
|
])
|
|
3044
3046
|
], 14, ln),
|
|
3045
3047
|
Ut.value ? (O(), K("div", {
|
|
@@ -3047,60 +3049,60 @@ const ln = ["id"], nn = ["for"], on = {
|
|
|
3047
3049
|
class: Ye(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
3048
3050
|
}, [
|
|
3049
3051
|
La(i.$slots, "message", {}, () => [
|
|
3050
|
-
jt(
|
|
3052
|
+
jt(Rt(e.message), 1)
|
|
3051
3053
|
], !0)
|
|
3052
|
-
], 2)) :
|
|
3053
|
-
], 16)) :
|
|
3054
|
+
], 2)) : me("", !0)
|
|
3055
|
+
], 16)) : me("", !0);
|
|
3054
3056
|
}
|
|
3055
|
-
}), sn = /* @__PURE__ */ Oa(un, [["__scopeId", "data-v-
|
|
3057
|
+
}), sn = /* @__PURE__ */ Oa(un, [["__scopeId", "data-v-56d3a040"]]), za = (e) => String(e).padStart(2, "0"), Na = (e) => {
|
|
3056
3058
|
if (!e || !(e instanceof Date))
|
|
3057
3059
|
return null;
|
|
3058
|
-
const
|
|
3059
|
-
return `${
|
|
3060
|
-
}, Fa = (e,
|
|
3060
|
+
const b = e.getFullYear(), g = za(e.getMonth() + 1), h = za(e.getDate()), F = za(e.getHours()), Q = za(e.getMinutes()), fe = za(e.getSeconds());
|
|
3061
|
+
return `${b}-${g}-${h}T${F}:${Q}:${fe}`;
|
|
3062
|
+
}, Fa = (e, b = "Z") => {
|
|
3061
3063
|
if (!e || !(e instanceof Date))
|
|
3062
3064
|
return null;
|
|
3063
3065
|
const g = e.toISOString();
|
|
3064
|
-
return
|
|
3065
|
-
},
|
|
3066
|
-
e.getMonth() ===
|
|
3067
|
-
e.getDate() ===
|
|
3066
|
+
return b === "+00:00" ? g.replace("Z", "+00:00") : g;
|
|
3067
|
+
}, bl = (e, b) => !e || !b ? !1 : e.getFullYear() === b.getFullYear() && // Verificar se o ano é o mesmo
|
|
3068
|
+
e.getMonth() === b.getMonth() && // Verificar se o mês é o mesmo
|
|
3069
|
+
e.getDate() === b.getDate(), ja = (e) => {
|
|
3068
3070
|
if (!e)
|
|
3069
3071
|
return null;
|
|
3070
3072
|
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
3071
|
-
const [g, h,
|
|
3072
|
-
return new Date(g, h - 1,
|
|
3073
|
+
const [g, h, F] = e.split("-").map(Number);
|
|
3074
|
+
return new Date(g, h - 1, F);
|
|
3073
3075
|
}
|
|
3074
|
-
const
|
|
3075
|
-
return isNaN(
|
|
3076
|
-
}, dn = (e,
|
|
3076
|
+
const b = new Date(e);
|
|
3077
|
+
return isNaN(b.getTime()) ? null : b;
|
|
3078
|
+
}, dn = (e, b = {}) => {
|
|
3077
3079
|
const {
|
|
3078
3080
|
inputType: g,
|
|
3079
3081
|
hasSeconds: h = !1,
|
|
3080
|
-
allowRange:
|
|
3082
|
+
allowRange: F = !1,
|
|
3081
3083
|
timezoneFormat: Q = "Z",
|
|
3082
|
-
locale:
|
|
3083
|
-
} =
|
|
3084
|
+
locale: fe = "en-US"
|
|
3085
|
+
} = b;
|
|
3084
3086
|
if (!e || e === "" || e === null || e === void 0)
|
|
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 } :
|
|
3087
|
+
return g === "date" ? { date: null, dateString: null, isoString: null, isoStringLocal: null, day: null } : g === "time" ? { hour: 0, minute: 0, second: void 0, timeString: "" } : g === "datetime-local" ? { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null } : g === "week" ? { weekString: null, weekStartDate: null, weekEndDate: null, weekNumber: null, weekYear: null, isoString: null, isoStringLocal: null } : g === "month" ? { date: null, dateString: null, month: null, year: null, monthName: null, isoString: null, isoStringLocal: null } : F ? { startDate: null, endDate: null, isRange: !0, isoString: null, isoStringLocal: null } : null;
|
|
3086
3088
|
try {
|
|
3087
3089
|
if (g === "date") {
|
|
3088
|
-
const
|
|
3089
|
-
if (!
|
|
3090
|
+
const R = ja(e);
|
|
3091
|
+
if (!R)
|
|
3090
3092
|
return { date: null, dateString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3091
|
-
const
|
|
3092
|
-
|
|
3093
|
-
const
|
|
3094
|
-
return
|
|
3095
|
-
date:
|
|
3093
|
+
const B = /* @__PURE__ */ new Date();
|
|
3094
|
+
B.setHours(0, 0, 0, 0);
|
|
3095
|
+
const C = new Date(R.getTime());
|
|
3096
|
+
return C.setHours(0, 0, 0, 0), {
|
|
3097
|
+
date: C,
|
|
3096
3098
|
dateString: e,
|
|
3097
|
-
isoString: Fa(
|
|
3098
|
-
isoStringLocal: Na(
|
|
3099
|
+
isoString: Fa(C, Q),
|
|
3100
|
+
isoStringLocal: Na(C),
|
|
3099
3101
|
day: {
|
|
3100
|
-
date:
|
|
3101
|
-
fullDate:
|
|
3102
|
+
date: C.getDate(),
|
|
3103
|
+
fullDate: C,
|
|
3102
3104
|
isOtherMonth: !1,
|
|
3103
|
-
isToday:
|
|
3105
|
+
isToday: bl(C, B),
|
|
3104
3106
|
isSelected: !0,
|
|
3105
3107
|
isInRange: !1,
|
|
3106
3108
|
isRangeStart: !1,
|
|
@@ -3110,36 +3112,36 @@ e.getDate() === y.getDate(), ja = (e) => {
|
|
|
3110
3112
|
}
|
|
3111
3113
|
};
|
|
3112
3114
|
} else if (g === "time") {
|
|
3113
|
-
const
|
|
3114
|
-
if (!
|
|
3115
|
+
const R = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, B = e.match(R);
|
|
3116
|
+
if (!B)
|
|
3115
3117
|
return { hour: 0, minute: 0, second: void 0, timeString: "" };
|
|
3116
|
-
const
|
|
3118
|
+
const C = parseInt(B[1], 10), I = parseInt(B[2], 10), ae = B[3] ? parseInt(B[3], 10) : void 0;
|
|
3117
3119
|
return {
|
|
3118
|
-
hour:
|
|
3120
|
+
hour: C,
|
|
3119
3121
|
minute: I,
|
|
3120
3122
|
second: h ? ae : void 0,
|
|
3121
3123
|
timeString: e
|
|
3122
3124
|
};
|
|
3123
3125
|
} else if (g === "datetime-local") {
|
|
3124
|
-
const
|
|
3125
|
-
if (
|
|
3126
|
+
const R = e.split("T");
|
|
3127
|
+
if (R.length !== 2)
|
|
3126
3128
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3127
|
-
const
|
|
3129
|
+
const B = R[0], C = R[1], I = ja(B);
|
|
3128
3130
|
if (!I)
|
|
3129
3131
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3130
|
-
const ae = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, le =
|
|
3132
|
+
const ae = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, le = C.match(ae);
|
|
3131
3133
|
if (!le)
|
|
3132
3134
|
return { date: null, hour: 0, minute: 0, second: void 0, datetimeString: null, isoString: null, isoStringLocal: null, day: null };
|
|
3133
|
-
const X = parseInt(le[1], 10), _ = parseInt(le[2], 10),
|
|
3134
|
-
H.setHours(X, _,
|
|
3135
|
-
const
|
|
3136
|
-
|
|
3135
|
+
const X = parseInt(le[1], 10), _ = parseInt(le[2], 10), w = le[3] ? parseInt(le[3], 10) : void 0, H = new Date(I.getTime());
|
|
3136
|
+
H.setHours(X, _, w || 0, 0);
|
|
3137
|
+
const se = /* @__PURE__ */ new Date();
|
|
3138
|
+
se.setHours(0, 0, 0, 0);
|
|
3137
3139
|
const q = new Date(I.getTime());
|
|
3138
3140
|
return q.setHours(0, 0, 0, 0), {
|
|
3139
3141
|
date: q,
|
|
3140
3142
|
hour: X,
|
|
3141
3143
|
minute: _,
|
|
3142
|
-
second: h ?
|
|
3144
|
+
second: h ? w : void 0,
|
|
3143
3145
|
datetimeString: e,
|
|
3144
3146
|
isoString: Fa(H, Q),
|
|
3145
3147
|
isoStringLocal: Na(H),
|
|
@@ -3147,7 +3149,7 @@ e.getDate() === y.getDate(), ja = (e) => {
|
|
|
3147
3149
|
date: q.getDate(),
|
|
3148
3150
|
fullDate: q,
|
|
3149
3151
|
isOtherMonth: !1,
|
|
3150
|
-
isToday:
|
|
3152
|
+
isToday: bl(q, se),
|
|
3151
3153
|
isSelected: !0,
|
|
3152
3154
|
isInRange: !1,
|
|
3153
3155
|
isRangeStart: !1,
|
|
@@ -3157,57 +3159,57 @@ e.getDate() === y.getDate(), ja = (e) => {
|
|
|
3157
3159
|
}
|
|
3158
3160
|
};
|
|
3159
3161
|
} else if (g === "week") {
|
|
3160
|
-
const
|
|
3161
|
-
if (!
|
|
3162
|
+
const R = /^(\d{4})-W(\d{2})$/, B = e.match(R);
|
|
3163
|
+
if (!B)
|
|
3162
3164
|
return { weekString: null, weekStartDate: null, weekEndDate: null, weekNumber: null, weekYear: null, isoString: null, isoStringLocal: null };
|
|
3163
|
-
const
|
|
3164
|
-
|
|
3165
|
-
const H = new Date(
|
|
3166
|
-
return H.setDate(
|
|
3165
|
+
const C = parseInt(B[1], 10), I = parseInt(B[2], 10), X = (8 - (new Date(C, 0, 4).getDay() || 7)) % 7, _ = new Date(C, 0, 4 + X), w = new Date(_.getTime());
|
|
3166
|
+
w.setDate(_.getDate() + (I - 1) * 7), w.setHours(0, 0, 0, 0);
|
|
3167
|
+
const H = new Date(w.getTime());
|
|
3168
|
+
return H.setDate(w.getDate() + 6), H.setHours(23, 59, 59, 999), {
|
|
3167
3169
|
weekString: e,
|
|
3168
|
-
weekStartDate:
|
|
3170
|
+
weekStartDate: w,
|
|
3169
3171
|
weekEndDate: H,
|
|
3170
3172
|
weekNumber: I,
|
|
3171
|
-
weekYear:
|
|
3172
|
-
isoString: Fa(
|
|
3173
|
-
isoStringLocal: Na(
|
|
3173
|
+
weekYear: C,
|
|
3174
|
+
isoString: Fa(w, Q),
|
|
3175
|
+
isoStringLocal: Na(w)
|
|
3174
3176
|
};
|
|
3175
3177
|
} else if (g === "month") {
|
|
3176
|
-
const
|
|
3177
|
-
if (!
|
|
3178
|
+
const R = /^(\d{4})-(\d{2})$/, B = e.match(R);
|
|
3179
|
+
if (!B)
|
|
3178
3180
|
return { date: null, dateString: null, month: null, year: null, monthName: null, isoString: null, isoStringLocal: null };
|
|
3179
|
-
const
|
|
3181
|
+
const C = parseInt(B[1], 10), I = parseInt(B[2], 10) - 1, ae = new Date(C, I, 1);
|
|
3180
3182
|
ae.setHours(0, 0, 0, 0);
|
|
3181
3183
|
const le = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
3182
3184
|
return {
|
|
3183
3185
|
date: ae,
|
|
3184
|
-
dateString: `${
|
|
3186
|
+
dateString: `${C}-${za(I + 1)}-01`,
|
|
3185
3187
|
month: I,
|
|
3186
|
-
year:
|
|
3188
|
+
year: C,
|
|
3187
3189
|
monthName: le[I],
|
|
3188
3190
|
isoString: Fa(ae, Q),
|
|
3189
3191
|
isoStringLocal: Na(ae)
|
|
3190
3192
|
};
|
|
3191
|
-
} else if (
|
|
3193
|
+
} else if (F && typeof e == "string" && e.startsWith("{"))
|
|
3192
3194
|
try {
|
|
3193
|
-
const
|
|
3194
|
-
if (
|
|
3195
|
-
const
|
|
3196
|
-
return
|
|
3197
|
-
startDate:
|
|
3198
|
-
endDate:
|
|
3195
|
+
const R = JSON.parse(e);
|
|
3196
|
+
if (R && (R.startDate || R.endDate)) {
|
|
3197
|
+
const B = R.startDate ? ja(R.startDate) : null, C = R.endDate ? ja(R.endDate) : null;
|
|
3198
|
+
return B && C ? (B.setHours(0, 0, 0, 0), C.setHours(0, 0, 0, 0), {
|
|
3199
|
+
startDate: B,
|
|
3200
|
+
endDate: C,
|
|
3199
3201
|
isRange: !0,
|
|
3200
3202
|
isoString: {
|
|
3201
|
-
start: Fa(
|
|
3202
|
-
end: Fa(
|
|
3203
|
+
start: Fa(B, Q),
|
|
3204
|
+
end: Fa(C, Q)
|
|
3203
3205
|
},
|
|
3204
3206
|
isoStringLocal: {
|
|
3205
|
-
start: Na(
|
|
3206
|
-
end: Na(
|
|
3207
|
+
start: Na(B),
|
|
3208
|
+
end: Na(C)
|
|
3207
3209
|
}
|
|
3208
3210
|
}) : {
|
|
3209
|
-
startDate:
|
|
3210
|
-
endDate:
|
|
3211
|
+
startDate: B,
|
|
3212
|
+
endDate: C,
|
|
3211
3213
|
isRange: !0,
|
|
3212
3214
|
isoString: null,
|
|
3213
3215
|
isoStringLocal: null
|
|
@@ -3216,8 +3218,8 @@ e.getDate() === y.getDate(), ja = (e) => {
|
|
|
3216
3218
|
} catch {
|
|
3217
3219
|
return { startDate: null, endDate: null, isRange: !0, isoString: null, isoStringLocal: null };
|
|
3218
3220
|
}
|
|
3219
|
-
} catch (
|
|
3220
|
-
console.error("Error building complete data from inputText:",
|
|
3221
|
+
} catch (R) {
|
|
3222
|
+
console.error("Error building complete data from inputText:", R);
|
|
3221
3223
|
}
|
|
3222
3224
|
return null;
|
|
3223
3225
|
};
|
|
@@ -3238,8 +3240,8 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3238
3240
|
type: String,
|
|
3239
3241
|
default: "b",
|
|
3240
3242
|
validator: (e = "b") => {
|
|
3241
|
-
const
|
|
3242
|
-
return ["b", "ib"].includes(
|
|
3243
|
+
const b = e.toLowerCase();
|
|
3244
|
+
return ["b", "ib"].includes(b);
|
|
3243
3245
|
}
|
|
3244
3246
|
},
|
|
3245
3247
|
tabIndex: {
|
|
@@ -3630,7 +3632,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3630
3632
|
calendarEvents: {
|
|
3631
3633
|
type: Array,
|
|
3632
3634
|
default: () => [],
|
|
3633
|
-
validator: (e) => Array.isArray(e) && e.every((
|
|
3635
|
+
validator: (e) => Array.isArray(e) && e.every((b) => b && b.date && (b.color || !0))
|
|
3634
3636
|
},
|
|
3635
3637
|
// Calendar props - Text
|
|
3636
3638
|
calendarSelectMonthText: {
|
|
@@ -3874,114 +3876,114 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3874
3876
|
"date-selected",
|
|
3875
3877
|
"month-changed"
|
|
3876
3878
|
],
|
|
3877
|
-
setup(e, { emit:
|
|
3879
|
+
setup(e, { emit: b }) {
|
|
3878
3880
|
Wa((t) => ({
|
|
3879
|
-
|
|
3880
|
-
"
|
|
3881
|
-
"
|
|
3882
|
-
"
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
"
|
|
3886
|
-
"
|
|
3887
|
-
"
|
|
3888
|
-
"
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
"
|
|
3892
|
-
"
|
|
3893
|
-
|
|
3894
|
-
"
|
|
3895
|
-
"
|
|
3896
|
-
"
|
|
3897
|
-
"
|
|
3898
|
-
"
|
|
3899
|
-
"
|
|
3900
|
-
|
|
3901
|
-
"
|
|
3881
|
+
"78d85593": oa.value,
|
|
3882
|
+
"374885dd": it.value,
|
|
3883
|
+
"2665f604": u(et),
|
|
3884
|
+
"38f2e66d": ia.value,
|
|
3885
|
+
"30b86dff": Ut.value,
|
|
3886
|
+
"7b5311d7": sa.value,
|
|
3887
|
+
"4f31469c": u(te),
|
|
3888
|
+
"968eb830": u(Se),
|
|
3889
|
+
"49b71004": u(V),
|
|
3890
|
+
"3c3b1e8c": Et.value,
|
|
3891
|
+
edd69198: u(D),
|
|
3892
|
+
"78f3cb6a": x.value,
|
|
3893
|
+
"47a32b8e": xe.value,
|
|
3894
|
+
"34f62550": u(gt),
|
|
3895
|
+
"75a0796c": u(Ct),
|
|
3896
|
+
"451ceecc": u(Ae),
|
|
3897
|
+
"76a47714": u(ge),
|
|
3898
|
+
"4137ca2b": Ze.value,
|
|
3899
|
+
"6a7e66f4": ra.value,
|
|
3900
|
+
"2fef0d33": ua.value,
|
|
3901
|
+
"5964df9c": st.value,
|
|
3902
|
+
77103076: Pt.value,
|
|
3903
|
+
"3919e7b8": t.styleButtonColor
|
|
3902
3904
|
}));
|
|
3903
3905
|
const g = Bl(
|
|
3904
3906
|
() => import("@vlalg-nimbus/nb-calendar").then((t) => t.Calendar ? t.Calendar : t.default && t.default.Calendar ? t.default.Calendar : t.default)
|
|
3905
3907
|
);
|
|
3906
3908
|
Aa(() => {
|
|
3907
|
-
|
|
3909
|
+
L.value = S.value;
|
|
3908
3910
|
}), Ya(() => {
|
|
3909
|
-
|
|
3911
|
+
Zt();
|
|
3910
3912
|
});
|
|
3911
|
-
const h =
|
|
3913
|
+
const h = b, F = e, {
|
|
3912
3914
|
nbId: Q,
|
|
3913
|
-
display:
|
|
3914
|
-
hasTabIndexEnter:
|
|
3915
|
-
ariaLabel:
|
|
3916
|
-
ariaAttrs:
|
|
3915
|
+
display: fe,
|
|
3916
|
+
hasTabIndexEnter: R,
|
|
3917
|
+
ariaLabel: B,
|
|
3918
|
+
ariaAttrs: C,
|
|
3917
3919
|
caretColor: I,
|
|
3918
3920
|
selectionBgColor: ae,
|
|
3919
3921
|
selectionTextColor: le,
|
|
3920
3922
|
hasBorderRadius: X,
|
|
3921
3923
|
borderRadius: _,
|
|
3922
|
-
disabled:
|
|
3924
|
+
disabled: w,
|
|
3923
3925
|
fontFamily: H,
|
|
3924
|
-
fontSize:
|
|
3926
|
+
fontSize: se,
|
|
3925
3927
|
fontWeight: q,
|
|
3926
3928
|
fontFamilyMsg: Fe,
|
|
3927
|
-
fontSizeMsg:
|
|
3929
|
+
fontSizeMsg: he,
|
|
3928
3930
|
fontWeightMsg: ee,
|
|
3929
|
-
textMessageColor:
|
|
3930
|
-
inputWidth:
|
|
3931
|
-
inputStyle:
|
|
3932
|
-
activeTextStyle:
|
|
3933
|
-
sizeMediaQuery:
|
|
3931
|
+
textMessageColor: Te,
|
|
3932
|
+
inputWidth: ve,
|
|
3933
|
+
inputStyle: we,
|
|
3934
|
+
activeTextStyle: ke,
|
|
3935
|
+
sizeMediaQuery: Be,
|
|
3934
3936
|
inputReadonly: j,
|
|
3935
|
-
blockPaste:
|
|
3937
|
+
blockPaste: Qe,
|
|
3936
3938
|
inputType: v,
|
|
3937
|
-
hasTrim:
|
|
3939
|
+
hasTrim: de,
|
|
3938
3940
|
inputUppercase: Oe,
|
|
3939
|
-
inputName:
|
|
3941
|
+
inputName: Xe,
|
|
3940
3942
|
inputText: S,
|
|
3941
3943
|
min: Ue,
|
|
3942
|
-
max:
|
|
3944
|
+
max: pe,
|
|
3943
3945
|
step: vt,
|
|
3944
3946
|
hasSeconds: ht,
|
|
3945
3947
|
locale: ot,
|
|
3946
3948
|
theme: ze,
|
|
3947
|
-
allowRange:
|
|
3948
|
-
calendarZIndex:
|
|
3949
|
+
allowRange: Le,
|
|
3950
|
+
calendarZIndex: Lt,
|
|
3949
3951
|
calendarWidth: pt,
|
|
3950
3952
|
blockClicksWithoutEvents: St,
|
|
3951
|
-
tabindex:
|
|
3952
|
-
lightBgColor:
|
|
3953
|
-
lightBgColorFocus:
|
|
3953
|
+
tabindex: xt,
|
|
3954
|
+
lightBgColor: Ct,
|
|
3955
|
+
lightBgColorFocus: Ae,
|
|
3954
3956
|
lightDisabledBgColor: gt,
|
|
3955
|
-
lightTextColor:
|
|
3957
|
+
lightTextColor: et,
|
|
3956
3958
|
darkBgColor: V,
|
|
3957
|
-
darkBgColorFocus:
|
|
3958
|
-
darkDisabledBgColor:
|
|
3959
|
+
darkBgColorFocus: D,
|
|
3960
|
+
darkDisabledBgColor: Se,
|
|
3959
3961
|
darkTextColor: te,
|
|
3960
|
-
textAlign:
|
|
3961
|
-
showMsg:
|
|
3962
|
+
textAlign: ge,
|
|
3963
|
+
showMsg: tt,
|
|
3962
3964
|
hasMsg: Ge,
|
|
3963
3965
|
showLabel: Ie,
|
|
3964
|
-
label:
|
|
3965
|
-
labelBreakOnActive:
|
|
3966
|
-
labelBackground:
|
|
3967
|
-
labelPadding:
|
|
3968
|
-
labelBorderRadius:
|
|
3966
|
+
label: y,
|
|
3967
|
+
labelBreakOnActive: k,
|
|
3968
|
+
labelBackground: ce,
|
|
3969
|
+
labelPadding: be,
|
|
3970
|
+
labelBorderRadius: ye,
|
|
3969
3971
|
labelLeft: _e,
|
|
3970
3972
|
inputLabelMarginActive: We,
|
|
3971
3973
|
labelActiveTop: Ee,
|
|
3972
3974
|
labelActiveLeft: He,
|
|
3973
3975
|
labelRight: qe,
|
|
3974
3976
|
labelActiveRight: Ke,
|
|
3975
|
-
fontFamilyLabel:
|
|
3977
|
+
fontFamilyLabel: at,
|
|
3976
3978
|
fontSizeLabel: yt,
|
|
3977
|
-
fontSizeLabelActive:
|
|
3978
|
-
fontWeightLabel:
|
|
3979
|
+
fontSizeLabelActive: Mt,
|
|
3980
|
+
fontWeightLabel: Vt,
|
|
3979
3981
|
lightTextColorLabel: bt,
|
|
3980
|
-
lightTextColorLabelActive:
|
|
3981
|
-
darkTextColorLabel:
|
|
3982
|
+
lightTextColorLabelActive: lt,
|
|
3983
|
+
darkTextColorLabel: Nt,
|
|
3982
3984
|
darkTextColorLabelActive: rt,
|
|
3983
|
-
required:
|
|
3984
|
-
} = Ea(
|
|
3985
|
+
required: Tt
|
|
3986
|
+
} = Ea(F), L = oe(""), E = oe(""), Z = oe(""), Y = oe(""), De = oe(!1), M = oe(!1), Wt = a(() => !pt.value || pt.value < 280 ? 280 : parseInt(pt.value, 10)), Re = a(() => {
|
|
3985
3987
|
if (ht.value !== null)
|
|
3986
3988
|
return ht.value;
|
|
3987
3989
|
if (v.value === "time" || v.value === "datetime-local") {
|
|
@@ -3991,16 +3993,16 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
3991
3993
|
let n = l;
|
|
3992
3994
|
return v.value === "datetime-local" && (n = l.split("T")[1] || "", n = n.split(/[Z+-]/)[0] || ""), n.split(":").length >= 3;
|
|
3993
3995
|
};
|
|
3994
|
-
if (t(
|
|
3996
|
+
if (t(L.value) || t(S.value))
|
|
3995
3997
|
return !0;
|
|
3996
3998
|
}
|
|
3997
3999
|
return !1;
|
|
3998
|
-
}),
|
|
3999
|
-
if (!
|
|
4000
|
+
}), At = a(() => {
|
|
4001
|
+
if (!L.value)
|
|
4000
4002
|
return null;
|
|
4001
|
-
if (
|
|
4003
|
+
if (Le.value && typeof L.value == "string" && L.value.startsWith("{"))
|
|
4002
4004
|
try {
|
|
4003
|
-
const t = JSON.parse(
|
|
4005
|
+
const t = JSON.parse(L.value);
|
|
4004
4006
|
if (t && (t.startDate || t.endDate)) {
|
|
4005
4007
|
const l = (n) => {
|
|
4006
4008
|
if (!n)
|
|
@@ -4018,28 +4020,28 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4018
4020
|
}
|
|
4019
4021
|
} catch {
|
|
4020
4022
|
}
|
|
4021
|
-
if (v.value === "date" && typeof
|
|
4022
|
-
const [t, l, n] =
|
|
4023
|
+
if (v.value === "date" && typeof L.value == "string" && /^\d{4}-\d{2}-\d{2}$/.test(L.value)) {
|
|
4024
|
+
const [t, l, n] = L.value.split("-").map(Number);
|
|
4023
4025
|
return new Date(t, l - 1, n);
|
|
4024
4026
|
}
|
|
4025
|
-
return
|
|
4027
|
+
return L.value;
|
|
4026
4028
|
}), ue = (t, l, n) => {
|
|
4027
4029
|
if (!t)
|
|
4028
4030
|
return "";
|
|
4029
4031
|
const r = n || ot.value;
|
|
4030
4032
|
if (l === "date") {
|
|
4031
|
-
if (
|
|
4033
|
+
if (Le.value && typeof t == "string" && t.startsWith("{"))
|
|
4032
4034
|
try {
|
|
4033
4035
|
const s = JSON.parse(t);
|
|
4034
4036
|
if (s && (s.startDate || s.endDate)) {
|
|
4035
|
-
const d = (
|
|
4036
|
-
if (!
|
|
4037
|
+
const d = (T) => {
|
|
4038
|
+
if (!T)
|
|
4037
4039
|
return "";
|
|
4038
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
4039
|
-
const [
|
|
4040
|
-
return r === "pt-BR" ? `${J}/${W}/${
|
|
4040
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(T)) {
|
|
4041
|
+
const [$, W, J] = T.split("-");
|
|
4042
|
+
return r === "pt-BR" ? `${J}/${W}/${$}` : `${W}/${J}/${$}`;
|
|
4041
4043
|
}
|
|
4042
|
-
return
|
|
4044
|
+
return T;
|
|
4043
4045
|
}, f = d(s.startDate), p = d(s.endDate);
|
|
4044
4046
|
if (f && p)
|
|
4045
4047
|
return `${f} - ${p}`;
|
|
@@ -4058,8 +4060,8 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4058
4060
|
if (/^(\d{4}-\d{2}-\d{2})(T\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})?)?$/.test(t) && t.includes("T")) {
|
|
4059
4061
|
const d = new Date(t);
|
|
4060
4062
|
if (!isNaN(d.getTime())) {
|
|
4061
|
-
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"),
|
|
4062
|
-
return r === "pt-BR" ? `${
|
|
4063
|
+
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"), T = String(d.getDate()).padStart(2, "0");
|
|
4064
|
+
return r === "pt-BR" ? `${T}/${p}/${f}` : `${p}/${T}/${f}`;
|
|
4063
4065
|
}
|
|
4064
4066
|
}
|
|
4065
4067
|
} else if (t instanceof Date && !isNaN(t.getTime())) {
|
|
@@ -4070,14 +4072,14 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4070
4072
|
} else if (l === "datetime-local") {
|
|
4071
4073
|
if (typeof t == "string") {
|
|
4072
4074
|
if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/.test(t)) {
|
|
4073
|
-
const [d, f] = t.split("T"), [p,
|
|
4074
|
-
return r === "pt-BR" ? `${
|
|
4075
|
+
const [d, f] = t.split("T"), [p, T, $] = d.split("-");
|
|
4076
|
+
return r === "pt-BR" ? `${$}/${T}/${p} ${f}` : `${T}/${$}/${p} ${f}`;
|
|
4075
4077
|
}
|
|
4076
4078
|
if (/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)(?:Z|[+-]\d{2}:\d{2})?$/.test(t)) {
|
|
4077
4079
|
const d = new Date(t);
|
|
4078
4080
|
if (!isNaN(d.getTime())) {
|
|
4079
|
-
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"),
|
|
4080
|
-
return r === "pt-BR" ? `${
|
|
4081
|
+
const f = d.getFullYear(), p = String(d.getMonth() + 1).padStart(2, "0"), T = String(d.getDate()).padStart(2, "0"), $ = String(d.getHours()).padStart(2, "0"), W = String(d.getMinutes()).padStart(2, "0"), J = String(d.getSeconds()).padStart(2, "0");
|
|
4082
|
+
return r === "pt-BR" ? `${T}/${p}/${f} ${$}:${W}:${J}` : `${p}/${T}/${f} ${$}:${W}:${J}`;
|
|
4081
4083
|
}
|
|
4082
4084
|
}
|
|
4083
4085
|
}
|
|
@@ -4102,33 +4104,33 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4102
4104
|
return "";
|
|
4103
4105
|
const r = t.trim(), s = n || ot.value;
|
|
4104
4106
|
if (l === "date") {
|
|
4105
|
-
if (
|
|
4106
|
-
const d = r.split(/\s*-\s*/).map((
|
|
4107
|
-
if (
|
|
4107
|
+
if (Le.value && r.includes("-")) {
|
|
4108
|
+
const d = r.split(/\s*-\s*/).map(($) => $.trim()), f = ($) => {
|
|
4109
|
+
if (!$)
|
|
4108
4110
|
return null;
|
|
4109
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(
|
|
4110
|
-
const W =
|
|
4111
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test($)) {
|
|
4112
|
+
const W = $.split("/");
|
|
4111
4113
|
if (s === "pt-BR") {
|
|
4112
|
-
const [J, Me, ft] = W, Pe = J.padStart(2, "0"),
|
|
4113
|
-
return `${ft}-${
|
|
4114
|
+
const [J, Me, ft] = W, Pe = J.padStart(2, "0"), Je = Me.padStart(2, "0");
|
|
4115
|
+
return `${ft}-${Je}-${Pe}`;
|
|
4114
4116
|
} else {
|
|
4115
|
-
const [J, Me, ft] = W, Pe = Me.padStart(2, "0"),
|
|
4116
|
-
return `${ft}-${
|
|
4117
|
+
const [J, Me, ft] = W, Pe = Me.padStart(2, "0"), Je = J.padStart(2, "0");
|
|
4118
|
+
return `${ft}-${Je}-${Pe}`;
|
|
4117
4119
|
}
|
|
4118
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
4119
|
-
const W =
|
|
4120
|
-
return `${J}-${
|
|
4120
|
+
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test($)) {
|
|
4121
|
+
const W = $.split("-"), [J, Me, ft] = W, Pe = ft.padStart(2, "0"), Je = Me.padStart(2, "0");
|
|
4122
|
+
return `${J}-${Je}-${Pe}`;
|
|
4121
4123
|
}
|
|
4122
4124
|
return null;
|
|
4123
4125
|
};
|
|
4124
|
-
let p = f(d[0]),
|
|
4125
|
-
if (p &&
|
|
4126
|
-
const
|
|
4127
|
-
if (new Date(
|
|
4126
|
+
let p = f(d[0]), T = d[1] ? f(d[1]) : null;
|
|
4127
|
+
if (p && T) {
|
|
4128
|
+
const $ = new Date(p);
|
|
4129
|
+
if (new Date(T) < $) {
|
|
4128
4130
|
const J = p;
|
|
4129
|
-
p =
|
|
4131
|
+
p = T, T = J;
|
|
4130
4132
|
}
|
|
4131
|
-
return JSON.stringify({ startDate: p, endDate:
|
|
4133
|
+
return JSON.stringify({ startDate: p, endDate: T });
|
|
4132
4134
|
} else if (p)
|
|
4133
4135
|
return JSON.stringify({ startDate: p, endDate: null });
|
|
4134
4136
|
return "";
|
|
@@ -4136,30 +4138,30 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4136
4138
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(r)) {
|
|
4137
4139
|
const d = r.split("/");
|
|
4138
4140
|
if (s === "pt-BR") {
|
|
4139
|
-
const [f, p,
|
|
4140
|
-
return `${
|
|
4141
|
+
const [f, p, T] = d, $ = f.padStart(2, "0"), W = p.padStart(2, "0");
|
|
4142
|
+
return `${T}-${W}-${$}`;
|
|
4141
4143
|
} else {
|
|
4142
|
-
const [f, p,
|
|
4143
|
-
return `${
|
|
4144
|
+
const [f, p, T] = d, $ = p.padStart(2, "0"), W = f.padStart(2, "0");
|
|
4145
|
+
return `${T}-${W}-${$}`;
|
|
4144
4146
|
}
|
|
4145
4147
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)) {
|
|
4146
|
-
const d = r.split("-"), [f, p,
|
|
4147
|
-
return `${f}-${W}-${
|
|
4148
|
+
const d = r.split("-"), [f, p, T] = d, $ = T.padStart(2, "0"), W = p.padStart(2, "0");
|
|
4149
|
+
return `${f}-${W}-${$}`;
|
|
4148
4150
|
}
|
|
4149
4151
|
return "";
|
|
4150
4152
|
} else if (l === "datetime-local") {
|
|
4151
4153
|
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(r)) {
|
|
4152
4154
|
const [d, f] = r.split(" "), p = d.split("/");
|
|
4153
4155
|
if (s === "pt-BR") {
|
|
4154
|
-
const [
|
|
4156
|
+
const [T, $, W] = p, J = T.padStart(2, "0"), Me = $.padStart(2, "0"), Pe = f.split(":").map((Je) => Je.padStart(2, "0")).join(":");
|
|
4155
4157
|
return `${W}-${Me}-${J}T${Pe}`;
|
|
4156
4158
|
} else {
|
|
4157
|
-
const [
|
|
4159
|
+
const [T, $, W] = p, J = $.padStart(2, "0"), Me = T.padStart(2, "0"), Pe = f.split(":").map((Je) => Je.padStart(2, "0")).join(":");
|
|
4158
4160
|
return `${W}-${Me}-${J}T${Pe}`;
|
|
4159
4161
|
}
|
|
4160
4162
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(r)) {
|
|
4161
|
-
const [d, f] = r.split("T"), p = d.split("-"), [
|
|
4162
|
-
return `${
|
|
4163
|
+
const [d, f] = r.split("T"), p = d.split("-"), [T, $, W] = p, J = W.padStart(2, "0"), Me = $.padStart(2, "0"), Pe = f.split(":").map((Je) => Je.padStart(2, "0")).join(":");
|
|
4164
|
+
return `${T}-${Me}-${J}T${Pe}`;
|
|
4163
4165
|
}
|
|
4164
4166
|
return "";
|
|
4165
4167
|
} else if (l === "month") {
|
|
@@ -4181,14 +4183,14 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4181
4183
|
return f ? `${f[2]}-W${f[1]}` : "";
|
|
4182
4184
|
}
|
|
4183
4185
|
return r;
|
|
4184
|
-
}, ne = oe(!1),
|
|
4185
|
-
const t =
|
|
4186
|
+
}, 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(() => {
|
|
4187
|
+
const t = w.value ? "component-disabled" : "", l = fe.value !== "b" ? "inline-block" : "block", n = I.value ? I.value : "", r = ae.value ? ae.value : "", s = le.value ? le.value : "", d = X.value ? X.value : !1, f = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, p = H.value ? H.value : "'Lato', sans-serif", T = se.value ? se.value : "1.4em", $ = q.value !== 0 && !q.value || q.value < 0 ? 100 : q.value, W = Fe.value ? Fe.value : "'Lato', sans-serif", J = he.value ? he.value : "1em", Me = ee.value !== 0 && !ee.value || ee.value < 0 ? 100 : ee.value, ft = Te.value ? Te.value : "#f15574", Pe = ve.value ? ve.value : 200, Je = ke.value ? ke.value : "normal", Ua = "sm", Ga = j.value ? j.value : !1, Ka = v.value ? v.value : "date", Za = Oe.value ? Oe.value : !1, Ja = ze.value ? ze.value : "normal", Qa = ge.value ? ge.value : "left", Xa = we.value ? we.value : "background", el = Ie.value ? Ie.value : !1, tl = _e.value !== 0 && !_e.value || _e.value < 0 ? 5 : _e.value, al = ce.value ? ce.value : "transparent", ll = We.value !== 0 && !We.value || We.value < 0 ? 15 : We.value, nl = be.value ? be.value : "1px 5px", ol = ye.value !== 0 && !ye.value || ye.value < 0 ? 0 : ye.value, rl = Ee.value === null || Ee.value === void 0 ? -13 : Ee.value, ul = He.value === null || He.value === void 0 ? 5 : He.value, il = qe.value === null || qe.value === void 0 ? 0 : qe.value, sl = Ke.value === null || Ke.value === void 0 ? 0 : Ke.value, dl = at.value ? at.value : "'Lato', sans-serif", cl = yt.value ? yt.value : "1em", fl = Mt.value ? Mt.value : "0.8em", vl = Vt.value ? Vt.value : 400, Sl = bt.value ? bt.value : "#ffffff", xl = Nt.value ? Nt.value : "#000000", Cl = lt.value ? lt.value : "#ffffff", Vl = rt.value ? rt.value : "#000000";
|
|
4186
4188
|
return {
|
|
4187
4189
|
disabled: t,
|
|
4188
4190
|
display: l,
|
|
4189
4191
|
font: p,
|
|
4190
|
-
fontSize:
|
|
4191
|
-
fontWeight:
|
|
4192
|
+
fontSize: T,
|
|
4193
|
+
fontWeight: $,
|
|
4192
4194
|
fontFamilyMsg: W,
|
|
4193
4195
|
fontSizeMsg: J,
|
|
4194
4196
|
fontWeightMsg: Me,
|
|
@@ -4200,7 +4202,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4200
4202
|
borderRadius: f,
|
|
4201
4203
|
textAlign: Qa,
|
|
4202
4204
|
inputWidth: Pe,
|
|
4203
|
-
activeTextStyle:
|
|
4205
|
+
activeTextStyle: Je,
|
|
4204
4206
|
sizeMediaQuery: Ua,
|
|
4205
4207
|
inputReadonly: Ga,
|
|
4206
4208
|
inputType: Ka,
|
|
@@ -4220,14 +4222,14 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4220
4222
|
fontFamilyLabel: dl,
|
|
4221
4223
|
fontSizeLabel: cl,
|
|
4222
4224
|
fontSizeLabelActive: fl,
|
|
4223
|
-
fontWeightLabel:
|
|
4225
|
+
fontWeightLabel: vl,
|
|
4224
4226
|
lightTextColorLabel: Sl,
|
|
4225
4227
|
darkTextColorLabel: xl,
|
|
4226
4228
|
lightTextColorLabelActive: Cl,
|
|
4227
4229
|
darkTextColorLabelActive: Vl
|
|
4228
4230
|
};
|
|
4229
|
-
}),
|
|
4230
|
-
const t = G.value, l =
|
|
4231
|
+
}), kt = a(() => G.value.disabled), wt = a(() => {
|
|
4232
|
+
const t = G.value, l = A.value;
|
|
4231
4233
|
return {
|
|
4232
4234
|
display: t.display,
|
|
4233
4235
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
@@ -4239,16 +4241,16 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4239
4241
|
}), it = a(() => {
|
|
4240
4242
|
const t = G.value;
|
|
4241
4243
|
return t.fontSize ? t.fontSize : "1.4em";
|
|
4242
|
-
}),
|
|
4243
|
-
const t = G.value, l =
|
|
4244
|
+
}), N = a(() => {
|
|
4245
|
+
const t = G.value, l = A.value;
|
|
4244
4246
|
return {
|
|
4245
4247
|
fontWeight: t.fontWeight,
|
|
4246
4248
|
marginTop: l && Ie.value ? `${t.inputLabelMarginActive}px` : "0"
|
|
4247
4249
|
};
|
|
4248
|
-
}),
|
|
4250
|
+
}), Ft = a(() => {
|
|
4249
4251
|
const t = G.value;
|
|
4250
4252
|
return t.inputStyle !== "line" && t.hasBorderRadius ? { borderRadius: `${t.borderRadius}rem` } : {};
|
|
4251
|
-
}), oa = a(() => G.value.font), ra = a(() => G.value.fontFamilyMsg), ua = a(() => G.value.fontSizeMsg), st = a(() => G.value.fontWeightMsg),
|
|
4253
|
+
}), 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
4254
|
const t = G.value;
|
|
4253
4255
|
return t.caretColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
4254
4256
|
}), Ut = a(() => {
|
|
@@ -4263,7 +4265,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4263
4265
|
width: `${t.inputWidth}px`
|
|
4264
4266
|
};
|
|
4265
4267
|
}), da = a(() => {
|
|
4266
|
-
switch (
|
|
4268
|
+
switch (we.value) {
|
|
4267
4269
|
case "line":
|
|
4268
4270
|
return "component__input--line";
|
|
4269
4271
|
case "border":
|
|
@@ -4280,34 +4282,34 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4280
4282
|
default:
|
|
4281
4283
|
return "component__input--active--normal";
|
|
4282
4284
|
}
|
|
4283
|
-
}), fa = a(() => "component__sm"),
|
|
4285
|
+
}), fa = a(() => "component__sm"), va = a(() => {
|
|
4284
4286
|
switch (G.value.theme) {
|
|
4285
4287
|
case "dark":
|
|
4286
4288
|
return "component__theme--dark";
|
|
4287
4289
|
default:
|
|
4288
4290
|
return "component__theme--light";
|
|
4289
4291
|
}
|
|
4290
|
-
}),
|
|
4291
|
-
a(() =>
|
|
4292
|
-
const
|
|
4292
|
+
}), Kt = a(() => G.value.inputReadonly ? "component__input--read-only" : ""), pa = a(() => G.value.inputUppercase ? "component__input--uppercase" : ""), zt = a(() => Xe.value ? Xe.value : `${Q.value}-name-label`), c = a(() => ""), A = a(() => De.value || E.value && E.value.trim().length > 0), ie = a(() => !E.value || E.value.trim().length === 0 ? "component__input--empty" : "");
|
|
4293
|
+
a(() => De.value ? "component__input--active" : "component__input--no-active");
|
|
4294
|
+
const Ze = a(() => "6px 10px"), Ot = a(() => !!(tt.value && Ge.value)), i = a(() => {
|
|
4293
4295
|
const t = {};
|
|
4294
|
-
|
|
4296
|
+
C.value && Object.keys(C.value).forEach((r) => t[`aria-${r}`] = C.value[r]);
|
|
4295
4297
|
const l = {
|
|
4296
|
-
"aria-label":
|
|
4297
|
-
"aria-disabled":
|
|
4298
|
+
"aria-label": B.value,
|
|
4299
|
+
"aria-disabled": w.value,
|
|
4298
4300
|
...t
|
|
4299
4301
|
};
|
|
4300
4302
|
return Object.fromEntries(
|
|
4301
4303
|
Object.entries(l).filter(([n, r]) => r != null)
|
|
4302
4304
|
);
|
|
4303
|
-
}),
|
|
4304
|
-
const t = ze.value === "dark" ? V.value :
|
|
4305
|
+
}), x = a(() => {
|
|
4306
|
+
const t = ze.value === "dark" ? V.value : Ct.value, l = ze.value === "dark" ? te.value : et.value;
|
|
4305
4307
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
4306
4308
|
}), xe = a(() => {
|
|
4307
|
-
const t = ze.value === "dark" ?
|
|
4309
|
+
const t = ze.value === "dark" ? D.value : Ae.value, l = ze.value === "dark" ? te.value : et.value;
|
|
4308
4310
|
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
4309
|
-
}),
|
|
4310
|
-
const t = G.value, l =
|
|
4311
|
+
}), je = a(() => {
|
|
4312
|
+
const t = G.value, l = A.value, n = l ? t.lightTextColorLabelActive : t.lightTextColorLabel, r = l ? t.darkTextColorLabelActive : t.darkTextColorLabel;
|
|
4311
4313
|
return {
|
|
4312
4314
|
fontFamily: t.fontFamilyLabel,
|
|
4313
4315
|
fontSize: l ? t.fontSizeLabelActive : t.fontSizeLabel,
|
|
@@ -4324,12 +4326,12 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4324
4326
|
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
4325
4327
|
...l ? {
|
|
4326
4328
|
width: "fit-content",
|
|
4327
|
-
whiteSpace:
|
|
4328
|
-
wordWrap:
|
|
4329
|
-
overflowWrap:
|
|
4329
|
+
whiteSpace: k.value ? "nowrap" : "normal",
|
|
4330
|
+
wordWrap: k.value ? "normal" : "break-word",
|
|
4331
|
+
overflowWrap: k.value ? "normal" : "break-word",
|
|
4330
4332
|
maxWidth: "100%",
|
|
4331
|
-
textOverflow:
|
|
4332
|
-
overflow:
|
|
4333
|
+
textOverflow: k.value ? "ellipsis" : "clip",
|
|
4334
|
+
overflow: k.value ? "hidden" : "visible"
|
|
4333
4335
|
} : {}
|
|
4334
4336
|
};
|
|
4335
4337
|
});
|
|
@@ -4337,36 +4339,36 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4337
4339
|
const t = G.value;
|
|
4338
4340
|
return t.theme === "dark" ? t.darkTextColorLabelActive : t.lightTextColorLabelActive;
|
|
4339
4341
|
});
|
|
4340
|
-
const
|
|
4341
|
-
|
|
4342
|
-
}, ga = () => {
|
|
4343
|
-
h("clicked");
|
|
4342
|
+
const Zt = () => {
|
|
4343
|
+
L.value = S.value, Y.value = v.value;
|
|
4344
|
+
}, ga = (t) => {
|
|
4345
|
+
h("clicked", t);
|
|
4344
4346
|
}, ya = (t) => {
|
|
4345
|
-
t.stopPropagation(), !(
|
|
4346
|
-
|
|
4347
|
+
t.stopPropagation(), !(w.value || G.value.inputReadonly) && P.value && (P.value.focus(), z.value && (ne.value = !1, requestAnimationFrame(() => {
|
|
4348
|
+
Dt(), ne.value = !0;
|
|
4347
4349
|
})));
|
|
4348
4350
|
}, ba = () => {
|
|
4349
|
-
|
|
4351
|
+
w.value || G.value.inputReadonly || !R.value || h("entered", L.value);
|
|
4350
4352
|
}, ma = async (t) => {
|
|
4351
4353
|
var n;
|
|
4352
4354
|
const l = ((n = t.clipboardData) == null ? void 0 : n.getData("text")) || "";
|
|
4353
|
-
h("paste", l),
|
|
4354
|
-
},
|
|
4355
|
+
h("paste", l), Qe.value && t.preventDefault();
|
|
4356
|
+
}, Dt = () => {
|
|
4355
4357
|
P.value && la(() => {
|
|
4356
4358
|
const t = P.value.getBoundingClientRect(), l = 4;
|
|
4357
|
-
|
|
4359
|
+
$t.value = {
|
|
4358
4360
|
top: `${t.bottom + l}px`,
|
|
4359
4361
|
left: `${t.left}px`
|
|
4360
4362
|
};
|
|
4361
4363
|
});
|
|
4362
4364
|
}, ha = a(() => ({
|
|
4363
4365
|
position: "fixed",
|
|
4364
|
-
top:
|
|
4365
|
-
left:
|
|
4366
|
-
zIndex:
|
|
4366
|
+
top: $t.value.top,
|
|
4367
|
+
left: $t.value.left,
|
|
4368
|
+
zIndex: Lt.value
|
|
4367
4369
|
})), Sa = () => {
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
+
De.value = !0, h("focused"), z.value && (ne.value = !1, requestAnimationFrame(() => {
|
|
4371
|
+
Dt(), ne.value = !0;
|
|
4370
4372
|
}));
|
|
4371
4373
|
}, xa = (t) => {
|
|
4372
4374
|
t.relatedTarget && U.value && U.value.contains(t.relatedTarget) || setTimeout(() => {
|
|
@@ -4382,11 +4384,11 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4382
4384
|
}
|
|
4383
4385
|
}
|
|
4384
4386
|
const n = (r = P.value) == null ? void 0 : r.closest(".component");
|
|
4385
|
-
n && n.contains(l) || P.value !== l && (
|
|
4387
|
+
n && n.contains(l) || P.value !== l && (De.value = !1, ne.value = !1, h("blurred"));
|
|
4386
4388
|
}, 200);
|
|
4387
4389
|
}, Ca = () => {
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
+
z.value && (ne.value, ne.value = !1, requestAnimationFrame(() => {
|
|
4391
|
+
Dt(), ne.value = !0;
|
|
4390
4392
|
}));
|
|
4391
4393
|
}, dt = (t) => {
|
|
4392
4394
|
if (!t || !(t instanceof Date))
|
|
@@ -4409,7 +4411,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4409
4411
|
}
|
|
4410
4412
|
}
|
|
4411
4413
|
return "";
|
|
4412
|
-
},
|
|
4414
|
+
}, Jt = (t) => {
|
|
4413
4415
|
if (!t)
|
|
4414
4416
|
return null;
|
|
4415
4417
|
if (t instanceof Date) {
|
|
@@ -4426,7 +4428,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4426
4428
|
return l.setHours(0, 0, 0, 0), l;
|
|
4427
4429
|
}
|
|
4428
4430
|
return null;
|
|
4429
|
-
},
|
|
4431
|
+
}, Qt = (t) => {
|
|
4430
4432
|
if (!t)
|
|
4431
4433
|
return null;
|
|
4432
4434
|
if (t instanceof Date && !isNaN(t.getTime())) {
|
|
@@ -4464,27 +4466,27 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4464
4466
|
return !0;
|
|
4465
4467
|
if (!l || isNaN(l.getTime()))
|
|
4466
4468
|
return !0;
|
|
4467
|
-
const n =
|
|
4469
|
+
const n = Jt(Ue.value);
|
|
4468
4470
|
if (n) {
|
|
4469
4471
|
const s = new Date(n.getTime());
|
|
4470
4472
|
if (s.setHours(0, 0, 0, 0), l < s)
|
|
4471
4473
|
return !0;
|
|
4472
4474
|
}
|
|
4473
|
-
const r =
|
|
4475
|
+
const r = Jt(pe.value);
|
|
4474
4476
|
if (r) {
|
|
4475
4477
|
const s = new Date(r.getTime());
|
|
4476
4478
|
if (s.setHours(0, 0, 0, 0), l > s)
|
|
4477
4479
|
return !0;
|
|
4478
4480
|
}
|
|
4479
4481
|
return !1;
|
|
4480
|
-
},
|
|
4481
|
-
const r = t * 3600 + l * 60 + n, s =
|
|
4482
|
+
}, Xt = (t, l, n = 0) => {
|
|
4483
|
+
const r = t * 3600 + l * 60 + n, s = Qt(Ue.value);
|
|
4482
4484
|
if (s) {
|
|
4483
4485
|
const f = s.hour * 3600 + s.minute * 60 + (s.second || 0);
|
|
4484
4486
|
if (r < f)
|
|
4485
4487
|
return !0;
|
|
4486
4488
|
}
|
|
4487
|
-
const d =
|
|
4489
|
+
const d = Qt(pe.value);
|
|
4488
4490
|
if (d) {
|
|
4489
4491
|
const f = d.hour * 3600 + d.minute * 60 + (d.second || 0);
|
|
4490
4492
|
if (r > f)
|
|
@@ -4523,10 +4525,10 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4523
4525
|
return n >= 1900 && n <= 2100 && r >= 1 && r <= 53;
|
|
4524
4526
|
}
|
|
4525
4527
|
return !1;
|
|
4526
|
-
},
|
|
4528
|
+
}, Bt = () => {
|
|
4527
4529
|
let t = !0;
|
|
4528
4530
|
if (S.value === null || S.value === void 0 || S.value === "") {
|
|
4529
|
-
t = !
|
|
4531
|
+
t = !Tt.value, h("valid", t);
|
|
4530
4532
|
return;
|
|
4531
4533
|
}
|
|
4532
4534
|
if (v.value === "date") {
|
|
@@ -4552,7 +4554,7 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4552
4554
|
const n = S.value.split(":");
|
|
4553
4555
|
if (n.length >= 2) {
|
|
4554
4556
|
const r = parseInt(n[0], 10) || 0, s = parseInt(n[1], 10) || 0, d = n[2] ? parseInt(n[2], 10) : 0;
|
|
4555
|
-
t = !
|
|
4557
|
+
t = !Xt(r, s, d);
|
|
4556
4558
|
}
|
|
4557
4559
|
} else if (v.value === "datetime-local") {
|
|
4558
4560
|
if (S.value, typeof S.value == "string") {
|
|
@@ -4572,14 +4574,14 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4572
4574
|
h("valid", !1);
|
|
4573
4575
|
return;
|
|
4574
4576
|
}
|
|
4575
|
-
if (
|
|
4576
|
-
const n =
|
|
4577
|
+
if (L.value) {
|
|
4578
|
+
const n = L.value.split("T");
|
|
4577
4579
|
if (n.length === 2) {
|
|
4578
4580
|
const r = n[0], s = n[1], d = !Ht(r), f = s.split(":");
|
|
4579
4581
|
let p = !0;
|
|
4580
4582
|
if (f.length >= 2) {
|
|
4581
|
-
const
|
|
4582
|
-
p = !
|
|
4583
|
+
const T = parseInt(f[0], 10) || 0, $ = parseInt(f[1], 10) || 0, W = f[2] ? parseInt(f[2], 10) : 0;
|
|
4584
|
+
p = !Xt(T, $, W);
|
|
4583
4585
|
}
|
|
4584
4586
|
t = d && p;
|
|
4585
4587
|
}
|
|
@@ -4619,17 +4621,17 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4619
4621
|
} else if (l === "week")
|
|
4620
4622
|
return dt(t);
|
|
4621
4623
|
return "";
|
|
4622
|
-
},
|
|
4623
|
-
if (!
|
|
4624
|
+
}, ka = a(() => {
|
|
4625
|
+
if (!z.value)
|
|
4624
4626
|
return ea(Ue.value, v.value);
|
|
4625
|
-
}),
|
|
4626
|
-
if (!
|
|
4627
|
-
return ea(
|
|
4628
|
-
}),
|
|
4627
|
+
}), o = a(() => {
|
|
4628
|
+
if (!z.value)
|
|
4629
|
+
return ea(pe.value, v.value);
|
|
4630
|
+
}), m = a(() => !0), Ce = (t) => {
|
|
4629
4631
|
let l = "";
|
|
4630
4632
|
if (!t)
|
|
4631
4633
|
l = "";
|
|
4632
|
-
else if (
|
|
4634
|
+
else if (Le.value && typeof t == "object" && !(t instanceof Date)) {
|
|
4633
4635
|
if (t.startDate === null && t.endDate === null)
|
|
4634
4636
|
l = "";
|
|
4635
4637
|
else if (t.startDate || t.endDate) {
|
|
@@ -4643,40 +4645,40 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4643
4645
|
}
|
|
4644
4646
|
} else
|
|
4645
4647
|
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,
|
|
4648
|
+
mt = !0, L.value = l;
|
|
4647
4649
|
const n = l ? ue(l, v.value) : "";
|
|
4648
4650
|
E.value = n, Z.value = n;
|
|
4649
|
-
},
|
|
4650
|
-
if (!
|
|
4651
|
-
|
|
4651
|
+
}, nt = () => {
|
|
4652
|
+
if (!z.value) {
|
|
4653
|
+
L.value = E.value;
|
|
4652
4654
|
return;
|
|
4653
4655
|
}
|
|
4654
|
-
|
|
4656
|
+
$e = !0;
|
|
4655
4657
|
const t = P.value ? {
|
|
4656
4658
|
start: P.value.selectionStart,
|
|
4657
4659
|
end: P.value.selectionEnd
|
|
4658
4660
|
} : null, l = E.value.trim();
|
|
4659
4661
|
if (!l || l.length === 0) {
|
|
4660
|
-
mt = !0,
|
|
4661
|
-
|
|
4662
|
+
mt = !0, L.value = "", E.value = "", Z.value = "", setTimeout(() => {
|
|
4663
|
+
$e = !1;
|
|
4662
4664
|
}, 50);
|
|
4663
4665
|
return;
|
|
4664
4666
|
}
|
|
4665
4667
|
if (v.value === "date") {
|
|
4666
|
-
const r =
|
|
4667
|
-
if (
|
|
4668
|
+
const r = Le.value ? /^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$|^\d{1,2}\/\d{1,2}\/\d{4}\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})?$/ : /^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/;
|
|
4669
|
+
if (Le.value) {
|
|
4668
4670
|
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/), l.length > 23 && !r.test(l)) {
|
|
4669
4671
|
E.value = Z.value, t && P.value && la(() => {
|
|
4670
4672
|
const s = Math.min(t.start, Z.value.length);
|
|
4671
4673
|
P.value.setSelectionRange(s, s);
|
|
4672
4674
|
}), setTimeout(() => {
|
|
4673
|
-
|
|
4675
|
+
$e = !1;
|
|
4674
4676
|
}, 50);
|
|
4675
4677
|
return;
|
|
4676
4678
|
}
|
|
4677
4679
|
if (!r.test(l) && l.length <= 23) {
|
|
4678
4680
|
setTimeout(() => {
|
|
4679
|
-
|
|
4681
|
+
$e = !1;
|
|
4680
4682
|
}, 50);
|
|
4681
4683
|
return;
|
|
4682
4684
|
}
|
|
@@ -4686,13 +4688,13 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4686
4688
|
const s = Math.min(t.start, Z.value.length);
|
|
4687
4689
|
P.value.setSelectionRange(s, s);
|
|
4688
4690
|
}), setTimeout(() => {
|
|
4689
|
-
|
|
4691
|
+
$e = !1;
|
|
4690
4692
|
}, 50);
|
|
4691
4693
|
return;
|
|
4692
4694
|
}
|
|
4693
4695
|
if (!r.test(l) && l.length <= 10) {
|
|
4694
4696
|
setTimeout(() => {
|
|
4695
|
-
|
|
4697
|
+
$e = !1;
|
|
4696
4698
|
}, 50);
|
|
4697
4699
|
return;
|
|
4698
4700
|
}
|
|
@@ -4700,13 +4702,13 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4700
4702
|
}
|
|
4701
4703
|
let n = null;
|
|
4702
4704
|
if (v.value === "date")
|
|
4703
|
-
if (
|
|
4705
|
+
if (Le.value)
|
|
4704
4706
|
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/))
|
|
4705
|
-
if (n = ut(l, v.value), n && n !==
|
|
4706
|
-
mt = !0,
|
|
4707
|
+
if (n = ut(l, v.value), n && n !== L.value)
|
|
4708
|
+
mt = !0, L.value = n, Z.value = l;
|
|
4707
4709
|
else {
|
|
4708
4710
|
setTimeout(() => {
|
|
4709
|
-
|
|
4711
|
+
$e = !1;
|
|
4710
4712
|
}, 50);
|
|
4711
4713
|
return;
|
|
4712
4714
|
}
|
|
@@ -4716,47 +4718,47 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4716
4718
|
const d = s[1], f = ut(d, v.value);
|
|
4717
4719
|
if (f) {
|
|
4718
4720
|
const p = JSON.stringify({ startDate: f, endDate: null });
|
|
4719
|
-
p !==
|
|
4721
|
+
p !== L.value && (mt = !0, L.value = p, Z.value = l);
|
|
4720
4722
|
} else {
|
|
4721
4723
|
Z.value = l, setTimeout(() => {
|
|
4722
|
-
|
|
4724
|
+
$e = !1;
|
|
4723
4725
|
}, 50);
|
|
4724
4726
|
return;
|
|
4725
4727
|
}
|
|
4726
4728
|
} else {
|
|
4727
4729
|
Z.value = l, setTimeout(() => {
|
|
4728
|
-
|
|
4730
|
+
$e = !1;
|
|
4729
4731
|
}, 50);
|
|
4730
4732
|
return;
|
|
4731
4733
|
}
|
|
4732
4734
|
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
4733
4735
|
if (n = ut(l, v.value), n) {
|
|
4734
4736
|
const d = JSON.stringify({ startDate: n, endDate: null });
|
|
4735
|
-
d !==
|
|
4737
|
+
d !== L.value && (mt = !0, L.value = d, Z.value = l);
|
|
4736
4738
|
} else {
|
|
4737
4739
|
Z.value = l, setTimeout(() => {
|
|
4738
|
-
|
|
4740
|
+
$e = !1;
|
|
4739
4741
|
}, 50);
|
|
4740
4742
|
return;
|
|
4741
4743
|
}
|
|
4742
4744
|
else {
|
|
4743
4745
|
Z.value = l, setTimeout(() => {
|
|
4744
|
-
|
|
4746
|
+
$e = !1;
|
|
4745
4747
|
}, 50);
|
|
4746
4748
|
return;
|
|
4747
4749
|
}
|
|
4748
4750
|
else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
4749
|
-
n = ut(l, v.value), n && n !==
|
|
4751
|
+
n = ut(l, v.value), n && n !== L.value && (mt = !0, L.value = n, Z.value = l);
|
|
4750
4752
|
else {
|
|
4751
4753
|
setTimeout(() => {
|
|
4752
|
-
|
|
4754
|
+
$e = !1;
|
|
4753
4755
|
}, 50);
|
|
4754
4756
|
return;
|
|
4755
4757
|
}
|
|
4756
4758
|
else
|
|
4757
|
-
n = ut(l, v.value), n && n !==
|
|
4759
|
+
n = ut(l, v.value), n && n !== L.value && (mt = !0, L.value = n, Z.value = l);
|
|
4758
4760
|
setTimeout(() => {
|
|
4759
|
-
|
|
4761
|
+
$e = !1;
|
|
4760
4762
|
}, 50);
|
|
4761
4763
|
}, Ba = (t) => {
|
|
4762
4764
|
h("changed-complete", t), h("current-value-complete", t);
|
|
@@ -4784,35 +4786,35 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4784
4786
|
if (!document.body.contains(l))
|
|
4785
4787
|
return;
|
|
4786
4788
|
const d = P.value && (l === P.value || P.value.contains(l)), f = n && (l === n || n.contains(l));
|
|
4787
|
-
!d && !f && (ne.value = !1, (!E.value || E.value.trim().length === 0) && (
|
|
4789
|
+
!d && !f && (ne.value = !1, (!E.value || E.value.trim().length === 0) && (De.value = !1));
|
|
4788
4790
|
}, 50);
|
|
4789
4791
|
}, wa = () => {
|
|
4790
|
-
ne.value &&
|
|
4792
|
+
ne.value && z.value && Dt();
|
|
4791
4793
|
}, Da = () => {
|
|
4792
|
-
ne.value &&
|
|
4794
|
+
ne.value && z.value && (ne.value = !1);
|
|
4793
4795
|
};
|
|
4794
|
-
let
|
|
4796
|
+
let It = null, aa = null, qt = { top: 0, left: 0 };
|
|
4795
4797
|
const Ra = () => {
|
|
4796
|
-
if (!ne.value || !
|
|
4798
|
+
if (!ne.value || !z.value || !P.value)
|
|
4797
4799
|
return;
|
|
4798
4800
|
const t = 4, l = P.value.getBoundingClientRect(), n = `${l.bottom + t}px`, r = `${l.left}px`;
|
|
4799
|
-
(qt.top !== n || qt.left !== r) && (qt.top = n, qt.left = r,
|
|
4801
|
+
(qt.top !== n || qt.left !== r) && (qt.top = n, qt.left = r, $t.value = {
|
|
4800
4802
|
top: n,
|
|
4801
4803
|
left: r
|
|
4802
4804
|
}), aa = requestAnimationFrame(Ra);
|
|
4803
4805
|
}, _a = () => {
|
|
4804
|
-
if (!P.value || !
|
|
4806
|
+
if (!P.value || !z.value)
|
|
4805
4807
|
return;
|
|
4806
|
-
qt = { top: 0, left: 0 }, Ra(),
|
|
4807
|
-
ne.value &&
|
|
4808
|
-
}),
|
|
4808
|
+
qt = { top: 0, left: 0 }, Ra(), It = new ResizeObserver(() => {
|
|
4809
|
+
ne.value && Dt();
|
|
4810
|
+
}), It.observe(P.value);
|
|
4809
4811
|
const t = P.value.closest(".component");
|
|
4810
|
-
t &&
|
|
4812
|
+
t && It.observe(t);
|
|
4811
4813
|
}, Ma = () => {
|
|
4812
|
-
aa !== null && (cancelAnimationFrame(aa), aa = null),
|
|
4814
|
+
aa !== null && (cancelAnimationFrame(aa), aa = null), It && (It.disconnect(), It = null);
|
|
4813
4815
|
};
|
|
4814
4816
|
re(ne, (t) => {
|
|
4815
|
-
t &&
|
|
4817
|
+
t && z.value ? la(() => {
|
|
4816
4818
|
_a();
|
|
4817
4819
|
}) : Ma();
|
|
4818
4820
|
}), Aa(() => {
|
|
@@ -4832,33 +4834,33 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4832
4834
|
if (isNaN(s.getTime()))
|
|
4833
4835
|
t = "";
|
|
4834
4836
|
else {
|
|
4835
|
-
const d = s.getFullYear(), f = String(s.getMonth() + 1).padStart(2, "0"), p = String(s.getDate()).padStart(2, "0"),
|
|
4836
|
-
t = J.includes(":") && J.split(":").length >= 3 ? `${d}-${f}-${p}T${
|
|
4837
|
+
const d = s.getFullYear(), f = String(s.getMonth() + 1).padStart(2, "0"), p = String(s.getDate()).padStart(2, "0"), T = String(s.getHours()).padStart(2, "0"), $ = String(s.getMinutes()).padStart(2, "0"), W = String(s.getSeconds()).padStart(2, "0"), J = ((l = S.value.split("T")[1]) == null ? void 0 : l.split(/[Z+-]/)[0]) || "";
|
|
4838
|
+
t = J.includes(":") && J.split(":").length >= 3 ? `${d}-${f}-${p}T${T}:${$}:${W}` : `${d}-${f}-${p}T${T}:${$}`;
|
|
4837
4839
|
}
|
|
4838
4840
|
} else
|
|
4839
4841
|
t = "";
|
|
4840
4842
|
} else
|
|
4841
4843
|
t = "";
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
+
L.value = t, E.value = ue(S.value, v.value), document.addEventListener("click", ta, !1), window.addEventListener("scroll", wa, { capture: !0, passive: !0 }), window.addEventListener("resize", Da), la(() => {
|
|
4845
|
+
Bt();
|
|
4844
4846
|
});
|
|
4845
4847
|
}), Ya(() => {
|
|
4846
|
-
|
|
4848
|
+
Zt(), Ma(), document.removeEventListener("click", ta), window.removeEventListener("scroll", wa, { capture: !0, passive: !0 }), window.removeEventListener("resize", Da);
|
|
4847
4849
|
}), re(v, (t) => {
|
|
4848
4850
|
Y.value = t;
|
|
4849
4851
|
}, { immediate: !0 }), re(ot, () => {
|
|
4850
|
-
|
|
4852
|
+
L.value && z.value && (E.value = ue(L.value, v.value));
|
|
4851
4853
|
});
|
|
4852
4854
|
const Ha = (t) => dn(t, {
|
|
4853
4855
|
inputType: v.value,
|
|
4854
|
-
hasSeconds:
|
|
4855
|
-
allowRange:
|
|
4856
|
-
timezoneFormat:
|
|
4857
|
-
locale:
|
|
4856
|
+
hasSeconds: F.hasSeconds,
|
|
4857
|
+
allowRange: Le.value,
|
|
4858
|
+
timezoneFormat: F.calendarIsoStringTimezoneFormat,
|
|
4859
|
+
locale: F.calendarLocale
|
|
4858
4860
|
});
|
|
4859
4861
|
re(S, (t) => {
|
|
4860
4862
|
var l;
|
|
4861
|
-
if (t !==
|
|
4863
|
+
if (t !== L.value) {
|
|
4862
4864
|
let n = t;
|
|
4863
4865
|
if (v.value === "date")
|
|
4864
4866
|
n = _t(t);
|
|
@@ -4874,37 +4876,37 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4874
4876
|
if (isNaN(p.getTime()))
|
|
4875
4877
|
n = "";
|
|
4876
4878
|
else {
|
|
4877
|
-
const
|
|
4878
|
-
n = Pe.includes(":") && Pe.split(":").length >= 3 ? `${
|
|
4879
|
+
const T = p.getFullYear(), $ = String(p.getMonth() + 1).padStart(2, "0"), W = String(p.getDate()).padStart(2, "0"), J = String(p.getHours()).padStart(2, "0"), Me = String(p.getMinutes()).padStart(2, "0"), ft = String(p.getSeconds()).padStart(2, "0"), Pe = ((l = t.split("T")[1]) == null ? void 0 : l.split(/[Z+-]/)[0]) || "";
|
|
4880
|
+
n = Pe.includes(":") && Pe.split(":").length >= 3 ? `${T}-${$}-${W}T${J}:${Me}:${ft}` : `${T}-${$}-${W}T${J}:${Me}`;
|
|
4879
4881
|
}
|
|
4880
4882
|
} else
|
|
4881
4883
|
n = "";
|
|
4882
4884
|
} else
|
|
4883
4885
|
n = "";
|
|
4884
|
-
|
|
4886
|
+
L.value = n;
|
|
4885
4887
|
const r = ue(t, v.value);
|
|
4886
4888
|
E.value = r, la(() => {
|
|
4887
|
-
|
|
4889
|
+
Bt();
|
|
4888
4890
|
}), Z.value = r;
|
|
4889
4891
|
const s = Ha(n);
|
|
4890
4892
|
s && (h("changed-complete", s), h("current-value-complete", s));
|
|
4891
4893
|
}
|
|
4892
4894
|
}, { immediate: !0 });
|
|
4893
|
-
let
|
|
4895
|
+
let $e = !1;
|
|
4894
4896
|
const qa = () => {
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
+
$e = !0, setTimeout(() => {
|
|
4898
|
+
$e = !1;
|
|
4897
4899
|
}, 100);
|
|
4898
4900
|
};
|
|
4899
4901
|
let mt = !1;
|
|
4900
|
-
return re(() =>
|
|
4901
|
-
if (
|
|
4902
|
+
return re(() => L.value, (t) => {
|
|
4903
|
+
if (z.value && !mt && !$e) {
|
|
4902
4904
|
const l = ue(t, v.value);
|
|
4903
4905
|
l !== E.value && (E.value = l, Z.value = l);
|
|
4904
4906
|
}
|
|
4905
4907
|
mt = !1;
|
|
4906
|
-
}), re(
|
|
4907
|
-
if (
|
|
4908
|
+
}), re(L, (t) => {
|
|
4909
|
+
if (de.value && (t = t.trim()), Le.value && typeof t == "string" && t.startsWith("{"))
|
|
4908
4910
|
try {
|
|
4909
4911
|
const l = JSON.parse(t);
|
|
4910
4912
|
if (l && (l.startDate || l.endDate)) {
|
|
@@ -4912,8 +4914,8 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4912
4914
|
if (!d)
|
|
4913
4915
|
return null;
|
|
4914
4916
|
if (/^\d{4}-\d{2}-\d{2}$/.test(d)) {
|
|
4915
|
-
const [f, p,
|
|
4916
|
-
return new Date(f, p - 1,
|
|
4917
|
+
const [f, p, T] = d.split("-").map(Number);
|
|
4918
|
+
return new Date(f, p - 1, T);
|
|
4917
4919
|
}
|
|
4918
4920
|
return new Date(d);
|
|
4919
4921
|
}, r = l.startDate ? n(l.startDate) : null, s = l.endDate ? n(l.endDate) : null;
|
|
@@ -4923,105 +4925,105 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
4923
4925
|
} catch {
|
|
4924
4926
|
}
|
|
4925
4927
|
h("changed", t);
|
|
4926
|
-
}), re(
|
|
4928
|
+
}), re(De, (t) => {
|
|
4927
4929
|
h(t ? "focused" : "blurred");
|
|
4928
|
-
}), re(
|
|
4929
|
-
|
|
4930
|
-
|
|
4930
|
+
}), re(L, (t) => {
|
|
4931
|
+
de.value && (t = t.trim()), h("current-value", t), la(() => {
|
|
4932
|
+
Bt();
|
|
4931
4933
|
});
|
|
4932
|
-
}), re([Ue,
|
|
4934
|
+
}), re([Ue, pe], () => {
|
|
4933
4935
|
la(() => {
|
|
4934
|
-
|
|
4936
|
+
Bt();
|
|
4935
4937
|
});
|
|
4936
4938
|
}), (t, l) => u(Q) ? (O(), K("div", $a({
|
|
4937
4939
|
key: 0,
|
|
4938
|
-
class: ["nb-wrapper",
|
|
4939
|
-
style: [
|
|
4940
|
+
class: ["nb-wrapper", kt.value],
|
|
4941
|
+
style: [wt.value, Gt.value, Ft.value],
|
|
4940
4942
|
role: "input"
|
|
4941
4943
|
}, i.value), [
|
|
4942
|
-
|
|
4944
|
+
Ve("div", {
|
|
4943
4945
|
id: u(Q),
|
|
4944
|
-
class: Ye(["nb-reset", "component", fa.value,
|
|
4945
|
-
style: Ne([
|
|
4946
|
-
onClick: ga
|
|
4946
|
+
class: Ye(["nb-reset", "component", fa.value, va.value, Kt.value, da.value]),
|
|
4947
|
+
style: Ne([N.value, Gt.value, Ft.value]),
|
|
4948
|
+
onClick: l[2] || (l[2] = (n) => ga(n))
|
|
4947
4949
|
}, [
|
|
4948
4950
|
u(Ie) ? (O(), K("label", {
|
|
4949
4951
|
key: 0,
|
|
4950
|
-
for:
|
|
4952
|
+
for: zt.value,
|
|
4951
4953
|
class: "component__label",
|
|
4952
|
-
style: Ne([
|
|
4954
|
+
style: Ne([je.value]),
|
|
4953
4955
|
onClick: ya
|
|
4954
4956
|
}, [
|
|
4955
|
-
jt(
|
|
4956
|
-
u(
|
|
4957
|
-
], 12, fn)) :
|
|
4958
|
-
Pa(
|
|
4957
|
+
jt(Rt(u(y)), 1),
|
|
4958
|
+
u(Tt) ? (O(), K("span", vn, "*")) : me("", !0)
|
|
4959
|
+
], 12, fn)) : me("", !0),
|
|
4960
|
+
Pa(Ve("input", {
|
|
4959
4961
|
ref_key: "inputRef",
|
|
4960
4962
|
ref: P,
|
|
4961
4963
|
"onUpdate:modelValue": l[0] || (l[0] = (n) => E.value = n),
|
|
4962
|
-
onInput:
|
|
4964
|
+
onInput: nt,
|
|
4963
4965
|
onKeydown: [
|
|
4964
4966
|
qa,
|
|
4965
|
-
l[1] || (l[1] = na((n) => !u(
|
|
4967
|
+
l[1] || (l[1] = na((n) => !u(w) && u(R) && ba(), ["enter"]))
|
|
4966
4968
|
],
|
|
4967
|
-
id:
|
|
4968
|
-
name:
|
|
4969
|
-
type:
|
|
4969
|
+
id: zt.value,
|
|
4970
|
+
name: zt.value,
|
|
4971
|
+
type: z.value ? "text" : Y.value,
|
|
4970
4972
|
class: Ye(["component__input", [
|
|
4971
4973
|
pa.value,
|
|
4972
4974
|
ca.value,
|
|
4973
|
-
|
|
4975
|
+
ie.value
|
|
4974
4976
|
]]),
|
|
4975
4977
|
placeholder: c.value,
|
|
4976
|
-
disabled: u(
|
|
4977
|
-
required: u(
|
|
4978
|
-
readonly:
|
|
4978
|
+
disabled: u(w) || u(j),
|
|
4979
|
+
required: u(Tt),
|
|
4980
|
+
readonly: m.value,
|
|
4979
4981
|
autocomplete: e.inputAutocomplete,
|
|
4980
|
-
min:
|
|
4981
|
-
max:
|
|
4982
|
-
step:
|
|
4983
|
-
tabindex: u(
|
|
4982
|
+
min: ka.value,
|
|
4983
|
+
max: o.value,
|
|
4984
|
+
step: z.value ? void 0 : u(vt),
|
|
4985
|
+
tabindex: u(w) || u(j) ? -1 : u(xt),
|
|
4984
4986
|
role: "input",
|
|
4985
|
-
style: Ne([
|
|
4987
|
+
style: Ne([Ft.value]),
|
|
4986
4988
|
onFocus: Sa,
|
|
4987
4989
|
onBlur: xa,
|
|
4988
4990
|
onClick: Ca,
|
|
4989
4991
|
onPaste: ma
|
|
4990
4992
|
}, null, 46, pn), [
|
|
4991
|
-
[
|
|
4993
|
+
[ml, E.value]
|
|
4992
4994
|
])
|
|
4993
4995
|
], 14, cn),
|
|
4994
|
-
|
|
4996
|
+
Ot.value ? (O(), K("div", {
|
|
4995
4997
|
key: 0,
|
|
4996
4998
|
class: Ye(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
4997
4999
|
}, [
|
|
4998
5000
|
La(t.$slots, "message", {}, () => [
|
|
4999
|
-
jt(
|
|
5001
|
+
jt(Rt(e.message), 1)
|
|
5000
5002
|
], !0)
|
|
5001
|
-
], 2)) :
|
|
5003
|
+
], 2)) : me("", !0),
|
|
5002
5004
|
(O(), Ll(Al, { to: "body" }, [
|
|
5003
|
-
|
|
5005
|
+
z.value && ne.value ? (O(), K("div", {
|
|
5004
5006
|
key: 0,
|
|
5005
5007
|
ref_key: "calendarRef",
|
|
5006
5008
|
ref: U,
|
|
5007
5009
|
class: "datepicker__custom-calendar-wrapper",
|
|
5008
5010
|
style: Ne(ha.value),
|
|
5009
|
-
onClick: l[
|
|
5010
|
-
onMousedown: l[
|
|
5011
|
+
onClick: l[5] || (l[5] = Ia((n) => M.value = !0, ["stop"])),
|
|
5012
|
+
onMousedown: l[6] || (l[6] = Ia((n) => M.value = !0, ["stop"]))
|
|
5011
5013
|
}, [
|
|
5012
5014
|
$l(u(g), {
|
|
5013
5015
|
"nb-id": `${u(Q)}-calendar`,
|
|
5014
|
-
value:
|
|
5016
|
+
value: At.value,
|
|
5015
5017
|
"input-type": u(v),
|
|
5016
|
-
"has-seconds":
|
|
5018
|
+
"has-seconds": Re.value,
|
|
5017
5019
|
min: u(Ue),
|
|
5018
|
-
max: u(
|
|
5020
|
+
max: u(pe),
|
|
5019
5021
|
step: u(vt),
|
|
5020
|
-
disabled: u(
|
|
5021
|
-
width:
|
|
5022
|
+
disabled: u(w),
|
|
5023
|
+
width: Wt.value,
|
|
5022
5024
|
locale: u(ot),
|
|
5023
5025
|
theme: u(ze),
|
|
5024
|
-
"allow-range": u(
|
|
5026
|
+
"allow-range": u(Le),
|
|
5025
5027
|
"block-clicks-without-events": u(St),
|
|
5026
5028
|
"font-family": e.calendarFontFamily,
|
|
5027
5029
|
"font-size": e.calendarFontSize,
|
|
@@ -5081,18 +5083,18 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
5081
5083
|
"clear-button-title": e.calendarClearButtonTitle,
|
|
5082
5084
|
"clear-button-symbol": e.calendarClearButtonSymbol,
|
|
5083
5085
|
"iso-string-timezone-format": e.calendarIsoStringTimezoneFormat,
|
|
5084
|
-
onChanged:
|
|
5086
|
+
onChanged: Ce,
|
|
5085
5087
|
onDateSelected: Ba,
|
|
5086
5088
|
onMonthChanged: Ta,
|
|
5087
5089
|
onValid: Va,
|
|
5088
|
-
onMousedown: l[
|
|
5089
|
-
onClick: l[
|
|
5090
|
+
onMousedown: l[3] || (l[3] = (n) => M.value = !0),
|
|
5091
|
+
onClick: l[4] || (l[4] = (n) => M.value = !0)
|
|
5090
5092
|
}, null, 8, ["nb-id", "value", "input-type", "has-seconds", "min", "max", "step", "disabled", "width", "locale", "theme", "allow-range", "block-clicks-without-events", "font-family", "font-size", "font-weight", "primary-color", "selection-color", "event-color", "today-color", "hover-text-color", "normal-text-color", "month-year-item-bg", "month-year-item-bg-hover", "day-hover-bg", "day-hover-text-color", "time-display-text-color", "time-edit-button-bg", "time-edit-button-text-color", "time-edit-button-bg-hover", "time-edit-button-text-color-hover", "time-edit-button-font-family", "time-edit-button-font-size", "time-edit-button-padding", "time-edit-button-border-radius", "time-edit-button-font-weight", "time-edit-button-border", "time-edit-button-text", "today-button-bg", "today-button-text-color", "today-button-bg-hover", "today-button-text-color-hover", "today-button-font-family", "today-button-font-size", "today-button-padding", "today-button-border-radius", "today-button-font-weight", "today-button-border", "today-button-text", "now-button-text", "show-clear-button", "show-today-button", "clear-button-keep-current-month", "start-week-on-monday", "edit-range", "max-range-days", "min-year", "max-year", "go-to-date", "is-required", "width-full", "border-radius", "scroll-class", "events", "select-month-text", "select-year-text", "select-time-text", "time-display-label-text", "clear-button-title", "clear-button-symbol", "iso-string-timezone-format"])
|
|
5091
|
-
], 36)) :
|
|
5093
|
+
], 36)) : me("", !0)
|
|
5092
5094
|
]))
|
|
5093
|
-
], 16)) :
|
|
5095
|
+
], 16)) : me("", !0);
|
|
5094
5096
|
}
|
|
5095
|
-
}), yn = /* @__PURE__ */ Oa(gn, [["__scopeId", "data-v-
|
|
5097
|
+
}), yn = /* @__PURE__ */ Oa(gn, [["__scopeId", "data-v-627e4800"]]), pl = {
|
|
5096
5098
|
NbInputRadio: Nl,
|
|
5097
5099
|
NbInputCheckbox: El,
|
|
5098
5100
|
NbInput: Kl,
|
|
@@ -5101,9 +5103,9 @@ const cn = ["id"], fn = ["for"], vn = {
|
|
|
5101
5103
|
NbDatePicker: yn
|
|
5102
5104
|
}, mn = {
|
|
5103
5105
|
install(e) {
|
|
5104
|
-
for (const
|
|
5105
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
5106
|
-
const g =
|
|
5106
|
+
for (const b in pl)
|
|
5107
|
+
if (Object.prototype.hasOwnProperty.call(pl, b)) {
|
|
5108
|
+
const g = pl[b];
|
|
5107
5109
|
e.component(g.name, g);
|
|
5108
5110
|
}
|
|
5109
5111
|
}
|