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