@vlalg-nimbus/nb-inputs 8.0.16 → 8.0.17
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 +1732 -1562
- package/dist/nb-inputs.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/nb-inputs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
},
|
|
1
|
+
import { useCssVars as ya, onMounted as pa, ref as j, toRefs as ma, computed as a, watch as U, openBlock as M, createElementBlock as D, normalizeClass as Fe, normalizeStyle as Se, createElementVNode as pe, mergeProps as ba, Fragment as Ya, renderList as Qa, unref as o, withDirectives as ha, vModelRadio as fl, withKeys as Kt, withModifiers as ga, toDisplayString as kt, createCommentVNode as re, vModelCheckbox as vl, onUnmounted as $a, createTextVNode as It, renderSlot as va, vModelDynamic as Ja, vModelText as Xa, defineAsyncComponent as pl, nextTick as _a, createBlock as bl, Teleport as gl, createVNode as yl } from "vue";
|
|
2
|
+
const Ca = (e, y) => {
|
|
3
|
+
const h = e.__vccOpts || e;
|
|
4
|
+
for (const [P, N] of y)
|
|
5
|
+
h[P] = N;
|
|
6
|
+
return h;
|
|
7
|
+
}, ml = ["id"], hl = ["id", "disabled", "value", "name"], Cl = ["for", "tabindex"], xl = /* @__PURE__ */ Object.assign({
|
|
8
8
|
name: "NbInputRadio",
|
|
9
9
|
inheritAttrs: !1
|
|
10
10
|
}, {
|
|
@@ -18,14 +18,14 @@ const ba = (e, m) => {
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: "b",
|
|
20
20
|
validator: (e = "b") => {
|
|
21
|
-
const
|
|
22
|
-
return ["b", "ib"].includes(
|
|
21
|
+
const y = e ? e.toLowerCase() : "";
|
|
22
|
+
return ["b", "ib"].includes(y);
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
tabIndex: {
|
|
26
26
|
type: [Number, Array],
|
|
27
27
|
default: 0,
|
|
28
|
-
validator: (e,
|
|
28
|
+
validator: (e, y) => Array.isArray(e) ? e.length === y.options.length : !0
|
|
29
29
|
},
|
|
30
30
|
hasTabIndexEnter: {
|
|
31
31
|
type: Boolean,
|
|
@@ -56,12 +56,12 @@ const ba = (e, m) => {
|
|
|
56
56
|
validator: (e) => {
|
|
57
57
|
if (!e.length)
|
|
58
58
|
return !1;
|
|
59
|
-
let
|
|
60
|
-
for (const
|
|
61
|
-
const
|
|
62
|
-
|
|
59
|
+
let y = !1;
|
|
60
|
+
for (const h of e) {
|
|
61
|
+
const P = Object.keys(h);
|
|
62
|
+
P.length !== 2 && (y = !0), P.every((Ve) => ["value", "text"].includes(Ve)) || (y = !0);
|
|
63
63
|
}
|
|
64
|
-
if (!
|
|
64
|
+
if (!y)
|
|
65
65
|
return e;
|
|
66
66
|
}
|
|
67
67
|
},
|
|
@@ -78,8 +78,8 @@ const ba = (e, m) => {
|
|
|
78
78
|
type: String,
|
|
79
79
|
default: "light",
|
|
80
80
|
validator: (e) => {
|
|
81
|
-
const
|
|
82
|
-
return ["light", "dark"].includes(
|
|
81
|
+
const y = e ? e.toLowerCase() : "";
|
|
82
|
+
return ["light", "dark"].includes(y);
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
// Cores do tema light
|
|
@@ -151,143 +151,143 @@ const ba = (e, m) => {
|
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
emits: ["current-value", "changed", "clicked"],
|
|
154
|
-
setup(e, { emit:
|
|
155
|
-
|
|
154
|
+
setup(e, { emit: y }) {
|
|
155
|
+
ya((b) => ({
|
|
156
156
|
"0fd48d29": ye.value,
|
|
157
157
|
"50426c15": ct.value,
|
|
158
158
|
"5fa7628c": dt.value,
|
|
159
159
|
"5949c3d2": Te.value,
|
|
160
160
|
91322790: Qe.value,
|
|
161
|
-
"6750fc92":
|
|
162
|
-
"8c592938":
|
|
161
|
+
"6750fc92": lt.value,
|
|
162
|
+
"8c592938": mt.value,
|
|
163
163
|
c11d4680: st.value,
|
|
164
|
-
"35b74fa6":
|
|
165
|
-
"7dd5f889":
|
|
166
|
-
"5cb21b36":
|
|
167
|
-
})),
|
|
164
|
+
"35b74fa6": nt.value,
|
|
165
|
+
"7dd5f889": xe.value,
|
|
166
|
+
"5cb21b36": ht.value
|
|
167
|
+
})), pa(() => {
|
|
168
168
|
Je();
|
|
169
169
|
});
|
|
170
|
-
const
|
|
170
|
+
const h = y, P = e, N = j(null), {
|
|
171
171
|
ariaLabel: Ve,
|
|
172
|
-
ariaAttrs:
|
|
173
|
-
currentOption:
|
|
172
|
+
ariaAttrs: be,
|
|
173
|
+
currentOption: Re,
|
|
174
174
|
valueType: ke,
|
|
175
|
-
display:
|
|
176
|
-
options:
|
|
177
|
-
theme:
|
|
178
|
-
lightTextColor:
|
|
179
|
-
lightColor:
|
|
180
|
-
lightColorHover:
|
|
175
|
+
display: ie,
|
|
176
|
+
options: J,
|
|
177
|
+
theme: Oe,
|
|
178
|
+
lightTextColor: Me,
|
|
179
|
+
lightColor: ae,
|
|
180
|
+
lightColorHover: G,
|
|
181
181
|
darkTextColor: w,
|
|
182
|
-
darkColor:
|
|
183
|
-
darkColorHover:
|
|
184
|
-
hoverEffect:
|
|
182
|
+
darkColor: le,
|
|
183
|
+
darkColorHover: se,
|
|
184
|
+
hoverEffect: K,
|
|
185
185
|
activeHoverEffect: Le,
|
|
186
|
-
itemGap:
|
|
187
|
-
internalGap:
|
|
188
|
-
scale:
|
|
189
|
-
disabled:
|
|
190
|
-
fontFamily:
|
|
191
|
-
fontSize:
|
|
192
|
-
fontWeight:
|
|
193
|
-
} =
|
|
194
|
-
const
|
|
186
|
+
itemGap: de,
|
|
187
|
+
internalGap: F,
|
|
188
|
+
scale: ge,
|
|
189
|
+
disabled: X,
|
|
190
|
+
fontFamily: he,
|
|
191
|
+
fontSize: ce,
|
|
192
|
+
fontWeight: Ce
|
|
193
|
+
} = ma(P), $ = a(() => {
|
|
194
|
+
const b = X.value ? "component-disabled" : "", S = ie.value !== "b" ? "inline-block" : "block", ne = he.value ? he.value : "'Lato', sans-serif", Z = ce.value ? ce.value : "1.6em", me = Ce.value !== 0 && !Ce.value || Ce.value < 0 ? 200 : Ce.value, Be = [!1, !0].includes(K.value) ? K.value : !1, Xe = [!1, !0].includes(Le.value) ? Le.value : !1, q = de.value !== 0 && !de.value || de.value < 0 ? 15 : de.value, d = F.value !== 0 && !F.value || F.value < 0 ? 6 : F.value, m = ge.value !== 0 && !ge.value || ge.value < 0 ? 1 : ge.value;
|
|
195
195
|
return {
|
|
196
|
-
disabled:
|
|
197
|
-
display:
|
|
198
|
-
hoverEffect:
|
|
199
|
-
activeHoverEffect:
|
|
200
|
-
itemGap:
|
|
196
|
+
disabled: b,
|
|
197
|
+
display: S,
|
|
198
|
+
hoverEffect: Be,
|
|
199
|
+
activeHoverEffect: Xe,
|
|
200
|
+
itemGap: q,
|
|
201
201
|
internalGap: d,
|
|
202
|
-
scale:
|
|
203
|
-
font:
|
|
204
|
-
fontSize:
|
|
202
|
+
scale: m,
|
|
203
|
+
font: ne,
|
|
204
|
+
fontSize: Z,
|
|
205
205
|
fontWeight: me
|
|
206
206
|
};
|
|
207
|
-
}), L = a(() => $.value.disabled),
|
|
207
|
+
}), L = a(() => $.value.disabled), C = a(() => ({
|
|
208
208
|
display: $.value.display
|
|
209
|
-
})),
|
|
210
|
-
const
|
|
209
|
+
})), ze = a(() => $.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), He = a(() => {
|
|
210
|
+
const b = $.value;
|
|
211
211
|
return {
|
|
212
|
-
fontSize:
|
|
213
|
-
fontWeight:
|
|
212
|
+
fontSize: b.fontSize,
|
|
213
|
+
fontWeight: b.fontWeight
|
|
214
214
|
};
|
|
215
|
-
}),
|
|
216
|
-
const
|
|
217
|
-
return !
|
|
215
|
+
}), We = a(() => Array.isArray(J.value) && J.value.constructor === Array && J.value.length > 0), at = a(() => Oe.value === "dark" ? "component__theme--dark" : "component__theme--light"), ye = a(() => $.value.font), lt = a(() => Me.value), mt = a(() => ae.value), Qe = a(() => $.value.hoverEffect ? G.value : ae.value), Te = a(() => $.value.activeHoverEffect ? G.value : ae.value), xe = a(() => w.value), ht = a(() => le.value), nt = a(() => $.value.hoverEffect ? se.value : le.value), st = a(() => $.value.activeHoverEffect ? se.value : le.value), dt = a(() => {
|
|
216
|
+
const S = $.value.internalGap;
|
|
217
|
+
return !S || S < 0 ? 0 : `${S}px`;
|
|
218
218
|
}), ct = a(() => {
|
|
219
|
-
const
|
|
220
|
-
return !
|
|
221
|
-
}),
|
|
219
|
+
const S = $.value.itemGap;
|
|
220
|
+
return !S || S < 0 ? 0 : `${S}px`;
|
|
221
|
+
}), je = a(() => ({
|
|
222
222
|
zoom: $.value.scale
|
|
223
223
|
})), Ue = a(() => {
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
const
|
|
224
|
+
const b = {};
|
|
225
|
+
be.value && Object.keys(be.value).forEach((Z) => b[`aria-${Z}`] = be.value[Z]);
|
|
226
|
+
const S = {
|
|
227
227
|
"aria-label": Ve.value,
|
|
228
|
-
"aria-disabled":
|
|
229
|
-
...
|
|
228
|
+
"aria-disabled": X.value,
|
|
229
|
+
...b
|
|
230
230
|
};
|
|
231
231
|
return Object.fromEntries(
|
|
232
|
-
Object.entries(
|
|
232
|
+
Object.entries(S).filter(([ne, Z]) => Z != null)
|
|
233
233
|
);
|
|
234
234
|
}), Je = () => {
|
|
235
|
-
const
|
|
236
|
-
|
|
235
|
+
const b = Re.value;
|
|
236
|
+
b && ["string"].includes(ke.value) ? N.value = b.toString().toLowerCase() : N.value = b;
|
|
237
237
|
}, Ge = () => {
|
|
238
|
-
|
|
238
|
+
h("clicked");
|
|
239
239
|
};
|
|
240
|
-
return
|
|
241
|
-
|
|
242
|
-
}),
|
|
243
|
-
|
|
244
|
-
}), (
|
|
240
|
+
return U(Re, (b, S) => {
|
|
241
|
+
b !== S && Je();
|
|
242
|
+
}), U(N, (b, S) => {
|
|
243
|
+
b !== S && (h("current-value", b), h("changed", b));
|
|
244
|
+
}), (b, S) => e.nbId && We.value ? (M(), D("div", {
|
|
245
245
|
key: 0,
|
|
246
|
-
class:
|
|
247
|
-
style:
|
|
246
|
+
class: Fe(["nb-wrapper", L.value]),
|
|
247
|
+
style: Se([C.value, je.value])
|
|
248
248
|
}, [
|
|
249
|
-
|
|
249
|
+
pe("div", ba({
|
|
250
250
|
id: e.nbId,
|
|
251
251
|
role: "radiogroup"
|
|
252
252
|
}, Ue.value, {
|
|
253
|
-
class: ["nb-reset", "component",
|
|
253
|
+
class: ["nb-reset", "component", ze.value, at.value]
|
|
254
254
|
}), [
|
|
255
|
-
(
|
|
256
|
-
key:
|
|
255
|
+
(M(!0), D(Ya, null, Qa(o(J), (ne, Z) => (M(), D("div", {
|
|
256
|
+
key: Z,
|
|
257
257
|
class: "component-radio__item"
|
|
258
258
|
}, [
|
|
259
|
-
|
|
260
|
-
id: `${e.nbId}-${
|
|
261
|
-
"onUpdate:modelValue":
|
|
259
|
+
ha(pe("input", {
|
|
260
|
+
id: `${e.nbId}-${ne.value}`,
|
|
261
|
+
"onUpdate:modelValue": S[0] || (S[0] = (me) => N.value = me),
|
|
262
262
|
type: "radio",
|
|
263
263
|
class: "component-radio__item--input",
|
|
264
|
-
disabled: o(
|
|
265
|
-
value:
|
|
264
|
+
disabled: o(X),
|
|
265
|
+
value: ne.value,
|
|
266
266
|
name: e.groupName,
|
|
267
267
|
onClick: Ge
|
|
268
|
-
}, null, 8,
|
|
269
|
-
[
|
|
268
|
+
}, null, 8, hl), [
|
|
269
|
+
[fl, N.value]
|
|
270
270
|
]),
|
|
271
|
-
|
|
272
|
-
for: `${e.nbId}-${
|
|
273
|
-
tabindex: o(
|
|
271
|
+
pe("label", {
|
|
272
|
+
for: `${e.nbId}-${ne.value}`,
|
|
273
|
+
tabindex: o(X) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[Z] : e.tabIndex >= 0 ? e.tabIndex : Z + 1,
|
|
274
274
|
class: "component-radio__item--label",
|
|
275
275
|
onKeydown: [
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
S[1] || (S[1] = Kt(ga((me) => !o(X) && e.hasTabIndexEnter && me.target.click(), ["prevent"]), ["enter"])),
|
|
277
|
+
S[2] || (S[2] = Kt(ga((me) => !o(X) && e.hasTabIndexSpace && me.target.click(), ["prevent"]), ["space"]))
|
|
278
278
|
]
|
|
279
279
|
}, [
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
style:
|
|
283
|
-
},
|
|
284
|
-
], 40,
|
|
280
|
+
S[3] || (S[3] = pe("div", null, null, -1)),
|
|
281
|
+
pe("span", {
|
|
282
|
+
style: Se([He.value])
|
|
283
|
+
}, kt(ne.text), 5)
|
|
284
|
+
], 40, Cl)
|
|
285
285
|
]))), 128))
|
|
286
|
-
], 16,
|
|
287
|
-
], 6)) :
|
|
286
|
+
], 16, ml)
|
|
287
|
+
], 6)) : re("", !0);
|
|
288
288
|
}
|
|
289
|
-
}),
|
|
290
|
-
const
|
|
289
|
+
}), Sl = /* @__PURE__ */ Ca(xl, [["__scopeId", "data-v-a95f65ea"]]);
|
|
290
|
+
const Vl = ["id"], kl = ["id", "disabled", "value", "name"], Ll = ["for", "tabindex"], Tl = /* @__PURE__ */ Object.assign({
|
|
291
291
|
name: "NbInputCheckbox",
|
|
292
292
|
inheritAttrs: !1
|
|
293
293
|
}, {
|
|
@@ -301,14 +301,14 @@ const bl = ["id"], gl = ["id", "disabled", "value", "name"], yl = ["for", "tabin
|
|
|
301
301
|
type: String,
|
|
302
302
|
default: "b",
|
|
303
303
|
validator: (e = "b") => {
|
|
304
|
-
const
|
|
305
|
-
return ["b", "ib"].includes(
|
|
304
|
+
const y = e ? e.toLowerCase() : "";
|
|
305
|
+
return ["b", "ib"].includes(y);
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
308
|
tabIndex: {
|
|
309
309
|
type: [Number, Array],
|
|
310
310
|
default: 0,
|
|
311
|
-
validator: (e,
|
|
311
|
+
validator: (e, y) => Array.isArray(e) ? e.length === y.options.length : !0
|
|
312
312
|
},
|
|
313
313
|
hasTabIndexEnter: {
|
|
314
314
|
type: Boolean,
|
|
@@ -339,12 +339,12 @@ const bl = ["id"], gl = ["id", "disabled", "value", "name"], yl = ["for", "tabin
|
|
|
339
339
|
validator: (e) => {
|
|
340
340
|
if (!e.length)
|
|
341
341
|
return !1;
|
|
342
|
-
let
|
|
343
|
-
for (const
|
|
344
|
-
const
|
|
345
|
-
|
|
342
|
+
let y = !1;
|
|
343
|
+
for (const h of e) {
|
|
344
|
+
const P = Object.keys(h);
|
|
345
|
+
P.length !== 2 && (y = !0), P.every((Ve) => ["value", "text"].includes(Ve)) || (y = !0);
|
|
346
346
|
}
|
|
347
|
-
if (!
|
|
347
|
+
if (!y)
|
|
348
348
|
return e;
|
|
349
349
|
}
|
|
350
350
|
},
|
|
@@ -356,8 +356,8 @@ const bl = ["id"], gl = ["id", "disabled", "value", "name"], yl = ["for", "tabin
|
|
|
356
356
|
type: String,
|
|
357
357
|
default: "light",
|
|
358
358
|
validator: (e) => {
|
|
359
|
-
const
|
|
360
|
-
return ["light", "dark"].includes(
|
|
359
|
+
const y = e ? e.toLowerCase() : "";
|
|
360
|
+
return ["light", "dark"].includes(y);
|
|
361
361
|
}
|
|
362
362
|
},
|
|
363
363
|
// Cores do tema light
|
|
@@ -447,167 +447,170 @@ const bl = ["id"], gl = ["id", "disabled", "value", "name"], yl = ["for", "tabin
|
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
449
|
emits: ["current-value", "changed", "clicked"],
|
|
450
|
-
setup(e, { emit:
|
|
451
|
-
|
|
452
|
-
"49e2c63f":
|
|
453
|
-
"107babaa":
|
|
454
|
-
"3c7cc5ce":
|
|
455
|
-
"16d311d0":
|
|
456
|
-
"3f8b2f30":
|
|
457
|
-
"53078d64":
|
|
458
|
-
"537834e6":
|
|
450
|
+
setup(e, { emit: y }) {
|
|
451
|
+
ya((d) => ({
|
|
452
|
+
"49e2c63f": mt.value,
|
|
453
|
+
"107babaa": ne.value,
|
|
454
|
+
"3c7cc5ce": S.value,
|
|
455
|
+
"16d311d0": b.value,
|
|
456
|
+
"3f8b2f30": ht.value,
|
|
457
|
+
"53078d64": xe.value,
|
|
458
|
+
"537834e6": nt.value,
|
|
459
459
|
fbc86ee4: Te.value,
|
|
460
460
|
"517939e1": Qe.value,
|
|
461
461
|
"3faff29d": Ge.value,
|
|
462
|
-
"302ecd6a":
|
|
462
|
+
"302ecd6a": je.value,
|
|
463
463
|
"8a4df060": ct.value,
|
|
464
464
|
"0a99dbe2": Ue.value,
|
|
465
465
|
d6971e68: dt.value,
|
|
466
466
|
ca30d9c2: st.value
|
|
467
|
-
})),
|
|
468
|
-
|
|
467
|
+
})), pa(() => {
|
|
468
|
+
Xe();
|
|
469
469
|
});
|
|
470
|
-
const
|
|
470
|
+
const h = y, P = e, N = j(null), {
|
|
471
471
|
ariaLabel: Ve,
|
|
472
|
-
ariaAttrs:
|
|
473
|
-
currentOption:
|
|
472
|
+
ariaAttrs: be,
|
|
473
|
+
currentOption: Re,
|
|
474
474
|
display: ke,
|
|
475
|
-
options:
|
|
476
|
-
theme:
|
|
477
|
-
lightTextColor:
|
|
478
|
-
lightColor:
|
|
479
|
-
lightColorHover:
|
|
480
|
-
darkTextColor:
|
|
475
|
+
options: ie,
|
|
476
|
+
theme: J,
|
|
477
|
+
lightTextColor: Oe,
|
|
478
|
+
lightColor: Me,
|
|
479
|
+
lightColorHover: ae,
|
|
480
|
+
darkTextColor: G,
|
|
481
481
|
darkColor: w,
|
|
482
|
-
darkColorHover:
|
|
483
|
-
boxRadius:
|
|
484
|
-
hoverEffect:
|
|
482
|
+
darkColorHover: le,
|
|
483
|
+
boxRadius: se,
|
|
484
|
+
hoverEffect: K,
|
|
485
485
|
activeHoverEffect: Le,
|
|
486
|
-
itemGap:
|
|
487
|
-
internalGap:
|
|
488
|
-
scale:
|
|
489
|
-
type:
|
|
490
|
-
background:
|
|
491
|
-
disabled:
|
|
492
|
-
fontFamily:
|
|
486
|
+
itemGap: de,
|
|
487
|
+
internalGap: F,
|
|
488
|
+
scale: ge,
|
|
489
|
+
type: X,
|
|
490
|
+
background: he,
|
|
491
|
+
disabled: ce,
|
|
492
|
+
fontFamily: Ce,
|
|
493
493
|
fontSize: $,
|
|
494
494
|
fontWeight: L
|
|
495
|
-
} =
|
|
496
|
-
const d =
|
|
495
|
+
} = ma(P), C = a(() => {
|
|
496
|
+
const d = ce.value ? "component-disabled" : "", m = ke.value !== "b" ? "inline-block" : "block", fe = Ce.value ? Ce.value : "'Lato', sans-serif", H = $.value ? $.value : "1.6em", Y = L.value !== 0 && !L.value || L.value < 0 ? 200 : L.value, Ae = se.value !== 0 && !se.value || se.value < 0 ? 0 : se.value, _e = [!1, !0].includes(K.value) ? K.value : !1, De = [!1, !0].includes(Le.value) ? Le.value : !1, qe = de.value !== 0 && !de.value || de.value < 0 ? 15 : de.value, Ze = F.value !== 0 && !F.value || F.value < 0 ? 6 : F.value, ot = ["box", "circle"].includes(X.value) ? X.value : "box", ut = ge.value !== 0 && !ge.value || ge.value < 0 ? 1 : ge.value, ft = [!1, !0].includes(he.value) ? he.value : !1;
|
|
497
497
|
return {
|
|
498
498
|
disabled: d,
|
|
499
|
-
display:
|
|
500
|
-
boxRadius:
|
|
501
|
-
hoverEffect:
|
|
502
|
-
activeHoverEffect:
|
|
503
|
-
itemGap:
|
|
504
|
-
internalGap:
|
|
505
|
-
scale:
|
|
506
|
-
type:
|
|
499
|
+
display: m,
|
|
500
|
+
boxRadius: Ae,
|
|
501
|
+
hoverEffect: _e,
|
|
502
|
+
activeHoverEffect: De,
|
|
503
|
+
itemGap: qe,
|
|
504
|
+
internalGap: Ze,
|
|
505
|
+
scale: ut,
|
|
506
|
+
type: ot,
|
|
507
507
|
font: fe,
|
|
508
508
|
background: ft,
|
|
509
|
-
fontSize:
|
|
510
|
-
fontWeight:
|
|
509
|
+
fontSize: H,
|
|
510
|
+
fontWeight: Y
|
|
511
511
|
};
|
|
512
|
-
}),
|
|
513
|
-
display:
|
|
514
|
-
})),
|
|
515
|
-
const d =
|
|
512
|
+
}), ze = a(() => C.value.disabled), He = a(() => ({
|
|
513
|
+
display: C.value.display
|
|
514
|
+
})), We = a(() => C.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), at = a(() => {
|
|
515
|
+
const d = C.value;
|
|
516
516
|
return {
|
|
517
517
|
fontSize: d.fontSize,
|
|
518
518
|
fontWeight: d.fontWeight
|
|
519
519
|
};
|
|
520
|
-
}), ye = a(() => Array.isArray(
|
|
521
|
-
const d =
|
|
522
|
-
return d.activeHoverEffect && d.background ? `${
|
|
523
|
-
}), st = a(() =>
|
|
524
|
-
const d =
|
|
525
|
-
return d.activeHoverEffect && d.background ? `${
|
|
526
|
-
}), Je = a(() =>
|
|
527
|
-
const d =
|
|
528
|
-
return d.background ? "#ffffff" :
|
|
520
|
+
}), ye = a(() => Array.isArray(ie.value) && ie.value.constructor === Array && ie.value.length > 0), lt = a(() => J.value === "dark" ? "component__theme--dark" : "component__theme--light"), mt = a(() => C.value.font), Qe = a(() => Oe.value), Te = a(() => Me.value), xe = a(() => C.value.hoverEffect ? ae.value : Me.value), ht = a(() => C.value.activeHoverEffect ? ae.value : Me.value), nt = a(() => {
|
|
521
|
+
const d = C.value;
|
|
522
|
+
return d.activeHoverEffect && d.background ? `${ae.value}80` : ae.value;
|
|
523
|
+
}), st = a(() => G.value), dt = a(() => w.value), ct = a(() => C.value.hoverEffect ? le.value : w.value), je = a(() => C.value.activeHoverEffect ? le.value : w.value), Ue = a(() => {
|
|
524
|
+
const d = C.value;
|
|
525
|
+
return d.activeHoverEffect && d.background ? `${le.value}80` : le.value;
|
|
526
|
+
}), Je = a(() => C.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), Ge = a(() => {
|
|
527
|
+
const d = C.value, m = J.value === "dark" ? G.value : Oe.value;
|
|
528
|
+
return d.background ? "#ffffff" : m;
|
|
529
529
|
});
|
|
530
|
-
a(() =>
|
|
531
|
-
const
|
|
532
|
-
const
|
|
533
|
-
return !
|
|
534
|
-
}),
|
|
535
|
-
const d =
|
|
530
|
+
a(() => C.value.background ? "19px" : "auto");
|
|
531
|
+
const b = a(() => {
|
|
532
|
+
const m = C.value.internalGap;
|
|
533
|
+
return !m || m < 0 ? 0 : `${m}px`;
|
|
534
|
+
}), S = a(() => {
|
|
535
|
+
const d = C.value;
|
|
536
536
|
return `${d.boxRadius > 7 ? 7 : d.boxRadius}px`;
|
|
537
|
-
}),
|
|
538
|
-
const
|
|
539
|
-
return !
|
|
540
|
-
}),
|
|
541
|
-
zoom:
|
|
542
|
-
})),
|
|
537
|
+
}), ne = a(() => {
|
|
538
|
+
const m = C.value.itemGap;
|
|
539
|
+
return !m || m < 0 ? 0 : `${m}px`;
|
|
540
|
+
}), Z = a(() => C.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), me = a(() => ({
|
|
541
|
+
zoom: C.value.scale
|
|
542
|
+
})), Be = a(() => {
|
|
543
543
|
const d = {};
|
|
544
|
-
|
|
545
|
-
const
|
|
544
|
+
be.value && Object.keys(be.value).forEach((H) => d[`aria-${H}`] = be.value[H]);
|
|
545
|
+
const m = {
|
|
546
546
|
"aria-label": Ve.value,
|
|
547
|
-
"aria-disabled":
|
|
547
|
+
"aria-disabled": ce.value,
|
|
548
548
|
...d
|
|
549
549
|
};
|
|
550
550
|
return Object.fromEntries(
|
|
551
|
-
Object.entries(
|
|
551
|
+
Object.entries(m).filter(([fe, H]) => H != null)
|
|
552
552
|
);
|
|
553
|
-
}),
|
|
554
|
-
|
|
555
|
-
},
|
|
556
|
-
|
|
553
|
+
}), Xe = () => {
|
|
554
|
+
N.value = Re.value;
|
|
555
|
+
}, q = () => {
|
|
556
|
+
h("clicked");
|
|
557
557
|
};
|
|
558
|
-
return
|
|
559
|
-
d !==
|
|
560
|
-
}),
|
|
561
|
-
d !==
|
|
562
|
-
}), (d,
|
|
558
|
+
return U(Re, (d, m) => {
|
|
559
|
+
d !== m && Xe();
|
|
560
|
+
}), U(N, (d, m) => {
|
|
561
|
+
d !== m && (h("current-value", d), h("changed", d));
|
|
562
|
+
}), (d, m) => e.nbId && ye.value ? (M(), D("div", {
|
|
563
563
|
key: 0,
|
|
564
|
-
class:
|
|
565
|
-
style:
|
|
564
|
+
class: Fe(["nb-wrapper", ze.value]),
|
|
565
|
+
style: Se([He.value, me.value])
|
|
566
566
|
}, [
|
|
567
|
-
|
|
567
|
+
pe("div", ba({
|
|
568
568
|
id: e.nbId,
|
|
569
569
|
role: "group"
|
|
570
|
-
},
|
|
571
|
-
class: ["nb-reset", "component",
|
|
570
|
+
}, Be.value, {
|
|
571
|
+
class: ["nb-reset", "component", We.value, lt.value]
|
|
572
572
|
}), [
|
|
573
|
-
(
|
|
574
|
-
key:
|
|
573
|
+
(M(!0), D(Ya, null, Qa(o(ie), (fe, H) => (M(), D("div", {
|
|
574
|
+
key: H,
|
|
575
575
|
class: "component-checkbox__item"
|
|
576
576
|
}, [
|
|
577
|
-
|
|
577
|
+
ha(pe("input", {
|
|
578
578
|
id: `${e.nbId}-${fe.value}`,
|
|
579
|
-
"onUpdate:modelValue":
|
|
579
|
+
"onUpdate:modelValue": m[0] || (m[0] = (Y) => N.value = Y),
|
|
580
580
|
type: "checkbox",
|
|
581
581
|
class: "component-checkbox__item--input",
|
|
582
|
-
disabled: o(
|
|
582
|
+
disabled: o(ce),
|
|
583
583
|
value: fe.value,
|
|
584
584
|
name: e.groupName,
|
|
585
|
-
onClick:
|
|
586
|
-
}, null, 8,
|
|
587
|
-
[
|
|
585
|
+
onClick: q
|
|
586
|
+
}, null, 8, kl), [
|
|
587
|
+
[vl, N.value]
|
|
588
588
|
]),
|
|
589
|
-
|
|
589
|
+
pe("label", {
|
|
590
590
|
for: `${e.nbId}-${fe.value}`,
|
|
591
|
-
class:
|
|
592
|
-
tabindex: o(
|
|
591
|
+
class: Fe([[Z.value], "component-checkbox__item--label"]),
|
|
592
|
+
tabindex: o(ce) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[H] : e.tabIndex >= 0 ? e.tabIndex : H + 1,
|
|
593
593
|
onKeydown: [
|
|
594
|
-
|
|
595
|
-
|
|
594
|
+
m[1] || (m[1] = Kt(ga((Y) => !o(ce) && e.hasTabIndexEnter && Y.target.click(), ["prevent"]), ["enter"])),
|
|
595
|
+
m[2] || (m[2] = Kt(ga((Y) => !o(ce) && e.hasTabIndexSpace && Y.target.click(), ["prevent"]), ["space"]))
|
|
596
596
|
]
|
|
597
597
|
}, [
|
|
598
|
-
|
|
599
|
-
class:
|
|
598
|
+
pe("div", {
|
|
599
|
+
class: Fe([Je.value])
|
|
600
600
|
}, null, 2),
|
|
601
|
-
|
|
602
|
-
style:
|
|
603
|
-
},
|
|
604
|
-
], 42,
|
|
601
|
+
pe("span", {
|
|
602
|
+
style: Se([at.value])
|
|
603
|
+
}, kt(fe.text), 5)
|
|
604
|
+
], 42, Ll)
|
|
605
605
|
]))), 128))
|
|
606
|
-
], 16,
|
|
607
|
-
], 6)) :
|
|
606
|
+
], 16, Vl)
|
|
607
|
+
], 6)) : re("", !0);
|
|
608
608
|
}
|
|
609
|
-
}),
|
|
610
|
-
const
|
|
609
|
+
}), Bl = /* @__PURE__ */ Ca(Tl, [["__scopeId", "data-v-1c6afddc"]]);
|
|
610
|
+
const Al = ["id"], _l = ["for"], $l = {
|
|
611
|
+
key: 0,
|
|
612
|
+
class: "component__label--required"
|
|
613
|
+
}, wl = ["for"], Rl = { key: 0 }, Ml = { key: 1 }, zl = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex", "min", "max", "step"], Wl = ["for"], Dl = /* @__PURE__ */ Object.assign({
|
|
611
614
|
name: "NbInput",
|
|
612
615
|
inheritAttrs: !1
|
|
613
616
|
}, {
|
|
@@ -621,8 +624,8 @@ const Cl = ["id"], xl = ["for"], Sl = ["for"], Vl = { key: 0 }, kl = { key: 1 },
|
|
|
621
624
|
type: String,
|
|
622
625
|
default: "b",
|
|
623
626
|
validator: (e = "b") => {
|
|
624
|
-
const
|
|
625
|
-
return ["b", "ib"].includes(
|
|
627
|
+
const y = e.toLowerCase();
|
|
628
|
+
return ["b", "ib"].includes(y);
|
|
626
629
|
}
|
|
627
630
|
},
|
|
628
631
|
tabIndex: {
|
|
@@ -967,6 +970,11 @@ const Cl = ["id"], xl = ["for"], Sl = ["for"], Vl = { key: 0 }, kl = { key: 1 },
|
|
|
967
970
|
type: String,
|
|
968
971
|
default: "Label text"
|
|
969
972
|
},
|
|
973
|
+
labelBreakOnActive: {
|
|
974
|
+
type: Boolean,
|
|
975
|
+
default: !0,
|
|
976
|
+
validator: (e) => typeof e == "boolean" && [!0, !1].includes(e)
|
|
977
|
+
},
|
|
970
978
|
labelBackground: {
|
|
971
979
|
type: String,
|
|
972
980
|
default: "transparent"
|
|
@@ -995,6 +1003,14 @@ const Cl = ["id"], xl = ["for"], Sl = ["for"], Vl = { key: 0 }, kl = { key: 1 },
|
|
|
995
1003
|
type: Number,
|
|
996
1004
|
default: 5
|
|
997
1005
|
},
|
|
1006
|
+
labelRight: {
|
|
1007
|
+
type: Number,
|
|
1008
|
+
default: 0
|
|
1009
|
+
},
|
|
1010
|
+
labelActiveRight: {
|
|
1011
|
+
type: Number,
|
|
1012
|
+
default: 0
|
|
1013
|
+
},
|
|
998
1014
|
fontFamilyLabel: {
|
|
999
1015
|
type: String,
|
|
1000
1016
|
default: "'Lato', sans-serif"
|
|
@@ -1040,200 +1056,211 @@ const Cl = ["id"], xl = ["for"], Sl = ["for"], Vl = { key: 0 }, kl = { key: 1 },
|
|
|
1040
1056
|
"clicked",
|
|
1041
1057
|
"entered"
|
|
1042
1058
|
],
|
|
1043
|
-
setup(e, { emit:
|
|
1044
|
-
|
|
1045
|
-
"
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
"
|
|
1049
|
-
"
|
|
1050
|
-
"
|
|
1051
|
-
"
|
|
1052
|
-
"
|
|
1053
|
-
|
|
1054
|
-
"
|
|
1055
|
-
"
|
|
1056
|
-
|
|
1057
|
-
"
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
"
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
"
|
|
1065
|
-
"
|
|
1066
|
-
"
|
|
1067
|
-
"
|
|
1068
|
-
"
|
|
1069
|
-
|
|
1070
|
-
"
|
|
1071
|
-
"
|
|
1072
|
-
|
|
1073
|
-
"
|
|
1074
|
-
"
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
"
|
|
1078
|
-
"
|
|
1079
|
-
"
|
|
1080
|
-
"
|
|
1081
|
-
|
|
1082
|
-
})),
|
|
1083
|
-
ye.value != null ?
|
|
1084
|
-
}),
|
|
1085
|
-
|
|
1059
|
+
setup(e, { emit: y }) {
|
|
1060
|
+
ya((n) => ({
|
|
1061
|
+
"598b71f8": Jt.value,
|
|
1062
|
+
"1c1eb8e8": Qt.value,
|
|
1063
|
+
"7e7ce396": o(ct),
|
|
1064
|
+
"2beb5748": ta.value,
|
|
1065
|
+
"428926a4": aa.value,
|
|
1066
|
+
"96ddbe74": zt.value,
|
|
1067
|
+
"09d9644b": o(S),
|
|
1068
|
+
"18ecb6d2": o(_e),
|
|
1069
|
+
e9631058: o(ne),
|
|
1070
|
+
"2e9ed8c4": o(ft),
|
|
1071
|
+
"0f798257": o(b),
|
|
1072
|
+
b297f190: o(Je),
|
|
1073
|
+
"2244285e": o(Ge),
|
|
1074
|
+
e54e87ae: Ht.value,
|
|
1075
|
+
f44e651a: o(je),
|
|
1076
|
+
"0a29f1b6": o(Ue),
|
|
1077
|
+
d7cee6e4: o(Ae),
|
|
1078
|
+
"27a5d52a": o(Z),
|
|
1079
|
+
"7ffc2c5a": o(ut),
|
|
1080
|
+
"325114c1": o(dt),
|
|
1081
|
+
"665dcae4": o(nt),
|
|
1082
|
+
"5a5ee334": o(st),
|
|
1083
|
+
"84932c46": o(xe),
|
|
1084
|
+
"0e109cfb": o(ht),
|
|
1085
|
+
b1764ade: Dt.value,
|
|
1086
|
+
"697ee21c": da.value,
|
|
1087
|
+
"2fdb7243": ca.value,
|
|
1088
|
+
"524d369a": jt.value,
|
|
1089
|
+
"89de2454": ia.value,
|
|
1090
|
+
"71a4c443": o(me),
|
|
1091
|
+
ed648ac8: oa.value,
|
|
1092
|
+
b2bfb73a: Ft.value,
|
|
1093
|
+
"3df309bc": Ot.value,
|
|
1094
|
+
"22588dcb": Xt.value,
|
|
1095
|
+
"25132f25": ea.value,
|
|
1096
|
+
"55495c15": n.styleButtonColor,
|
|
1097
|
+
"8993b80c": Zt.value
|
|
1098
|
+
})), pa(() => {
|
|
1099
|
+
ye.value != null ? C.value === "number" && typeof ye.value == "number" ? Q.value = ye.value : Q.value = String(ye.value) : Q.value = "";
|
|
1100
|
+
}), $a(() => {
|
|
1101
|
+
_t();
|
|
1086
1102
|
});
|
|
1087
|
-
const
|
|
1088
|
-
nbId:
|
|
1103
|
+
const h = y, P = e, {
|
|
1104
|
+
nbId: N,
|
|
1089
1105
|
display: Ve,
|
|
1090
|
-
hasTabIndexEnter:
|
|
1091
|
-
ariaLabel:
|
|
1106
|
+
hasTabIndexEnter: be,
|
|
1107
|
+
ariaLabel: Re,
|
|
1092
1108
|
ariaAttrs: ke,
|
|
1093
|
-
textColor:
|
|
1094
|
-
caretColor:
|
|
1095
|
-
selectionBgColor:
|
|
1096
|
-
selectionTextColor:
|
|
1097
|
-
hasBorderRadius:
|
|
1098
|
-
borderRadius:
|
|
1109
|
+
textColor: ie,
|
|
1110
|
+
caretColor: J,
|
|
1111
|
+
selectionBgColor: Oe,
|
|
1112
|
+
selectionTextColor: Me,
|
|
1113
|
+
hasBorderRadius: ae,
|
|
1114
|
+
borderRadius: G,
|
|
1099
1115
|
disabled: w,
|
|
1100
|
-
fontFamily:
|
|
1101
|
-
fontSize:
|
|
1102
|
-
fontWeight:
|
|
1116
|
+
fontFamily: le,
|
|
1117
|
+
fontSize: se,
|
|
1118
|
+
fontWeight: K,
|
|
1103
1119
|
fontFamilyMsg: Le,
|
|
1104
|
-
fontSizeMsg:
|
|
1105
|
-
fontWeightMsg:
|
|
1106
|
-
textMessageColor:
|
|
1107
|
-
inputWidth:
|
|
1108
|
-
inputStyle:
|
|
1109
|
-
activeTextStyle:
|
|
1110
|
-
sizeMediaQuery:
|
|
1120
|
+
fontSizeMsg: de,
|
|
1121
|
+
fontWeightMsg: F,
|
|
1122
|
+
textMessageColor: ge,
|
|
1123
|
+
inputWidth: X,
|
|
1124
|
+
inputStyle: he,
|
|
1125
|
+
activeTextStyle: ce,
|
|
1126
|
+
sizeMediaQuery: Ce,
|
|
1111
1127
|
inputReadonly: $,
|
|
1112
1128
|
showInputEye: L,
|
|
1113
|
-
inputType:
|
|
1114
|
-
hasTrim:
|
|
1115
|
-
inputUppercase:
|
|
1116
|
-
inputName:
|
|
1117
|
-
inputPlaceholder:
|
|
1129
|
+
inputType: C,
|
|
1130
|
+
hasTrim: ze,
|
|
1131
|
+
inputUppercase: He,
|
|
1132
|
+
inputName: We,
|
|
1133
|
+
inputPlaceholder: at,
|
|
1118
1134
|
inputText: ye,
|
|
1119
|
-
theme:
|
|
1120
|
-
inputEyeIcon:
|
|
1135
|
+
theme: lt,
|
|
1136
|
+
inputEyeIcon: mt,
|
|
1121
1137
|
tabindex: Qe,
|
|
1122
1138
|
inputEyeIconHidden: Te,
|
|
1123
|
-
lightBgColor:
|
|
1124
|
-
lightBgColorFocus:
|
|
1125
|
-
lightEyeBgColor:
|
|
1139
|
+
lightBgColor: xe,
|
|
1140
|
+
lightBgColorFocus: ht,
|
|
1141
|
+
lightEyeBgColor: nt,
|
|
1126
1142
|
lightEyeBgColorActive: st,
|
|
1127
1143
|
lightDisabledBgColor: dt,
|
|
1128
1144
|
lightTextColor: ct,
|
|
1129
|
-
darkBgColor:
|
|
1145
|
+
darkBgColor: je,
|
|
1130
1146
|
darkBgColorFocus: Ue,
|
|
1131
1147
|
darkEyeBgColor: Je,
|
|
1132
1148
|
darkEyeBgColorActive: Ge,
|
|
1133
|
-
darkDisabledBgColor:
|
|
1134
|
-
darkTextColor:
|
|
1135
|
-
darkDisabledEyeBgColor:
|
|
1136
|
-
lightDisabledEyeBgColor:
|
|
1149
|
+
darkDisabledBgColor: b,
|
|
1150
|
+
darkTextColor: S,
|
|
1151
|
+
darkDisabledEyeBgColor: ne,
|
|
1152
|
+
lightDisabledEyeBgColor: Z,
|
|
1137
1153
|
textAlign: me,
|
|
1138
|
-
showMsg:
|
|
1139
|
-
hasMsg:
|
|
1140
|
-
hasIcon:
|
|
1154
|
+
showMsg: Be,
|
|
1155
|
+
hasMsg: Xe,
|
|
1156
|
+
hasIcon: q,
|
|
1141
1157
|
iconDirection: d,
|
|
1142
|
-
iconPadding:
|
|
1158
|
+
iconPadding: m,
|
|
1143
1159
|
iconPaddingInput: fe,
|
|
1144
|
-
iconMargin:
|
|
1145
|
-
iconBorderRadius:
|
|
1146
|
-
iconLightTextColor:
|
|
1147
|
-
iconDarkTextColor:
|
|
1148
|
-
iconLightBgColor:
|
|
1149
|
-
iconDarkBgColor:
|
|
1150
|
-
iconLightBgColorActive:
|
|
1151
|
-
iconDarkBgColorActive:
|
|
1152
|
-
iconLightDisabledBgColor:
|
|
1160
|
+
iconMargin: H,
|
|
1161
|
+
iconBorderRadius: Y,
|
|
1162
|
+
iconLightTextColor: Ae,
|
|
1163
|
+
iconDarkTextColor: _e,
|
|
1164
|
+
iconLightBgColor: De,
|
|
1165
|
+
iconDarkBgColor: qe,
|
|
1166
|
+
iconLightBgColorActive: Ze,
|
|
1167
|
+
iconDarkBgColorActive: ot,
|
|
1168
|
+
iconLightDisabledBgColor: ut,
|
|
1153
1169
|
iconDarkDisabledBgColor: ft,
|
|
1154
|
-
iconWidth:
|
|
1155
|
-
iconSize:
|
|
1156
|
-
showLabel:
|
|
1157
|
-
|
|
1170
|
+
iconWidth: vt,
|
|
1171
|
+
iconSize: pt,
|
|
1172
|
+
showLabel: Ke,
|
|
1173
|
+
label: Lt,
|
|
1174
|
+
labelBreakOnActive: g,
|
|
1175
|
+
labelBackground: I,
|
|
1158
1176
|
labelPadding: T,
|
|
1159
|
-
labelBorderRadius:
|
|
1160
|
-
labelLeft:
|
|
1161
|
-
inputLabelMarginActive:
|
|
1162
|
-
labelActiveTop:
|
|
1163
|
-
labelActiveLeft:
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1177
|
+
labelBorderRadius: $e,
|
|
1178
|
+
labelLeft: f,
|
|
1179
|
+
inputLabelMarginActive: rt,
|
|
1180
|
+
labelActiveTop: wt,
|
|
1181
|
+
labelActiveLeft: Rt,
|
|
1182
|
+
labelRight: ee,
|
|
1183
|
+
labelActiveRight: we,
|
|
1184
|
+
fontFamilyLabel: V,
|
|
1185
|
+
fontSizeLabel: Ct,
|
|
1186
|
+
fontSizeLabelActive: R,
|
|
1187
|
+
fontWeightLabel: z,
|
|
1188
|
+
lightTextColorLabel: te,
|
|
1189
|
+
lightTextColorLabelActive: E,
|
|
1190
|
+
darkTextColorLabel: Et,
|
|
1191
|
+
darkTextColorLabelActive: Pt
|
|
1192
|
+
} = ma(P), Q = j(""), Tt = j(null), et = j(""), bt = j(!1), it = j(!1), k = a(() => {
|
|
1193
|
+
const n = w.value ? "component-disabled" : "", t = Ve.value !== "b" ? "inline-block" : "block", l = ie ? ie.value : "ffffff", s = J.value ? J.value : "", i = Oe.value ? Oe.value : "", v = Me.value ? Me.value : "", c = ae.value ? ae.value : !1, p = G.value !== 0 && !G.value || G.value < 0 ? 0 : G.value, x = le.value ? le.value : "'Lato', sans-serif", _ = se.value ? se.value : null, W = K.value !== 0 && !K.value || K.value < 0 ? 100 : K.value, O = Le.value ? Le.value : "'Lato', sans-serif", ue = de.value ? de.value : "1em", Ie = F.value !== 0 && !F.value || F.value < 0 ? 100 : F.value, tt = ge.value ? ge.value : "#f15574", Ee = X.value ? X.value : 200, Pe = ce.value ? ce.value : "normal", xa = Ce.value ? Ce.value : "xs", Sa = $.value ? $.value : !1, Va = L.value ? L.value : !1, ka = C.value ? C.value : "text", La = He.value ? He.value : !1, Ta = lt.value ? lt.value : "normal", Ba = me.value ? me.value : "left", Aa = he.value ? he.value : "background", wa = m.value ? m.value : "5px 10px", Ra = H.value ? H.value : "0", Ma = fe.value ? fe.value : 10, za = Ae.value ? Ae.value : "#000000", Wa = _e.value ? _e.value : "#000000", Da = De.value ? De.value : "transparent", Na = qe.value ? qe.value : "transparent", Ia = Y.value !== 0 && !Y.value || Y.value < 0 ? 0 : Y.value, Ea = Ze.value ? Ze.value : "transparent", Pa = ot.value ? ot.value : "transparent", Fa = vt.value ? vt.value : 32, Oa = pt.value ? pt.value : 1, qa = Ke.value ? Ke.value : !1, Ha = f.value !== 0 && !f.value || f.value < 0 ? 5 : f.value, ja = I.value ? I.value : "transparent", Ua = rt.value !== 0 && !rt.value || rt.value < 0 ? 15 : rt.value, Ga = T.value ? T.value : "1px 5px", Za = $e.value !== 0 && !$e.value || $e.value < 0 ? 0 : $e.value, el = wt.value === null || wt.value === void 0 ? -13 : wt.value, tl = Rt.value === null || Rt.value === void 0 ? -10 : Rt.value, al = ee.value === null || ee.value === void 0 ? 0 : ee.value, ll = we.value === null || we.value === void 0 ? 0 : we.value, nl = V.value ? V.value : "'Lato', sans-serif", ol = Ct.value ? Ct.value : "1em", ul = R.value ? R.value : "0.8em", rl = z.value ? z.value : 400, il = te.value ? te.value : "#ffffff", sl = Et.value ? Et.value : "#000000", dl = E.value ? E.value : "#ffffff", cl = Pt.value ? Pt.value : "#000000";
|
|
1194
|
+
return {
|
|
1195
|
+
disabled: n,
|
|
1196
|
+
display: t,
|
|
1197
|
+
font: x,
|
|
1198
|
+
fontSize: _,
|
|
1199
|
+
fontWeight: W,
|
|
1200
|
+
fontFamilyMsg: O,
|
|
1201
|
+
fontSizeMsg: ue,
|
|
1202
|
+
fontWeightMsg: Ie,
|
|
1203
|
+
textMessageColor: tt,
|
|
1204
|
+
textColor: l,
|
|
1205
|
+
caretColor: s,
|
|
1206
|
+
selectionBgColor: i,
|
|
1207
|
+
selectionTextColor: v,
|
|
1208
|
+
hasBorderRadius: c,
|
|
1209
|
+
borderRadius: p,
|
|
1210
|
+
textAlign: Ba,
|
|
1211
|
+
inputWidth: Ee,
|
|
1212
|
+
activeTextStyle: Pe,
|
|
1213
|
+
sizeMediaQuery: xa,
|
|
1214
|
+
inputReadonly: Sa,
|
|
1215
|
+
showInputEye: Va,
|
|
1216
|
+
inputType: ka,
|
|
1217
|
+
inputUppercase: La,
|
|
1218
|
+
theme: Ta,
|
|
1219
|
+
inputStyle: Aa,
|
|
1220
|
+
iconPadding: wa,
|
|
1221
|
+
iconMargin: Ra,
|
|
1222
|
+
iconPaddingInput: Ma,
|
|
1223
|
+
iconLightTextColor: za,
|
|
1224
|
+
iconDarkTextColor: Wa,
|
|
1225
|
+
iconLightBgColor: Da,
|
|
1226
|
+
iconDarkBgColor: Na,
|
|
1227
|
+
iconBorderRadius: Ia,
|
|
1228
|
+
iconLightBgColorActive: Ea,
|
|
1229
|
+
iconDarkBgColorActive: Pa,
|
|
1230
|
+
iconWidth: Fa,
|
|
1231
|
+
iconSize: Oa,
|
|
1232
|
+
showLabel: qa,
|
|
1233
|
+
labelBackground: ja,
|
|
1234
|
+
labelPadding: Ga,
|
|
1235
|
+
labelBorderRadius: Za,
|
|
1236
|
+
labelLeft: Ha,
|
|
1237
|
+
inputLabelMarginActive: Ua,
|
|
1238
|
+
labelActiveTop: el,
|
|
1239
|
+
labelActiveLeft: tl,
|
|
1240
|
+
labelRight: al,
|
|
1241
|
+
labelActiveRight: ll,
|
|
1242
|
+
fontFamilyLabel: nl,
|
|
1243
|
+
fontSizeLabel: ol,
|
|
1244
|
+
fontSizeLabelActive: ul,
|
|
1245
|
+
fontWeightLabel: rl,
|
|
1246
|
+
lightTextColorLabel: il,
|
|
1247
|
+
darkTextColorLabel: sl,
|
|
1248
|
+
lightTextColorLabelActive: dl,
|
|
1249
|
+
darkTextColorLabelActive: cl
|
|
1250
|
+
};
|
|
1251
|
+
}), Yt = a(() => k.value.disabled), Mt = a(() => {
|
|
1252
|
+
const n = k.value, t = Wt.value;
|
|
1174
1253
|
return {
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
fontSize: p,
|
|
1179
|
-
fontWeight: S,
|
|
1180
|
-
fontFamilyMsg: A,
|
|
1181
|
-
fontSizeMsg: z,
|
|
1182
|
-
fontWeightMsg: O,
|
|
1183
|
-
textMessageColor: ie,
|
|
1184
|
-
textColor: Q,
|
|
1185
|
-
caretColor: t,
|
|
1186
|
-
selectionBgColor: n,
|
|
1187
|
-
selectionTextColor: s,
|
|
1188
|
-
hasBorderRadius: i,
|
|
1189
|
-
borderRadius: v,
|
|
1190
|
-
textAlign: Va,
|
|
1191
|
-
inputWidth: De,
|
|
1192
|
-
activeTextStyle: Ze,
|
|
1193
|
-
sizeMediaQuery: Ne,
|
|
1194
|
-
inputReadonly: Ie,
|
|
1195
|
-
showInputEye: ha,
|
|
1196
|
-
inputType: Ca,
|
|
1197
|
-
inputUppercase: xa,
|
|
1198
|
-
theme: Sa,
|
|
1199
|
-
inputStyle: ka,
|
|
1200
|
-
iconPadding: La,
|
|
1201
|
-
iconMargin: Ta,
|
|
1202
|
-
iconPaddingInput: Ba,
|
|
1203
|
-
iconLightTextColor: Aa,
|
|
1204
|
-
iconDarkTextColor: $a,
|
|
1205
|
-
iconLightBgColor: _a,
|
|
1206
|
-
iconDarkBgColor: wa,
|
|
1207
|
-
iconBorderRadius: Ra,
|
|
1208
|
-
iconLightBgColorActive: Ma,
|
|
1209
|
-
iconDarkBgColorActive: za,
|
|
1210
|
-
iconWidth: Da,
|
|
1211
|
-
iconSize: Na,
|
|
1212
|
-
showLabel: Ia,
|
|
1213
|
-
labelBackground: Ea,
|
|
1214
|
-
labelPadding: Fa,
|
|
1215
|
-
labelBorderRadius: Ga,
|
|
1216
|
-
labelLeft: Wa,
|
|
1217
|
-
inputLabelMarginActive: Pa,
|
|
1218
|
-
labelActiveTop: Ka,
|
|
1219
|
-
labelActiveLeft: Ya,
|
|
1220
|
-
fontFamilyLabel: Qa,
|
|
1221
|
-
fontSizeLabel: Ja,
|
|
1222
|
-
fontSizeLabelActive: Xa,
|
|
1223
|
-
fontWeightLabel: Za,
|
|
1224
|
-
lightTextColorLabel: el,
|
|
1225
|
-
darkTextColorLabel: tl,
|
|
1226
|
-
lightTextColorLabelActive: al,
|
|
1227
|
-
darkTextColorLabelActive: ll
|
|
1254
|
+
display: n.display,
|
|
1255
|
+
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
1256
|
+
paddingTop: t && Ke.value ? `${Math.abs(n.labelActiveTop)}px` : "0"
|
|
1228
1257
|
};
|
|
1229
|
-
}),
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
let c = "";
|
|
1236
|
-
switch (l.sizeMediaQuery) {
|
|
1258
|
+
}), Qt = a(() => {
|
|
1259
|
+
const n = k.value;
|
|
1260
|
+
if (n.fontSize)
|
|
1261
|
+
return n.fontSize;
|
|
1262
|
+
let t = "";
|
|
1263
|
+
switch (n.sizeMediaQuery) {
|
|
1237
1264
|
case "sm":
|
|
1238
1265
|
return "1.2em";
|
|
1239
1266
|
case "md":
|
|
@@ -1241,34 +1268,34 @@ const Cl = ["id"], xl = ["for"], Sl = ["for"], Vl = { key: 0 }, kl = { key: 1 },
|
|
|
1241
1268
|
case "lg":
|
|
1242
1269
|
return "2em";
|
|
1243
1270
|
default:
|
|
1244
|
-
|
|
1271
|
+
t = "1.2em";
|
|
1245
1272
|
}
|
|
1246
|
-
return
|
|
1247
|
-
}),
|
|
1248
|
-
const
|
|
1273
|
+
return t;
|
|
1274
|
+
}), Bt = a(() => {
|
|
1275
|
+
const n = k.value, t = Wt.value;
|
|
1249
1276
|
return {
|
|
1250
|
-
fontWeight:
|
|
1251
|
-
marginTop:
|
|
1277
|
+
fontWeight: n.fontWeight,
|
|
1278
|
+
marginTop: t && Ke.value ? `${n.inputLabelMarginActive}px` : "0"
|
|
1252
1279
|
};
|
|
1253
|
-
}),
|
|
1254
|
-
const
|
|
1255
|
-
return
|
|
1256
|
-
}),
|
|
1257
|
-
const
|
|
1258
|
-
return
|
|
1259
|
-
}),
|
|
1260
|
-
const
|
|
1261
|
-
return
|
|
1262
|
-
}),
|
|
1263
|
-
const
|
|
1264
|
-
return
|
|
1265
|
-
}),
|
|
1266
|
-
const
|
|
1267
|
-
return
|
|
1268
|
-
width: `${
|
|
1280
|
+
}), xt = a(() => {
|
|
1281
|
+
const n = k.value;
|
|
1282
|
+
return n.inputStyle !== "line" && n.hasBorderRadius ? { borderRadius: `${n.borderRadius}rem` } : {};
|
|
1283
|
+
}), Jt = a(() => k.value.font), Ft = a(() => k.value.fontFamilyMsg), Ot = a(() => k.value.fontSizeMsg), Xt = a(() => k.value.fontWeightMsg), Zt = a(() => k.value.textColor), ea = a(() => k.value.textMessageColor), ta = a(() => {
|
|
1284
|
+
const n = k.value;
|
|
1285
|
+
return n.caretColor || (n.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1286
|
+
}), aa = a(() => {
|
|
1287
|
+
const n = k.value;
|
|
1288
|
+
return n.selectionBgColor || (n.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1289
|
+
}), zt = a(() => {
|
|
1290
|
+
const n = k.value;
|
|
1291
|
+
return n.selectionTextColor || (n.theme === "dark" ? "#000000" : "#ffffff");
|
|
1292
|
+
}), qt = a(() => {
|
|
1293
|
+
const n = k.value;
|
|
1294
|
+
return n.display === "block" ? { width: "100%" } : {
|
|
1295
|
+
width: `${n.inputWidth}px`
|
|
1269
1296
|
};
|
|
1270
|
-
}),
|
|
1271
|
-
switch (
|
|
1297
|
+
}), At = a(() => {
|
|
1298
|
+
switch (he.value) {
|
|
1272
1299
|
case "line":
|
|
1273
1300
|
return "component__input--line";
|
|
1274
1301
|
case "border":
|
|
@@ -1277,7 +1304,7 @@ const Cl = ["id"], xl = ["for"], Sl = ["for"], Vl = { key: 0 }, kl = { key: 1 },
|
|
|
1277
1304
|
return "component__input--background";
|
|
1278
1305
|
}
|
|
1279
1306
|
}), r = a(() => {
|
|
1280
|
-
switch (
|
|
1307
|
+
switch (k.value.activeTextStyle) {
|
|
1281
1308
|
case "italic":
|
|
1282
1309
|
return "component__input--active--italic";
|
|
1283
1310
|
case "oblique":
|
|
@@ -1285,8 +1312,8 @@ const Cl = ["id"], xl = ["for"], Sl = ["for"], Vl = { key: 0 }, kl = { key: 1 },
|
|
|
1285
1312
|
default:
|
|
1286
1313
|
return "component__input--active--normal";
|
|
1287
1314
|
}
|
|
1288
|
-
}),
|
|
1289
|
-
switch (
|
|
1315
|
+
}), B = a(() => {
|
|
1316
|
+
switch (k.value.sizeMediaQuery) {
|
|
1290
1317
|
case "sm":
|
|
1291
1318
|
return "component__sm";
|
|
1292
1319
|
case "md":
|
|
@@ -1296,199 +1323,220 @@ const Cl = ["id"], xl = ["for"], Sl = ["for"], Vl = { key: 0 }, kl = { key: 1 },
|
|
|
1296
1323
|
default:
|
|
1297
1324
|
return "";
|
|
1298
1325
|
}
|
|
1299
|
-
}),
|
|
1300
|
-
switch (
|
|
1326
|
+
}), ve = a(() => {
|
|
1327
|
+
switch (k.value.theme) {
|
|
1301
1328
|
case "dark":
|
|
1302
1329
|
return "component__theme--dark";
|
|
1303
1330
|
default:
|
|
1304
1331
|
return "component__theme--light";
|
|
1305
1332
|
}
|
|
1306
|
-
}),
|
|
1307
|
-
const
|
|
1308
|
-
return !!(
|
|
1309
|
-
}),
|
|
1310
|
-
const
|
|
1311
|
-
return
|
|
1312
|
-
}),
|
|
1313
|
-
const
|
|
1314
|
-
ke.value && Object.keys(ke.value).forEach((
|
|
1315
|
-
const
|
|
1316
|
-
"aria-label":
|
|
1333
|
+
}), u = a(() => k.value.inputReadonly ? "component__input--read-only" : ""), A = a(() => k.value.inputUppercase ? "component__input--uppercase" : ""), Ne = a(() => {
|
|
1334
|
+
const n = k.value;
|
|
1335
|
+
return !!(n.showInputEye && n.inputType === "password");
|
|
1336
|
+
}), Ye = a(() => bt.value ? mt.value : Te.value), gt = a(() => We.value ? We.value : `${N.value}-name-label`), la = a(() => Ke.value ? it.value ? at.value : "" : at.value), Wt = a(() => {
|
|
1337
|
+
const n = Q.value;
|
|
1338
|
+
return it.value || n != null && String(n).trim().length > 0;
|
|
1339
|
+
}), na = a(() => k.value.inputType === "password" ? "component__input__eye-default--hidden" : ""), St = a(() => it.value ? "component__input--active" : "component__input--no-active"), oa = a(() => Ne.value ? "6px 50px 6px 10px" : "6px 10px"), ua = a(() => !!(Be.value && Xe.value)), ra = a(() => {
|
|
1340
|
+
const n = {};
|
|
1341
|
+
ke.value && Object.keys(ke.value).forEach((s) => n[`aria-${s}`] = ke.value[s]);
|
|
1342
|
+
const t = {
|
|
1343
|
+
"aria-label": Re.value,
|
|
1317
1344
|
"aria-disabled": w.value,
|
|
1318
|
-
...
|
|
1345
|
+
...n
|
|
1319
1346
|
};
|
|
1320
1347
|
return Object.fromEntries(
|
|
1321
|
-
Object.entries(
|
|
1348
|
+
Object.entries(t).filter(([l, s]) => s != null)
|
|
1322
1349
|
);
|
|
1323
|
-
}),
|
|
1324
|
-
const
|
|
1325
|
-
return
|
|
1326
|
-
}),
|
|
1327
|
-
const
|
|
1328
|
-
return
|
|
1329
|
-
}),
|
|
1330
|
-
const
|
|
1331
|
-
return
|
|
1332
|
-
}),
|
|
1333
|
-
const
|
|
1334
|
-
return
|
|
1335
|
-
}),
|
|
1336
|
-
const
|
|
1337
|
-
return
|
|
1338
|
-
}),
|
|
1339
|
-
const
|
|
1350
|
+
}), ia = a(() => q.value ? `${pt.value}rem` : "0"), Dt = a(() => q.value ? `${vt.value}px` : "0"), sa = a(() => q.value ? `component__icon--${d.value}` : ""), da = a(() => {
|
|
1351
|
+
const n = k.value;
|
|
1352
|
+
return q.value ? n.iconPadding : "0";
|
|
1353
|
+
}), ca = a(() => {
|
|
1354
|
+
const n = k.value;
|
|
1355
|
+
return q.value ? n.iconMargin : "0";
|
|
1356
|
+
}), Ht = a(() => {
|
|
1357
|
+
const n = k.value;
|
|
1358
|
+
return q.value ? n.theme === "dark" ? n.iconDarkBgColor : n.iconLightBgColor : "transparent";
|
|
1359
|
+
}), jt = a(() => {
|
|
1360
|
+
const n = k.value;
|
|
1361
|
+
return q.value ? `${n.iconBorderRadius}rem` : "0";
|
|
1362
|
+
}), Ut = a(() => {
|
|
1363
|
+
const n = k.value;
|
|
1364
|
+
return q.value ? d.value === "left" ? { paddingLeft: `${n.iconPaddingInput}px` } : { paddingRight: `${n.iconPaddingInput}px` } : {};
|
|
1365
|
+
}), yt = a(() => {
|
|
1366
|
+
const n = k.value, t = Wt.value, l = t ? n.lightTextColorLabelActive : n.lightTextColorLabel, s = t ? n.darkTextColorLabelActive : n.darkTextColorLabel;
|
|
1340
1367
|
return {
|
|
1341
|
-
fontFamily:
|
|
1342
|
-
fontSize:
|
|
1343
|
-
fontWeight:
|
|
1344
|
-
color:
|
|
1345
|
-
top:
|
|
1346
|
-
left:
|
|
1347
|
-
|
|
1368
|
+
fontFamily: n.fontFamilyLabel,
|
|
1369
|
+
fontSize: t ? n.fontSizeLabelActive : n.fontSizeLabel,
|
|
1370
|
+
fontWeight: n.fontWeightLabel,
|
|
1371
|
+
color: n.theme === "dark" ? s : l,
|
|
1372
|
+
top: t ? `${n.labelActiveTop}px` : "50%",
|
|
1373
|
+
left: t ? `${n.labelActiveLeft}px` : `${n.labelLeft}px`,
|
|
1374
|
+
right: t ? `${n.labelActiveRight}px` : `${n.labelRight}px`,
|
|
1375
|
+
transform: t ? "translateY(0)" : "translateY(-50%)",
|
|
1348
1376
|
transition: "all 0.2s ease",
|
|
1349
|
-
backgroundColor:
|
|
1350
|
-
padding:
|
|
1351
|
-
borderRadius:
|
|
1377
|
+
backgroundColor: t ? n.labelBackground : "transparent",
|
|
1378
|
+
padding: t ? n.labelPadding : "0",
|
|
1379
|
+
borderRadius: t ? `${n.labelBorderRadius}rem` : "0",
|
|
1380
|
+
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
1381
|
+
...t ? {
|
|
1382
|
+
whiteSpace: g.value ? "nowrap" : "normal",
|
|
1383
|
+
wordWrap: g.value ? "normal" : "break-word",
|
|
1384
|
+
overflowWrap: g.value ? "normal" : "break-word",
|
|
1385
|
+
maxWidth: "100%",
|
|
1386
|
+
textOverflow: g.value ? "ellipsis" : "clip",
|
|
1387
|
+
overflow: g.value ? "hidden" : "visible"
|
|
1388
|
+
} : {}
|
|
1352
1389
|
};
|
|
1353
1390
|
});
|
|
1354
1391
|
a(() => {
|
|
1355
|
-
const
|
|
1356
|
-
return
|
|
1392
|
+
const n = k.value;
|
|
1393
|
+
return n.theme === "dark" ? n.darkTextColorLabelActive : n.lightTextColorLabelActive;
|
|
1357
1394
|
});
|
|
1358
|
-
const
|
|
1359
|
-
ye.value != null ?
|
|
1360
|
-
},
|
|
1361
|
-
const
|
|
1362
|
-
if (
|
|
1395
|
+
const _t = () => {
|
|
1396
|
+
ye.value != null ? C.value === "number" && typeof ye.value == "number" ? Q.value = ye.value : Q.value = String(ye.value) : Q.value = "", et.value = C.value;
|
|
1397
|
+
}, Vt = () => {
|
|
1398
|
+
const n = k.value;
|
|
1399
|
+
if (n.inputReadonly || n.disabled)
|
|
1363
1400
|
return;
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1366
|
-
},
|
|
1367
|
-
if (
|
|
1368
|
-
if (
|
|
1401
|
+
const t = !bt.value;
|
|
1402
|
+
t ? et.value = "text" : et.value = C.value, bt.value = t;
|
|
1403
|
+
}, $t = a(() => et.value === "number"), Nt = (n) => {
|
|
1404
|
+
if (C.value === "number") {
|
|
1405
|
+
if (n === "" || n === null || n === void 0)
|
|
1369
1406
|
return "";
|
|
1370
1407
|
{
|
|
1371
|
-
const
|
|
1372
|
-
return isNaN(
|
|
1408
|
+
const t = typeof n == "number" ? n : Number(n);
|
|
1409
|
+
return isNaN(t) ? n : t;
|
|
1373
1410
|
}
|
|
1374
1411
|
}
|
|
1375
|
-
return
|
|
1376
|
-
},
|
|
1377
|
-
|
|
1378
|
-
},
|
|
1379
|
-
w.value ||
|
|
1412
|
+
return n;
|
|
1413
|
+
}, Gt = () => {
|
|
1414
|
+
h("clicked");
|
|
1415
|
+
}, oe = (n) => {
|
|
1416
|
+
n.stopPropagation(), !(w.value || k.value.inputReadonly) && Tt.value && Tt.value.focus();
|
|
1417
|
+
}, fa = () => {
|
|
1418
|
+
w.value || k.value.inputReadonly || !be.value || h("entered", Nt(Q.value));
|
|
1380
1419
|
};
|
|
1381
|
-
return
|
|
1382
|
-
|
|
1383
|
-
}, { immediate: !0 }),
|
|
1384
|
-
if (
|
|
1385
|
-
if (
|
|
1386
|
-
|
|
1420
|
+
return U(C, (n) => {
|
|
1421
|
+
et.value = n;
|
|
1422
|
+
}, { immediate: !0 }), U(ye, (n) => {
|
|
1423
|
+
if (n != null)
|
|
1424
|
+
if (C.value === "number" && typeof n == "number")
|
|
1425
|
+
n !== Q.value && (Q.value = n);
|
|
1387
1426
|
else {
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1427
|
+
const t = String(n);
|
|
1428
|
+
t !== Q.value && (Q.value = t);
|
|
1390
1429
|
}
|
|
1391
1430
|
else
|
|
1392
|
-
|
|
1393
|
-
}, { immediate: !0 }),
|
|
1394
|
-
|
|
1395
|
-
}),
|
|
1396
|
-
|
|
1397
|
-
}),
|
|
1398
|
-
|
|
1399
|
-
}, { immediate: !0 }),
|
|
1400
|
-
|
|
1401
|
-
}),
|
|
1402
|
-
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1431
|
+
Q.value !== "" && (Q.value = "");
|
|
1432
|
+
}, { immediate: !0 }), U(Q, (n) => {
|
|
1433
|
+
ze.value && typeof n == "string" && (n = n.trim()), h("changed", Nt(n));
|
|
1434
|
+
}), U(it, (n) => {
|
|
1435
|
+
h(n ? "focused" : "blurred");
|
|
1436
|
+
}), U(bt, (n) => {
|
|
1437
|
+
h("show-input-eye", n);
|
|
1438
|
+
}, { immediate: !0 }), U(Q, (n) => {
|
|
1439
|
+
ze.value && typeof n == "string" && (n = n.trim()), h("current-value", Nt(n));
|
|
1440
|
+
}), U(C, (n) => {
|
|
1441
|
+
n === "password" && nextTick(() => {
|
|
1442
|
+
const t = document.getElementById(We.value);
|
|
1443
|
+
t && (t.type = "password", t.removeAttribute("autocomplete"));
|
|
1405
1444
|
});
|
|
1406
|
-
}), (
|
|
1445
|
+
}), (n, t) => o(N) ? (M(), D("div", ba({
|
|
1407
1446
|
key: 0,
|
|
1408
|
-
class: ["nb-wrapper",
|
|
1409
|
-
style: [Mt.value,
|
|
1447
|
+
class: ["nb-wrapper", Yt.value],
|
|
1448
|
+
style: [Mt.value, qt.value, xt.value],
|
|
1410
1449
|
role: "input"
|
|
1411
|
-
},
|
|
1412
|
-
|
|
1413
|
-
id: o(
|
|
1414
|
-
class:
|
|
1415
|
-
style:
|
|
1416
|
-
onClick:
|
|
1450
|
+
}, ra.value), [
|
|
1451
|
+
pe("div", {
|
|
1452
|
+
id: o(N),
|
|
1453
|
+
class: Fe(["nb-reset", "component", B.value, ve.value, u.value, At.value]),
|
|
1454
|
+
style: Se([Bt.value, qt.value, xt.value]),
|
|
1455
|
+
onClick: Gt
|
|
1417
1456
|
}, [
|
|
1418
|
-
o(
|
|
1457
|
+
o(Ke) ? (M(), D("label", {
|
|
1419
1458
|
key: 0,
|
|
1420
|
-
for:
|
|
1459
|
+
for: gt.value,
|
|
1421
1460
|
class: "component__label",
|
|
1422
|
-
style:
|
|
1423
|
-
|
|
1424
|
-
|
|
1461
|
+
style: Se([yt.value]),
|
|
1462
|
+
onClick: oe
|
|
1463
|
+
}, [
|
|
1464
|
+
It(kt(o(Lt)), 1),
|
|
1465
|
+
e.required ? (M(), D("span", $l, "*")) : re("", !0)
|
|
1466
|
+
], 12, _l)) : re("", !0),
|
|
1467
|
+
Ne.value ? (M(), D("div", {
|
|
1425
1468
|
key: 1,
|
|
1426
|
-
class:
|
|
1427
|
-
style:
|
|
1428
|
-
onClick:
|
|
1469
|
+
class: Fe(["component__eye", St.value]),
|
|
1470
|
+
style: Se([xt.value]),
|
|
1471
|
+
onClick: Vt
|
|
1429
1472
|
}, [
|
|
1430
|
-
|
|
1431
|
-
for:
|
|
1432
|
-
class:
|
|
1473
|
+
pe("label", {
|
|
1474
|
+
for: gt.value,
|
|
1475
|
+
class: Fe(["component__eye-icon", "fas"])
|
|
1433
1476
|
}, [
|
|
1434
|
-
e.inputEyeCustomIcon ? (
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
], !0) :
|
|
1438
|
-
|
|
1477
|
+
e.inputEyeCustomIcon ? (M(), D("span", Ml, [
|
|
1478
|
+
bt.value ? va(n.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
1479
|
+
t[4] || (t[4] = It("show"))
|
|
1480
|
+
], !0) : va(n.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1481
|
+
t[5] || (t[5] = It("hidden"))
|
|
1439
1482
|
], !0)
|
|
1440
|
-
])) : (
|
|
1441
|
-
], 8,
|
|
1442
|
-
], 6)) :
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1483
|
+
])) : (M(), D("span", Rl, kt(Ye.value), 1))
|
|
1484
|
+
], 8, wl)
|
|
1485
|
+
], 6)) : re("", !0),
|
|
1486
|
+
ha(pe("input", {
|
|
1487
|
+
ref_key: "inputRef",
|
|
1488
|
+
ref: Tt,
|
|
1489
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => Q.value = l),
|
|
1490
|
+
id: gt.value,
|
|
1491
|
+
name: gt.value,
|
|
1492
|
+
type: et.value,
|
|
1493
|
+
class: Fe(["component__input", [
|
|
1494
|
+
A.value,
|
|
1495
|
+
na.value,
|
|
1451
1496
|
r.value
|
|
1452
1497
|
]]),
|
|
1453
|
-
placeholder:
|
|
1498
|
+
placeholder: la.value,
|
|
1454
1499
|
disabled: o(w) || o($),
|
|
1455
1500
|
required: e.required,
|
|
1456
1501
|
readonly: o($),
|
|
1457
1502
|
autocomplete: e.inputAutocomplete,
|
|
1458
1503
|
tabindex: o(w) || o($) ? -1 : o(Qe),
|
|
1459
|
-
min:
|
|
1460
|
-
max:
|
|
1461
|
-
step:
|
|
1504
|
+
min: $t.value ? e.min : void 0,
|
|
1505
|
+
max: $t.value ? e.max : void 0,
|
|
1506
|
+
step: $t.value ? e.step : void 0,
|
|
1462
1507
|
role: "input",
|
|
1463
|
-
style:
|
|
1464
|
-
onFocus:
|
|
1465
|
-
onBlur:
|
|
1466
|
-
onKeydown:
|
|
1467
|
-
}, null, 46,
|
|
1468
|
-
[
|
|
1508
|
+
style: Se([xt.value, Ut.value]),
|
|
1509
|
+
onFocus: t[1] || (t[1] = (l) => it.value = !0),
|
|
1510
|
+
onBlur: t[2] || (t[2] = (l) => it.value = !1),
|
|
1511
|
+
onKeydown: t[3] || (t[3] = Kt((l) => !o(w) && o(be) && fa(), ["enter"]))
|
|
1512
|
+
}, null, 46, zl), [
|
|
1513
|
+
[Ja, Q.value]
|
|
1469
1514
|
]),
|
|
1470
|
-
o(
|
|
1515
|
+
o(q) ? (M(), D("label", {
|
|
1471
1516
|
key: 2,
|
|
1472
|
-
for:
|
|
1473
|
-
class:
|
|
1517
|
+
for: gt.value,
|
|
1518
|
+
class: Fe(["component__icon", sa.value])
|
|
1474
1519
|
}, [
|
|
1475
|
-
|
|
1476
|
-
|
|
1520
|
+
va(n.$slots, "icon", {}, () => [
|
|
1521
|
+
t[6] || (t[6] = pe("span", null, "♥", -1))
|
|
1477
1522
|
], !0)
|
|
1478
|
-
], 10,
|
|
1479
|
-
], 14,
|
|
1480
|
-
|
|
1523
|
+
], 10, Wl)) : re("", !0)
|
|
1524
|
+
], 14, Al),
|
|
1525
|
+
ua.value ? (M(), D("div", {
|
|
1481
1526
|
key: 0,
|
|
1482
|
-
class:
|
|
1527
|
+
class: Fe(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
1483
1528
|
}, [
|
|
1484
|
-
|
|
1485
|
-
|
|
1529
|
+
va(n.$slots, "message", {}, () => [
|
|
1530
|
+
It(kt(e.message), 1)
|
|
1486
1531
|
], !0)
|
|
1487
|
-
], 2)) :
|
|
1488
|
-
], 16)) :
|
|
1532
|
+
], 2)) : re("", !0)
|
|
1533
|
+
], 16)) : re("", !0);
|
|
1489
1534
|
}
|
|
1490
|
-
}),
|
|
1491
|
-
const
|
|
1535
|
+
}), Nl = /* @__PURE__ */ Ca(Dl, [["__scopeId", "data-v-23bbf3c4"]]);
|
|
1536
|
+
const Il = ["for"], El = {
|
|
1537
|
+
key: 0,
|
|
1538
|
+
class: "component__label--required"
|
|
1539
|
+
}, Pl = ["id"], Fl = ["onClick"], Ol = ["id", "name", "placeholder", "readonly", "autocomplete", "required", "tabindex"], ql = /* @__PURE__ */ Object.assign({
|
|
1492
1540
|
name: "NbInputChip",
|
|
1493
1541
|
inheritAttrs: !1
|
|
1494
1542
|
}, {
|
|
@@ -1502,8 +1550,8 @@ const $l = ["for"], _l = ["id"], wl = { class: "chip-text" }, Rl = ["onClick"],
|
|
|
1502
1550
|
type: String,
|
|
1503
1551
|
default: "b",
|
|
1504
1552
|
validator: (e = "b") => {
|
|
1505
|
-
const
|
|
1506
|
-
return ["b", "ib"].includes(
|
|
1553
|
+
const y = e.toLowerCase();
|
|
1554
|
+
return ["b", "ib"].includes(y);
|
|
1507
1555
|
}
|
|
1508
1556
|
},
|
|
1509
1557
|
tabIndex: {
|
|
@@ -1768,7 +1816,7 @@ const $l = ["for"], _l = ["id"], wl = { class: "chip-text" }, Rl = ["onClick"],
|
|
|
1768
1816
|
},
|
|
1769
1817
|
labelActiveTop: {
|
|
1770
1818
|
type: Number,
|
|
1771
|
-
default: 13
|
|
1819
|
+
default: -13
|
|
1772
1820
|
},
|
|
1773
1821
|
labelActiveLeft: {
|
|
1774
1822
|
type: Number,
|
|
@@ -1808,170 +1856,184 @@ const $l = ["for"], _l = ["id"], wl = { class: "chip-text" }, Rl = ["onClick"],
|
|
|
1808
1856
|
darkTextColorLabelActive: {
|
|
1809
1857
|
type: String,
|
|
1810
1858
|
default: "#ffffff"
|
|
1859
|
+
},
|
|
1860
|
+
fontFamilyChip: {
|
|
1861
|
+
type: String,
|
|
1862
|
+
default: "'Lato', sans-serif"
|
|
1863
|
+
},
|
|
1864
|
+
fontSizeChip: {
|
|
1865
|
+
type: String,
|
|
1866
|
+
default: "1.2em"
|
|
1867
|
+
},
|
|
1868
|
+
fontWeightChip: {
|
|
1869
|
+
type: Number,
|
|
1870
|
+
default: 400,
|
|
1871
|
+
validator: (e) => e || 700
|
|
1811
1872
|
}
|
|
1812
1873
|
},
|
|
1813
1874
|
emits: ["clicked", "changed", "removed", "added", "input-changed", "focused", "blurred"],
|
|
1814
|
-
setup(e, { emit:
|
|
1815
|
-
|
|
1816
|
-
"
|
|
1817
|
-
|
|
1818
|
-
"
|
|
1819
|
-
"
|
|
1820
|
-
|
|
1821
|
-
"
|
|
1822
|
-
"
|
|
1823
|
-
"
|
|
1824
|
-
|
|
1825
|
-
"
|
|
1826
|
-
|
|
1827
|
-
"
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
"
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
"
|
|
1838
|
-
"
|
|
1839
|
-
|
|
1840
|
-
"
|
|
1841
|
-
"
|
|
1842
|
-
})),
|
|
1843
|
-
|
|
1875
|
+
setup(e, { emit: y }) {
|
|
1876
|
+
ya((r) => ({
|
|
1877
|
+
"6622f6ac": Pt.value,
|
|
1878
|
+
"6b4fc1fd": Tt.value,
|
|
1879
|
+
"3459745b": o(mt),
|
|
1880
|
+
"363da183": o(He),
|
|
1881
|
+
af4a5108: o(at),
|
|
1882
|
+
"2db785d2": o(Qe),
|
|
1883
|
+
"6ff10a22": o(Te),
|
|
1884
|
+
"6b000890": o(xe),
|
|
1885
|
+
bb8dbd36: o(Ue),
|
|
1886
|
+
"054dede6": o(nt),
|
|
1887
|
+
"1d036a06": o(dt),
|
|
1888
|
+
"5dcccfa1": o(Je),
|
|
1889
|
+
"9654da0e": o(Ge),
|
|
1890
|
+
"87af8d7c": o(b),
|
|
1891
|
+
"397adabc": o(ye),
|
|
1892
|
+
"7cda4e72": o(ct),
|
|
1893
|
+
eb5f3eb4: z.value,
|
|
1894
|
+
"2d219a14": bt.value,
|
|
1895
|
+
"3d016fc8": it.value,
|
|
1896
|
+
cd3a7540: k.value,
|
|
1897
|
+
"428050bb": r.styleButtonColor,
|
|
1898
|
+
"2ece0a20": Q.value,
|
|
1899
|
+
"0c114667": o(lt),
|
|
1900
|
+
"70496a60": o(ht),
|
|
1901
|
+
"048cf81e": o(je),
|
|
1902
|
+
"9db85a2c": o(S)
|
|
1903
|
+
})), pa(() => {
|
|
1904
|
+
G.value.length > 0 && (ee.value = G.value);
|
|
1844
1905
|
});
|
|
1845
|
-
const
|
|
1846
|
-
nbId:
|
|
1906
|
+
const h = y, P = e, {
|
|
1907
|
+
nbId: N,
|
|
1847
1908
|
display: Ve,
|
|
1848
|
-
textColor:
|
|
1849
|
-
paddingX:
|
|
1909
|
+
textColor: be,
|
|
1910
|
+
paddingX: Re,
|
|
1850
1911
|
paddingY: ke,
|
|
1851
|
-
borderRadius:
|
|
1852
|
-
disabled:
|
|
1853
|
-
fontFamily:
|
|
1854
|
-
fontSize:
|
|
1855
|
-
fontWeight:
|
|
1856
|
-
currentList:
|
|
1912
|
+
borderRadius: ie,
|
|
1913
|
+
disabled: J,
|
|
1914
|
+
fontFamily: Oe,
|
|
1915
|
+
fontSize: Me,
|
|
1916
|
+
fontWeight: ae,
|
|
1917
|
+
currentList: G,
|
|
1857
1918
|
allowDuplicates: w,
|
|
1858
|
-
minChips:
|
|
1859
|
-
maxChips:
|
|
1860
|
-
inputPosition:
|
|
1919
|
+
minChips: le,
|
|
1920
|
+
maxChips: se,
|
|
1921
|
+
inputPosition: K,
|
|
1861
1922
|
width: Le,
|
|
1862
|
-
inputName:
|
|
1863
|
-
inputPlaceholder:
|
|
1864
|
-
inputUppercase:
|
|
1865
|
-
inputReadonly:
|
|
1866
|
-
inputAutocomplete:
|
|
1867
|
-
required:
|
|
1868
|
-
textAlign:
|
|
1923
|
+
inputName: de,
|
|
1924
|
+
inputPlaceholder: F,
|
|
1925
|
+
inputUppercase: ge,
|
|
1926
|
+
inputReadonly: X,
|
|
1927
|
+
inputAutocomplete: he,
|
|
1928
|
+
required: ce,
|
|
1929
|
+
textAlign: Ce,
|
|
1869
1930
|
hasBorderRadius: $,
|
|
1870
1931
|
activeTextStyle: L,
|
|
1871
|
-
theme:
|
|
1872
|
-
inputStyle:
|
|
1873
|
-
lightBgColor:
|
|
1874
|
-
lightBgColorFocus:
|
|
1875
|
-
lightBorderColor:
|
|
1932
|
+
theme: C,
|
|
1933
|
+
inputStyle: ze,
|
|
1934
|
+
lightBgColor: He,
|
|
1935
|
+
lightBgColorFocus: We,
|
|
1936
|
+
lightBorderColor: at,
|
|
1876
1937
|
lightBorderColorFocus: ye,
|
|
1877
|
-
lightDisabledBgColor:
|
|
1878
|
-
lightTextColor:
|
|
1938
|
+
lightDisabledBgColor: lt,
|
|
1939
|
+
lightTextColor: mt,
|
|
1879
1940
|
lightChipBgColor: Qe,
|
|
1880
1941
|
lightChipTextColor: Te,
|
|
1881
|
-
lightChipRemoveColor:
|
|
1882
|
-
lightDisabledBorderColor:
|
|
1883
|
-
darkBgColor:
|
|
1942
|
+
lightChipRemoveColor: xe,
|
|
1943
|
+
lightDisabledBorderColor: ht,
|
|
1944
|
+
darkBgColor: nt,
|
|
1884
1945
|
darkBgColorFocus: st,
|
|
1885
1946
|
darkBorderColor: dt,
|
|
1886
1947
|
darkBorderColorFocus: ct,
|
|
1887
|
-
darkDisabledBgColor:
|
|
1948
|
+
darkDisabledBgColor: je,
|
|
1888
1949
|
darkTextColor: Ue,
|
|
1889
1950
|
darkChipBgColor: Je,
|
|
1890
1951
|
darkChipTextColor: Ge,
|
|
1891
|
-
darkChipRemoveColor:
|
|
1892
|
-
darkDisabledBorderColor:
|
|
1893
|
-
tabIndex:
|
|
1894
|
-
hasTabIndexEnter:
|
|
1952
|
+
darkChipRemoveColor: b,
|
|
1953
|
+
darkDisabledBorderColor: S,
|
|
1954
|
+
tabIndex: ne,
|
|
1955
|
+
hasTabIndexEnter: Z,
|
|
1895
1956
|
ariaLabel: me,
|
|
1896
|
-
ariaAttrs:
|
|
1897
|
-
caretColor:
|
|
1898
|
-
selectionBgColor:
|
|
1957
|
+
ariaAttrs: Be,
|
|
1958
|
+
caretColor: Xe,
|
|
1959
|
+
selectionBgColor: q,
|
|
1899
1960
|
selectionTextColor: d,
|
|
1900
|
-
showLabel:
|
|
1961
|
+
showLabel: m,
|
|
1901
1962
|
label: fe,
|
|
1902
|
-
labelBackground:
|
|
1903
|
-
labelPadding:
|
|
1904
|
-
labelBorderRadius:
|
|
1905
|
-
labelLeft:
|
|
1906
|
-
inputLabelMarginActive:
|
|
1907
|
-
labelActiveTop:
|
|
1908
|
-
labelActiveLeft:
|
|
1909
|
-
fontFamilyLabel:
|
|
1910
|
-
fontSizeLabel:
|
|
1963
|
+
labelBackground: H,
|
|
1964
|
+
labelPadding: Y,
|
|
1965
|
+
labelBorderRadius: Ae,
|
|
1966
|
+
labelLeft: _e,
|
|
1967
|
+
inputLabelMarginActive: De,
|
|
1968
|
+
labelActiveTop: qe,
|
|
1969
|
+
labelActiveLeft: Ze,
|
|
1970
|
+
fontFamilyLabel: ot,
|
|
1971
|
+
fontSizeLabel: ut,
|
|
1911
1972
|
fontSizeLabelActive: ft,
|
|
1912
|
-
fontWeightLabel:
|
|
1913
|
-
lightTextColorLabel:
|
|
1914
|
-
lightTextColorLabelActive:
|
|
1915
|
-
darkTextColorLabel:
|
|
1916
|
-
darkTextColorLabelActive:
|
|
1917
|
-
|
|
1918
|
-
|
|
1973
|
+
fontWeightLabel: vt,
|
|
1974
|
+
lightTextColorLabel: pt,
|
|
1975
|
+
lightTextColorLabelActive: Ke,
|
|
1976
|
+
darkTextColorLabel: Lt,
|
|
1977
|
+
darkTextColorLabelActive: g,
|
|
1978
|
+
fontFamilyChip: I,
|
|
1979
|
+
fontSizeChip: T,
|
|
1980
|
+
fontWeightChip: $e
|
|
1981
|
+
} = ma(P), f = j(""), rt = j(null), wt = j(null), Rt = j(null), ee = j([]), we = j(!1), V = a(() => {
|
|
1982
|
+
const r = J.value ? "component-disabled" : "", B = Ve.value !== "b" ? "inline-block" : "block", ve = !Le.value || Le.value < 185 ? 185 : Le.value, u = be ? be.value : "ffffff", A = Xe.value ? Xe.value : "", Ne = q.value ? q.value : "", Ye = d.value ? d.value : "", gt = Re.value !== 0 && !Re.value || Re.value < 0 ? 1 : Re.value, la = ke.value !== 0 && !ke.value || ke.value < 0 ? 0.2 : ke.value, Wt = ie.value !== 0 && !ie.value || ie.value < 0 ? 0 : ie.value, na = Oe.value ? Oe.value : "'Lato', sans-serif", St = Me.value ? Me.value : "1.2em", oa = ae.value !== 0 && !ae.value || ae.value < 0 ? 100 : ae.value, ua = le.value !== 0 && !le.value || le.value < 0 ? 0 : le.value, ra = se.value !== 0 && !se.value || se.value < 0 ? 10 : se.value, ia = !K.value || !["top", "bottom"].includes(K.value) ? "bottom" : K.value, Dt = !ze.value || !["background", "line", "border"].includes(ze.value) ? "background" : ze.value, sa = C.value ? C.value : "light", da = m.value ? m.value : !1, ca = _e.value !== 0 && !_e.value || _e.value < 0 ? 5 : _e.value, Ht = H.value ? H.value : "transparent", jt = De.value !== 0 && !De.value || De.value < 0 ? 15 : De.value, Ut = Y.value ? Y.value : "1px 5px", yt = Ae.value !== 0 && !Ae.value || Ae.value < 0 ? 0 : Ae.value, _t = qe.value === null || qe.value === void 0 ? -13 : qe.value, Vt = Ze.value === null || Ze.value === void 0 ? 5 : Ze.value, $t = ot.value ? ot.value : "'Lato', sans-serif", Nt = ut.value ? ut.value : "1em", Gt = ft.value ? ft.value : "0.8em", oe = vt.value ? vt.value : 400, fa = pt.value ? pt.value : "#333333", n = Lt.value ? Lt.value : "#ffffff", t = Ke.value ? Ke.value : "#333333", l = g.value ? g.value : "#ffffff", s = I.value ? I.value : "'Lato', sans-serif", i = T.value ? T.value : "1.2em", v = $e.value ? $e.value : 400;
|
|
1919
1983
|
return {
|
|
1920
|
-
disabled:
|
|
1921
|
-
display:
|
|
1922
|
-
width:
|
|
1923
|
-
font:
|
|
1924
|
-
fontSize:
|
|
1925
|
-
fontWeight:
|
|
1926
|
-
textColor:
|
|
1927
|
-
caretColor:
|
|
1928
|
-
selectionBgColor:
|
|
1929
|
-
selectionTextColor:
|
|
1930
|
-
paddingX:
|
|
1931
|
-
paddingY:
|
|
1932
|
-
borderRadius:
|
|
1933
|
-
minChips:
|
|
1934
|
-
maxChips:
|
|
1935
|
-
inputPosition:
|
|
1936
|
-
inputStyle:
|
|
1937
|
-
theme:
|
|
1938
|
-
showLabel:
|
|
1939
|
-
labelLeft:
|
|
1940
|
-
labelBackground:
|
|
1941
|
-
inputLabelMarginActive:
|
|
1942
|
-
labelPadding:
|
|
1943
|
-
labelBorderRadius:
|
|
1944
|
-
labelActiveTop:
|
|
1945
|
-
labelActiveLeft:
|
|
1946
|
-
fontFamilyLabel:
|
|
1947
|
-
fontSizeLabel:
|
|
1948
|
-
fontSizeLabelActive:
|
|
1949
|
-
fontWeightLabel:
|
|
1950
|
-
lightTextColorLabel:
|
|
1951
|
-
darkTextColorLabel:
|
|
1984
|
+
disabled: r,
|
|
1985
|
+
display: B,
|
|
1986
|
+
width: ve,
|
|
1987
|
+
font: na,
|
|
1988
|
+
fontSize: St,
|
|
1989
|
+
fontWeight: oa,
|
|
1990
|
+
textColor: u,
|
|
1991
|
+
caretColor: A,
|
|
1992
|
+
selectionBgColor: Ne,
|
|
1993
|
+
selectionTextColor: Ye,
|
|
1994
|
+
paddingX: gt,
|
|
1995
|
+
paddingY: la,
|
|
1996
|
+
borderRadius: Wt,
|
|
1997
|
+
minChips: ua,
|
|
1998
|
+
maxChips: ra,
|
|
1999
|
+
inputPosition: ia,
|
|
2000
|
+
inputStyle: Dt,
|
|
2001
|
+
theme: sa,
|
|
2002
|
+
showLabel: da,
|
|
2003
|
+
labelLeft: ca,
|
|
2004
|
+
labelBackground: Ht,
|
|
2005
|
+
inputLabelMarginActive: jt,
|
|
2006
|
+
labelPadding: Ut,
|
|
2007
|
+
labelBorderRadius: yt,
|
|
2008
|
+
labelActiveTop: _t,
|
|
2009
|
+
labelActiveLeft: Vt,
|
|
2010
|
+
fontFamilyLabel: $t,
|
|
2011
|
+
fontSizeLabel: Nt,
|
|
2012
|
+
fontSizeLabelActive: Gt,
|
|
2013
|
+
fontWeightLabel: oe,
|
|
2014
|
+
lightTextColorLabel: fa,
|
|
2015
|
+
darkTextColorLabel: n,
|
|
1952
2016
|
lightTextColorLabelActive: t,
|
|
1953
|
-
darkTextColorLabelActive:
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
return {
|
|
1958
|
-
display: u.display,
|
|
1959
|
-
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
1960
|
-
paddingTop: g && b.value ? `${Math.abs(u.labelActiveTop)}px` : "0"
|
|
2017
|
+
darkTextColorLabelActive: l,
|
|
2018
|
+
fontFamilyChip: s,
|
|
2019
|
+
fontSizeChip: i,
|
|
2020
|
+
fontWeightChip: v
|
|
1961
2021
|
};
|
|
1962
|
-
}),
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
2022
|
+
}), Ct = a(() => V.value.disabled), R = a(() => ({
|
|
2023
|
+
display: V.value.display
|
|
2024
|
+
})), z = a(() => {
|
|
2025
|
+
const r = V.value;
|
|
2026
|
+
return r.fontSize ? r.fontSize : "1.2em";
|
|
2027
|
+
}), te = a(() => {
|
|
2028
|
+
const r = V.value, B = xt.value;
|
|
1967
2029
|
return {
|
|
1968
|
-
color:
|
|
1969
|
-
padding: `${
|
|
1970
|
-
fontWeight:
|
|
1971
|
-
textAlign:
|
|
1972
|
-
marginTop:
|
|
2030
|
+
color: r.textColor,
|
|
2031
|
+
padding: `${r.paddingY}rem ${r.paddingX}rem`,
|
|
2032
|
+
fontWeight: r.fontWeight,
|
|
2033
|
+
textAlign: Ce.value,
|
|
2034
|
+
marginTop: B && m.value ? `${r.inputLabelMarginActive}px` : "0"
|
|
1973
2035
|
};
|
|
1974
|
-
}),
|
|
2036
|
+
}), E = a(() => {
|
|
1975
2037
|
switch (L.value) {
|
|
1976
2038
|
case "italic":
|
|
1977
2039
|
return "component__text--italic";
|
|
@@ -1980,63 +2042,70 @@ const $l = ["for"], _l = ["id"], wl = { class: "chip-text" }, Rl = ["onClick"],
|
|
|
1980
2042
|
default:
|
|
1981
2043
|
return "component__text--normal";
|
|
1982
2044
|
}
|
|
1983
|
-
}),
|
|
1984
|
-
const
|
|
1985
|
-
return
|
|
1986
|
-
}),
|
|
1987
|
-
const
|
|
1988
|
-
|
|
1989
|
-
const
|
|
2045
|
+
}), Et = a(() => {
|
|
2046
|
+
const r = V.value;
|
|
2047
|
+
return r.inputStyle !== "line" && $.value ? { borderRadius: `${r.borderRadius}rem` } : {};
|
|
2048
|
+
}), Pt = a(() => V.value.font), Q = a(() => V.value.textColor), Tt = a(() => V.value.inputPosition === "top" ? "column" : "column-reverse"), et = a(() => {
|
|
2049
|
+
const r = {};
|
|
2050
|
+
Be.value && Object.keys(Be.value).forEach((u) => r[`aria-${u}`] = Be.value[u]);
|
|
2051
|
+
const B = {
|
|
1990
2052
|
"aria-label": me.value,
|
|
1991
|
-
"aria-disabled":
|
|
1992
|
-
...
|
|
2053
|
+
"aria-disabled": J.value,
|
|
2054
|
+
...r
|
|
1993
2055
|
};
|
|
1994
2056
|
return Object.fromEntries(
|
|
1995
|
-
Object.entries(
|
|
2057
|
+
Object.entries(B).filter(([ve, u]) => u != null)
|
|
1996
2058
|
);
|
|
1997
|
-
}),
|
|
1998
|
-
const
|
|
1999
|
-
return
|
|
2000
|
-
}),
|
|
2001
|
-
const
|
|
2002
|
-
return
|
|
2003
|
-
}),
|
|
2004
|
-
const
|
|
2005
|
-
return
|
|
2006
|
-
}),
|
|
2007
|
-
caretColor:
|
|
2008
|
-
})),
|
|
2009
|
-
"--selection-bg-color":
|
|
2010
|
-
"--selection-text-color":
|
|
2011
|
-
})),
|
|
2012
|
-
const
|
|
2013
|
-
width: `${
|
|
2059
|
+
}), bt = a(() => {
|
|
2060
|
+
const r = V.value;
|
|
2061
|
+
return r.caretColor || (r.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2062
|
+
}), it = a(() => {
|
|
2063
|
+
const r = V.value;
|
|
2064
|
+
return r.selectionBgColor || (r.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2065
|
+
}), k = a(() => {
|
|
2066
|
+
const r = V.value;
|
|
2067
|
+
return r.selectionTextColor || (r.theme === "dark" ? "#000000" : "#ffffff");
|
|
2068
|
+
}), Yt = a(() => ({
|
|
2069
|
+
caretColor: bt.value
|
|
2070
|
+
})), Mt = a(() => ({
|
|
2071
|
+
"--selection-bg-color": it.value,
|
|
2072
|
+
"--selection-text-color": k.value
|
|
2073
|
+
})), Qt = a(() => {
|
|
2074
|
+
const r = V.value, B = {
|
|
2075
|
+
width: `${r.width}px`
|
|
2014
2076
|
};
|
|
2015
|
-
return
|
|
2016
|
-
}), Bt = a(() =>
|
|
2017
|
-
const
|
|
2077
|
+
return r.display === "block" ? { width: "auto" } : B;
|
|
2078
|
+
}), Bt = a(() => de.value ? de.value : `${N.value}-name-label`), xt = a(() => we.value || ee.value.length > 0 || f.value && f.value.trim().length > 0), Jt = a(() => m.value ? we.value || ee.value.length > 0 ? F.value : "" : F.value), Ft = a(() => {
|
|
2079
|
+
const r = V.value, B = xt.value, ve = B ? r.lightTextColorLabelActive : r.lightTextColorLabel, u = B ? r.darkTextColorLabelActive : r.darkTextColorLabel;
|
|
2018
2080
|
return {
|
|
2019
|
-
fontFamily:
|
|
2020
|
-
fontSize:
|
|
2021
|
-
fontWeight:
|
|
2022
|
-
color:
|
|
2023
|
-
top:
|
|
2024
|
-
left:
|
|
2025
|
-
transform:
|
|
2081
|
+
fontFamily: r.fontFamilyLabel,
|
|
2082
|
+
fontSize: B ? r.fontSizeLabelActive : r.fontSizeLabel,
|
|
2083
|
+
fontWeight: r.fontWeightLabel,
|
|
2084
|
+
color: r.theme === "dark" ? u : ve,
|
|
2085
|
+
top: B ? `${r.labelActiveTop}px` : "50%",
|
|
2086
|
+
left: B ? `${r.labelActiveLeft}px` : `${r.labelLeft}px`,
|
|
2087
|
+
transform: B ? "translateY(0)" : "translateY(-50%)",
|
|
2026
2088
|
transition: "all 0.2s ease",
|
|
2027
|
-
backgroundColor:
|
|
2028
|
-
padding:
|
|
2029
|
-
borderRadius:
|
|
2089
|
+
backgroundColor: B ? r.labelBackground : "transparent",
|
|
2090
|
+
padding: B ? r.labelPadding : "0",
|
|
2091
|
+
borderRadius: B ? `${r.labelBorderRadius}rem` : "0"
|
|
2030
2092
|
};
|
|
2031
|
-
}),
|
|
2032
|
-
|
|
2093
|
+
}), Ot = a(() => {
|
|
2094
|
+
const r = V.value;
|
|
2095
|
+
return {
|
|
2096
|
+
fontSize: r.fontSizeChip,
|
|
2097
|
+
fontWeight: r.fontWeightChip,
|
|
2098
|
+
fontFamily: r.fontFamilyChip
|
|
2099
|
+
};
|
|
2100
|
+
}), Xt = a(() => {
|
|
2101
|
+
switch (C.value) {
|
|
2033
2102
|
case "dark":
|
|
2034
2103
|
return "component__theme--dark";
|
|
2035
2104
|
default:
|
|
2036
2105
|
return "component__theme--light";
|
|
2037
2106
|
}
|
|
2038
|
-
}),
|
|
2039
|
-
switch (
|
|
2107
|
+
}), Zt = a(() => {
|
|
2108
|
+
switch (ze.value) {
|
|
2040
2109
|
case "line":
|
|
2041
2110
|
return "component__input--line";
|
|
2042
2111
|
case "border":
|
|
@@ -2044,95 +2113,105 @@ const $l = ["for"], _l = ["id"], wl = { class: "chip-text" }, Rl = ["onClick"],
|
|
|
2044
2113
|
default:
|
|
2045
2114
|
return "component__input--background";
|
|
2046
2115
|
}
|
|
2047
|
-
}),
|
|
2048
|
-
|
|
2049
|
-
},
|
|
2050
|
-
|
|
2051
|
-
},
|
|
2052
|
-
|
|
2053
|
-
},
|
|
2054
|
-
if (!(
|
|
2055
|
-
|
|
2056
|
-
let
|
|
2057
|
-
|
|
2116
|
+
}), ea = () => {
|
|
2117
|
+
h("clicked");
|
|
2118
|
+
}, ta = () => {
|
|
2119
|
+
we.value = !0, h("focused");
|
|
2120
|
+
}, aa = () => {
|
|
2121
|
+
we.value = !1, h("blurred");
|
|
2122
|
+
}, zt = (r) => {
|
|
2123
|
+
if (!(J.value || X.value) && r.key === "Enter" && f.value.trim() !== "") {
|
|
2124
|
+
r.preventDefault();
|
|
2125
|
+
let B = f.value.trim();
|
|
2126
|
+
ge.value && (B = B.toUpperCase()), (w.value || !ee.value.includes(B)) && qt(B), f.value = "";
|
|
2058
2127
|
}
|
|
2059
|
-
},
|
|
2060
|
-
|
|
2061
|
-
},
|
|
2062
|
-
|
|
2128
|
+
}, qt = (r) => {
|
|
2129
|
+
ee.value.push(r), h("added", r);
|
|
2130
|
+
}, At = (r) => {
|
|
2131
|
+
ee.value = ee.value.filter((B) => B !== r), h("removed", r);
|
|
2063
2132
|
};
|
|
2064
|
-
return
|
|
2065
|
-
|
|
2066
|
-
}),
|
|
2067
|
-
|
|
2068
|
-
}), (
|
|
2133
|
+
return U(G, (r) => {
|
|
2134
|
+
ee.value = r, h("changed", r);
|
|
2135
|
+
}), U(f, (r) => {
|
|
2136
|
+
h("input-changed", r);
|
|
2137
|
+
}), (r, B) => o(N) ? (M(), D("div", ba({
|
|
2069
2138
|
key: 0,
|
|
2070
|
-
class: ["nb-wrapper",
|
|
2071
|
-
style: [
|
|
2139
|
+
class: ["nb-wrapper", Ct.value],
|
|
2140
|
+
style: [R.value],
|
|
2072
2141
|
role: "input"
|
|
2073
|
-
},
|
|
2074
|
-
o(
|
|
2142
|
+
}, et.value, { onClick: ea }), [
|
|
2143
|
+
o(m) ? (M(), D("label", {
|
|
2075
2144
|
key: 0,
|
|
2076
2145
|
for: Bt.value,
|
|
2077
2146
|
class: "component__label",
|
|
2078
|
-
style:
|
|
2079
|
-
},
|
|
2080
|
-
|
|
2081
|
-
|
|
2147
|
+
style: Se([Ft.value])
|
|
2148
|
+
}, [
|
|
2149
|
+
It(kt(o(fe)), 1),
|
|
2150
|
+
o(ce) ? (M(), D("span", El, "*")) : re("", !0)
|
|
2151
|
+
], 12, Il)) : re("", !0),
|
|
2152
|
+
pe("div", {
|
|
2153
|
+
id: o(N),
|
|
2082
2154
|
ref_key: "chipsContainer",
|
|
2083
|
-
ref:
|
|
2084
|
-
class:
|
|
2085
|
-
style:
|
|
2155
|
+
ref: rt,
|
|
2156
|
+
class: Fe(["nb-reset", "component", Xt.value, Zt.value]),
|
|
2157
|
+
style: Se([te.value, Qt.value, Et.value])
|
|
2086
2158
|
}, [
|
|
2087
|
-
|
|
2159
|
+
ee.value.length > 0 ? (M(), D("div", {
|
|
2088
2160
|
key: 0,
|
|
2089
2161
|
ref_key: "chips",
|
|
2090
|
-
ref:
|
|
2162
|
+
ref: Rt,
|
|
2091
2163
|
class: "chips"
|
|
2092
2164
|
}, [
|
|
2093
|
-
(
|
|
2094
|
-
key:
|
|
2165
|
+
(M(!0), D(Ya, null, Qa(ee.value, (ve) => (M(), D("div", {
|
|
2166
|
+
key: ve,
|
|
2095
2167
|
class: "chip"
|
|
2096
2168
|
}, [
|
|
2097
|
-
|
|
2098
|
-
chips:
|
|
2099
|
-
chip:
|
|
2100
|
-
removeChip:
|
|
2169
|
+
va(r.$slots, "chip", {
|
|
2170
|
+
chips: ee.value,
|
|
2171
|
+
chip: ve,
|
|
2172
|
+
removeChip: At
|
|
2101
2173
|
}, () => [
|
|
2102
|
-
|
|
2103
|
-
|
|
2174
|
+
pe("span", {
|
|
2175
|
+
class: "chip-text",
|
|
2176
|
+
style: Se([Ot.value])
|
|
2177
|
+
}, kt(ve), 5),
|
|
2178
|
+
!o(J) && !o(X) ? (M(), D("span", {
|
|
2104
2179
|
key: 0,
|
|
2105
2180
|
class: "chip-remove",
|
|
2106
|
-
|
|
2107
|
-
|
|
2181
|
+
style: Se([Ot.value]),
|
|
2182
|
+
onClick: (u) => At(ve)
|
|
2183
|
+
}, "×", 12, Fl)) : re("", !0)
|
|
2108
2184
|
], !0)
|
|
2109
2185
|
]))), 128))
|
|
2110
|
-
], 512)) :
|
|
2111
|
-
|
|
2186
|
+
], 512)) : re("", !0),
|
|
2187
|
+
ha(pe("input", {
|
|
2112
2188
|
ref_key: "chipInput",
|
|
2113
|
-
ref:
|
|
2189
|
+
ref: wt,
|
|
2114
2190
|
type: "text",
|
|
2115
|
-
"onUpdate:modelValue":
|
|
2191
|
+
"onUpdate:modelValue": B[0] || (B[0] = (ve) => f.value = ve),
|
|
2116
2192
|
id: Bt.value,
|
|
2117
2193
|
name: Bt.value,
|
|
2118
|
-
placeholder:
|
|
2119
|
-
readonly: o(
|
|
2120
|
-
autocomplete: o(
|
|
2121
|
-
required: o(
|
|
2122
|
-
tabindex: o(
|
|
2123
|
-
class:
|
|
2124
|
-
style:
|
|
2125
|
-
onKeydown:
|
|
2126
|
-
onFocus:
|
|
2127
|
-
onBlur:
|
|
2128
|
-
}, null, 46,
|
|
2129
|
-
[
|
|
2194
|
+
placeholder: Jt.value,
|
|
2195
|
+
readonly: o(X),
|
|
2196
|
+
autocomplete: o(he),
|
|
2197
|
+
required: o(ce),
|
|
2198
|
+
tabindex: o(J) || o(X) ? -1 : o(ne),
|
|
2199
|
+
class: Fe(["chips-input", E.value]),
|
|
2200
|
+
style: Se([Yt.value, Mt.value]),
|
|
2201
|
+
onKeydown: B[1] || (B[1] = Kt((ve) => !o(J) && o(Z) && zt(ve), ["enter"])),
|
|
2202
|
+
onFocus: ta,
|
|
2203
|
+
onBlur: aa
|
|
2204
|
+
}, null, 46, Ol), [
|
|
2205
|
+
[Xa, f.value]
|
|
2130
2206
|
])
|
|
2131
|
-
], 14,
|
|
2132
|
-
], 16)) :
|
|
2207
|
+
], 14, Pl)
|
|
2208
|
+
], 16)) : re("", !0);
|
|
2133
2209
|
}
|
|
2134
|
-
}),
|
|
2135
|
-
const
|
|
2210
|
+
}), Hl = /* @__PURE__ */ Ca(ql, [["__scopeId", "data-v-ad4015ce"]]);
|
|
2211
|
+
const jl = ["id"], Ul = ["for"], Gl = {
|
|
2212
|
+
key: 0,
|
|
2213
|
+
class: "component__label--required"
|
|
2214
|
+
}, Kl = ["id", "name", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex"], Yl = /* @__PURE__ */ Object.assign({
|
|
2136
2215
|
name: "NbTextarea",
|
|
2137
2216
|
inheritAttrs: !1
|
|
2138
2217
|
}, {
|
|
@@ -2146,8 +2225,8 @@ const Nl = ["id"], Il = ["for"], Wl = ["id", "name", "placeholder", "disabled",
|
|
|
2146
2225
|
type: String,
|
|
2147
2226
|
default: "b",
|
|
2148
2227
|
validator: (e = "b") => {
|
|
2149
|
-
const
|
|
2150
|
-
return ["b", "ib"].includes(
|
|
2228
|
+
const y = e.toLowerCase();
|
|
2229
|
+
return ["b", "ib"].includes(y);
|
|
2151
2230
|
}
|
|
2152
2231
|
},
|
|
2153
2232
|
tabIndex: {
|
|
@@ -2473,6 +2552,26 @@ const Nl = ["id"], Il = ["for"], Wl = ["id", "name", "placeholder", "disabled",
|
|
|
2473
2552
|
default: "vertical",
|
|
2474
2553
|
validator: (e) => ["none", "both", "vertical", "horizontal"].indexOf(e) !== -1
|
|
2475
2554
|
},
|
|
2555
|
+
minWidth: {
|
|
2556
|
+
// Largura mínima do textarea
|
|
2557
|
+
type: String,
|
|
2558
|
+
default: "auto"
|
|
2559
|
+
},
|
|
2560
|
+
maxWidth: {
|
|
2561
|
+
// Largura máxima do textarea
|
|
2562
|
+
type: String,
|
|
2563
|
+
default: "auto"
|
|
2564
|
+
},
|
|
2565
|
+
minHeight: {
|
|
2566
|
+
// Altura mínima do textarea
|
|
2567
|
+
type: String,
|
|
2568
|
+
default: "auto"
|
|
2569
|
+
},
|
|
2570
|
+
maxHeight: {
|
|
2571
|
+
// Altura máxima do textarea
|
|
2572
|
+
type: String,
|
|
2573
|
+
default: "auto"
|
|
2574
|
+
},
|
|
2476
2575
|
autoResize: {
|
|
2477
2576
|
// Redimensionamento automático
|
|
2478
2577
|
type: Boolean,
|
|
@@ -2500,186 +2599,194 @@ const Nl = ["id"], Il = ["for"], Wl = ["id", "name", "placeholder", "disabled",
|
|
|
2500
2599
|
"clicked",
|
|
2501
2600
|
"entered"
|
|
2502
2601
|
],
|
|
2503
|
-
setup(e, { emit:
|
|
2504
|
-
|
|
2505
|
-
"
|
|
2506
|
-
|
|
2507
|
-
"
|
|
2508
|
-
|
|
2509
|
-
"
|
|
2510
|
-
"
|
|
2511
|
-
|
|
2512
|
-
"
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
"
|
|
2517
|
-
"
|
|
2518
|
-
"
|
|
2519
|
-
"
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
"
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
})),
|
|
2527
|
-
|
|
2528
|
-
}),
|
|
2529
|
-
|
|
2602
|
+
setup(e, { emit: y }) {
|
|
2603
|
+
ya((u) => ({
|
|
2604
|
+
"15fde79e": V.value,
|
|
2605
|
+
"2d10b64f": o(Qe),
|
|
2606
|
+
"07a02f82": Et.value,
|
|
2607
|
+
f1245958: Pt.value,
|
|
2608
|
+
"0b771428": Q.value,
|
|
2609
|
+
"0d57d0f1": o(nt),
|
|
2610
|
+
"6ac15a7d": o(ht),
|
|
2611
|
+
"6b362b99": o(Te),
|
|
2612
|
+
dfdede82: o(xe),
|
|
2613
|
+
"4004415b": o(mt),
|
|
2614
|
+
f7f65f12: o(ye),
|
|
2615
|
+
"1d9c46a1": o(lt),
|
|
2616
|
+
"1521df9c": Rt.value,
|
|
2617
|
+
"7eef73e9": o(st),
|
|
2618
|
+
"4f9c2136": xt.value,
|
|
2619
|
+
e804faee: Ct.value,
|
|
2620
|
+
"02c75370": R.value,
|
|
2621
|
+
"31e43771": z.value,
|
|
2622
|
+
"6474d46a": E.value,
|
|
2623
|
+
"2b2234a2": u.styleButtonColor,
|
|
2624
|
+
"27854c14": te.value
|
|
2625
|
+
})), pa(() => {
|
|
2626
|
+
T.value = He.value;
|
|
2627
|
+
}), $a(() => {
|
|
2628
|
+
At();
|
|
2530
2629
|
});
|
|
2531
|
-
const
|
|
2532
|
-
nbId:
|
|
2630
|
+
const h = y, P = e, {
|
|
2631
|
+
nbId: N,
|
|
2533
2632
|
display: Ve,
|
|
2534
|
-
hasTabIndexEnter:
|
|
2535
|
-
ariaLabel:
|
|
2633
|
+
hasTabIndexEnter: be,
|
|
2634
|
+
ariaLabel: Re,
|
|
2536
2635
|
ariaAttrs: ke,
|
|
2537
|
-
textColor:
|
|
2538
|
-
caretColor:
|
|
2539
|
-
selectionBgColor:
|
|
2540
|
-
selectionTextColor:
|
|
2541
|
-
hasBorderRadius:
|
|
2542
|
-
borderRadius:
|
|
2636
|
+
textColor: ie,
|
|
2637
|
+
caretColor: J,
|
|
2638
|
+
selectionBgColor: Oe,
|
|
2639
|
+
selectionTextColor: Me,
|
|
2640
|
+
hasBorderRadius: ae,
|
|
2641
|
+
borderRadius: G,
|
|
2543
2642
|
disabled: w,
|
|
2544
|
-
fontFamily:
|
|
2545
|
-
fontSize:
|
|
2546
|
-
fontWeight:
|
|
2643
|
+
fontFamily: le,
|
|
2644
|
+
fontSize: se,
|
|
2645
|
+
fontWeight: K,
|
|
2547
2646
|
fontFamilyMsg: Le,
|
|
2548
|
-
fontSizeMsg:
|
|
2549
|
-
fontWeightMsg:
|
|
2550
|
-
textMessageColor:
|
|
2551
|
-
inputWidth:
|
|
2552
|
-
inputStyle:
|
|
2553
|
-
activeTextStyle:
|
|
2554
|
-
inputReadonly:
|
|
2647
|
+
fontSizeMsg: de,
|
|
2648
|
+
fontWeightMsg: F,
|
|
2649
|
+
textMessageColor: ge,
|
|
2650
|
+
inputWidth: X,
|
|
2651
|
+
inputStyle: he,
|
|
2652
|
+
activeTextStyle: ce,
|
|
2653
|
+
inputReadonly: Ce,
|
|
2555
2654
|
hasTrim: $,
|
|
2556
2655
|
inputUppercase: L,
|
|
2557
|
-
inputName:
|
|
2558
|
-
inputPlaceholder:
|
|
2559
|
-
inputText:
|
|
2560
|
-
theme:
|
|
2561
|
-
tabindex:
|
|
2656
|
+
inputName: C,
|
|
2657
|
+
inputPlaceholder: ze,
|
|
2658
|
+
inputText: He,
|
|
2659
|
+
theme: We,
|
|
2660
|
+
tabindex: at,
|
|
2562
2661
|
lightBgColor: ye,
|
|
2563
|
-
lightBgColorFocus:
|
|
2564
|
-
lightDisabledBgColor:
|
|
2662
|
+
lightBgColorFocus: lt,
|
|
2663
|
+
lightDisabledBgColor: mt,
|
|
2565
2664
|
lightTextColor: Qe,
|
|
2566
2665
|
darkBgColor: Te,
|
|
2567
|
-
darkBgColorFocus:
|
|
2568
|
-
darkDisabledBgColor:
|
|
2569
|
-
darkTextColor:
|
|
2666
|
+
darkBgColorFocus: xe,
|
|
2667
|
+
darkDisabledBgColor: ht,
|
|
2668
|
+
darkTextColor: nt,
|
|
2570
2669
|
textAlign: st,
|
|
2571
2670
|
showMsg: dt,
|
|
2572
2671
|
hasMsg: ct,
|
|
2573
|
-
showLabel:
|
|
2672
|
+
showLabel: je,
|
|
2574
2673
|
labelBackground: Ue,
|
|
2575
2674
|
labelPadding: Je,
|
|
2576
2675
|
labelBorderRadius: Ge,
|
|
2577
|
-
labelLeft:
|
|
2578
|
-
inputLabelMarginActive:
|
|
2579
|
-
labelActiveTop:
|
|
2580
|
-
labelActiveLeft:
|
|
2676
|
+
labelLeft: b,
|
|
2677
|
+
inputLabelMarginActive: S,
|
|
2678
|
+
labelActiveTop: ne,
|
|
2679
|
+
labelActiveLeft: Z,
|
|
2581
2680
|
fontFamilyLabel: me,
|
|
2582
|
-
fontSizeLabel:
|
|
2583
|
-
fontSizeLabelActive:
|
|
2584
|
-
fontWeightLabel:
|
|
2681
|
+
fontSizeLabel: Be,
|
|
2682
|
+
fontSizeLabelActive: Xe,
|
|
2683
|
+
fontWeightLabel: q,
|
|
2585
2684
|
lightTextColorLabel: d,
|
|
2586
|
-
lightTextColorLabelActive:
|
|
2685
|
+
lightTextColorLabelActive: m,
|
|
2587
2686
|
darkTextColorLabel: fe,
|
|
2588
|
-
darkTextColorLabelActive:
|
|
2589
|
-
rows:
|
|
2590
|
-
cols:
|
|
2591
|
-
maxlength:
|
|
2592
|
-
minlength:
|
|
2593
|
-
wrap:
|
|
2594
|
-
spellcheck:
|
|
2595
|
-
autofocus:
|
|
2596
|
-
resize:
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2687
|
+
darkTextColorLabelActive: H,
|
|
2688
|
+
rows: Y,
|
|
2689
|
+
cols: Ae,
|
|
2690
|
+
maxlength: _e,
|
|
2691
|
+
minlength: De,
|
|
2692
|
+
wrap: qe,
|
|
2693
|
+
spellcheck: Ze,
|
|
2694
|
+
autofocus: ot,
|
|
2695
|
+
resize: ut,
|
|
2696
|
+
minWidth: ft,
|
|
2697
|
+
maxWidth: vt,
|
|
2698
|
+
minHeight: pt,
|
|
2699
|
+
maxHeight: Ke,
|
|
2700
|
+
autoResize: Lt,
|
|
2701
|
+
minRows: g,
|
|
2702
|
+
maxRows: I
|
|
2703
|
+
} = ma(P), T = j(""), $e = j(!1), f = a(() => {
|
|
2704
|
+
const u = w.value ? "component-disabled" : "", A = Ve.value !== "b" ? "inline-block" : "block", Ne = ie ? ie.value : "ffffff", Ye = J.value ? J.value : "", gt = Oe.value ? Oe.value : "", la = Me.value ? Me.value : "", Wt = ae.value ? ae.value : !1, na = G.value !== 0 && !G.value || G.value < 0 ? 0 : G.value, St = le.value ? le.value : "'Lato', sans-serif", oa = se.value ? se.value : "1.4em", ua = K.value !== 0 && !K.value || K.value < 0 ? 100 : K.value, ra = Le.value ? Le.value : "'Lato', sans-serif", ia = de.value ? de.value : "1em", Dt = F.value !== 0 && !F.value || F.value < 0 ? 100 : F.value, sa = ge.value ? ge.value : "#f15574", da = X.value ? X.value : 200, ca = ce.value ? ce.value : "normal", Ht = Ce.value ? Ce.value : !1, jt = L.value ? L.value : !1, Ut = We.value ? We.value : "normal", yt = st.value ? st.value : "left", _t = he.value ? he.value : "background", Vt = je.value ? je.value : !1, $t = b.value !== 0 && !b.value || b.value < 0 ? 5 : b.value, Nt = Ue.value ? Ue.value : "transparent", Gt = S.value !== 0 && !S.value || S.value < 0 ? 15 : S.value, oe = Je.value ? Je.value : "1px 5px", fa = Ge.value !== 0 && !Ge.value || Ge.value < 0 ? 0 : Ge.value, n = ne.value === null || ne.value === void 0 ? -13 : ne.value, t = Z.value === null || Z.value === void 0 ? -10 : Z.value, l = me.value ? me.value : "'Lato', sans-serif", s = Be.value ? Be.value : "1em", i = Xe.value ? Xe.value : "0.8em", v = q.value ? q.value : 400, c = d.value ? d.value : "#ffffff", p = fe.value ? fe.value : "#000000", x = m.value ? m.value : "#ffffff", _ = H.value ? H.value : "#000000", W = Y.value && Y.value > 0 ? Y.value : 2, O = Ae.value && Ae.value > 0 ? Ae.value : 20, ue = _e.value !== null && _e.value >= 0 ? _e.value : null, Ie = De.value !== null && De.value >= 0 ? De.value : null, tt = qe.value && ["soft", "hard", "off"].includes(qe.value) ? qe.value : "soft", Ee = Ze.value !== void 0 ? Ze.value : "default", Pe = ot.value !== void 0 ? ot.value : !1, xa = ut.value && ["none", "both", "vertical", "horizontal"].includes(ut.value) ? ut.value : "vertical", Sa = ft.value ? ft.value : "auto", Va = vt.value ? vt.value : "auto", ka = pt.value ? pt.value : "auto", La = Ke.value ? Ke.value : "auto", Ta = Lt.value !== void 0 ? Lt.value : !1, Ba = g.value !== null && g.value > 0 ? g.value : null, Aa = I.value !== null && I.value > 0 ? I.value : null;
|
|
2602
2705
|
return {
|
|
2603
|
-
disabled:
|
|
2604
|
-
display:
|
|
2605
|
-
font:
|
|
2606
|
-
fontSize:
|
|
2607
|
-
fontWeight:
|
|
2608
|
-
fontFamilyMsg:
|
|
2609
|
-
fontSizeMsg:
|
|
2610
|
-
fontWeightMsg:
|
|
2611
|
-
textMessageColor:
|
|
2612
|
-
textColor:
|
|
2613
|
-
caretColor:
|
|
2614
|
-
selectionBgColor:
|
|
2615
|
-
selectionTextColor:
|
|
2616
|
-
hasBorderRadius:
|
|
2617
|
-
borderRadius:
|
|
2618
|
-
textAlign:
|
|
2619
|
-
inputWidth:
|
|
2620
|
-
activeTextStyle:
|
|
2621
|
-
inputReadonly:
|
|
2622
|
-
inputUppercase:
|
|
2623
|
-
theme:
|
|
2624
|
-
inputStyle:
|
|
2625
|
-
showLabel:
|
|
2626
|
-
labelBackground:
|
|
2627
|
-
labelPadding:
|
|
2628
|
-
labelBorderRadius:
|
|
2629
|
-
labelLeft:
|
|
2630
|
-
inputLabelMarginActive:
|
|
2631
|
-
labelActiveTop:
|
|
2632
|
-
labelActiveLeft:
|
|
2706
|
+
disabled: u,
|
|
2707
|
+
display: A,
|
|
2708
|
+
font: St,
|
|
2709
|
+
fontSize: oa,
|
|
2710
|
+
fontWeight: ua,
|
|
2711
|
+
fontFamilyMsg: ra,
|
|
2712
|
+
fontSizeMsg: ia,
|
|
2713
|
+
fontWeightMsg: Dt,
|
|
2714
|
+
textMessageColor: sa,
|
|
2715
|
+
textColor: Ne,
|
|
2716
|
+
caretColor: Ye,
|
|
2717
|
+
selectionBgColor: gt,
|
|
2718
|
+
selectionTextColor: la,
|
|
2719
|
+
hasBorderRadius: Wt,
|
|
2720
|
+
borderRadius: na,
|
|
2721
|
+
textAlign: yt,
|
|
2722
|
+
inputWidth: da,
|
|
2723
|
+
activeTextStyle: ca,
|
|
2724
|
+
inputReadonly: Ht,
|
|
2725
|
+
inputUppercase: jt,
|
|
2726
|
+
theme: Ut,
|
|
2727
|
+
inputStyle: _t,
|
|
2728
|
+
showLabel: Vt,
|
|
2729
|
+
labelBackground: Nt,
|
|
2730
|
+
labelPadding: oe,
|
|
2731
|
+
labelBorderRadius: fa,
|
|
2732
|
+
labelLeft: $t,
|
|
2733
|
+
inputLabelMarginActive: Gt,
|
|
2734
|
+
labelActiveTop: n,
|
|
2735
|
+
labelActiveLeft: t,
|
|
2633
2736
|
fontFamilyLabel: l,
|
|
2634
|
-
fontSizeLabel:
|
|
2635
|
-
fontSizeLabelActive:
|
|
2636
|
-
fontWeightLabel:
|
|
2637
|
-
lightTextColorLabel:
|
|
2638
|
-
darkTextColorLabel:
|
|
2639
|
-
lightTextColorLabelActive:
|
|
2640
|
-
darkTextColorLabelActive:
|
|
2641
|
-
rows:
|
|
2642
|
-
cols:
|
|
2643
|
-
maxlength:
|
|
2644
|
-
minlength:
|
|
2645
|
-
wrap:
|
|
2646
|
-
spellcheck:
|
|
2647
|
-
autofocus:
|
|
2648
|
-
resize:
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2737
|
+
fontSizeLabel: s,
|
|
2738
|
+
fontSizeLabelActive: i,
|
|
2739
|
+
fontWeightLabel: v,
|
|
2740
|
+
lightTextColorLabel: c,
|
|
2741
|
+
darkTextColorLabel: p,
|
|
2742
|
+
lightTextColorLabelActive: x,
|
|
2743
|
+
darkTextColorLabelActive: _,
|
|
2744
|
+
rows: W,
|
|
2745
|
+
cols: O,
|
|
2746
|
+
maxlength: ue,
|
|
2747
|
+
minlength: Ie,
|
|
2748
|
+
wrap: tt,
|
|
2749
|
+
spellcheck: Ee,
|
|
2750
|
+
autofocus: Pe,
|
|
2751
|
+
resize: xa,
|
|
2752
|
+
minWidth: Sa,
|
|
2753
|
+
maxWidth: Va,
|
|
2754
|
+
minHeight: ka,
|
|
2755
|
+
maxHeight: La,
|
|
2756
|
+
autoResize: Ta,
|
|
2757
|
+
minRows: Ba,
|
|
2758
|
+
maxRows: Aa
|
|
2652
2759
|
};
|
|
2653
|
-
}),
|
|
2654
|
-
display:
|
|
2655
|
-
})),
|
|
2656
|
-
const
|
|
2657
|
-
return
|
|
2658
|
-
}),
|
|
2659
|
-
const
|
|
2760
|
+
}), rt = a(() => f.value.disabled), wt = a(() => ({
|
|
2761
|
+
display: f.value.display
|
|
2762
|
+
})), Rt = a(() => {
|
|
2763
|
+
const u = f.value;
|
|
2764
|
+
return u.fontSize ? u.fontSize : "1.4em";
|
|
2765
|
+
}), ee = a(() => {
|
|
2766
|
+
const u = f.value, A = Bt.value;
|
|
2660
2767
|
return {
|
|
2661
|
-
fontWeight:
|
|
2662
|
-
marginTop:
|
|
2768
|
+
fontWeight: u.fontWeight,
|
|
2769
|
+
marginTop: A && je.value ? `${u.inputLabelMarginActive}px` : "0"
|
|
2663
2770
|
};
|
|
2664
|
-
}),
|
|
2665
|
-
const
|
|
2666
|
-
return
|
|
2667
|
-
}),
|
|
2668
|
-
const
|
|
2669
|
-
return
|
|
2670
|
-
}),
|
|
2671
|
-
const
|
|
2672
|
-
return
|
|
2673
|
-
}),
|
|
2674
|
-
const
|
|
2675
|
-
return
|
|
2676
|
-
}),
|
|
2677
|
-
const
|
|
2678
|
-
return
|
|
2679
|
-
width: `${
|
|
2771
|
+
}), we = a(() => {
|
|
2772
|
+
const u = f.value;
|
|
2773
|
+
return u.inputStyle !== "line" && u.hasBorderRadius ? { borderRadius: `${u.borderRadius}rem` } : {};
|
|
2774
|
+
}), V = a(() => f.value.font), Ct = a(() => f.value.fontFamilyMsg), R = a(() => f.value.fontSizeMsg), z = a(() => f.value.fontWeightMsg), te = a(() => f.value.textColor), E = a(() => f.value.textMessageColor), Et = a(() => {
|
|
2775
|
+
const u = f.value;
|
|
2776
|
+
return u.caretColor || (u.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2777
|
+
}), Pt = a(() => {
|
|
2778
|
+
const u = f.value;
|
|
2779
|
+
return u.selectionBgColor || (u.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2780
|
+
}), Q = a(() => {
|
|
2781
|
+
const u = f.value;
|
|
2782
|
+
return u.selectionTextColor || (u.theme === "dark" ? "#000000" : "#ffffff");
|
|
2783
|
+
}), Tt = a(() => {
|
|
2784
|
+
const u = f.value;
|
|
2785
|
+
return u.display === "block" ? { width: "100%" } : {
|
|
2786
|
+
width: `${u.inputWidth}px`
|
|
2680
2787
|
};
|
|
2681
|
-
}),
|
|
2682
|
-
switch (
|
|
2788
|
+
}), et = a(() => {
|
|
2789
|
+
switch (he.value) {
|
|
2683
2790
|
case "line":
|
|
2684
2791
|
return "component__input--line";
|
|
2685
2792
|
case "border":
|
|
@@ -2687,8 +2794,8 @@ const Nl = ["id"], Il = ["for"], Wl = ["id", "name", "placeholder", "disabled",
|
|
|
2687
2794
|
default:
|
|
2688
2795
|
return "component__input--background";
|
|
2689
2796
|
}
|
|
2690
|
-
}),
|
|
2691
|
-
switch (
|
|
2797
|
+
}), bt = a(() => {
|
|
2798
|
+
switch (f.value.activeTextStyle) {
|
|
2692
2799
|
case "italic":
|
|
2693
2800
|
return "component__input--active--italic";
|
|
2694
2801
|
case "oblique":
|
|
@@ -2696,133 +2803,159 @@ const Nl = ["id"], Il = ["for"], Wl = ["id", "name", "placeholder", "disabled",
|
|
|
2696
2803
|
default:
|
|
2697
2804
|
return "component__input--active--normal";
|
|
2698
2805
|
}
|
|
2699
|
-
}),
|
|
2700
|
-
switch (
|
|
2806
|
+
}), it = a(() => {
|
|
2807
|
+
switch (f.value.theme) {
|
|
2701
2808
|
case "dark":
|
|
2702
2809
|
return "component__theme--dark";
|
|
2703
2810
|
default:
|
|
2704
2811
|
return "component__theme--light";
|
|
2705
2812
|
}
|
|
2706
|
-
}),
|
|
2707
|
-
a(() =>
|
|
2708
|
-
const
|
|
2709
|
-
const
|
|
2710
|
-
ke.value && Object.keys(ke.value).forEach((
|
|
2711
|
-
const
|
|
2712
|
-
"aria-label":
|
|
2813
|
+
}), k = a(() => f.value.inputReadonly ? "component__input--read-only" : ""), Yt = a(() => f.value.inputUppercase ? "component__input--uppercase" : ""), Mt = a(() => C.value ? C.value : `${N.value}-name-label`), Qt = a(() => je.value ? $e.value ? ze.value : "" : ze.value), Bt = a(() => $e.value || T.value && T.value.trim().length > 0);
|
|
2814
|
+
a(() => $e.value ? "component__input--active" : "component__input--no-active");
|
|
2815
|
+
const xt = a(() => "6px 10px"), Jt = a(() => !!(dt.value && ct.value)), Ft = a(() => {
|
|
2816
|
+
const u = {};
|
|
2817
|
+
ke.value && Object.keys(ke.value).forEach((Ye) => u[`aria-${Ye}`] = ke.value[Ye]);
|
|
2818
|
+
const A = {
|
|
2819
|
+
"aria-label": Re.value,
|
|
2713
2820
|
"aria-disabled": w.value,
|
|
2714
|
-
...
|
|
2821
|
+
...u
|
|
2715
2822
|
};
|
|
2716
2823
|
return Object.fromEntries(
|
|
2717
|
-
Object.entries(
|
|
2824
|
+
Object.entries(A).filter(([Ne, Ye]) => Ye != null)
|
|
2718
2825
|
);
|
|
2719
|
-
}),
|
|
2720
|
-
const
|
|
2826
|
+
}), Ot = a(() => {
|
|
2827
|
+
const u = f.value, A = Bt.value, Ne = A ? u.lightTextColorLabelActive : u.lightTextColorLabel, Ye = A ? u.darkTextColorLabelActive : u.darkTextColorLabel;
|
|
2721
2828
|
return {
|
|
2722
|
-
fontFamily:
|
|
2723
|
-
fontSize:
|
|
2724
|
-
fontWeight:
|
|
2725
|
-
color:
|
|
2726
|
-
top:
|
|
2727
|
-
left:
|
|
2728
|
-
transform:
|
|
2829
|
+
fontFamily: u.fontFamilyLabel,
|
|
2830
|
+
fontSize: A ? u.fontSizeLabelActive : u.fontSizeLabel,
|
|
2831
|
+
fontWeight: u.fontWeightLabel,
|
|
2832
|
+
color: u.theme === "dark" ? Ye : Ne,
|
|
2833
|
+
top: A ? `${u.labelActiveTop}px` : "50%",
|
|
2834
|
+
left: A ? `${u.labelActiveLeft}px` : `${u.labelLeft}px`,
|
|
2835
|
+
transform: A ? "translateY(0)" : "translateY(-50%)",
|
|
2729
2836
|
transition: "all 0.2s ease",
|
|
2730
|
-
backgroundColor:
|
|
2731
|
-
padding:
|
|
2732
|
-
borderRadius:
|
|
2837
|
+
backgroundColor: A ? u.labelBackground : "transparent",
|
|
2838
|
+
padding: A ? u.labelPadding : "0",
|
|
2839
|
+
borderRadius: A ? `${u.labelBorderRadius}rem` : "0"
|
|
2733
2840
|
};
|
|
2734
2841
|
});
|
|
2735
2842
|
a(() => {
|
|
2736
|
-
const
|
|
2737
|
-
return
|
|
2843
|
+
const u = f.value;
|
|
2844
|
+
return u.theme === "dark" ? u.darkTextColorLabelActive : u.lightTextColorLabelActive;
|
|
2738
2845
|
});
|
|
2739
|
-
const
|
|
2740
|
-
const
|
|
2741
|
-
rows:
|
|
2742
|
-
cols:
|
|
2743
|
-
wrap:
|
|
2744
|
-
spellcheck:
|
|
2745
|
-
autofocus:
|
|
2846
|
+
const Xt = a(() => {
|
|
2847
|
+
const u = f.value, A = {
|
|
2848
|
+
rows: u.rows,
|
|
2849
|
+
cols: u.cols,
|
|
2850
|
+
wrap: u.wrap,
|
|
2851
|
+
spellcheck: u.spellcheck === "default" ? void 0 : u.spellcheck,
|
|
2852
|
+
autofocus: u.autofocus || void 0
|
|
2746
2853
|
};
|
|
2747
|
-
return
|
|
2748
|
-
}),
|
|
2749
|
-
resize:
|
|
2750
|
-
})),
|
|
2854
|
+
return u.maxlength !== null && (A.maxlength = u.maxlength), u.minlength !== null && (A.minlength = u.minlength), A;
|
|
2855
|
+
}), Zt = a(() => ({
|
|
2856
|
+
resize: f.value.resize
|
|
2857
|
+
})), ea = a(() => f.value.wrap === "off" ? {
|
|
2751
2858
|
whiteSpace: "nowrap",
|
|
2752
2859
|
overflowX: "auto"
|
|
2753
|
-
} : {}),
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2860
|
+
} : {}), ta = a(() => {
|
|
2861
|
+
const u = f.value;
|
|
2862
|
+
return u.minWidth === "auto" ? {} : {
|
|
2863
|
+
minWidth: u.minWidth
|
|
2864
|
+
};
|
|
2865
|
+
}), aa = a(() => {
|
|
2866
|
+
const u = f.value;
|
|
2867
|
+
return u.maxWidth === "auto" ? {} : {
|
|
2868
|
+
maxWidth: u.maxWidth
|
|
2869
|
+
};
|
|
2870
|
+
}), zt = a(() => {
|
|
2871
|
+
const u = f.value;
|
|
2872
|
+
return u.minHeight === "auto" ? {} : {
|
|
2873
|
+
minHeight: u.minHeight
|
|
2874
|
+
};
|
|
2875
|
+
}), qt = a(() => {
|
|
2876
|
+
const u = f.value;
|
|
2877
|
+
return u.maxHeight === "auto" ? {} : {
|
|
2878
|
+
maxHeight: u.maxHeight
|
|
2879
|
+
};
|
|
2880
|
+
}), At = () => {
|
|
2881
|
+
T.value = He.value;
|
|
2882
|
+
}, r = () => {
|
|
2883
|
+
h("clicked");
|
|
2884
|
+
}, B = () => {
|
|
2885
|
+
w.value || f.value.inputReadonly || !be.value || h("entered", T.value);
|
|
2886
|
+
}, ve = () => {
|
|
2887
|
+
let u = T.value;
|
|
2888
|
+
$.value && (u = u.trim()), h("current-value", u);
|
|
2762
2889
|
};
|
|
2763
|
-
return
|
|
2764
|
-
|
|
2765
|
-
}, { immediate: !0 }),
|
|
2766
|
-
$.value && (
|
|
2767
|
-
}),
|
|
2768
|
-
|
|
2769
|
-
}),
|
|
2770
|
-
|
|
2771
|
-
}, { immediate: !0 }), (
|
|
2890
|
+
return U(He, (u) => {
|
|
2891
|
+
u !== T.value && (T.value = u);
|
|
2892
|
+
}, { immediate: !0 }), U(T, (u) => {
|
|
2893
|
+
$.value && (u = u.trim()), h("changed", u);
|
|
2894
|
+
}), U($e, (u) => {
|
|
2895
|
+
h(u ? "focused" : "blurred");
|
|
2896
|
+
}), U(T, () => {
|
|
2897
|
+
ve();
|
|
2898
|
+
}, { immediate: !0 }), (u, A) => o(N) ? (M(), D("div", ba({
|
|
2772
2899
|
key: 0,
|
|
2773
|
-
class: ["nb-wrapper",
|
|
2774
|
-
style: [
|
|
2900
|
+
class: ["nb-wrapper", rt.value],
|
|
2901
|
+
style: [wt.value, Tt.value, we.value],
|
|
2775
2902
|
role: "input"
|
|
2776
|
-
},
|
|
2777
|
-
|
|
2778
|
-
id: o(
|
|
2779
|
-
class:
|
|
2780
|
-
style:
|
|
2781
|
-
onClick:
|
|
2903
|
+
}, Ft.value), [
|
|
2904
|
+
pe("div", {
|
|
2905
|
+
id: o(N),
|
|
2906
|
+
class: Fe(["nb-reset", "component", it.value, k.value, et.value]),
|
|
2907
|
+
style: Se([ee.value, Tt.value, we.value]),
|
|
2908
|
+
onClick: r
|
|
2782
2909
|
}, [
|
|
2783
|
-
o(
|
|
2910
|
+
o(je) ? (M(), D("label", {
|
|
2784
2911
|
key: 0,
|
|
2785
|
-
for:
|
|
2912
|
+
for: Mt.value,
|
|
2786
2913
|
class: "component__label",
|
|
2787
|
-
style:
|
|
2788
|
-
},
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2914
|
+
style: Se([Ot.value])
|
|
2915
|
+
}, [
|
|
2916
|
+
It(kt(e.label), 1),
|
|
2917
|
+
e.required ? (M(), D("span", Gl, "*")) : re("", !0)
|
|
2918
|
+
], 12, Ul)) : re("", !0),
|
|
2919
|
+
ha(pe("textarea", ba({
|
|
2920
|
+
"onUpdate:modelValue": A[0] || (A[0] = (Ne) => T.value = Ne),
|
|
2921
|
+
id: Mt.value,
|
|
2922
|
+
name: Mt.value
|
|
2923
|
+
}, Xt.value, {
|
|
2794
2924
|
class: ["component__input", [
|
|
2795
|
-
|
|
2796
|
-
|
|
2925
|
+
Yt.value,
|
|
2926
|
+
bt.value
|
|
2797
2927
|
]],
|
|
2798
|
-
placeholder:
|
|
2799
|
-
disabled: o(w) || o(
|
|
2928
|
+
placeholder: Qt.value,
|
|
2929
|
+
disabled: o(w) || o(Ce),
|
|
2800
2930
|
required: e.required,
|
|
2801
|
-
readonly: o(
|
|
2931
|
+
readonly: o(Ce),
|
|
2802
2932
|
autocomplete: e.inputAutocomplete,
|
|
2803
|
-
tabindex: o(w) || o(
|
|
2933
|
+
tabindex: o(w) || o(Ce) ? -1 : o(at),
|
|
2804
2934
|
role: "textbox",
|
|
2805
|
-
style: [
|
|
2806
|
-
onFocus:
|
|
2807
|
-
onBlur:
|
|
2808
|
-
onInput:
|
|
2809
|
-
onKeydown:
|
|
2810
|
-
}), null, 16,
|
|
2811
|
-
[
|
|
2935
|
+
style: [we.value, Zt.value, ea.value, ta.value, aa.value, zt.value, qt.value],
|
|
2936
|
+
onFocus: A[1] || (A[1] = (Ne) => $e.value = !0),
|
|
2937
|
+
onBlur: A[2] || (A[2] = (Ne) => $e.value = !1),
|
|
2938
|
+
onInput: ve,
|
|
2939
|
+
onKeydown: A[3] || (A[3] = Kt((Ne) => !o(w) && o(be) && B(), ["enter"]))
|
|
2940
|
+
}), null, 16, Kl), [
|
|
2941
|
+
[Xa, T.value]
|
|
2812
2942
|
])
|
|
2813
|
-
], 14,
|
|
2814
|
-
|
|
2943
|
+
], 14, jl),
|
|
2944
|
+
Jt.value ? (M(), D("div", {
|
|
2815
2945
|
key: 0,
|
|
2816
|
-
class:
|
|
2946
|
+
class: Fe(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
2817
2947
|
}, [
|
|
2818
|
-
|
|
2819
|
-
|
|
2948
|
+
va(u.$slots, "message", {}, () => [
|
|
2949
|
+
It(kt(e.message), 1)
|
|
2820
2950
|
], !0)
|
|
2821
|
-
], 2)) :
|
|
2822
|
-
], 16)) :
|
|
2951
|
+
], 2)) : re("", !0)
|
|
2952
|
+
], 16)) : re("", !0);
|
|
2823
2953
|
}
|
|
2824
|
-
}),
|
|
2825
|
-
const
|
|
2954
|
+
}), Ql = /* @__PURE__ */ Ca(Yl, [["__scopeId", "data-v-f04d2155"]]);
|
|
2955
|
+
const Jl = ["id"], Xl = ["for"], Zl = {
|
|
2956
|
+
key: 0,
|
|
2957
|
+
class: "component__label--required"
|
|
2958
|
+
}, en = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "min", "max", "step", "tabindex"], tn = /* @__PURE__ */ Object.assign({
|
|
2826
2959
|
name: "NbDatePicker",
|
|
2827
2960
|
inheritAttrs: !1
|
|
2828
2961
|
}, {
|
|
@@ -2836,8 +2969,8 @@ const Fl = ["id"], Ol = ["for"], ql = ["id", "name", "type", "placeholder", "dis
|
|
|
2836
2969
|
type: String,
|
|
2837
2970
|
default: "b",
|
|
2838
2971
|
validator: (e = "b") => {
|
|
2839
|
-
const
|
|
2840
|
-
return ["b", "ib"].includes(
|
|
2972
|
+
const y = e.toLowerCase();
|
|
2973
|
+
return ["b", "ib"].includes(y);
|
|
2841
2974
|
}
|
|
2842
2975
|
},
|
|
2843
2976
|
tabIndex: {
|
|
@@ -3090,6 +3223,11 @@ const Fl = ["id"], Ol = ["for"], ql = ["id", "name", "type", "placeholder", "dis
|
|
|
3090
3223
|
type: String,
|
|
3091
3224
|
default: "Label text"
|
|
3092
3225
|
},
|
|
3226
|
+
labelBreakOnActive: {
|
|
3227
|
+
type: Boolean,
|
|
3228
|
+
default: !0,
|
|
3229
|
+
validator: (e) => typeof e == "boolean" && [!0, !1].includes(e)
|
|
3230
|
+
},
|
|
3093
3231
|
labelBackground: {
|
|
3094
3232
|
type: String,
|
|
3095
3233
|
default: "transparent"
|
|
@@ -3118,6 +3256,14 @@ const Fl = ["id"], Ol = ["for"], ql = ["id", "name", "type", "placeholder", "dis
|
|
|
3118
3256
|
type: Number,
|
|
3119
3257
|
default: 5
|
|
3120
3258
|
},
|
|
3259
|
+
labelRight: {
|
|
3260
|
+
type: Number,
|
|
3261
|
+
default: 0
|
|
3262
|
+
},
|
|
3263
|
+
labelActiveRight: {
|
|
3264
|
+
type: Number,
|
|
3265
|
+
default: 0
|
|
3266
|
+
},
|
|
3121
3267
|
fontFamilyLabel: {
|
|
3122
3268
|
type: String,
|
|
3123
3269
|
default: "'Lato', sans-serif"
|
|
@@ -3162,179 +3308,183 @@ const Fl = ["id"], Ol = ["for"], ql = ["id", "name", "type", "placeholder", "dis
|
|
|
3162
3308
|
"clicked",
|
|
3163
3309
|
"entered"
|
|
3164
3310
|
],
|
|
3165
|
-
setup(e, { emit:
|
|
3166
|
-
|
|
3167
|
-
"
|
|
3168
|
-
"
|
|
3169
|
-
|
|
3170
|
-
"
|
|
3171
|
-
"
|
|
3172
|
-
"
|
|
3173
|
-
|
|
3174
|
-
"
|
|
3175
|
-
"
|
|
3176
|
-
|
|
3177
|
-
"
|
|
3178
|
-
"
|
|
3179
|
-
"
|
|
3180
|
-
|
|
3181
|
-
"
|
|
3182
|
-
|
|
3183
|
-
"
|
|
3184
|
-
|
|
3185
|
-
"
|
|
3186
|
-
"
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3311
|
+
setup(e, { emit: y }) {
|
|
3312
|
+
ya((t) => ({
|
|
3313
|
+
"38fee851": bt.value,
|
|
3314
|
+
"72e828df": Q.value,
|
|
3315
|
+
"5ebab342": o(Ue),
|
|
3316
|
+
"0b35d0ef": Bt.value,
|
|
3317
|
+
"188def01": xt.value,
|
|
3318
|
+
"78674b4e": Jt.value,
|
|
3319
|
+
ea5e2cc4: o(S),
|
|
3320
|
+
"7e9e7d6a": o(b),
|
|
3321
|
+
"90f0e8f4": o(Je),
|
|
3322
|
+
a86f6b88: Mt.value,
|
|
3323
|
+
"01a1c61c": o(Ge),
|
|
3324
|
+
"21e39db0": A.value,
|
|
3325
|
+
"2f78ac90": Ne.value,
|
|
3326
|
+
b06907e4: o(je),
|
|
3327
|
+
"7c4123ac": o(dt),
|
|
3328
|
+
db617e64: o(ct),
|
|
3329
|
+
"4601eb16": o(ne),
|
|
3330
|
+
e512822e: B.value,
|
|
3331
|
+
"4f623b14": it.value,
|
|
3332
|
+
"0231f7b5": k.value,
|
|
3333
|
+
b2d19cc4: Yt.value,
|
|
3334
|
+
"5ee5b178": Qt.value,
|
|
3335
|
+
"598d71e2": t.styleButtonColor
|
|
3190
3336
|
}));
|
|
3191
|
-
const
|
|
3337
|
+
const h = pl(
|
|
3192
3338
|
() => import("@vlalg-nimbus/nb-calendar").then((t) => t.Calendar ? t.Calendar : t.default && t.default.Calendar ? t.default.Calendar : t.default)
|
|
3193
3339
|
);
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
}),
|
|
3197
|
-
|
|
3340
|
+
pa(() => {
|
|
3341
|
+
g.value = We.value;
|
|
3342
|
+
}), $a(() => {
|
|
3343
|
+
gt();
|
|
3198
3344
|
});
|
|
3199
|
-
const
|
|
3345
|
+
const P = y, N = e, {
|
|
3200
3346
|
nbId: Ve,
|
|
3201
|
-
display:
|
|
3202
|
-
hasTabIndexEnter:
|
|
3347
|
+
display: be,
|
|
3348
|
+
hasTabIndexEnter: Re,
|
|
3203
3349
|
ariaLabel: ke,
|
|
3204
|
-
ariaAttrs:
|
|
3205
|
-
caretColor:
|
|
3206
|
-
selectionBgColor:
|
|
3207
|
-
selectionTextColor:
|
|
3208
|
-
hasBorderRadius:
|
|
3209
|
-
borderRadius:
|
|
3350
|
+
ariaAttrs: ie,
|
|
3351
|
+
caretColor: J,
|
|
3352
|
+
selectionBgColor: Oe,
|
|
3353
|
+
selectionTextColor: Me,
|
|
3354
|
+
hasBorderRadius: ae,
|
|
3355
|
+
borderRadius: G,
|
|
3210
3356
|
disabled: w,
|
|
3211
|
-
fontFamily:
|
|
3212
|
-
fontSize:
|
|
3213
|
-
fontWeight:
|
|
3357
|
+
fontFamily: le,
|
|
3358
|
+
fontSize: se,
|
|
3359
|
+
fontWeight: K,
|
|
3214
3360
|
fontFamilyMsg: Le,
|
|
3215
|
-
fontSizeMsg:
|
|
3216
|
-
fontWeightMsg:
|
|
3217
|
-
textMessageColor:
|
|
3218
|
-
inputWidth:
|
|
3219
|
-
inputStyle:
|
|
3220
|
-
activeTextStyle:
|
|
3221
|
-
sizeMediaQuery:
|
|
3361
|
+
fontSizeMsg: de,
|
|
3362
|
+
fontWeightMsg: F,
|
|
3363
|
+
textMessageColor: ge,
|
|
3364
|
+
inputWidth: X,
|
|
3365
|
+
inputStyle: he,
|
|
3366
|
+
activeTextStyle: ce,
|
|
3367
|
+
sizeMediaQuery: Ce,
|
|
3222
3368
|
inputReadonly: $,
|
|
3223
3369
|
inputType: L,
|
|
3224
|
-
hasTrim:
|
|
3225
|
-
inputUppercase:
|
|
3226
|
-
inputName:
|
|
3227
|
-
inputText:
|
|
3228
|
-
min:
|
|
3370
|
+
hasTrim: C,
|
|
3371
|
+
inputUppercase: ze,
|
|
3372
|
+
inputName: He,
|
|
3373
|
+
inputText: We,
|
|
3374
|
+
min: at,
|
|
3229
3375
|
max: ye,
|
|
3230
|
-
step:
|
|
3231
|
-
useCustomCalendar:
|
|
3376
|
+
step: lt,
|
|
3377
|
+
useCustomCalendar: mt,
|
|
3232
3378
|
locale: Qe,
|
|
3233
3379
|
theme: Te,
|
|
3234
|
-
allowRange:
|
|
3235
|
-
calendarZIndex:
|
|
3236
|
-
calendarWidth:
|
|
3380
|
+
allowRange: xe,
|
|
3381
|
+
calendarZIndex: ht,
|
|
3382
|
+
calendarWidth: nt,
|
|
3237
3383
|
tabindex: st,
|
|
3238
3384
|
lightBgColor: dt,
|
|
3239
3385
|
lightBgColorFocus: ct,
|
|
3240
|
-
lightDisabledBgColor:
|
|
3386
|
+
lightDisabledBgColor: je,
|
|
3241
3387
|
lightTextColor: Ue,
|
|
3242
3388
|
darkBgColor: Je,
|
|
3243
3389
|
darkBgColorFocus: Ge,
|
|
3244
|
-
darkDisabledBgColor:
|
|
3245
|
-
darkTextColor:
|
|
3246
|
-
textAlign:
|
|
3247
|
-
showMsg:
|
|
3390
|
+
darkDisabledBgColor: b,
|
|
3391
|
+
darkTextColor: S,
|
|
3392
|
+
textAlign: ne,
|
|
3393
|
+
showMsg: Z,
|
|
3248
3394
|
hasMsg: me,
|
|
3249
|
-
showLabel:
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3395
|
+
showLabel: Be,
|
|
3396
|
+
label: Xe,
|
|
3397
|
+
labelBreakOnActive: q,
|
|
3398
|
+
labelBackground: d,
|
|
3399
|
+
labelPadding: m,
|
|
3400
|
+
labelBorderRadius: fe,
|
|
3401
|
+
labelLeft: H,
|
|
3402
|
+
inputLabelMarginActive: Y,
|
|
3403
|
+
labelActiveTop: Ae,
|
|
3404
|
+
labelActiveLeft: _e,
|
|
3405
|
+
labelRight: De,
|
|
3406
|
+
labelActiveRight: qe,
|
|
3407
|
+
fontFamilyLabel: Ze,
|
|
3408
|
+
fontSizeLabel: ot,
|
|
3409
|
+
fontSizeLabelActive: ut,
|
|
3410
|
+
fontWeightLabel: ft,
|
|
3411
|
+
lightTextColorLabel: vt,
|
|
3412
|
+
lightTextColorLabelActive: pt,
|
|
3413
|
+
darkTextColorLabel: Ke,
|
|
3414
|
+
darkTextColorLabelActive: Lt
|
|
3415
|
+
} = ma(N), g = j(""), I = j(""), T = j(""), $e = j(""), f = j(!1), rt = j(!1), wt = a(() => !nt.value || nt.value < 280 ? 280 : parseInt(nt.value, 10)), Rt = a(() => {
|
|
3416
|
+
if (!g.value)
|
|
3267
3417
|
return null;
|
|
3268
|
-
if (
|
|
3418
|
+
if (xe.value && typeof g.value == "string" && g.value.startsWith("{"))
|
|
3269
3419
|
try {
|
|
3270
|
-
const t = JSON.parse(
|
|
3420
|
+
const t = JSON.parse(g.value);
|
|
3271
3421
|
if (t && (t.startDate || t.endDate)) {
|
|
3272
|
-
const
|
|
3422
|
+
const l = (s) => {
|
|
3273
3423
|
if (!s)
|
|
3274
3424
|
return null;
|
|
3275
3425
|
if (/^\d{4}-\d{2}-\d{2}$/.test(s)) {
|
|
3276
|
-
const [i, v,
|
|
3277
|
-
return new Date(i, v - 1,
|
|
3426
|
+
const [i, v, c] = s.split("-").map(Number);
|
|
3427
|
+
return new Date(i, v - 1, c);
|
|
3278
3428
|
}
|
|
3279
3429
|
return new Date(s);
|
|
3280
3430
|
};
|
|
3281
3431
|
return {
|
|
3282
|
-
startDate: t.startDate ?
|
|
3283
|
-
endDate: t.endDate ?
|
|
3432
|
+
startDate: t.startDate ? l(t.startDate) : null,
|
|
3433
|
+
endDate: t.endDate ? l(t.endDate) : null
|
|
3284
3434
|
};
|
|
3285
3435
|
}
|
|
3286
3436
|
} catch {
|
|
3287
3437
|
}
|
|
3288
|
-
if (L.value === "date" && typeof
|
|
3289
|
-
const [t,
|
|
3290
|
-
return new Date(t,
|
|
3438
|
+
if (L.value === "date" && typeof g.value == "string" && /^\d{4}-\d{2}-\d{2}$/.test(g.value)) {
|
|
3439
|
+
const [t, l, s] = g.value.split("-").map(Number);
|
|
3440
|
+
return new Date(t, l - 1, s);
|
|
3291
3441
|
}
|
|
3292
|
-
return
|
|
3293
|
-
}),
|
|
3442
|
+
return g.value;
|
|
3443
|
+
}), ee = (t, l, s) => {
|
|
3294
3444
|
if (!t)
|
|
3295
3445
|
return "";
|
|
3296
3446
|
const i = s || Qe.value;
|
|
3297
|
-
if (
|
|
3298
|
-
if (
|
|
3447
|
+
if (l === "date") {
|
|
3448
|
+
if (xe.value && typeof t == "string" && t.startsWith("{"))
|
|
3299
3449
|
try {
|
|
3300
3450
|
const v = JSON.parse(t);
|
|
3301
3451
|
if (v && (v.startDate || v.endDate)) {
|
|
3302
|
-
const
|
|
3303
|
-
if (!
|
|
3452
|
+
const c = (_) => {
|
|
3453
|
+
if (!_)
|
|
3304
3454
|
return "";
|
|
3305
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
3306
|
-
const [
|
|
3307
|
-
return i === "pt-BR" ? `${
|
|
3455
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(_)) {
|
|
3456
|
+
const [W, O, ue] = _.split("-");
|
|
3457
|
+
return i === "pt-BR" ? `${ue}/${O}/${W}` : `${O}/${ue}/${W}`;
|
|
3308
3458
|
}
|
|
3309
|
-
return
|
|
3310
|
-
}, p =
|
|
3311
|
-
if (p &&
|
|
3312
|
-
return `${p} - ${
|
|
3459
|
+
return _;
|
|
3460
|
+
}, p = c(v.startDate), x = c(v.endDate);
|
|
3461
|
+
if (p && x)
|
|
3462
|
+
return `${p} - ${x}`;
|
|
3313
3463
|
if (p)
|
|
3314
3464
|
return p;
|
|
3315
|
-
if (
|
|
3316
|
-
return
|
|
3465
|
+
if (x)
|
|
3466
|
+
return x;
|
|
3317
3467
|
}
|
|
3318
3468
|
} catch {
|
|
3319
3469
|
}
|
|
3320
3470
|
if (typeof t == "string" && /^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
3321
|
-
const [v,
|
|
3322
|
-
return i === "pt-BR" ? `${p}/${
|
|
3471
|
+
const [v, c, p] = t.split("-");
|
|
3472
|
+
return i === "pt-BR" ? `${p}/${c}/${v}` : `${c}/${p}/${v}`;
|
|
3323
3473
|
}
|
|
3324
3474
|
return t;
|
|
3325
|
-
} else if (
|
|
3475
|
+
} else if (l === "datetime-local") {
|
|
3326
3476
|
if (typeof t == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/.test(t)) {
|
|
3327
|
-
const [v,
|
|
3328
|
-
return i === "pt-BR" ? `${
|
|
3477
|
+
const [v, c] = t.split("T"), [p, x, _] = v.split("-");
|
|
3478
|
+
return i === "pt-BR" ? `${_}/${x}/${p} ${c}` : `${x}/${_}/${p} ${c}`;
|
|
3329
3479
|
}
|
|
3330
3480
|
return t;
|
|
3331
|
-
} else if (
|
|
3481
|
+
} else if (l === "month") {
|
|
3332
3482
|
if (typeof t == "string" && /^\d{4}-\d{2}$/.test(t)) {
|
|
3333
|
-
const [v,
|
|
3334
|
-
return `${
|
|
3483
|
+
const [v, c] = t.split("-");
|
|
3484
|
+
return `${c}/${v}`;
|
|
3335
3485
|
}
|
|
3336
3486
|
return t;
|
|
3337
|
-
} else if (
|
|
3487
|
+
} else if (l === "week") {
|
|
3338
3488
|
if (typeof t == "string" && /^\d{4}-W\d{2}$/i.test(t)) {
|
|
3339
3489
|
const v = t.match(/^(\d{4})-W(\d{2})$/i);
|
|
3340
3490
|
if (v)
|
|
@@ -3343,163 +3493,170 @@ const Fl = ["id"], Ol = ["for"], ql = ["id", "name", "type", "placeholder", "dis
|
|
|
3343
3493
|
return t;
|
|
3344
3494
|
}
|
|
3345
3495
|
return t;
|
|
3346
|
-
},
|
|
3496
|
+
}, we = (t, l, s) => {
|
|
3347
3497
|
if (!t || !t.trim())
|
|
3348
3498
|
return "";
|
|
3349
3499
|
const i = t.trim(), v = s || Qe.value;
|
|
3350
|
-
if (
|
|
3351
|
-
if (
|
|
3352
|
-
const
|
|
3353
|
-
if (!
|
|
3500
|
+
if (l === "date") {
|
|
3501
|
+
if (xe.value && i.includes("-")) {
|
|
3502
|
+
const c = i.split(/\s*-\s*/).map((W) => W.trim()), p = (W) => {
|
|
3503
|
+
if (!W)
|
|
3354
3504
|
return null;
|
|
3355
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(
|
|
3356
|
-
const O =
|
|
3505
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(W)) {
|
|
3506
|
+
const O = W.split("/");
|
|
3357
3507
|
if (v === "pt-BR") {
|
|
3358
|
-
const [
|
|
3359
|
-
return `${
|
|
3508
|
+
const [ue, Ie, tt] = O, Ee = ue.padStart(2, "0"), Pe = Ie.padStart(2, "0");
|
|
3509
|
+
return `${tt}-${Pe}-${Ee}`;
|
|
3360
3510
|
} else {
|
|
3361
|
-
const [
|
|
3362
|
-
return `${
|
|
3511
|
+
const [ue, Ie, tt] = O, Ee = Ie.padStart(2, "0"), Pe = ue.padStart(2, "0");
|
|
3512
|
+
return `${tt}-${Pe}-${Ee}`;
|
|
3363
3513
|
}
|
|
3364
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
3365
|
-
const O =
|
|
3366
|
-
return `${
|
|
3514
|
+
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(W)) {
|
|
3515
|
+
const O = W.split("-"), [ue, Ie, tt] = O, Ee = tt.padStart(2, "0"), Pe = Ie.padStart(2, "0");
|
|
3516
|
+
return `${ue}-${Pe}-${Ee}`;
|
|
3367
3517
|
}
|
|
3368
3518
|
return null;
|
|
3369
3519
|
};
|
|
3370
|
-
let
|
|
3371
|
-
if (
|
|
3372
|
-
const
|
|
3373
|
-
if (new Date(
|
|
3374
|
-
const
|
|
3375
|
-
|
|
3520
|
+
let x = p(c[0]), _ = c[1] ? p(c[1]) : null;
|
|
3521
|
+
if (x && _) {
|
|
3522
|
+
const W = new Date(x);
|
|
3523
|
+
if (new Date(_) < W) {
|
|
3524
|
+
const ue = x;
|
|
3525
|
+
x = _, _ = ue;
|
|
3376
3526
|
}
|
|
3377
|
-
return JSON.stringify({ startDate:
|
|
3378
|
-
} else if (
|
|
3379
|
-
return JSON.stringify({ startDate:
|
|
3527
|
+
return JSON.stringify({ startDate: x, endDate: _ });
|
|
3528
|
+
} else if (x)
|
|
3529
|
+
return JSON.stringify({ startDate: x, endDate: null });
|
|
3380
3530
|
return "";
|
|
3381
3531
|
}
|
|
3382
3532
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(i)) {
|
|
3383
|
-
const
|
|
3533
|
+
const c = i.split("/");
|
|
3384
3534
|
if (v === "pt-BR") {
|
|
3385
|
-
const [p,
|
|
3386
|
-
return `${
|
|
3535
|
+
const [p, x, _] = c, W = p.padStart(2, "0"), O = x.padStart(2, "0");
|
|
3536
|
+
return `${_}-${O}-${W}`;
|
|
3387
3537
|
} else {
|
|
3388
|
-
const [p,
|
|
3389
|
-
return `${
|
|
3538
|
+
const [p, x, _] = c, W = x.padStart(2, "0"), O = p.padStart(2, "0");
|
|
3539
|
+
return `${_}-${O}-${W}`;
|
|
3390
3540
|
}
|
|
3391
3541
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(i)) {
|
|
3392
|
-
const
|
|
3393
|
-
return `${p}-${O}-${
|
|
3542
|
+
const c = i.split("-"), [p, x, _] = c, W = _.padStart(2, "0"), O = x.padStart(2, "0");
|
|
3543
|
+
return `${p}-${O}-${W}`;
|
|
3394
3544
|
}
|
|
3395
3545
|
return "";
|
|
3396
|
-
} else if (
|
|
3546
|
+
} else if (l === "datetime-local") {
|
|
3397
3547
|
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(i)) {
|
|
3398
|
-
const [
|
|
3548
|
+
const [c, p] = i.split(" "), x = c.split("/");
|
|
3399
3549
|
if (v === "pt-BR") {
|
|
3400
|
-
const [
|
|
3401
|
-
return `${O}-${
|
|
3550
|
+
const [_, W, O] = x, ue = _.padStart(2, "0"), Ie = W.padStart(2, "0"), Ee = p.split(":").map((Pe) => Pe.padStart(2, "0")).join(":");
|
|
3551
|
+
return `${O}-${Ie}-${ue}T${Ee}`;
|
|
3402
3552
|
} else {
|
|
3403
|
-
const [
|
|
3404
|
-
return `${O}-${
|
|
3553
|
+
const [_, W, O] = x, ue = W.padStart(2, "0"), Ie = _.padStart(2, "0"), Ee = p.split(":").map((Pe) => Pe.padStart(2, "0")).join(":");
|
|
3554
|
+
return `${O}-${Ie}-${ue}T${Ee}`;
|
|
3405
3555
|
}
|
|
3406
3556
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(i)) {
|
|
3407
|
-
const [
|
|
3408
|
-
return `${
|
|
3557
|
+
const [c, p] = i.split("T"), x = c.split("-"), [_, W, O] = x, ue = O.padStart(2, "0"), Ie = W.padStart(2, "0"), Ee = p.split(":").map((Pe) => Pe.padStart(2, "0")).join(":");
|
|
3558
|
+
return `${_}-${Ie}-${ue}T${Ee}`;
|
|
3409
3559
|
}
|
|
3410
3560
|
return "";
|
|
3411
|
-
} else if (
|
|
3561
|
+
} else if (l === "month") {
|
|
3412
3562
|
if (/^\d{1,2}\/\d{4}$/.test(i)) {
|
|
3413
|
-
const [
|
|
3414
|
-
return `${p}-${
|
|
3563
|
+
const [c, p] = i.split("/"), x = c.padStart(2, "0");
|
|
3564
|
+
return `${p}-${x}`;
|
|
3415
3565
|
} else if (/^\d{4}-\d{1,2}$/.test(i)) {
|
|
3416
|
-
const [
|
|
3417
|
-
return `${
|
|
3566
|
+
const [c, p] = i.split("-"), x = p.padStart(2, "0");
|
|
3567
|
+
return `${c}-${x}`;
|
|
3418
3568
|
}
|
|
3419
3569
|
return "";
|
|
3420
|
-
} else if (
|
|
3570
|
+
} else if (l === "week") {
|
|
3421
3571
|
if (/^\d{4}-W\d{2}$/i.test(i))
|
|
3422
3572
|
return i.toUpperCase();
|
|
3423
|
-
const
|
|
3424
|
-
if (
|
|
3425
|
-
return `${
|
|
3573
|
+
const c = i.match(/semana\s+W?(\d{2})\s+de\s+(\d{4})/i);
|
|
3574
|
+
if (c)
|
|
3575
|
+
return `${c[2]}-W${c[1]}`;
|
|
3426
3576
|
const p = i.match(/week\s+W?(\d{2})\s+of\s+(\d{4})/i);
|
|
3427
3577
|
return p ? `${p[2]}-W${p[1]}` : "";
|
|
3428
3578
|
}
|
|
3429
3579
|
return i;
|
|
3430
|
-
},
|
|
3431
|
-
const t = w.value ? "component-disabled" : "",
|
|
3580
|
+
}, V = j(!1), Ct = j({ top: 0, left: 0 }), R = j(null), z = j(null), te = a(() => mt.value === !0), E = a(() => {
|
|
3581
|
+
const t = w.value ? "component-disabled" : "", l = be.value !== "b" ? "inline-block" : "block", s = J.value ? J.value : "", i = Oe.value ? Oe.value : "", v = Me.value ? Me.value : "", c = ae.value ? ae.value : !1, p = G.value !== 0 && !G.value || G.value < 0 ? 0 : G.value, x = le.value ? le.value : "'Lato', sans-serif", _ = se.value ? se.value : "1.4em", W = K.value !== 0 && !K.value || K.value < 0 ? 100 : K.value, O = Le.value ? Le.value : "'Lato', sans-serif", ue = de.value ? de.value : "1em", Ie = F.value !== 0 && !F.value || F.value < 0 ? 100 : F.value, tt = ge.value ? ge.value : "#f15574", Ee = X.value ? X.value : 200, Pe = ce.value ? ce.value : "normal", xa = "sm", Sa = $.value ? $.value : !1, Va = L.value ? L.value : "date", ka = ze.value ? ze.value : !1, La = Te.value ? Te.value : "normal", Ta = ne.value ? ne.value : "left", Ba = he.value ? he.value : "background", Aa = Be.value ? Be.value : !1, wa = H.value !== 0 && !H.value || H.value < 0 ? 5 : H.value, Ra = d.value ? d.value : "transparent", Ma = Y.value !== 0 && !Y.value || Y.value < 0 ? 15 : Y.value, za = m.value ? m.value : "1px 5px", Wa = fe.value !== 0 && !fe.value || fe.value < 0 ? 0 : fe.value, Da = Ae.value === null || Ae.value === void 0 ? -13 : Ae.value, Na = _e.value === null || _e.value === void 0 ? -10 : _e.value, Ia = De.value === null || De.value === void 0 ? 0 : De.value, Ea = qe.value === null || qe.value === void 0 ? 0 : qe.value, Pa = Ze.value ? Ze.value : "'Lato', sans-serif", Fa = ot.value ? ot.value : "1em", Oa = ut.value ? ut.value : "0.8em", qa = ft.value ? ft.value : 400, Ha = vt.value ? vt.value : "#ffffff", ja = Ke.value ? Ke.value : "#000000", Ua = pt.value ? pt.value : "#ffffff", Ga = Lt.value ? Lt.value : "#000000";
|
|
3432
3582
|
return {
|
|
3433
3583
|
disabled: t,
|
|
3434
|
-
display:
|
|
3435
|
-
font:
|
|
3436
|
-
fontSize:
|
|
3437
|
-
fontWeight:
|
|
3584
|
+
display: l,
|
|
3585
|
+
font: x,
|
|
3586
|
+
fontSize: _,
|
|
3587
|
+
fontWeight: W,
|
|
3438
3588
|
fontFamilyMsg: O,
|
|
3439
|
-
fontSizeMsg:
|
|
3440
|
-
fontWeightMsg:
|
|
3441
|
-
textMessageColor:
|
|
3589
|
+
fontSizeMsg: ue,
|
|
3590
|
+
fontWeightMsg: Ie,
|
|
3591
|
+
textMessageColor: tt,
|
|
3442
3592
|
caretColor: s,
|
|
3443
3593
|
selectionBgColor: i,
|
|
3444
3594
|
selectionTextColor: v,
|
|
3445
|
-
hasBorderRadius:
|
|
3595
|
+
hasBorderRadius: c,
|
|
3446
3596
|
borderRadius: p,
|
|
3447
|
-
textAlign:
|
|
3448
|
-
inputWidth:
|
|
3449
|
-
activeTextStyle:
|
|
3450
|
-
sizeMediaQuery:
|
|
3451
|
-
inputReadonly:
|
|
3452
|
-
inputType:
|
|
3453
|
-
inputUppercase:
|
|
3454
|
-
theme:
|
|
3455
|
-
inputStyle:
|
|
3456
|
-
showLabel:
|
|
3457
|
-
labelBackground:
|
|
3458
|
-
labelPadding:
|
|
3459
|
-
labelBorderRadius:
|
|
3460
|
-
labelLeft:
|
|
3461
|
-
inputLabelMarginActive:
|
|
3462
|
-
labelActiveTop:
|
|
3463
|
-
labelActiveLeft:
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3597
|
+
textAlign: Ta,
|
|
3598
|
+
inputWidth: Ee,
|
|
3599
|
+
activeTextStyle: Pe,
|
|
3600
|
+
sizeMediaQuery: xa,
|
|
3601
|
+
inputReadonly: Sa,
|
|
3602
|
+
inputType: Va,
|
|
3603
|
+
inputUppercase: ka,
|
|
3604
|
+
theme: La,
|
|
3605
|
+
inputStyle: Ba,
|
|
3606
|
+
showLabel: Aa,
|
|
3607
|
+
labelBackground: Ra,
|
|
3608
|
+
labelPadding: za,
|
|
3609
|
+
labelBorderRadius: Wa,
|
|
3610
|
+
labelLeft: wa,
|
|
3611
|
+
inputLabelMarginActive: Ma,
|
|
3612
|
+
labelActiveTop: Da,
|
|
3613
|
+
labelActiveLeft: Na,
|
|
3614
|
+
labelRight: Ia,
|
|
3615
|
+
labelActiveRight: Ea,
|
|
3616
|
+
fontFamilyLabel: Pa,
|
|
3617
|
+
fontSizeLabel: Fa,
|
|
3618
|
+
fontSizeLabelActive: Oa,
|
|
3619
|
+
fontWeightLabel: qa,
|
|
3620
|
+
lightTextColorLabel: Ha,
|
|
3621
|
+
darkTextColorLabel: ja,
|
|
3622
|
+
lightTextColorLabelActive: Ua,
|
|
3623
|
+
darkTextColorLabelActive: Ga
|
|
3472
3624
|
};
|
|
3473
|
-
}),
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3625
|
+
}), Et = a(() => E.value.disabled), Pt = a(() => {
|
|
3626
|
+
const t = E.value, l = At.value;
|
|
3627
|
+
return {
|
|
3628
|
+
display: t.display,
|
|
3629
|
+
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
3630
|
+
paddingTop: l && Be.value ? `${Math.abs(t.labelActiveTop)}px` : "0"
|
|
3631
|
+
};
|
|
3632
|
+
}), Q = a(() => {
|
|
3633
|
+
const t = E.value;
|
|
3477
3634
|
return t.fontSize ? t.fontSize : "1.4em";
|
|
3478
|
-
}),
|
|
3479
|
-
const t =
|
|
3635
|
+
}), Tt = a(() => {
|
|
3636
|
+
const t = E.value, l = At.value;
|
|
3480
3637
|
return {
|
|
3481
3638
|
fontWeight: t.fontWeight,
|
|
3482
|
-
marginTop:
|
|
3639
|
+
marginTop: l && Be.value ? `${t.inputLabelMarginActive}px` : "0"
|
|
3483
3640
|
};
|
|
3484
|
-
}),
|
|
3485
|
-
const t =
|
|
3641
|
+
}), et = a(() => {
|
|
3642
|
+
const t = E.value;
|
|
3486
3643
|
return t.inputStyle !== "line" && t.hasBorderRadius ? { borderRadius: `${t.borderRadius}rem` } : {};
|
|
3487
|
-
}),
|
|
3488
|
-
const t =
|
|
3644
|
+
}), bt = a(() => E.value.font), it = a(() => E.value.fontFamilyMsg), k = a(() => E.value.fontSizeMsg), Yt = a(() => E.value.fontWeightMsg), Mt = a(() => Te.value === "dark" ? S.value : Ue.value), Qt = a(() => E.value.textMessageColor), Bt = a(() => {
|
|
3645
|
+
const t = E.value;
|
|
3489
3646
|
return t.caretColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
3490
|
-
}),
|
|
3491
|
-
const t =
|
|
3647
|
+
}), xt = a(() => {
|
|
3648
|
+
const t = E.value;
|
|
3492
3649
|
return t.selectionBgColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
3493
|
-
}),
|
|
3494
|
-
const t =
|
|
3650
|
+
}), Jt = a(() => {
|
|
3651
|
+
const t = E.value;
|
|
3495
3652
|
return t.selectionTextColor || (t.theme === "dark" ? "#000000" : "#ffffff");
|
|
3496
|
-
}),
|
|
3497
|
-
const t =
|
|
3653
|
+
}), Ft = a(() => {
|
|
3654
|
+
const t = E.value;
|
|
3498
3655
|
return t.display === "block" ? { width: "100%" } : {
|
|
3499
3656
|
width: `${t.inputWidth}px`
|
|
3500
3657
|
};
|
|
3501
|
-
}),
|
|
3502
|
-
switch (
|
|
3658
|
+
}), Ot = a(() => {
|
|
3659
|
+
switch (he.value) {
|
|
3503
3660
|
case "line":
|
|
3504
3661
|
return "component__input--line";
|
|
3505
3662
|
case "border":
|
|
@@ -3507,8 +3664,8 @@ const Fl = ["id"], Ol = ["for"], ql = ["id", "name", "type", "placeholder", "dis
|
|
|
3507
3664
|
default:
|
|
3508
3665
|
return "component__input--background";
|
|
3509
3666
|
}
|
|
3510
|
-
}),
|
|
3511
|
-
switch (
|
|
3667
|
+
}), Xt = a(() => {
|
|
3668
|
+
switch (E.value.activeTextStyle) {
|
|
3512
3669
|
case "italic":
|
|
3513
3670
|
return "component__input--active--italic";
|
|
3514
3671
|
case "oblique":
|
|
@@ -3516,172 +3673,182 @@ const Fl = ["id"], Ol = ["for"], ql = ["id", "name", "type", "placeholder", "dis
|
|
|
3516
3673
|
default:
|
|
3517
3674
|
return "component__input--active--normal";
|
|
3518
3675
|
}
|
|
3519
|
-
}),
|
|
3520
|
-
switch (
|
|
3676
|
+
}), Zt = a(() => "component__sm"), ea = a(() => {
|
|
3677
|
+
switch (E.value.theme) {
|
|
3521
3678
|
case "dark":
|
|
3522
3679
|
return "component__theme--dark";
|
|
3523
3680
|
default:
|
|
3524
3681
|
return "component__theme--light";
|
|
3525
3682
|
}
|
|
3526
|
-
}),
|
|
3527
|
-
a(() =>
|
|
3528
|
-
const
|
|
3683
|
+
}), ta = a(() => E.value.inputReadonly ? "component__input--read-only" : ""), aa = a(() => E.value.inputUppercase ? "component__input--uppercase" : ""), zt = a(() => He.value ? He.value : `${Ve.value}-name-label`), qt = a(() => ""), At = a(() => f.value || I.value && I.value.trim().length > 0), r = a(() => !I.value || I.value.trim().length === 0 ? "component__input--empty" : "");
|
|
3684
|
+
a(() => f.value ? "component__input--active" : "component__input--no-active");
|
|
3685
|
+
const B = a(() => "6px 10px"), ve = a(() => !!(Z.value && me.value)), u = a(() => {
|
|
3529
3686
|
const t = {};
|
|
3530
|
-
|
|
3531
|
-
const
|
|
3687
|
+
ie.value && Object.keys(ie.value).forEach((i) => t[`aria-${i}`] = ie.value[i]);
|
|
3688
|
+
const l = {
|
|
3532
3689
|
"aria-label": ke.value,
|
|
3533
3690
|
"aria-disabled": w.value,
|
|
3534
3691
|
...t
|
|
3535
3692
|
};
|
|
3536
3693
|
return Object.fromEntries(
|
|
3537
|
-
Object.entries(
|
|
3694
|
+
Object.entries(l).filter(([s, i]) => i != null)
|
|
3538
3695
|
);
|
|
3539
|
-
}),
|
|
3540
|
-
const t = Te.value === "dark" ? Je.value : dt.value,
|
|
3541
|
-
return t === "transparent" || t === "#transparent" || !t ?
|
|
3542
|
-
}),
|
|
3543
|
-
const t = Te.value === "dark" ? Ge.value : ct.value,
|
|
3544
|
-
return t === "transparent" || t === "#transparent" || !t ?
|
|
3545
|
-
}),
|
|
3546
|
-
const t =
|
|
3696
|
+
}), A = a(() => {
|
|
3697
|
+
const t = Te.value === "dark" ? Je.value : dt.value, l = Te.value === "dark" ? S.value : Ue.value;
|
|
3698
|
+
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
3699
|
+
}), Ne = a(() => {
|
|
3700
|
+
const t = Te.value === "dark" ? Ge.value : ct.value, l = Te.value === "dark" ? S.value : Ue.value;
|
|
3701
|
+
return t === "transparent" || t === "#transparent" || !t ? l : t;
|
|
3702
|
+
}), Ye = a(() => {
|
|
3703
|
+
const t = E.value, l = At.value, s = l ? t.lightTextColorLabelActive : t.lightTextColorLabel, i = l ? t.darkTextColorLabelActive : t.darkTextColorLabel;
|
|
3547
3704
|
return {
|
|
3548
3705
|
fontFamily: t.fontFamilyLabel,
|
|
3549
|
-
fontSize:
|
|
3706
|
+
fontSize: l ? t.fontSizeLabelActive : t.fontSizeLabel,
|
|
3550
3707
|
fontWeight: t.fontWeightLabel,
|
|
3551
3708
|
color: t.theme === "dark" ? i : s,
|
|
3552
|
-
top:
|
|
3553
|
-
left:
|
|
3554
|
-
|
|
3709
|
+
top: l ? `${t.labelActiveTop}px` : "50%",
|
|
3710
|
+
left: l ? `${t.labelActiveLeft}px` : `${t.labelLeft}px`,
|
|
3711
|
+
right: l ? `${t.labelActiveRight}px` : `${t.labelRight}px`,
|
|
3712
|
+
transform: l ? "translateY(0)" : "translateY(-50%)",
|
|
3555
3713
|
transition: "all 0.2s ease",
|
|
3556
|
-
backgroundColor:
|
|
3557
|
-
padding:
|
|
3558
|
-
borderRadius:
|
|
3714
|
+
backgroundColor: l ? t.labelBackground : "transparent",
|
|
3715
|
+
padding: l ? t.labelPadding : "0",
|
|
3716
|
+
borderRadius: l ? `${t.labelBorderRadius}rem` : "0",
|
|
3717
|
+
// Se labelBreakOnActive for true (padrão), usa ellipsis quando ativo. Se false, quebra linha
|
|
3718
|
+
...l ? {
|
|
3719
|
+
whiteSpace: q.value ? "nowrap" : "normal",
|
|
3720
|
+
wordWrap: q.value ? "normal" : "break-word",
|
|
3721
|
+
overflowWrap: q.value ? "normal" : "break-word",
|
|
3722
|
+
maxWidth: "100%",
|
|
3723
|
+
textOverflow: q.value ? "ellipsis" : "clip",
|
|
3724
|
+
overflow: q.value ? "hidden" : "visible"
|
|
3725
|
+
} : {}
|
|
3559
3726
|
};
|
|
3560
3727
|
});
|
|
3561
3728
|
a(() => {
|
|
3562
|
-
const t =
|
|
3729
|
+
const t = E.value;
|
|
3563
3730
|
return t.theme === "dark" ? t.darkTextColorLabelActive : t.lightTextColorLabelActive;
|
|
3564
3731
|
});
|
|
3565
|
-
const
|
|
3566
|
-
|
|
3567
|
-
},
|
|
3568
|
-
|
|
3569
|
-
},
|
|
3570
|
-
t.stopPropagation(), !(w.value ||
|
|
3571
|
-
|
|
3732
|
+
const gt = () => {
|
|
3733
|
+
g.value = We.value, $e.value = L.value;
|
|
3734
|
+
}, la = () => {
|
|
3735
|
+
P("clicked");
|
|
3736
|
+
}, Wt = (t) => {
|
|
3737
|
+
t.stopPropagation(), !(w.value || E.value.inputReadonly) && R.value && (R.value.focus(), te.value && (V.value = !1, requestAnimationFrame(() => {
|
|
3738
|
+
St(), V.value = !0;
|
|
3572
3739
|
})));
|
|
3573
|
-
},
|
|
3574
|
-
w.value ||
|
|
3575
|
-
},
|
|
3576
|
-
|
|
3577
|
-
const t =
|
|
3578
|
-
|
|
3579
|
-
top: `${t.bottom +
|
|
3740
|
+
}, na = () => {
|
|
3741
|
+
w.value || E.value.inputReadonly || !Re.value || P("entered", g.value);
|
|
3742
|
+
}, St = () => {
|
|
3743
|
+
R.value && _a(() => {
|
|
3744
|
+
const t = R.value.getBoundingClientRect(), l = 4;
|
|
3745
|
+
Ct.value = {
|
|
3746
|
+
top: `${t.bottom + l}px`,
|
|
3580
3747
|
left: `${t.left}px`
|
|
3581
3748
|
};
|
|
3582
3749
|
});
|
|
3583
|
-
},
|
|
3750
|
+
}, oa = a(() => ({
|
|
3584
3751
|
position: "fixed",
|
|
3585
|
-
top:
|
|
3586
|
-
left:
|
|
3587
|
-
zIndex:
|
|
3588
|
-
})),
|
|
3589
|
-
|
|
3590
|
-
|
|
3752
|
+
top: Ct.value.top,
|
|
3753
|
+
left: Ct.value.left,
|
|
3754
|
+
zIndex: ht.value
|
|
3755
|
+
})), ua = () => {
|
|
3756
|
+
f.value = !0, P("focused"), te.value && (V.value = !1, requestAnimationFrame(() => {
|
|
3757
|
+
St(), V.value = !0;
|
|
3591
3758
|
}));
|
|
3592
|
-
},
|
|
3593
|
-
t.relatedTarget &&
|
|
3759
|
+
}, ra = (t) => {
|
|
3760
|
+
t.relatedTarget && z.value && z.value.contains(t.relatedTarget) || setTimeout(() => {
|
|
3594
3761
|
var i;
|
|
3595
|
-
const
|
|
3596
|
-
if (
|
|
3597
|
-
if (
|
|
3762
|
+
const l = document.activeElement;
|
|
3763
|
+
if (V.value) {
|
|
3764
|
+
if (z.value && z.value.contains(l) || t.relatedTarget && z.value && z.value.contains(t.relatedTarget))
|
|
3598
3765
|
return;
|
|
3599
|
-
if (
|
|
3600
|
-
const v =
|
|
3766
|
+
if (l === document.body && z.value) {
|
|
3767
|
+
const v = z.value.querySelectorAll('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
3601
3768
|
if (Array.from(v).some((p) => p === document.activeElement || p.contains(document.activeElement)))
|
|
3602
3769
|
return;
|
|
3603
3770
|
}
|
|
3604
3771
|
}
|
|
3605
|
-
const s = (i =
|
|
3606
|
-
s && s.contains(
|
|
3772
|
+
const s = (i = R.value) == null ? void 0 : i.closest(".component");
|
|
3773
|
+
s && s.contains(l) || R.value !== l && (f.value = !1, V.value = !1, P("blurred"));
|
|
3607
3774
|
}, 200);
|
|
3608
|
-
},
|
|
3609
|
-
|
|
3610
|
-
|
|
3775
|
+
}, ia = () => {
|
|
3776
|
+
te.value && (V.value, V.value = !1, requestAnimationFrame(() => {
|
|
3777
|
+
St(), V.value = !0;
|
|
3611
3778
|
}));
|
|
3612
|
-
},
|
|
3779
|
+
}, Dt = (t) => {
|
|
3613
3780
|
if (!t || !(t instanceof Date))
|
|
3614
3781
|
return null;
|
|
3615
|
-
const
|
|
3616
|
-
return `${
|
|
3617
|
-
},
|
|
3618
|
-
let
|
|
3782
|
+
const l = t.getFullYear(), s = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0");
|
|
3783
|
+
return `${l}-${s}-${i}`;
|
|
3784
|
+
}, sa = (t) => {
|
|
3785
|
+
let l = "";
|
|
3619
3786
|
if (!t)
|
|
3620
|
-
|
|
3621
|
-
else if (
|
|
3787
|
+
l = "";
|
|
3788
|
+
else if (xe.value && typeof t == "object" && !(t instanceof Date)) {
|
|
3622
3789
|
if (t.startDate === null && t.endDate === null)
|
|
3623
|
-
|
|
3790
|
+
l = "";
|
|
3624
3791
|
else if (t.startDate || t.endDate) {
|
|
3625
3792
|
const i = {
|
|
3626
3793
|
// Converter startDate para string ISO se existir
|
|
3627
|
-
startDate: t.startDate ?
|
|
3794
|
+
startDate: t.startDate ? Dt(t.startDate) : null,
|
|
3628
3795
|
// Converter endDate para string ISO se existir
|
|
3629
|
-
endDate: t.endDate ?
|
|
3796
|
+
endDate: t.endDate ? Dt(t.endDate) : null
|
|
3630
3797
|
};
|
|
3631
|
-
|
|
3798
|
+
l = JSON.stringify(i);
|
|
3632
3799
|
}
|
|
3633
3800
|
} else
|
|
3634
|
-
L.value === "date" ? t instanceof Date ?
|
|
3635
|
-
|
|
3636
|
-
const s =
|
|
3637
|
-
|
|
3638
|
-
},
|
|
3639
|
-
if (!
|
|
3640
|
-
|
|
3801
|
+
L.value === "date" ? t instanceof Date ? l = Dt(t) : typeof t == "string" && (l = t) : (L.value === "month" || L.value === "time" || L.value === "datetime-local" || L.value === "week") && (l = typeof t == "string" ? t : "");
|
|
3802
|
+
n = !0, g.value = l;
|
|
3803
|
+
const s = l ? ee(l, L.value) : "";
|
|
3804
|
+
I.value = s, T.value = s;
|
|
3805
|
+
}, da = () => {
|
|
3806
|
+
if (!te.value) {
|
|
3807
|
+
g.value = I.value;
|
|
3641
3808
|
return;
|
|
3642
3809
|
}
|
|
3643
|
-
|
|
3644
|
-
const t =
|
|
3645
|
-
start:
|
|
3646
|
-
end:
|
|
3647
|
-
} : null,
|
|
3648
|
-
if (!
|
|
3649
|
-
|
|
3650
|
-
|
|
3810
|
+
oe = !0;
|
|
3811
|
+
const t = R.value ? {
|
|
3812
|
+
start: R.value.selectionStart,
|
|
3813
|
+
end: R.value.selectionEnd
|
|
3814
|
+
} : null, l = I.value.trim();
|
|
3815
|
+
if (!l || l.length === 0) {
|
|
3816
|
+
n = !0, g.value = "", I.value = "", T.value = "", setTimeout(() => {
|
|
3817
|
+
oe = !1;
|
|
3651
3818
|
}, 50);
|
|
3652
3819
|
return;
|
|
3653
3820
|
}
|
|
3654
3821
|
if (L.value === "date") {
|
|
3655
|
-
const i =
|
|
3656
|
-
if (
|
|
3657
|
-
if (
|
|
3658
|
-
|
|
3659
|
-
const v = Math.min(t.start,
|
|
3660
|
-
|
|
3822
|
+
const i = xe.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}$/;
|
|
3823
|
+
if (xe.value) {
|
|
3824
|
+
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/), l.length > 23 && !i.test(l)) {
|
|
3825
|
+
I.value = T.value, t && R.value && _a(() => {
|
|
3826
|
+
const v = Math.min(t.start, T.value.length);
|
|
3827
|
+
R.value.setSelectionRange(v, v);
|
|
3661
3828
|
}), setTimeout(() => {
|
|
3662
|
-
|
|
3829
|
+
oe = !1;
|
|
3663
3830
|
}, 50);
|
|
3664
3831
|
return;
|
|
3665
3832
|
}
|
|
3666
|
-
if (!i.test(
|
|
3833
|
+
if (!i.test(l) && l.length <= 23) {
|
|
3667
3834
|
setTimeout(() => {
|
|
3668
|
-
|
|
3835
|
+
oe = !1;
|
|
3669
3836
|
}, 50);
|
|
3670
3837
|
return;
|
|
3671
3838
|
}
|
|
3672
3839
|
} else {
|
|
3673
|
-
if (
|
|
3674
|
-
|
|
3675
|
-
const v = Math.min(t.start,
|
|
3676
|
-
|
|
3840
|
+
if (l.length > 10 && !i.test(l)) {
|
|
3841
|
+
I.value = T.value, t && R.value && _a(() => {
|
|
3842
|
+
const v = Math.min(t.start, T.value.length);
|
|
3843
|
+
R.value.setSelectionRange(v, v);
|
|
3677
3844
|
}), setTimeout(() => {
|
|
3678
|
-
|
|
3845
|
+
oe = !1;
|
|
3679
3846
|
}, 50);
|
|
3680
3847
|
return;
|
|
3681
3848
|
}
|
|
3682
|
-
if (!i.test(
|
|
3849
|
+
if (!i.test(l) && l.length <= 10) {
|
|
3683
3850
|
setTimeout(() => {
|
|
3684
|
-
|
|
3851
|
+
oe = !1;
|
|
3685
3852
|
}, 50);
|
|
3686
3853
|
return;
|
|
3687
3854
|
}
|
|
@@ -3689,281 +3856,284 @@ const Fl = ["id"], Ol = ["for"], ql = ["id", "name", "type", "placeholder", "dis
|
|
|
3689
3856
|
}
|
|
3690
3857
|
let s = null;
|
|
3691
3858
|
if (L.value === "date")
|
|
3692
|
-
if (
|
|
3693
|
-
if (
|
|
3694
|
-
if (s =
|
|
3695
|
-
|
|
3859
|
+
if (xe.value)
|
|
3860
|
+
if (l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/))
|
|
3861
|
+
if (s = we(l, L.value), s && s !== g.value)
|
|
3862
|
+
n = !0, g.value = s, T.value = l;
|
|
3696
3863
|
else {
|
|
3697
3864
|
setTimeout(() => {
|
|
3698
|
-
|
|
3865
|
+
oe = !1;
|
|
3699
3866
|
}, 50);
|
|
3700
3867
|
return;
|
|
3701
3868
|
}
|
|
3702
|
-
else if (
|
|
3703
|
-
const v =
|
|
3869
|
+
else if (l.includes("-")) {
|
|
3870
|
+
const v = l.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*$/);
|
|
3704
3871
|
if (v) {
|
|
3705
|
-
const
|
|
3872
|
+
const c = v[1], p = we(c, L.value);
|
|
3706
3873
|
if (p) {
|
|
3707
|
-
const
|
|
3708
|
-
|
|
3874
|
+
const x = JSON.stringify({ startDate: p, endDate: null });
|
|
3875
|
+
x !== g.value && (n = !0, g.value = x, T.value = l);
|
|
3709
3876
|
} else {
|
|
3710
|
-
|
|
3711
|
-
|
|
3877
|
+
T.value = l, setTimeout(() => {
|
|
3878
|
+
oe = !1;
|
|
3712
3879
|
}, 50);
|
|
3713
3880
|
return;
|
|
3714
3881
|
}
|
|
3715
3882
|
} else {
|
|
3716
|
-
|
|
3717
|
-
|
|
3883
|
+
T.value = l, setTimeout(() => {
|
|
3884
|
+
oe = !1;
|
|
3718
3885
|
}, 50);
|
|
3719
3886
|
return;
|
|
3720
3887
|
}
|
|
3721
|
-
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
3722
|
-
if (s =
|
|
3723
|
-
const
|
|
3724
|
-
|
|
3888
|
+
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
3889
|
+
if (s = we(l, L.value), s) {
|
|
3890
|
+
const c = JSON.stringify({ startDate: s, endDate: null });
|
|
3891
|
+
c !== g.value && (n = !0, g.value = c, T.value = l);
|
|
3725
3892
|
} else {
|
|
3726
|
-
|
|
3727
|
-
|
|
3893
|
+
T.value = l, setTimeout(() => {
|
|
3894
|
+
oe = !1;
|
|
3728
3895
|
}, 50);
|
|
3729
3896
|
return;
|
|
3730
3897
|
}
|
|
3731
3898
|
else {
|
|
3732
|
-
|
|
3733
|
-
|
|
3899
|
+
T.value = l, setTimeout(() => {
|
|
3900
|
+
oe = !1;
|
|
3734
3901
|
}, 50);
|
|
3735
3902
|
return;
|
|
3736
3903
|
}
|
|
3737
|
-
else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
3738
|
-
s =
|
|
3904
|
+
else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(l))
|
|
3905
|
+
s = we(l, L.value), s && s !== g.value && (n = !0, g.value = s, T.value = l);
|
|
3739
3906
|
else {
|
|
3740
3907
|
setTimeout(() => {
|
|
3741
|
-
|
|
3908
|
+
oe = !1;
|
|
3742
3909
|
}, 50);
|
|
3743
3910
|
return;
|
|
3744
3911
|
}
|
|
3745
3912
|
else
|
|
3746
|
-
s =
|
|
3913
|
+
s = we(l, L.value), s && s !== g.value && (n = !0, g.value = s, T.value = l);
|
|
3747
3914
|
setTimeout(() => {
|
|
3748
|
-
|
|
3915
|
+
oe = !1;
|
|
3749
3916
|
}, 50);
|
|
3750
|
-
},
|
|
3751
|
-
},
|
|
3917
|
+
}, ca = (t) => {
|
|
3918
|
+
}, Ht = (t) => {
|
|
3752
3919
|
var v;
|
|
3753
|
-
if (!
|
|
3920
|
+
if (!V.value || !z.value || !R.value)
|
|
3754
3921
|
return;
|
|
3755
|
-
const
|
|
3756
|
-
if (
|
|
3922
|
+
const l = t.target, s = (v = R.value) == null ? void 0 : v.closest(".nb-wrapper");
|
|
3923
|
+
if (z.value && z.value.contains(l) || s && (l === s || s.contains(l)) || z.value && z.value.contains(l))
|
|
3757
3924
|
return;
|
|
3758
|
-
let i =
|
|
3925
|
+
let i = l;
|
|
3759
3926
|
for (; i && i !== document.body; ) {
|
|
3760
|
-
if (i ===
|
|
3927
|
+
if (i === z.value || z.value && z.value.contains(i))
|
|
3761
3928
|
return;
|
|
3762
3929
|
i = i.parentElement;
|
|
3763
3930
|
}
|
|
3764
3931
|
setTimeout(() => {
|
|
3765
|
-
if (!
|
|
3932
|
+
if (!V.value || !z.value || z.value && z.value.contains(l))
|
|
3766
3933
|
return;
|
|
3767
|
-
for (i =
|
|
3768
|
-
if (i ===
|
|
3934
|
+
for (i = l; i && i !== document.body; ) {
|
|
3935
|
+
if (i === z.value || z.value && z.value.contains(i))
|
|
3769
3936
|
return;
|
|
3770
3937
|
i = i.parentElement;
|
|
3771
3938
|
}
|
|
3772
|
-
if (!document.body.contains(
|
|
3939
|
+
if (!document.body.contains(l))
|
|
3773
3940
|
return;
|
|
3774
|
-
const
|
|
3775
|
-
!
|
|
3941
|
+
const c = R.value && (l === R.value || R.value.contains(l)), p = s && (l === s || s.contains(l));
|
|
3942
|
+
!c && !p && (V.value = !1, (!I.value || I.value.trim().length === 0) && (f.value = !1));
|
|
3776
3943
|
}, 50);
|
|
3777
|
-
},
|
|
3778
|
-
|
|
3779
|
-
},
|
|
3780
|
-
|
|
3944
|
+
}, jt = () => {
|
|
3945
|
+
V.value && te.value && St();
|
|
3946
|
+
}, Ut = () => {
|
|
3947
|
+
V.value && te.value && (V.value = !1);
|
|
3781
3948
|
};
|
|
3782
|
-
let
|
|
3783
|
-
const
|
|
3784
|
-
if (!
|
|
3949
|
+
let yt = null, _t = null, Vt = { top: 0, left: 0 };
|
|
3950
|
+
const $t = () => {
|
|
3951
|
+
if (!V.value || !te.value || !R.value)
|
|
3785
3952
|
return;
|
|
3786
|
-
const t = 4,
|
|
3787
|
-
(
|
|
3953
|
+
const t = 4, l = R.value.getBoundingClientRect(), s = `${l.bottom + t}px`, i = `${l.left}px`;
|
|
3954
|
+
(Vt.top !== s || Vt.left !== i) && (Vt.top = s, Vt.left = i, Ct.value = {
|
|
3788
3955
|
top: s,
|
|
3789
3956
|
left: i
|
|
3790
|
-
}),
|
|
3791
|
-
},
|
|
3792
|
-
if (!
|
|
3957
|
+
}), _t = requestAnimationFrame($t);
|
|
3958
|
+
}, Nt = () => {
|
|
3959
|
+
if (!R.value || !te.value)
|
|
3793
3960
|
return;
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
}),
|
|
3797
|
-
const t =
|
|
3798
|
-
t &&
|
|
3799
|
-
},
|
|
3800
|
-
|
|
3961
|
+
Vt = { top: 0, left: 0 }, $t(), yt = new ResizeObserver(() => {
|
|
3962
|
+
V.value && St();
|
|
3963
|
+
}), yt.observe(R.value);
|
|
3964
|
+
const t = R.value.closest(".component");
|
|
3965
|
+
t && yt.observe(t);
|
|
3966
|
+
}, Gt = () => {
|
|
3967
|
+
_t !== null && (cancelAnimationFrame(_t), _t = null), yt && (yt.disconnect(), yt = null);
|
|
3801
3968
|
};
|
|
3802
|
-
|
|
3803
|
-
t &&
|
|
3804
|
-
|
|
3805
|
-
}) :
|
|
3806
|
-
}),
|
|
3807
|
-
|
|
3808
|
-
}),
|
|
3809
|
-
|
|
3810
|
-
}),
|
|
3811
|
-
|
|
3812
|
-
}, { immediate: !0 }),
|
|
3813
|
-
|
|
3814
|
-
}),
|
|
3815
|
-
if (t !==
|
|
3816
|
-
|
|
3817
|
-
const
|
|
3818
|
-
|
|
3969
|
+
U(V, (t) => {
|
|
3970
|
+
t && te.value ? _a(() => {
|
|
3971
|
+
Nt();
|
|
3972
|
+
}) : Gt();
|
|
3973
|
+
}), pa(() => {
|
|
3974
|
+
g.value = We.value, I.value = ee(We.value, L.value), document.addEventListener("click", Ht, !1), window.addEventListener("scroll", jt, { capture: !0, passive: !0 }), window.addEventListener("resize", Ut);
|
|
3975
|
+
}), $a(() => {
|
|
3976
|
+
gt(), Gt(), document.removeEventListener("click", Ht), window.removeEventListener("scroll", jt, { capture: !0, passive: !0 }), window.removeEventListener("resize", Ut);
|
|
3977
|
+
}), U(L, (t) => {
|
|
3978
|
+
$e.value = t;
|
|
3979
|
+
}, { immediate: !0 }), U(Qe, () => {
|
|
3980
|
+
g.value && te.value && (I.value = ee(g.value, L.value));
|
|
3981
|
+
}), U(We, (t) => {
|
|
3982
|
+
if (t !== g.value) {
|
|
3983
|
+
g.value = t;
|
|
3984
|
+
const l = ee(t, L.value);
|
|
3985
|
+
I.value = l, T.value = l;
|
|
3819
3986
|
}
|
|
3820
3987
|
}, { immediate: !0 });
|
|
3821
|
-
let
|
|
3822
|
-
const
|
|
3823
|
-
|
|
3824
|
-
|
|
3988
|
+
let oe = !1;
|
|
3989
|
+
const fa = () => {
|
|
3990
|
+
oe = !0, setTimeout(() => {
|
|
3991
|
+
oe = !1;
|
|
3825
3992
|
}, 100);
|
|
3826
3993
|
};
|
|
3827
|
-
let
|
|
3828
|
-
return
|
|
3829
|
-
if (
|
|
3830
|
-
const
|
|
3831
|
-
|
|
3994
|
+
let n = !1;
|
|
3995
|
+
return U(() => g.value, (t) => {
|
|
3996
|
+
if (te.value && !n && !oe) {
|
|
3997
|
+
const l = ee(t, L.value);
|
|
3998
|
+
l !== I.value && (I.value = l, T.value = l);
|
|
3832
3999
|
}
|
|
3833
|
-
|
|
3834
|
-
}),
|
|
3835
|
-
if (
|
|
4000
|
+
n = !1;
|
|
4001
|
+
}), U(g, (t) => {
|
|
4002
|
+
if (C.value && (t = t.trim()), xe.value && typeof t == "string" && t.startsWith("{"))
|
|
3836
4003
|
try {
|
|
3837
|
-
const
|
|
3838
|
-
if (
|
|
3839
|
-
const s = (
|
|
3840
|
-
if (!
|
|
4004
|
+
const l = JSON.parse(t);
|
|
4005
|
+
if (l && (l.startDate || l.endDate)) {
|
|
4006
|
+
const s = (c) => {
|
|
4007
|
+
if (!c)
|
|
3841
4008
|
return null;
|
|
3842
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
3843
|
-
const [p,
|
|
3844
|
-
return new Date(p,
|
|
4009
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(c)) {
|
|
4010
|
+
const [p, x, _] = c.split("-").map(Number);
|
|
4011
|
+
return new Date(p, x - 1, _);
|
|
3845
4012
|
}
|
|
3846
|
-
return new Date(
|
|
3847
|
-
}, i =
|
|
3848
|
-
|
|
4013
|
+
return new Date(c);
|
|
4014
|
+
}, i = l.startDate ? s(l.startDate) : null, v = l.endDate ? s(l.endDate) : null;
|
|
4015
|
+
P("changed", { startDate: i, endDate: v });
|
|
3849
4016
|
return;
|
|
3850
4017
|
}
|
|
3851
4018
|
} catch {
|
|
3852
4019
|
}
|
|
3853
|
-
|
|
3854
|
-
}),
|
|
3855
|
-
|
|
3856
|
-
}),
|
|
3857
|
-
|
|
3858
|
-
}), (t,
|
|
4020
|
+
P("changed", t);
|
|
4021
|
+
}), U(f, (t) => {
|
|
4022
|
+
P(t ? "focused" : "blurred");
|
|
4023
|
+
}), U(g, (t) => {
|
|
4024
|
+
C.value && (t = t.trim()), P("current-value", t);
|
|
4025
|
+
}), (t, l) => o(Ve) ? (M(), D("div", ba({
|
|
3859
4026
|
key: 0,
|
|
3860
|
-
class: ["nb-wrapper",
|
|
3861
|
-
style: [
|
|
4027
|
+
class: ["nb-wrapper", Et.value],
|
|
4028
|
+
style: [Pt.value, Ft.value, et.value],
|
|
3862
4029
|
role: "input"
|
|
3863
|
-
},
|
|
3864
|
-
|
|
4030
|
+
}, u.value), [
|
|
4031
|
+
pe("div", {
|
|
3865
4032
|
id: o(Ve),
|
|
3866
|
-
class:
|
|
3867
|
-
style:
|
|
3868
|
-
onClick:
|
|
4033
|
+
class: Fe(["nb-reset", "component", Zt.value, ea.value, ta.value, Ot.value]),
|
|
4034
|
+
style: Se([Tt.value, Ft.value, et.value]),
|
|
4035
|
+
onClick: la
|
|
3869
4036
|
}, [
|
|
3870
|
-
o(
|
|
4037
|
+
o(Be) ? (M(), D("label", {
|
|
3871
4038
|
key: 0,
|
|
3872
|
-
for:
|
|
4039
|
+
for: zt.value,
|
|
3873
4040
|
class: "component__label",
|
|
3874
|
-
style:
|
|
3875
|
-
onClick:
|
|
3876
|
-
},
|
|
3877
|
-
|
|
4041
|
+
style: Se([Ye.value]),
|
|
4042
|
+
onClick: Wt
|
|
4043
|
+
}, [
|
|
4044
|
+
It(kt(o(Xe)), 1),
|
|
4045
|
+
e.required ? (M(), D("span", Zl, "*")) : re("", !0)
|
|
4046
|
+
], 12, Xl)) : re("", !0),
|
|
4047
|
+
ha(pe("input", {
|
|
3878
4048
|
ref_key: "inputRef",
|
|
3879
|
-
ref:
|
|
3880
|
-
"onUpdate:modelValue":
|
|
3881
|
-
onInput:
|
|
4049
|
+
ref: R,
|
|
4050
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => I.value = s),
|
|
4051
|
+
onInput: da,
|
|
3882
4052
|
onKeydown: [
|
|
3883
|
-
|
|
3884
|
-
|
|
4053
|
+
fa,
|
|
4054
|
+
l[1] || (l[1] = Kt((s) => !o(w) && o(Re) && na(), ["enter"]))
|
|
3885
4055
|
],
|
|
3886
|
-
id:
|
|
3887
|
-
name:
|
|
3888
|
-
type:
|
|
3889
|
-
class:
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
4056
|
+
id: zt.value,
|
|
4057
|
+
name: zt.value,
|
|
4058
|
+
type: te.value ? "text" : $e.value,
|
|
4059
|
+
class: Fe(["component__input", [
|
|
4060
|
+
aa.value,
|
|
4061
|
+
Xt.value,
|
|
4062
|
+
r.value
|
|
3893
4063
|
]]),
|
|
3894
|
-
placeholder:
|
|
4064
|
+
placeholder: qt.value,
|
|
3895
4065
|
disabled: o(w) || o($),
|
|
3896
4066
|
required: e.required,
|
|
3897
4067
|
readonly: o($),
|
|
3898
4068
|
autocomplete: e.inputAutocomplete,
|
|
3899
|
-
min:
|
|
3900
|
-
max:
|
|
3901
|
-
step:
|
|
4069
|
+
min: te.value ? void 0 : o(at),
|
|
4070
|
+
max: te.value ? void 0 : o(ye),
|
|
4071
|
+
step: te.value ? void 0 : o(lt),
|
|
3902
4072
|
tabindex: o(w) || o($) ? -1 : o(st),
|
|
3903
4073
|
role: "input",
|
|
3904
|
-
style:
|
|
3905
|
-
onFocus:
|
|
3906
|
-
onBlur:
|
|
3907
|
-
onClick:
|
|
3908
|
-
}, null, 46,
|
|
3909
|
-
[
|
|
4074
|
+
style: Se([et.value]),
|
|
4075
|
+
onFocus: ua,
|
|
4076
|
+
onBlur: ra,
|
|
4077
|
+
onClick: ia
|
|
4078
|
+
}, null, 46, en), [
|
|
4079
|
+
[Ja, I.value]
|
|
3910
4080
|
])
|
|
3911
|
-
], 14,
|
|
3912
|
-
|
|
4081
|
+
], 14, Jl),
|
|
4082
|
+
ve.value ? (M(), D("div", {
|
|
3913
4083
|
key: 0,
|
|
3914
|
-
class:
|
|
4084
|
+
class: Fe(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
3915
4085
|
}, [
|
|
3916
|
-
|
|
3917
|
-
|
|
4086
|
+
va(t.$slots, "message", {}, () => [
|
|
4087
|
+
It(kt(e.message), 1)
|
|
3918
4088
|
], !0)
|
|
3919
|
-
], 2)) :
|
|
3920
|
-
(
|
|
3921
|
-
|
|
4089
|
+
], 2)) : re("", !0),
|
|
4090
|
+
(M(), bl(gl, { to: "body" }, [
|
|
4091
|
+
te.value && V.value ? (M(), D("div", {
|
|
3922
4092
|
key: 0,
|
|
3923
4093
|
ref_key: "calendarRef",
|
|
3924
|
-
ref:
|
|
4094
|
+
ref: z,
|
|
3925
4095
|
class: "datepicker__custom-calendar-wrapper",
|
|
3926
|
-
style:
|
|
3927
|
-
onClick:
|
|
3928
|
-
onMousedown:
|
|
4096
|
+
style: Se(oa.value),
|
|
4097
|
+
onClick: l[4] || (l[4] = ga((s) => rt.value = !0, ["stop"])),
|
|
4098
|
+
onMousedown: l[5] || (l[5] = ga((s) => rt.value = !0, ["stop"]))
|
|
3929
4099
|
}, [
|
|
3930
|
-
|
|
4100
|
+
yl(o(h), {
|
|
3931
4101
|
"nb-id": `${o(Ve)}-calendar`,
|
|
3932
|
-
value:
|
|
4102
|
+
value: Rt.value,
|
|
3933
4103
|
"input-type": o(L),
|
|
3934
|
-
min: o(
|
|
4104
|
+
min: o(at),
|
|
3935
4105
|
max: o(ye),
|
|
3936
|
-
step: o(
|
|
4106
|
+
step: o(lt),
|
|
3937
4107
|
disabled: o(w),
|
|
3938
|
-
width:
|
|
4108
|
+
width: wt.value,
|
|
3939
4109
|
locale: o(Qe),
|
|
3940
4110
|
theme: o(Te),
|
|
3941
|
-
"allow-range": o(
|
|
3942
|
-
onChanged:
|
|
3943
|
-
onDateSelected:
|
|
3944
|
-
onMousedown:
|
|
3945
|
-
onClick:
|
|
4111
|
+
"allow-range": o(xe),
|
|
4112
|
+
onChanged: sa,
|
|
4113
|
+
onDateSelected: ca,
|
|
4114
|
+
onMousedown: l[2] || (l[2] = (s) => rt.value = !0),
|
|
4115
|
+
onClick: l[3] || (l[3] = (s) => rt.value = !0)
|
|
3946
4116
|
}, null, 8, ["nb-id", "value", "input-type", "min", "max", "step", "disabled", "width", "locale", "theme", "allow-range"])
|
|
3947
|
-
], 36)) :
|
|
4117
|
+
], 36)) : re("", !0)
|
|
3948
4118
|
]))
|
|
3949
|
-
], 16)) :
|
|
4119
|
+
], 16)) : re("", !0);
|
|
3950
4120
|
}
|
|
3951
|
-
}),
|
|
3952
|
-
NbInputRadio:
|
|
3953
|
-
NbInputCheckbox:
|
|
3954
|
-
NbInput:
|
|
3955
|
-
NbInputChip:
|
|
3956
|
-
NbTextarea:
|
|
3957
|
-
NbDatePicker:
|
|
3958
|
-
},
|
|
4121
|
+
}), an = /* @__PURE__ */ Ca(tn, [["__scopeId", "data-v-5c71e4c8"]]), Ka = {
|
|
4122
|
+
NbInputRadio: Sl,
|
|
4123
|
+
NbInputCheckbox: Bl,
|
|
4124
|
+
NbInput: Nl,
|
|
4125
|
+
NbInputChip: Hl,
|
|
4126
|
+
NbTextarea: Ql,
|
|
4127
|
+
NbDatePicker: an
|
|
4128
|
+
}, nn = {
|
|
3959
4129
|
install(e) {
|
|
3960
|
-
for (const
|
|
3961
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3962
|
-
const
|
|
3963
|
-
e.component(
|
|
4130
|
+
for (const y in Ka)
|
|
4131
|
+
if (Object.prototype.hasOwnProperty.call(Ka, y)) {
|
|
4132
|
+
const h = Ka[y];
|
|
4133
|
+
e.component(h.name, h);
|
|
3964
4134
|
}
|
|
3965
4135
|
}
|
|
3966
4136
|
};
|
|
3967
4137
|
export {
|
|
3968
|
-
|
|
4138
|
+
nn as default
|
|
3969
4139
|
};
|