@vlalg-nimbus/nb-inputs 8.0.4 → 8.0.6
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 +1370 -1377
- 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,8 +1,8 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
const
|
|
1
|
+
import { useCssVars as ia, onMounted as oa, ref as X, toRefs as sa, computed as a, watch as H, openBlock as F, createElementBlock as q, normalizeClass as Ne, normalizeStyle as We, createElementVNode as fe, mergeProps as ua, Fragment as Ea, renderList as Pa, unref as o, withDirectives as da, vModelRadio as al, withKeys as Et, withModifiers as ra, toDisplayString as yt, createCommentVNode as Ve, vModelCheckbox as ll, onUnmounted as ma, renderSlot as na, createTextVNode as ga, vModelDynamic as Oa, vModelText as Fa, defineAsyncComponent as nl, nextTick as ya, createVNode as ol } from "vue";
|
|
2
|
+
const ca = (e, y) => {
|
|
3
3
|
const h = e.__vccOpts || e;
|
|
4
|
-
for (const [
|
|
5
|
-
h[
|
|
4
|
+
for (const [W, w] of y)
|
|
5
|
+
h[W] = w;
|
|
6
6
|
return h;
|
|
7
7
|
}, ul = ["id"], rl = ["id", "disabled", "value", "name"], il = ["for", "tabindex"], sl = /* @__PURE__ */ Object.assign({
|
|
8
8
|
name: "NbInputRadio",
|
|
@@ -18,14 +18,14 @@ const fa = (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 fa = (e, m) => {
|
|
|
56
56
|
validator: (e) => {
|
|
57
57
|
if (!e.length)
|
|
58
58
|
return !1;
|
|
59
|
-
let
|
|
59
|
+
let y = !1;
|
|
60
60
|
for (const h of e) {
|
|
61
|
-
const
|
|
62
|
-
|
|
61
|
+
const W = Object.keys(h);
|
|
62
|
+
W.length !== 2 && (y = !0), W.every((he) => ["value", "text"].includes(he)) || (y = !0);
|
|
63
63
|
}
|
|
64
|
-
if (!
|
|
64
|
+
if (!y)
|
|
65
65
|
return e;
|
|
66
66
|
}
|
|
67
67
|
},
|
|
@@ -78,8 +78,8 @@ const fa = (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,142 +151,142 @@ const fa = (e, m) => {
|
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
emits: ["current-value", "changed", "clicked"],
|
|
154
|
-
setup(e, { emit:
|
|
155
|
-
|
|
156
|
-
"0fd48d29":
|
|
157
|
-
"50426c15":
|
|
158
|
-
"5fa7628c":
|
|
159
|
-
"5949c3d2":
|
|
160
|
-
91322790:
|
|
154
|
+
setup(e, { emit: y }) {
|
|
155
|
+
ia((p) => ({
|
|
156
|
+
"0fd48d29": Ue.value,
|
|
157
|
+
"50426c15": Ke.value,
|
|
158
|
+
"5fa7628c": ft.value,
|
|
159
|
+
"5949c3d2": Se.value,
|
|
160
|
+
91322790: Ge.value,
|
|
161
161
|
"6750fc92": tt.value,
|
|
162
|
-
"8c592938":
|
|
162
|
+
"8c592938": dt.value,
|
|
163
163
|
c11d4680: at.value,
|
|
164
|
-
"35b74fa6":
|
|
165
|
-
"7dd5f889":
|
|
166
|
-
"5cb21b36":
|
|
167
|
-
})),
|
|
168
|
-
|
|
164
|
+
"35b74fa6": rt.value,
|
|
165
|
+
"7dd5f889": me.value,
|
|
166
|
+
"5cb21b36": ct.value
|
|
167
|
+
})), oa(() => {
|
|
168
|
+
nt();
|
|
169
169
|
});
|
|
170
|
-
const h =
|
|
171
|
-
ariaLabel:
|
|
172
|
-
ariaAttrs:
|
|
173
|
-
currentOption:
|
|
174
|
-
valueType:
|
|
175
|
-
display:
|
|
176
|
-
options:
|
|
170
|
+
const h = y, W = e, w = X(null), {
|
|
171
|
+
ariaLabel: he,
|
|
172
|
+
ariaAttrs: ve,
|
|
173
|
+
currentOption: ke,
|
|
174
|
+
valueType: Ce,
|
|
175
|
+
display: ue,
|
|
176
|
+
options: J,
|
|
177
177
|
theme: Ee,
|
|
178
|
-
lightTextColor:
|
|
179
|
-
lightColor:
|
|
180
|
-
lightColorHover:
|
|
181
|
-
darkTextColor:
|
|
182
|
-
darkColor:
|
|
183
|
-
darkColorHover:
|
|
184
|
-
hoverEffect:
|
|
185
|
-
activeHoverEffect:
|
|
186
|
-
itemGap:
|
|
187
|
-
internalGap:
|
|
188
|
-
scale:
|
|
189
|
-
disabled:
|
|
190
|
-
fontFamily:
|
|
191
|
-
fontSize:
|
|
192
|
-
fontWeight:
|
|
193
|
-
} =
|
|
194
|
-
const
|
|
178
|
+
lightTextColor: Le,
|
|
179
|
+
lightColor: te,
|
|
180
|
+
lightColorHover: U,
|
|
181
|
+
darkTextColor: R,
|
|
182
|
+
darkColor: ae,
|
|
183
|
+
darkColorHover: G,
|
|
184
|
+
hoverEffect: K,
|
|
185
|
+
activeHoverEffect: xe,
|
|
186
|
+
itemGap: re,
|
|
187
|
+
internalGap: E,
|
|
188
|
+
scale: pe,
|
|
189
|
+
disabled: Z,
|
|
190
|
+
fontFamily: ge,
|
|
191
|
+
fontSize: be,
|
|
192
|
+
fontWeight: ye
|
|
193
|
+
} = sa(W), $ = a(() => {
|
|
194
|
+
const p = Z.value ? "component-disabled" : "", k = ue.value !== "b" ? "inline-block" : "block", ie = ge.value ? ge.value : "'Lato', sans-serif", P = be.value ? be.value : "1.6em", se = ye.value !== 0 && !ye.value || ye.value < 0 ? 200 : ye.value, je = [!1, !0].includes(K.value) ? K.value : !1, $e = [!1, !0].includes(xe.value) ? xe.value : !1, Y = re.value !== 0 && !re.value || re.value < 0 ? 15 : re.value, c = E.value !== 0 && !E.value || E.value < 0 ? 6 : E.value, g = pe.value !== 0 && !pe.value || pe.value < 0 ? 1 : pe.value;
|
|
195
195
|
return {
|
|
196
|
-
disabled:
|
|
197
|
-
display:
|
|
196
|
+
disabled: p,
|
|
197
|
+
display: k,
|
|
198
198
|
hoverEffect: je,
|
|
199
|
-
activeHoverEffect:
|
|
200
|
-
itemGap:
|
|
199
|
+
activeHoverEffect: $e,
|
|
200
|
+
itemGap: Y,
|
|
201
201
|
internalGap: c,
|
|
202
|
-
scale:
|
|
203
|
-
font:
|
|
204
|
-
fontSize:
|
|
205
|
-
fontWeight:
|
|
202
|
+
scale: g,
|
|
203
|
+
font: ie,
|
|
204
|
+
fontSize: P,
|
|
205
|
+
fontWeight: se
|
|
206
206
|
};
|
|
207
|
-
}),
|
|
208
|
-
display:
|
|
209
|
-
})),
|
|
210
|
-
const
|
|
207
|
+
}), x = a(() => $.value.disabled), S = a(() => ({
|
|
208
|
+
display: $.value.display
|
|
209
|
+
})), Te = a(() => $.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), qe = a(() => {
|
|
210
|
+
const p = $.value;
|
|
211
211
|
return {
|
|
212
|
-
fontSize:
|
|
213
|
-
fontWeight:
|
|
212
|
+
fontSize: p.fontSize,
|
|
213
|
+
fontWeight: p.fontWeight
|
|
214
214
|
};
|
|
215
|
-
}),
|
|
216
|
-
const
|
|
217
|
-
return !
|
|
218
|
-
}),
|
|
219
|
-
const
|
|
220
|
-
return !
|
|
221
|
-
}),
|
|
222
|
-
zoom:
|
|
215
|
+
}), Be = a(() => Array.isArray(J.value) && J.value.constructor === Array && J.value.length > 0), et = a(() => Ee.value === "dark" ? "component__theme--dark" : "component__theme--light"), Ue = a(() => $.value.font), tt = a(() => Le.value), dt = a(() => te.value), Ge = a(() => $.value.hoverEffect ? U.value : te.value), Se = a(() => $.value.activeHoverEffect ? U.value : te.value), me = a(() => R.value), ct = a(() => ae.value), rt = a(() => $.value.hoverEffect ? G.value : ae.value), at = a(() => $.value.activeHoverEffect ? G.value : ae.value), ft = a(() => {
|
|
216
|
+
const k = $.value.internalGap;
|
|
217
|
+
return !k || k < 0 ? 0 : `${k}px`;
|
|
218
|
+
}), Ke = a(() => {
|
|
219
|
+
const k = $.value.itemGap;
|
|
220
|
+
return !k || k < 0 ? 0 : `${k}px`;
|
|
221
|
+
}), Pe = a(() => ({
|
|
222
|
+
zoom: $.value.scale
|
|
223
223
|
})), lt = a(() => {
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
const
|
|
227
|
-
"aria-label":
|
|
228
|
-
"aria-disabled":
|
|
229
|
-
...
|
|
224
|
+
const p = {};
|
|
225
|
+
ve.value && Object.keys(ve.value).forEach((P) => p[`aria-${P}`] = ve.value[P]);
|
|
226
|
+
const k = {
|
|
227
|
+
"aria-label": he.value,
|
|
228
|
+
"aria-disabled": Z.value,
|
|
229
|
+
...p
|
|
230
230
|
};
|
|
231
231
|
return Object.fromEntries(
|
|
232
|
-
Object.entries(
|
|
232
|
+
Object.entries(k).filter(([ie, P]) => P != null)
|
|
233
233
|
);
|
|
234
|
-
}),
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
},
|
|
234
|
+
}), nt = () => {
|
|
235
|
+
const p = ke.value;
|
|
236
|
+
p && ["string"].includes(Ce.value) ? w.value = p.toString().toLowerCase() : w.value = p;
|
|
237
|
+
}, Ae = () => {
|
|
238
238
|
h("clicked");
|
|
239
239
|
};
|
|
240
|
-
return
|
|
241
|
-
|
|
242
|
-
}),
|
|
243
|
-
|
|
244
|
-
}), (
|
|
240
|
+
return H(ke, (p, k) => {
|
|
241
|
+
p !== k && nt();
|
|
242
|
+
}), H(w, (p, k) => {
|
|
243
|
+
p !== k && (h("current-value", p), h("changed", p));
|
|
244
|
+
}), (p, k) => e.nbId && Be.value ? (F(), q("div", {
|
|
245
245
|
key: 0,
|
|
246
|
-
class: Ne(["nb-wrapper",
|
|
247
|
-
style: We([
|
|
246
|
+
class: Ne(["nb-wrapper", x.value]),
|
|
247
|
+
style: We([S.value, Pe.value])
|
|
248
248
|
}, [
|
|
249
|
-
|
|
249
|
+
fe("div", ua({
|
|
250
250
|
id: e.nbId,
|
|
251
251
|
role: "radiogroup"
|
|
252
252
|
}, lt.value, {
|
|
253
|
-
class: ["nb-reset", "component",
|
|
253
|
+
class: ["nb-reset", "component", Te.value, et.value]
|
|
254
254
|
}), [
|
|
255
|
-
(
|
|
256
|
-
key:
|
|
255
|
+
(F(!0), q(Ea, null, Pa(o(J), (ie, P) => (F(), q("div", {
|
|
256
|
+
key: P,
|
|
257
257
|
class: "component-radio__item"
|
|
258
258
|
}, [
|
|
259
|
-
|
|
260
|
-
id: `${e.nbId}-${
|
|
261
|
-
"onUpdate:modelValue":
|
|
259
|
+
da(fe("input", {
|
|
260
|
+
id: `${e.nbId}-${ie.value}`,
|
|
261
|
+
"onUpdate:modelValue": k[0] || (k[0] = (se) => w.value = se),
|
|
262
262
|
type: "radio",
|
|
263
263
|
class: "component-radio__item--input",
|
|
264
|
-
disabled: o(
|
|
265
|
-
value:
|
|
264
|
+
disabled: o(Z),
|
|
265
|
+
value: ie.value,
|
|
266
266
|
name: e.groupName,
|
|
267
|
-
onClick:
|
|
267
|
+
onClick: Ae
|
|
268
268
|
}, null, 8, rl), [
|
|
269
|
-
[al,
|
|
269
|
+
[al, w.value]
|
|
270
270
|
]),
|
|
271
|
-
|
|
272
|
-
for: `${e.nbId}-${
|
|
273
|
-
tabindex: o(
|
|
271
|
+
fe("label", {
|
|
272
|
+
for: `${e.nbId}-${ie.value}`,
|
|
273
|
+
tabindex: o(Z) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[P] : e.tabIndex >= 0 ? e.tabIndex : P + 1,
|
|
274
274
|
class: "component-radio__item--label",
|
|
275
275
|
onKeydown: [
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
k[1] || (k[1] = Et(ra((se) => !o(Z) && e.hasTabIndexEnter && se.target.click(), ["prevent"]), ["enter"])),
|
|
277
|
+
k[2] || (k[2] = Et(ra((se) => !o(Z) && e.hasTabIndexSpace && se.target.click(), ["prevent"]), ["space"]))
|
|
278
278
|
]
|
|
279
279
|
}, [
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
k[3] || (k[3] = fe("div", null, null, -1)),
|
|
281
|
+
fe("span", {
|
|
282
282
|
style: We([qe.value])
|
|
283
|
-
},
|
|
283
|
+
}, yt(ie.text), 5)
|
|
284
284
|
], 40, il)
|
|
285
285
|
]))), 128))
|
|
286
286
|
], 16, ul)
|
|
287
|
-
], 6)) :
|
|
287
|
+
], 6)) : Ve("", !0);
|
|
288
288
|
}
|
|
289
|
-
}), dl = /* @__PURE__ */
|
|
289
|
+
}), dl = /* @__PURE__ */ ca(sl, [["__scopeId", "data-v-a95f65ea"]]);
|
|
290
290
|
const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["for", "tabindex"], pl = /* @__PURE__ */ Object.assign({
|
|
291
291
|
name: "NbInputCheckbox",
|
|
292
292
|
inheritAttrs: !1
|
|
@@ -301,14 +301,14 @@ const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["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 cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["for", "tabin
|
|
|
339
339
|
validator: (e) => {
|
|
340
340
|
if (!e.length)
|
|
341
341
|
return !1;
|
|
342
|
-
let
|
|
342
|
+
let y = !1;
|
|
343
343
|
for (const h of e) {
|
|
344
|
-
const
|
|
345
|
-
|
|
344
|
+
const W = Object.keys(h);
|
|
345
|
+
W.length !== 2 && (y = !0), W.every((he) => ["value", "text"].includes(he)) || (y = !0);
|
|
346
346
|
}
|
|
347
|
-
if (!
|
|
347
|
+
if (!y)
|
|
348
348
|
return e;
|
|
349
349
|
}
|
|
350
350
|
},
|
|
@@ -356,8 +356,8 @@ const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["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,166 +447,166 @@ const cl = ["id"], fl = ["id", "disabled", "value", "name"], vl = ["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":
|
|
459
|
-
fbc86ee4:
|
|
460
|
-
"517939e1":
|
|
461
|
-
"3faff29d":
|
|
462
|
-
"302ecd6a":
|
|
463
|
-
"8a4df060":
|
|
450
|
+
setup(e, { emit: y }) {
|
|
451
|
+
ia((c) => ({
|
|
452
|
+
"49e2c63f": dt.value,
|
|
453
|
+
"107babaa": ie.value,
|
|
454
|
+
"3c7cc5ce": k.value,
|
|
455
|
+
"16d311d0": p.value,
|
|
456
|
+
"3f8b2f30": ct.value,
|
|
457
|
+
"53078d64": me.value,
|
|
458
|
+
"537834e6": rt.value,
|
|
459
|
+
fbc86ee4: Se.value,
|
|
460
|
+
"517939e1": Ge.value,
|
|
461
|
+
"3faff29d": Ae.value,
|
|
462
|
+
"302ecd6a": Pe.value,
|
|
463
|
+
"8a4df060": Ke.value,
|
|
464
464
|
"0a99dbe2": lt.value,
|
|
465
|
-
d6971e68:
|
|
465
|
+
d6971e68: ft.value,
|
|
466
466
|
ca30d9c2: at.value
|
|
467
|
-
})),
|
|
468
|
-
|
|
467
|
+
})), oa(() => {
|
|
468
|
+
$e();
|
|
469
469
|
});
|
|
470
|
-
const h =
|
|
471
|
-
ariaLabel:
|
|
472
|
-
ariaAttrs:
|
|
473
|
-
currentOption:
|
|
474
|
-
display:
|
|
475
|
-
options:
|
|
476
|
-
theme:
|
|
470
|
+
const h = y, W = e, w = X(null), {
|
|
471
|
+
ariaLabel: he,
|
|
472
|
+
ariaAttrs: ve,
|
|
473
|
+
currentOption: ke,
|
|
474
|
+
display: Ce,
|
|
475
|
+
options: ue,
|
|
476
|
+
theme: J,
|
|
477
477
|
lightTextColor: Ee,
|
|
478
|
-
lightColor:
|
|
479
|
-
lightColorHover:
|
|
480
|
-
darkTextColor:
|
|
481
|
-
darkColor:
|
|
482
|
-
darkColorHover:
|
|
483
|
-
boxRadius:
|
|
484
|
-
hoverEffect:
|
|
485
|
-
activeHoverEffect:
|
|
486
|
-
itemGap:
|
|
487
|
-
internalGap:
|
|
488
|
-
scale:
|
|
489
|
-
type:
|
|
490
|
-
background:
|
|
491
|
-
disabled:
|
|
492
|
-
fontFamily:
|
|
493
|
-
fontSize:
|
|
494
|
-
fontWeight:
|
|
495
|
-
} =
|
|
496
|
-
const c =
|
|
478
|
+
lightColor: Le,
|
|
479
|
+
lightColorHover: te,
|
|
480
|
+
darkTextColor: U,
|
|
481
|
+
darkColor: R,
|
|
482
|
+
darkColorHover: ae,
|
|
483
|
+
boxRadius: G,
|
|
484
|
+
hoverEffect: K,
|
|
485
|
+
activeHoverEffect: xe,
|
|
486
|
+
itemGap: re,
|
|
487
|
+
internalGap: E,
|
|
488
|
+
scale: pe,
|
|
489
|
+
type: Z,
|
|
490
|
+
background: ge,
|
|
491
|
+
disabled: be,
|
|
492
|
+
fontFamily: ye,
|
|
493
|
+
fontSize: $,
|
|
494
|
+
fontWeight: x
|
|
495
|
+
} = sa(W), S = a(() => {
|
|
496
|
+
const c = be.value ? "component-disabled" : "", g = Ce.value !== "b" ? "inline-block" : "block", de = ye.value ? ye.value : "'Lato', sans-serif", ee = $.value ? $.value : "1.6em", le = x.value !== 0 && !x.value || x.value < 0 ? 200 : x.value, _e = G.value !== 0 && !G.value || G.value < 0 ? 0 : G.value, we = [!1, !0].includes(K.value) ? K.value : !1, Oe = [!1, !0].includes(xe.value) ? xe.value : !1, Fe = re.value !== 0 && !re.value || re.value < 0 ? 15 : re.value, He = E.value !== 0 && !E.value || E.value < 0 ? 6 : E.value, ot = ["box", "circle"].includes(Z.value) ? Z.value : "box", m = pe.value !== 0 && !pe.value || pe.value < 0 ? 1 : pe.value, M = [!1, !0].includes(ge.value) ? ge.value : !1;
|
|
497
497
|
return {
|
|
498
498
|
disabled: c,
|
|
499
|
-
display:
|
|
500
|
-
boxRadius:
|
|
501
|
-
hoverEffect:
|
|
499
|
+
display: g,
|
|
500
|
+
boxRadius: _e,
|
|
501
|
+
hoverEffect: we,
|
|
502
502
|
activeHoverEffect: Oe,
|
|
503
503
|
itemGap: Fe,
|
|
504
|
-
internalGap:
|
|
505
|
-
scale:
|
|
506
|
-
type:
|
|
507
|
-
font:
|
|
508
|
-
background:
|
|
509
|
-
fontSize:
|
|
510
|
-
fontWeight:
|
|
504
|
+
internalGap: He,
|
|
505
|
+
scale: m,
|
|
506
|
+
type: ot,
|
|
507
|
+
font: de,
|
|
508
|
+
background: M,
|
|
509
|
+
fontSize: ee,
|
|
510
|
+
fontWeight: le
|
|
511
511
|
};
|
|
512
|
-
}),
|
|
513
|
-
display:
|
|
514
|
-
})),
|
|
515
|
-
const c =
|
|
512
|
+
}), Te = a(() => S.value.disabled), qe = a(() => ({
|
|
513
|
+
display: S.value.display
|
|
514
|
+
})), Be = a(() => S.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), et = a(() => {
|
|
515
|
+
const c = S.value;
|
|
516
516
|
return {
|
|
517
517
|
fontSize: c.fontSize,
|
|
518
518
|
fontWeight: c.fontWeight
|
|
519
519
|
};
|
|
520
|
-
}),
|
|
521
|
-
const c =
|
|
520
|
+
}), Ue = a(() => Array.isArray(ue.value) && ue.value.constructor === Array && ue.value.length > 0), tt = a(() => J.value === "dark" ? "component__theme--dark" : "component__theme--light"), dt = a(() => S.value.font), Ge = a(() => Ee.value), Se = a(() => Le.value), me = a(() => S.value.hoverEffect ? te.value : Le.value), ct = a(() => S.value.activeHoverEffect ? te.value : Le.value), rt = a(() => {
|
|
521
|
+
const c = S.value;
|
|
522
|
+
return c.activeHoverEffect && c.background ? `${te.value}80` : te.value;
|
|
523
|
+
}), at = a(() => U.value), ft = a(() => R.value), Ke = a(() => S.value.hoverEffect ? ae.value : R.value), Pe = a(() => S.value.activeHoverEffect ? ae.value : R.value), lt = a(() => {
|
|
524
|
+
const c = S.value;
|
|
522
525
|
return c.activeHoverEffect && c.background ? `${ae.value}80` : ae.value;
|
|
523
|
-
}),
|
|
524
|
-
const c =
|
|
525
|
-
return c.
|
|
526
|
-
}), Qe = a(() => d.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), Xe = a(() => {
|
|
527
|
-
const c = d.value, y = X.value === "dark" ? le.value : Ee.value;
|
|
528
|
-
return c.background ? "#ffffff" : y;
|
|
526
|
+
}), nt = a(() => S.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), Ae = a(() => {
|
|
527
|
+
const c = S.value, g = J.value === "dark" ? U.value : Ee.value;
|
|
528
|
+
return c.background ? "#ffffff" : g;
|
|
529
529
|
});
|
|
530
|
-
a(() =>
|
|
531
|
-
const
|
|
532
|
-
const
|
|
533
|
-
return !
|
|
534
|
-
}),
|
|
535
|
-
const c =
|
|
530
|
+
a(() => S.value.background ? "19px" : "auto");
|
|
531
|
+
const p = a(() => {
|
|
532
|
+
const g = S.value.internalGap;
|
|
533
|
+
return !g || g < 0 ? 0 : `${g}px`;
|
|
534
|
+
}), k = a(() => {
|
|
535
|
+
const c = S.value;
|
|
536
536
|
return `${c.boxRadius > 7 ? 7 : c.boxRadius}px`;
|
|
537
|
-
}),
|
|
538
|
-
const
|
|
539
|
-
return !
|
|
540
|
-
}),
|
|
541
|
-
zoom:
|
|
537
|
+
}), ie = a(() => {
|
|
538
|
+
const g = S.value.itemGap;
|
|
539
|
+
return !g || g < 0 ? 0 : `${g}px`;
|
|
540
|
+
}), P = a(() => S.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), se = a(() => ({
|
|
541
|
+
zoom: S.value.scale
|
|
542
542
|
})), je = a(() => {
|
|
543
543
|
const c = {};
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
"aria-label":
|
|
547
|
-
"aria-disabled":
|
|
544
|
+
ve.value && Object.keys(ve.value).forEach((ee) => c[`aria-${ee}`] = ve.value[ee]);
|
|
545
|
+
const g = {
|
|
546
|
+
"aria-label": he.value,
|
|
547
|
+
"aria-disabled": be.value,
|
|
548
548
|
...c
|
|
549
549
|
};
|
|
550
550
|
return Object.fromEntries(
|
|
551
|
-
Object.entries(
|
|
551
|
+
Object.entries(g).filter(([de, ee]) => ee != null)
|
|
552
552
|
);
|
|
553
|
-
}),
|
|
554
|
-
|
|
555
|
-
},
|
|
553
|
+
}), $e = () => {
|
|
554
|
+
w.value = ke.value;
|
|
555
|
+
}, Y = () => {
|
|
556
556
|
h("clicked");
|
|
557
557
|
};
|
|
558
|
-
return
|
|
559
|
-
c !==
|
|
560
|
-
}),
|
|
561
|
-
c !==
|
|
562
|
-
}), (c,
|
|
558
|
+
return H(ke, (c, g) => {
|
|
559
|
+
c !== g && $e();
|
|
560
|
+
}), H(w, (c, g) => {
|
|
561
|
+
c !== g && (h("current-value", c), h("changed", c));
|
|
562
|
+
}), (c, g) => e.nbId && Ue.value ? (F(), q("div", {
|
|
563
563
|
key: 0,
|
|
564
|
-
class: Ne(["nb-wrapper",
|
|
565
|
-
style: We([qe.value,
|
|
564
|
+
class: Ne(["nb-wrapper", Te.value]),
|
|
565
|
+
style: We([qe.value, se.value])
|
|
566
566
|
}, [
|
|
567
|
-
|
|
567
|
+
fe("div", ua({
|
|
568
568
|
id: e.nbId,
|
|
569
569
|
role: "group"
|
|
570
570
|
}, je.value, {
|
|
571
|
-
class: ["nb-reset", "component",
|
|
571
|
+
class: ["nb-reset", "component", Be.value, tt.value]
|
|
572
572
|
}), [
|
|
573
|
-
(
|
|
574
|
-
key:
|
|
573
|
+
(F(!0), q(Ea, null, Pa(o(ue), (de, ee) => (F(), q("div", {
|
|
574
|
+
key: ee,
|
|
575
575
|
class: "component-checkbox__item"
|
|
576
576
|
}, [
|
|
577
|
-
|
|
578
|
-
id: `${e.nbId}-${
|
|
579
|
-
"onUpdate:modelValue":
|
|
577
|
+
da(fe("input", {
|
|
578
|
+
id: `${e.nbId}-${de.value}`,
|
|
579
|
+
"onUpdate:modelValue": g[0] || (g[0] = (le) => w.value = le),
|
|
580
580
|
type: "checkbox",
|
|
581
581
|
class: "component-checkbox__item--input",
|
|
582
|
-
disabled: o(
|
|
583
|
-
value:
|
|
582
|
+
disabled: o(be),
|
|
583
|
+
value: de.value,
|
|
584
584
|
name: e.groupName,
|
|
585
|
-
onClick:
|
|
585
|
+
onClick: Y
|
|
586
586
|
}, null, 8, fl), [
|
|
587
|
-
[ll,
|
|
587
|
+
[ll, w.value]
|
|
588
588
|
]),
|
|
589
|
-
|
|
590
|
-
for: `${e.nbId}-${
|
|
591
|
-
class: Ne([[
|
|
592
|
-
tabindex: o(
|
|
589
|
+
fe("label", {
|
|
590
|
+
for: `${e.nbId}-${de.value}`,
|
|
591
|
+
class: Ne([[P.value], "component-checkbox__item--label"]),
|
|
592
|
+
tabindex: o(be) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[ee] : e.tabIndex >= 0 ? e.tabIndex : ee + 1,
|
|
593
593
|
onKeydown: [
|
|
594
|
-
|
|
595
|
-
|
|
594
|
+
g[1] || (g[1] = Et(ra((le) => !o(be) && e.hasTabIndexEnter && le.target.click(), ["prevent"]), ["enter"])),
|
|
595
|
+
g[2] || (g[2] = Et(ra((le) => !o(be) && e.hasTabIndexSpace && le.target.click(), ["prevent"]), ["space"]))
|
|
596
596
|
]
|
|
597
597
|
}, [
|
|
598
|
-
|
|
599
|
-
class: Ne([
|
|
598
|
+
fe("div", {
|
|
599
|
+
class: Ne([nt.value])
|
|
600
600
|
}, null, 2),
|
|
601
|
-
|
|
602
|
-
style: We([
|
|
603
|
-
},
|
|
601
|
+
fe("span", {
|
|
602
|
+
style: We([et.value])
|
|
603
|
+
}, yt(de.text), 5)
|
|
604
604
|
], 42, vl)
|
|
605
605
|
]))), 128))
|
|
606
606
|
], 16, cl)
|
|
607
|
-
], 6)) :
|
|
607
|
+
], 6)) : Ve("", !0);
|
|
608
608
|
}
|
|
609
|
-
}), bl = /* @__PURE__ */
|
|
609
|
+
}), bl = /* @__PURE__ */ ca(pl, [["__scopeId", "data-v-1c6afddc"]]);
|
|
610
610
|
const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 }, xl = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex"], Sl = ["for"], Vl = /* @__PURE__ */ Object.assign({
|
|
611
611
|
name: "NbInput",
|
|
612
612
|
inheritAttrs: !1
|
|
@@ -621,8 +621,8 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
621
621
|
type: String,
|
|
622
622
|
default: "b",
|
|
623
623
|
validator: (e = "b") => {
|
|
624
|
-
const
|
|
625
|
-
return ["b", "ib"].includes(
|
|
624
|
+
const y = e.toLowerCase();
|
|
625
|
+
return ["b", "ib"].includes(y);
|
|
626
626
|
}
|
|
627
627
|
},
|
|
628
628
|
tabIndex: {
|
|
@@ -1028,157 +1028,157 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1028
1028
|
"clicked",
|
|
1029
1029
|
"entered"
|
|
1030
1030
|
],
|
|
1031
|
-
setup(e, { emit:
|
|
1032
|
-
|
|
1033
|
-
"54d471e0":
|
|
1034
|
-
cd7a1fa0:
|
|
1035
|
-
"03b8d611": o(
|
|
1036
|
-
"05fc0800":
|
|
1037
|
-
"60d8d552":
|
|
1038
|
-
"24f6f06a":
|
|
1039
|
-
"9da89e22": o(
|
|
1040
|
-
"017fdd14": o(
|
|
1041
|
-
"4cde23b0": o(
|
|
1042
|
-
59166342: o(
|
|
1043
|
-
a33e780a: o(
|
|
1044
|
-
"2ca961d8": o(
|
|
1045
|
-
"60451b3a": o(
|
|
1046
|
-
"20c505f6":
|
|
1047
|
-
"19ddf317": o(
|
|
1031
|
+
setup(e, { emit: y }) {
|
|
1032
|
+
ia((u) => ({
|
|
1033
|
+
"54d471e0": St.value,
|
|
1034
|
+
cd7a1fa0: ht.value,
|
|
1035
|
+
"03b8d611": o(Ke),
|
|
1036
|
+
"05fc0800": Vt.value,
|
|
1037
|
+
"60d8d552": Gt.value,
|
|
1038
|
+
"24f6f06a": wt.value,
|
|
1039
|
+
"9da89e22": o(k),
|
|
1040
|
+
"017fdd14": o(we),
|
|
1041
|
+
"4cde23b0": o(ie),
|
|
1042
|
+
59166342: o(M),
|
|
1043
|
+
a33e780a: o(p),
|
|
1044
|
+
"2ca961d8": o(nt),
|
|
1045
|
+
"60451b3a": o(Ae),
|
|
1046
|
+
"20c505f6": st.value,
|
|
1047
|
+
"19ddf317": o(Pe),
|
|
1048
1048
|
"5d2fc801": o(lt),
|
|
1049
|
-
"7830866a": o(
|
|
1050
|
-
cfe8b664: o(
|
|
1051
|
-
"1c505136": o(
|
|
1052
|
-
"7052079d": o(
|
|
1053
|
-
"2e7a639c": o(
|
|
1049
|
+
"7830866a": o(_e),
|
|
1050
|
+
cfe8b664: o(P),
|
|
1051
|
+
"1c505136": o(m),
|
|
1052
|
+
"7052079d": o(ft),
|
|
1053
|
+
"2e7a639c": o(rt),
|
|
1054
1054
|
47076850: o(at),
|
|
1055
|
-
ab540e8e: o(
|
|
1056
|
-
"173810c2": o(
|
|
1057
|
-
"2b87bb26":
|
|
1058
|
-
"6878ba10":
|
|
1059
|
-
"4bcd25e7":
|
|
1060
|
-
"58f6cd57":
|
|
1061
|
-
"62633a7a":
|
|
1062
|
-
"033f02e7": o(
|
|
1063
|
-
"75ed4978":
|
|
1055
|
+
ab540e8e: o(me),
|
|
1056
|
+
"173810c2": o(ct),
|
|
1057
|
+
"2b87bb26": ta.value,
|
|
1058
|
+
"6878ba10": Dt.value,
|
|
1059
|
+
"4bcd25e7": It.value,
|
|
1060
|
+
"58f6cd57": Ct.value,
|
|
1061
|
+
"62633a7a": ea.value,
|
|
1062
|
+
"033f02e7": o(se),
|
|
1063
|
+
"75ed4978": Jt.value,
|
|
1064
1064
|
"3aa54a07": Ft.value,
|
|
1065
1065
|
"060fa274": qt.value,
|
|
1066
1066
|
"08abe86f": jt.value,
|
|
1067
1067
|
b19ed06e: Ut.value,
|
|
1068
1068
|
"90e3c61e": u.styleButtonColor,
|
|
1069
1069
|
"03a52854": Ht.value
|
|
1070
|
-
})),
|
|
1071
|
-
|
|
1070
|
+
})), oa(() => {
|
|
1071
|
+
Me.value = Ue.value;
|
|
1072
1072
|
}), ma(() => {
|
|
1073
|
-
|
|
1073
|
+
aa();
|
|
1074
1074
|
});
|
|
1075
|
-
const h =
|
|
1076
|
-
nbId:
|
|
1077
|
-
display:
|
|
1078
|
-
hasTabIndexEnter:
|
|
1079
|
-
ariaLabel:
|
|
1080
|
-
ariaAttrs:
|
|
1081
|
-
textColor:
|
|
1082
|
-
caretColor:
|
|
1075
|
+
const h = y, W = e, {
|
|
1076
|
+
nbId: w,
|
|
1077
|
+
display: he,
|
|
1078
|
+
hasTabIndexEnter: ve,
|
|
1079
|
+
ariaLabel: ke,
|
|
1080
|
+
ariaAttrs: Ce,
|
|
1081
|
+
textColor: ue,
|
|
1082
|
+
caretColor: J,
|
|
1083
1083
|
selectionBgColor: Ee,
|
|
1084
|
-
selectionTextColor:
|
|
1085
|
-
hasBorderRadius:
|
|
1086
|
-
borderRadius:
|
|
1087
|
-
disabled:
|
|
1088
|
-
fontFamily:
|
|
1089
|
-
fontSize:
|
|
1090
|
-
fontWeight:
|
|
1091
|
-
fontFamilyMsg:
|
|
1092
|
-
fontSizeMsg:
|
|
1093
|
-
fontWeightMsg:
|
|
1094
|
-
textMessageColor:
|
|
1095
|
-
inputWidth:
|
|
1096
|
-
inputStyle:
|
|
1097
|
-
activeTextStyle:
|
|
1098
|
-
sizeMediaQuery:
|
|
1099
|
-
inputReadonly:
|
|
1100
|
-
showInputEye:
|
|
1101
|
-
inputType:
|
|
1102
|
-
hasTrim:
|
|
1084
|
+
selectionTextColor: Le,
|
|
1085
|
+
hasBorderRadius: te,
|
|
1086
|
+
borderRadius: U,
|
|
1087
|
+
disabled: R,
|
|
1088
|
+
fontFamily: ae,
|
|
1089
|
+
fontSize: G,
|
|
1090
|
+
fontWeight: K,
|
|
1091
|
+
fontFamilyMsg: xe,
|
|
1092
|
+
fontSizeMsg: re,
|
|
1093
|
+
fontWeightMsg: E,
|
|
1094
|
+
textMessageColor: pe,
|
|
1095
|
+
inputWidth: Z,
|
|
1096
|
+
inputStyle: ge,
|
|
1097
|
+
activeTextStyle: be,
|
|
1098
|
+
sizeMediaQuery: ye,
|
|
1099
|
+
inputReadonly: $,
|
|
1100
|
+
showInputEye: x,
|
|
1101
|
+
inputType: S,
|
|
1102
|
+
hasTrim: Te,
|
|
1103
1103
|
inputUppercase: qe,
|
|
1104
|
-
inputName:
|
|
1105
|
-
inputPlaceholder:
|
|
1106
|
-
inputText:
|
|
1104
|
+
inputName: Be,
|
|
1105
|
+
inputPlaceholder: et,
|
|
1106
|
+
inputText: Ue,
|
|
1107
1107
|
theme: tt,
|
|
1108
|
-
inputEyeIcon:
|
|
1109
|
-
tabindex:
|
|
1110
|
-
inputEyeIconHidden:
|
|
1111
|
-
lightBgColor:
|
|
1112
|
-
lightBgColorFocus:
|
|
1113
|
-
lightEyeBgColor:
|
|
1108
|
+
inputEyeIcon: dt,
|
|
1109
|
+
tabindex: Ge,
|
|
1110
|
+
inputEyeIconHidden: Se,
|
|
1111
|
+
lightBgColor: me,
|
|
1112
|
+
lightBgColorFocus: ct,
|
|
1113
|
+
lightEyeBgColor: rt,
|
|
1114
1114
|
lightEyeBgColorActive: at,
|
|
1115
|
-
lightDisabledBgColor:
|
|
1116
|
-
lightTextColor:
|
|
1117
|
-
darkBgColor:
|
|
1115
|
+
lightDisabledBgColor: ft,
|
|
1116
|
+
lightTextColor: Ke,
|
|
1117
|
+
darkBgColor: Pe,
|
|
1118
1118
|
darkBgColorFocus: lt,
|
|
1119
|
-
darkEyeBgColor:
|
|
1120
|
-
darkEyeBgColorActive:
|
|
1121
|
-
darkDisabledBgColor:
|
|
1122
|
-
darkTextColor:
|
|
1123
|
-
darkDisabledEyeBgColor:
|
|
1124
|
-
lightDisabledEyeBgColor:
|
|
1125
|
-
textAlign:
|
|
1119
|
+
darkEyeBgColor: nt,
|
|
1120
|
+
darkEyeBgColorActive: Ae,
|
|
1121
|
+
darkDisabledBgColor: p,
|
|
1122
|
+
darkTextColor: k,
|
|
1123
|
+
darkDisabledEyeBgColor: ie,
|
|
1124
|
+
lightDisabledEyeBgColor: P,
|
|
1125
|
+
textAlign: se,
|
|
1126
1126
|
showMsg: je,
|
|
1127
|
-
hasMsg:
|
|
1128
|
-
hasIcon:
|
|
1127
|
+
hasMsg: $e,
|
|
1128
|
+
hasIcon: Y,
|
|
1129
1129
|
iconDirection: c,
|
|
1130
|
-
iconPadding:
|
|
1131
|
-
iconPaddingInput:
|
|
1132
|
-
iconMargin:
|
|
1133
|
-
iconBorderRadius:
|
|
1134
|
-
iconLightTextColor:
|
|
1135
|
-
iconDarkTextColor:
|
|
1130
|
+
iconPadding: g,
|
|
1131
|
+
iconPaddingInput: de,
|
|
1132
|
+
iconMargin: ee,
|
|
1133
|
+
iconBorderRadius: le,
|
|
1134
|
+
iconLightTextColor: _e,
|
|
1135
|
+
iconDarkTextColor: we,
|
|
1136
1136
|
iconLightBgColor: Oe,
|
|
1137
1137
|
iconDarkBgColor: Fe,
|
|
1138
|
-
iconLightBgColorActive:
|
|
1139
|
-
iconDarkBgColorActive:
|
|
1140
|
-
iconLightDisabledBgColor:
|
|
1141
|
-
iconDarkDisabledBgColor:
|
|
1142
|
-
iconWidth:
|
|
1143
|
-
iconSize:
|
|
1144
|
-
showLabel:
|
|
1145
|
-
labelBackground:
|
|
1138
|
+
iconLightBgColorActive: He,
|
|
1139
|
+
iconDarkBgColorActive: ot,
|
|
1140
|
+
iconLightDisabledBgColor: m,
|
|
1141
|
+
iconDarkDisabledBgColor: M,
|
|
1142
|
+
iconWidth: D,
|
|
1143
|
+
iconSize: Ye,
|
|
1144
|
+
showLabel: I,
|
|
1145
|
+
labelBackground: Re,
|
|
1146
1146
|
labelPadding: L,
|
|
1147
|
-
labelBorderRadius:
|
|
1148
|
-
labelLeft:
|
|
1149
|
-
inputLabelMarginActive:
|
|
1150
|
-
labelActiveTop:
|
|
1151
|
-
labelActiveLeft:
|
|
1147
|
+
labelBorderRadius: ce,
|
|
1148
|
+
labelLeft: Qe,
|
|
1149
|
+
inputLabelMarginActive: j,
|
|
1150
|
+
labelActiveTop: Xe,
|
|
1151
|
+
labelActiveLeft: b,
|
|
1152
1152
|
fontFamilyLabel: T,
|
|
1153
|
-
fontSizeLabel:
|
|
1154
|
-
fontSizeLabelActive:
|
|
1155
|
-
fontWeightLabel:
|
|
1153
|
+
fontSizeLabel: B,
|
|
1154
|
+
fontSizeLabelActive: N,
|
|
1155
|
+
fontWeightLabel: Bt,
|
|
1156
1156
|
lightTextColorLabel: At,
|
|
1157
|
-
lightTextColorLabelActive:
|
|
1158
|
-
darkTextColorLabel:
|
|
1159
|
-
darkTextColorLabelActive:
|
|
1160
|
-
} =
|
|
1161
|
-
const u =
|
|
1157
|
+
lightTextColorLabelActive: xt,
|
|
1158
|
+
darkTextColorLabel: $t,
|
|
1159
|
+
darkTextColorLabelActive: mt
|
|
1160
|
+
} = sa(W), Me = X(""), it = X(""), vt = X(!1), ut = X(!1), V = a(() => {
|
|
1161
|
+
const u = R.value ? "component-disabled" : "", t = he.value !== "b" ? "inline-block" : "block", n = ue ? ue.value : "ffffff", r = J.value ? J.value : "", i = Ee.value ? Ee.value : "", d = Le.value ? Le.value : "", f = te.value ? te.value : !1, v = U.value !== 0 && !U.value || U.value < 0 ? 0 : U.value, C = ae.value ? ae.value : "'Lato', sans-serif", A = G.value && G.value >= 0 ? G.value : null, _ = K.value !== 0 && !K.value || K.value < 0 ? 100 : K.value, O = xe.value ? xe.value : "'Lato', sans-serif", oe = re.value ? re.value : "1em", ze = E.value !== 0 && !E.value || E.value < 0 ? 100 : E.value, Ze = pe.value ? pe.value : "#f15574", De = Z.value ? Z.value : 200, Ie = be.value ? be.value : "normal", fa = ye.value ? ye.value : "xs", va = $.value ? $.value : !1, pa = x.value ? x.value : !1, ba = S.value ? S.value : "text", ha = qe.value ? qe.value : !1, Ca = tt.value ? tt.value : "normal", xa = se.value ? se.value : "left", Sa = ge.value ? ge.value : "background", Va = g.value ? g.value : "5px 10px", ka = ee.value ? ee.value : "0", La = de.value ? de.value : 10, Ta = _e.value ? _e.value : "#000000", Ba = we.value ? we.value : "#000000", Aa = Oe.value ? Oe.value : "transparent", $a = Fe.value ? Fe.value : "transparent", _a = le.value !== 0 && !le.value || le.value < 0 ? 0 : le.value, wa = He.value ? He.value : "transparent", Ra = ot.value ? ot.value : "transparent", Ma = D.value ? D.value : 32, za = Ye.value ? Ye.value : 1, Da = I.value ? I.value : !1, Ia = Qe.value !== 0 && !Qe.value || Qe.value < 0 ? 5 : Qe.value, Na = Re.value ? Re.value : "transparent", qa = j.value !== 0 && !j.value || j.value < 0 ? 15 : j.value, ja = L.value ? L.value : "1px 5px", Ha = ce.value !== 0 && !ce.value || ce.value < 0 ? 0 : ce.value, Ua = Xe.value !== 0 && !Xe.value || Xe.value < 0 ? -13 : Xe.value, Ga = b.value !== 0 && !b.value || b.value < 0 ? -10 : b.value, Ka = T.value ? T.value : "'Lato', sans-serif", Ya = B.value ? B.value : "1em", Qa = N.value ? N.value : "0.8em", Xa = Bt.value ? Bt.value : 400, Ja = At.value ? At.value : "#ffffff", Za = $t.value ? $t.value : "#000000", el = xt.value ? xt.value : "#ffffff", tl = mt.value ? mt.value : "#000000";
|
|
1162
1162
|
return {
|
|
1163
1163
|
disabled: u,
|
|
1164
|
-
display:
|
|
1165
|
-
font:
|
|
1166
|
-
fontSize:
|
|
1167
|
-
fontWeight:
|
|
1168
|
-
fontFamilyMsg:
|
|
1169
|
-
fontSizeMsg:
|
|
1170
|
-
fontWeightMsg:
|
|
1171
|
-
textMessageColor:
|
|
1172
|
-
textColor:
|
|
1173
|
-
caretColor:
|
|
1174
|
-
selectionBgColor:
|
|
1175
|
-
selectionTextColor:
|
|
1176
|
-
hasBorderRadius:
|
|
1177
|
-
borderRadius:
|
|
1164
|
+
display: t,
|
|
1165
|
+
font: C,
|
|
1166
|
+
fontSize: A,
|
|
1167
|
+
fontWeight: _,
|
|
1168
|
+
fontFamilyMsg: O,
|
|
1169
|
+
fontSizeMsg: oe,
|
|
1170
|
+
fontWeightMsg: ze,
|
|
1171
|
+
textMessageColor: Ze,
|
|
1172
|
+
textColor: n,
|
|
1173
|
+
caretColor: r,
|
|
1174
|
+
selectionBgColor: i,
|
|
1175
|
+
selectionTextColor: d,
|
|
1176
|
+
hasBorderRadius: f,
|
|
1177
|
+
borderRadius: v,
|
|
1178
1178
|
textAlign: xa,
|
|
1179
|
-
inputWidth:
|
|
1180
|
-
activeTextStyle:
|
|
1181
|
-
sizeMediaQuery:
|
|
1179
|
+
inputWidth: De,
|
|
1180
|
+
activeTextStyle: Ie,
|
|
1181
|
+
sizeMediaQuery: fa,
|
|
1182
1182
|
inputReadonly: va,
|
|
1183
1183
|
showInputEye: pa,
|
|
1184
1184
|
inputType: ba,
|
|
@@ -1199,10 +1199,10 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1199
1199
|
iconSize: za,
|
|
1200
1200
|
showLabel: Da,
|
|
1201
1201
|
labelBackground: Na,
|
|
1202
|
-
labelPadding:
|
|
1202
|
+
labelPadding: ja,
|
|
1203
1203
|
labelBorderRadius: Ha,
|
|
1204
1204
|
labelLeft: Ia,
|
|
1205
|
-
inputLabelMarginActive:
|
|
1205
|
+
inputLabelMarginActive: qa,
|
|
1206
1206
|
labelActiveTop: Ua,
|
|
1207
1207
|
labelActiveLeft: Ga,
|
|
1208
1208
|
fontFamilyLabel: Ka,
|
|
@@ -1214,13 +1214,13 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1214
1214
|
lightTextColorLabelActive: el,
|
|
1215
1215
|
darkTextColorLabelActive: tl
|
|
1216
1216
|
};
|
|
1217
|
-
}),
|
|
1218
|
-
display:
|
|
1219
|
-
})),
|
|
1220
|
-
const u =
|
|
1217
|
+
}), _t = a(() => V.value.disabled), Pt = a(() => ({
|
|
1218
|
+
display: V.value.display
|
|
1219
|
+
})), ht = a(() => {
|
|
1220
|
+
const u = V.value;
|
|
1221
1221
|
if (u.fontSize)
|
|
1222
1222
|
return `${u.fontSize}em`;
|
|
1223
|
-
let
|
|
1223
|
+
let t = "";
|
|
1224
1224
|
switch (u.sizeMediaQuery) {
|
|
1225
1225
|
case "sm":
|
|
1226
1226
|
return "1.2em";
|
|
@@ -1229,35 +1229,35 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1229
1229
|
case "lg":
|
|
1230
1230
|
return "2em";
|
|
1231
1231
|
default:
|
|
1232
|
-
|
|
1232
|
+
t = "1.2em";
|
|
1233
1233
|
}
|
|
1234
|
-
return
|
|
1234
|
+
return t;
|
|
1235
1235
|
}), Ot = a(() => {
|
|
1236
|
-
const u =
|
|
1236
|
+
const u = V.value, t = Mt.value;
|
|
1237
1237
|
return {
|
|
1238
|
-
fontSize:
|
|
1238
|
+
fontSize: ht.value,
|
|
1239
1239
|
fontWeight: u.fontWeight,
|
|
1240
|
-
marginTop:
|
|
1240
|
+
marginTop: t && I.value ? `${u.inputLabelMarginActive}px` : "0"
|
|
1241
1241
|
};
|
|
1242
|
-
}),
|
|
1243
|
-
const u =
|
|
1242
|
+
}), Je = a(() => {
|
|
1243
|
+
const u = V.value;
|
|
1244
1244
|
return u.inputStyle !== "line" && u.hasBorderRadius ? { borderRadius: `${u.borderRadius}rem` } : {};
|
|
1245
|
-
}),
|
|
1246
|
-
const u =
|
|
1245
|
+
}), St = a(() => V.value.font), Ft = a(() => V.value.fontFamilyMsg), qt = a(() => V.value.fontSizeMsg), jt = a(() => V.value.fontWeightMsg), Ht = a(() => V.value.textColor), Ut = a(() => V.value.textMessageColor), Vt = a(() => {
|
|
1246
|
+
const u = V.value;
|
|
1247
1247
|
return u.caretColor || (u.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1248
|
-
}),
|
|
1249
|
-
const u =
|
|
1248
|
+
}), Gt = a(() => {
|
|
1249
|
+
const u = V.value;
|
|
1250
1250
|
return u.selectionBgColor || (u.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1251
|
-
}),
|
|
1252
|
-
const u =
|
|
1251
|
+
}), wt = a(() => {
|
|
1252
|
+
const u = V.value;
|
|
1253
1253
|
return u.selectionTextColor || (u.theme === "dark" ? "#000000" : "#ffffff");
|
|
1254
|
-
}),
|
|
1255
|
-
const u =
|
|
1254
|
+
}), Rt = a(() => {
|
|
1255
|
+
const u = V.value;
|
|
1256
1256
|
return u.display === "block" ? { width: "100%" } : {
|
|
1257
1257
|
width: `${u.inputWidth}px`
|
|
1258
1258
|
};
|
|
1259
|
-
}),
|
|
1260
|
-
switch (
|
|
1259
|
+
}), kt = a(() => {
|
|
1260
|
+
switch (ge.value) {
|
|
1261
1261
|
case "line":
|
|
1262
1262
|
return "component__input--line";
|
|
1263
1263
|
case "border":
|
|
@@ -1266,7 +1266,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1266
1266
|
return "component__input--background";
|
|
1267
1267
|
}
|
|
1268
1268
|
}), l = a(() => {
|
|
1269
|
-
switch (
|
|
1269
|
+
switch (V.value.activeTextStyle) {
|
|
1270
1270
|
case "italic":
|
|
1271
1271
|
return "component__input--active--italic";
|
|
1272
1272
|
case "oblique":
|
|
@@ -1275,7 +1275,7 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1275
1275
|
return "component__input--active--normal";
|
|
1276
1276
|
}
|
|
1277
1277
|
}), s = a(() => {
|
|
1278
|
-
switch (
|
|
1278
|
+
switch (V.value.sizeMediaQuery) {
|
|
1279
1279
|
case "sm":
|
|
1280
1280
|
return "component__sm";
|
|
1281
1281
|
case "md":
|
|
@@ -1285,174 +1285,174 @@ const gl = ["id"], yl = ["for"], ml = ["for"], hl = { key: 0 }, Cl = { key: 1 },
|
|
|
1285
1285
|
default:
|
|
1286
1286
|
return "";
|
|
1287
1287
|
}
|
|
1288
|
-
}),
|
|
1289
|
-
switch (
|
|
1288
|
+
}), z = a(() => {
|
|
1289
|
+
switch (V.value.theme) {
|
|
1290
1290
|
case "dark":
|
|
1291
1291
|
return "component__theme--dark";
|
|
1292
1292
|
default:
|
|
1293
1293
|
return "component__theme--light";
|
|
1294
1294
|
}
|
|
1295
|
-
}),
|
|
1296
|
-
const u =
|
|
1295
|
+
}), Q = a(() => V.value.inputReadonly ? "component__input--read-only" : ""), Kt = a(() => V.value.inputUppercase ? "component__input--uppercase" : ""), Lt = a(() => {
|
|
1296
|
+
const u = V.value;
|
|
1297
1297
|
return !!(u.showInputEye && u.inputType === "password");
|
|
1298
|
-
}),
|
|
1298
|
+
}), Yt = a(() => vt.value ? dt.value : Se.value), pt = a(() => Be.value ? Be.value : `${w.value}-name-label`), bt = a(() => I.value ? ut.value ? et.value : "" : et.value), Mt = a(() => ut.value || Me.value && Me.value.trim().length > 0), Qt = a(() => V.value.inputType === "password" ? "component__input__eye-default--hidden" : ""), Xt = a(() => ut.value ? "component__input--active" : "component__input--no-active"), Jt = a(() => Lt.value ? "6px 50px 6px 10px" : "6px 10px"), Tt = a(() => !!(je.value && $e.value)), Zt = a(() => {
|
|
1299
1299
|
const u = {};
|
|
1300
|
-
|
|
1301
|
-
const
|
|
1302
|
-
"aria-label":
|
|
1303
|
-
"aria-disabled":
|
|
1300
|
+
Ce.value && Object.keys(Ce.value).forEach((r) => u[`aria-${r}`] = Ce.value[r]);
|
|
1301
|
+
const t = {
|
|
1302
|
+
"aria-label": ke.value,
|
|
1303
|
+
"aria-disabled": R.value,
|
|
1304
1304
|
...u
|
|
1305
1305
|
};
|
|
1306
1306
|
return Object.fromEntries(
|
|
1307
|
-
Object.entries(
|
|
1307
|
+
Object.entries(t).filter(([n, r]) => r != null)
|
|
1308
1308
|
);
|
|
1309
|
-
}),
|
|
1310
|
-
const u =
|
|
1311
|
-
return
|
|
1312
|
-
}), Dt = a(() => {
|
|
1313
|
-
const u = k.value;
|
|
1314
|
-
return K.value ? u.iconMargin : "0";
|
|
1309
|
+
}), ea = a(() => Y.value ? `${Ye.value}rem` : "0"), ta = a(() => Y.value ? `${D.value}px` : "0"), zt = a(() => Y.value ? `component__icon--${c.value}` : ""), Dt = a(() => {
|
|
1310
|
+
const u = V.value;
|
|
1311
|
+
return Y.value ? u.iconPadding : "0";
|
|
1315
1312
|
}), It = a(() => {
|
|
1316
|
-
const u =
|
|
1317
|
-
return
|
|
1318
|
-
}),
|
|
1319
|
-
const u =
|
|
1320
|
-
return
|
|
1321
|
-
}),
|
|
1322
|
-
const u =
|
|
1323
|
-
return
|
|
1324
|
-
}),
|
|
1325
|
-
const u =
|
|
1313
|
+
const u = V.value;
|
|
1314
|
+
return Y.value ? u.iconMargin : "0";
|
|
1315
|
+
}), st = a(() => {
|
|
1316
|
+
const u = V.value;
|
|
1317
|
+
return Y.value ? u.theme === "dark" ? u.iconDarkBgColor : u.iconLightBgColor : "transparent";
|
|
1318
|
+
}), Ct = a(() => {
|
|
1319
|
+
const u = V.value;
|
|
1320
|
+
return Y.value ? `${u.iconBorderRadius}rem` : "0";
|
|
1321
|
+
}), gt = a(() => {
|
|
1322
|
+
const u = V.value;
|
|
1323
|
+
return Y.value ? c.value === "left" ? { paddingLeft: `${u.iconPaddingInput}px` } : { paddingRight: `${u.iconPaddingInput}px` } : {};
|
|
1324
|
+
}), Nt = a(() => {
|
|
1325
|
+
const u = V.value, t = Mt.value, n = t ? u.lightTextColorLabelActive : u.lightTextColorLabel, r = t ? u.darkTextColorLabelActive : u.darkTextColorLabel;
|
|
1326
1326
|
return {
|
|
1327
1327
|
fontFamily: u.fontFamilyLabel,
|
|
1328
|
-
fontSize:
|
|
1328
|
+
fontSize: t ? u.fontSizeLabelActive : u.fontSizeLabel,
|
|
1329
1329
|
fontWeight: u.fontWeightLabel,
|
|
1330
|
-
color: u.theme === "dark" ?
|
|
1331
|
-
top:
|
|
1332
|
-
left:
|
|
1333
|
-
transform:
|
|
1330
|
+
color: u.theme === "dark" ? r : n,
|
|
1331
|
+
top: t ? `${u.labelActiveTop}px` : "50%",
|
|
1332
|
+
left: t ? `${u.labelActiveLeft}px` : `${u.labelLeft}px`,
|
|
1333
|
+
transform: t ? "translateY(0)" : "translateY(-50%)",
|
|
1334
1334
|
transition: "all 0.2s ease",
|
|
1335
|
-
backgroundColor:
|
|
1336
|
-
padding:
|
|
1337
|
-
borderRadius:
|
|
1335
|
+
backgroundColor: t ? u.labelBackground : "transparent",
|
|
1336
|
+
padding: t ? u.labelPadding : "0",
|
|
1337
|
+
borderRadius: t ? `${u.labelBorderRadius}rem` : "0"
|
|
1338
1338
|
};
|
|
1339
1339
|
});
|
|
1340
1340
|
a(() => {
|
|
1341
|
-
const u =
|
|
1341
|
+
const u = V.value;
|
|
1342
1342
|
return u.theme === "dark" ? u.darkTextColorLabelActive : u.lightTextColorLabelActive;
|
|
1343
1343
|
});
|
|
1344
|
-
const
|
|
1345
|
-
|
|
1346
|
-
},
|
|
1347
|
-
const u =
|
|
1344
|
+
const aa = () => {
|
|
1345
|
+
Me.value = Ue.value, it.value = S.value;
|
|
1346
|
+
}, Wt = () => {
|
|
1347
|
+
const u = V.value;
|
|
1348
1348
|
if (u.inputReadonly || u.disabled)
|
|
1349
1349
|
return;
|
|
1350
|
-
const
|
|
1351
|
-
|
|
1352
|
-
},
|
|
1350
|
+
const t = !vt.value;
|
|
1351
|
+
t ? it.value = "text" : it.value = S.value, vt.value = t;
|
|
1352
|
+
}, ne = () => {
|
|
1353
1353
|
h("clicked");
|
|
1354
|
-
},
|
|
1355
|
-
|
|
1354
|
+
}, la = () => {
|
|
1355
|
+
R.value || V.value.inputReadonly || !ve.value || h("entered", Me.value);
|
|
1356
1356
|
};
|
|
1357
|
-
return
|
|
1358
|
-
|
|
1359
|
-
}, { immediate: !0 }),
|
|
1360
|
-
u !==
|
|
1361
|
-
}, { immediate: !0 }),
|
|
1362
|
-
|
|
1363
|
-
}),
|
|
1357
|
+
return H(S, (u) => {
|
|
1358
|
+
it.value = u;
|
|
1359
|
+
}, { immediate: !0 }), H(Ue, (u) => {
|
|
1360
|
+
u !== Me.value && (Me.value = u);
|
|
1361
|
+
}, { immediate: !0 }), H(Me, (u) => {
|
|
1362
|
+
Te.value && (u = u.trim()), h("changed", u);
|
|
1363
|
+
}), H(ut, (u) => {
|
|
1364
1364
|
h(u ? "focused" : "blurred");
|
|
1365
|
-
}),
|
|
1365
|
+
}), H(vt, (u) => {
|
|
1366
1366
|
h("show-input-eye", u);
|
|
1367
|
-
}, { immediate: !0 }),
|
|
1368
|
-
|
|
1369
|
-
}),
|
|
1367
|
+
}, { immediate: !0 }), H(Me, (u) => {
|
|
1368
|
+
Te.value && (u = u.trim()), h("current-value", u);
|
|
1369
|
+
}), H(S, (u) => {
|
|
1370
1370
|
u === "password" && nextTick(() => {
|
|
1371
|
-
const
|
|
1372
|
-
|
|
1371
|
+
const t = document.getElementById(Be.value);
|
|
1372
|
+
t && (t.type = "password", t.removeAttribute("autocomplete"));
|
|
1373
1373
|
});
|
|
1374
|
-
}), (u,
|
|
1374
|
+
}), (u, t) => o(w) ? (F(), q("div", ua({
|
|
1375
1375
|
key: 0,
|
|
1376
|
-
class: ["nb-wrapper",
|
|
1377
|
-
style: [Pt.value,
|
|
1376
|
+
class: ["nb-wrapper", _t.value],
|
|
1377
|
+
style: [Pt.value, Rt.value, Je.value],
|
|
1378
1378
|
role: "input"
|
|
1379
|
-
},
|
|
1380
|
-
|
|
1381
|
-
id: o(
|
|
1382
|
-
class: Ne(["nb-reset", "component", s.value,
|
|
1383
|
-
style: We([Ot.value,
|
|
1384
|
-
onClick:
|
|
1379
|
+
}, Zt.value), [
|
|
1380
|
+
fe("div", {
|
|
1381
|
+
id: o(w),
|
|
1382
|
+
class: Ne(["nb-reset", "component", s.value, z.value, Q.value, kt.value]),
|
|
1383
|
+
style: We([Ot.value, Rt.value, Je.value]),
|
|
1384
|
+
onClick: ne
|
|
1385
1385
|
}, [
|
|
1386
|
-
o(
|
|
1386
|
+
o(I) ? (F(), q("label", {
|
|
1387
1387
|
key: 0,
|
|
1388
|
-
for:
|
|
1388
|
+
for: pt.value,
|
|
1389
1389
|
class: "component__label",
|
|
1390
|
-
style: We([
|
|
1391
|
-
},
|
|
1392
|
-
|
|
1390
|
+
style: We([Nt.value])
|
|
1391
|
+
}, yt(e.label), 13, yl)) : Ve("", !0),
|
|
1392
|
+
Lt.value ? (F(), q("div", {
|
|
1393
1393
|
key: 1,
|
|
1394
|
-
class: Ne(["component__eye",
|
|
1395
|
-
style: We([
|
|
1396
|
-
onClick:
|
|
1394
|
+
class: Ne(["component__eye", Xt.value]),
|
|
1395
|
+
style: We([Je.value]),
|
|
1396
|
+
onClick: Wt
|
|
1397
1397
|
}, [
|
|
1398
|
-
|
|
1399
|
-
for:
|
|
1398
|
+
fe("label", {
|
|
1399
|
+
for: pt.value,
|
|
1400
1400
|
class: Ne(["component__eye-icon", "fas"])
|
|
1401
1401
|
}, [
|
|
1402
|
-
e.inputEyeCustomIcon ? (
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
], !0) :
|
|
1406
|
-
|
|
1402
|
+
e.inputEyeCustomIcon ? (F(), q("span", Cl, [
|
|
1403
|
+
vt.value ? na(u.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
1404
|
+
t[4] || (t[4] = ga("show"))
|
|
1405
|
+
], !0) : na(u.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1406
|
+
t[5] || (t[5] = ga("hidden"))
|
|
1407
1407
|
], !0)
|
|
1408
|
-
])) : (
|
|
1408
|
+
])) : (F(), q("span", hl, yt(Yt.value), 1))
|
|
1409
1409
|
], 8, ml)
|
|
1410
|
-
], 6)) :
|
|
1411
|
-
|
|
1412
|
-
"onUpdate:modelValue":
|
|
1413
|
-
id:
|
|
1414
|
-
name:
|
|
1415
|
-
type:
|
|
1410
|
+
], 6)) : Ve("", !0),
|
|
1411
|
+
da(fe("input", {
|
|
1412
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => Me.value = n),
|
|
1413
|
+
id: pt.value,
|
|
1414
|
+
name: pt.value,
|
|
1415
|
+
type: it.value,
|
|
1416
1416
|
class: Ne(["component__input", [
|
|
1417
|
-
|
|
1418
|
-
|
|
1417
|
+
Kt.value,
|
|
1418
|
+
Qt.value,
|
|
1419
1419
|
l.value
|
|
1420
1420
|
]]),
|
|
1421
|
-
placeholder:
|
|
1422
|
-
disabled: o(
|
|
1421
|
+
placeholder: bt.value,
|
|
1422
|
+
disabled: o(R) || o($),
|
|
1423
1423
|
required: e.required,
|
|
1424
|
-
readonly: o(
|
|
1424
|
+
readonly: o($),
|
|
1425
1425
|
autocomplete: e.inputAutocomplete,
|
|
1426
|
-
tabindex: o(
|
|
1426
|
+
tabindex: o(R) || o($) ? -1 : o(Ge),
|
|
1427
1427
|
role: "input",
|
|
1428
|
-
style: We([
|
|
1429
|
-
onFocus:
|
|
1430
|
-
onBlur:
|
|
1431
|
-
onKeydown:
|
|
1428
|
+
style: We([Je.value, gt.value]),
|
|
1429
|
+
onFocus: t[1] || (t[1] = (n) => ut.value = !0),
|
|
1430
|
+
onBlur: t[2] || (t[2] = (n) => ut.value = !1),
|
|
1431
|
+
onKeydown: t[3] || (t[3] = Et((n) => !o(R) && o(ve) && la(), ["enter"]))
|
|
1432
1432
|
}, null, 46, xl), [
|
|
1433
|
-
[
|
|
1433
|
+
[Oa, Me.value]
|
|
1434
1434
|
]),
|
|
1435
|
-
o(
|
|
1435
|
+
o(Y) ? (F(), q("label", {
|
|
1436
1436
|
key: 2,
|
|
1437
|
-
for:
|
|
1438
|
-
class: Ne(["component__icon",
|
|
1437
|
+
for: pt.value,
|
|
1438
|
+
class: Ne(["component__icon", zt.value])
|
|
1439
1439
|
}, [
|
|
1440
|
-
|
|
1441
|
-
|
|
1440
|
+
na(u.$slots, "icon", {}, () => [
|
|
1441
|
+
t[6] || (t[6] = fe("span", null, "♥", -1))
|
|
1442
1442
|
], !0)
|
|
1443
|
-
], 10, Sl)) :
|
|
1443
|
+
], 10, Sl)) : Ve("", !0)
|
|
1444
1444
|
], 14, gl),
|
|
1445
|
-
|
|
1445
|
+
Tt.value ? (F(), q("div", {
|
|
1446
1446
|
key: 0,
|
|
1447
1447
|
class: Ne(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
1448
1448
|
}, [
|
|
1449
|
-
|
|
1450
|
-
ga(
|
|
1449
|
+
na(u.$slots, "message", {}, () => [
|
|
1450
|
+
ga(yt(e.message), 1)
|
|
1451
1451
|
], !0)
|
|
1452
|
-
], 2)) :
|
|
1453
|
-
], 16)) :
|
|
1452
|
+
], 2)) : Ve("", !0)
|
|
1453
|
+
], 16)) : Ve("", !0);
|
|
1454
1454
|
}
|
|
1455
|
-
}), kl = /* @__PURE__ */
|
|
1455
|
+
}), kl = /* @__PURE__ */ ca(Vl, [["__scopeId", "data-v-d2aa24e0"]]);
|
|
1456
1456
|
const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"], $l = ["id", "name", "placeholder", "readonly", "autocomplete", "required", "tabindex"], _l = /* @__PURE__ */ Object.assign({
|
|
1457
1457
|
name: "NbInputChip",
|
|
1458
1458
|
inheritAttrs: !1
|
|
@@ -1467,8 +1467,8 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
1467
1467
|
type: String,
|
|
1468
1468
|
default: "b",
|
|
1469
1469
|
validator: (e = "b") => {
|
|
1470
|
-
const
|
|
1471
|
-
return ["b", "ib"].includes(
|
|
1470
|
+
const y = e.toLowerCase();
|
|
1471
|
+
return ["b", "ib"].includes(y);
|
|
1472
1472
|
}
|
|
1473
1473
|
},
|
|
1474
1474
|
tabIndex: {
|
|
@@ -1777,165 +1777,165 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
1777
1777
|
}
|
|
1778
1778
|
},
|
|
1779
1779
|
emits: ["clicked", "changed", "removed", "added", "input-changed", "focused", "blurred"],
|
|
1780
|
-
setup(e, { emit:
|
|
1781
|
-
|
|
1782
|
-
"1f44fc40":
|
|
1783
|
-
"7aef2e9a":
|
|
1784
|
-
"59a433de": o(
|
|
1780
|
+
setup(e, { emit: y }) {
|
|
1781
|
+
ia((l) => ({
|
|
1782
|
+
"1f44fc40": mt.value,
|
|
1783
|
+
"7aef2e9a": it.value,
|
|
1784
|
+
"59a433de": o(dt),
|
|
1785
1785
|
"1861ee8e": o(qe),
|
|
1786
|
-
"384c989c": o(
|
|
1787
|
-
"24a3194d": o(
|
|
1788
|
-
"1f4021a5": o(
|
|
1789
|
-
"3629ccee": o(
|
|
1786
|
+
"384c989c": o(et),
|
|
1787
|
+
"24a3194d": o(Ge),
|
|
1788
|
+
"1f4021a5": o(Se),
|
|
1789
|
+
"3629ccee": o(me),
|
|
1790
1790
|
d256be22: o(lt),
|
|
1791
|
-
"3502e317": o(
|
|
1792
|
-
"58bd2f10": o(
|
|
1793
|
-
ccf2d6aa: o(
|
|
1794
|
-
"2d9b84fa": o(
|
|
1795
|
-
"4c04694c": o(
|
|
1796
|
-
"430b3046": o(
|
|
1797
|
-
"2ef7c0b0": o(
|
|
1791
|
+
"3502e317": o(rt),
|
|
1792
|
+
"58bd2f10": o(ft),
|
|
1793
|
+
ccf2d6aa: o(nt),
|
|
1794
|
+
"2d9b84fa": o(Ae),
|
|
1795
|
+
"4c04694c": o(p),
|
|
1796
|
+
"430b3046": o(Ue),
|
|
1797
|
+
"2ef7c0b0": o(Ke),
|
|
1798
1798
|
"2528f800": ut.value,
|
|
1799
|
-
"4691c552":
|
|
1800
|
-
ff983f2c:
|
|
1799
|
+
"4691c552": V.value,
|
|
1800
|
+
ff983f2c: _t.value,
|
|
1801
1801
|
"7dff2cf1": l.styleButtonColor,
|
|
1802
|
-
"64bb0854":
|
|
1802
|
+
"64bb0854": Me.value,
|
|
1803
1803
|
"77bb179d": o(tt),
|
|
1804
|
-
"639bb096": o(
|
|
1805
|
-
e4d4980a: o(
|
|
1806
|
-
d0162418: o(
|
|
1807
|
-
})),
|
|
1808
|
-
|
|
1804
|
+
"639bb096": o(ct),
|
|
1805
|
+
e4d4980a: o(Pe),
|
|
1806
|
+
d0162418: o(k)
|
|
1807
|
+
})), oa(() => {
|
|
1808
|
+
U.value.length > 0 && (b.value = U.value);
|
|
1809
1809
|
});
|
|
1810
|
-
const h =
|
|
1811
|
-
nbId:
|
|
1812
|
-
display:
|
|
1813
|
-
textColor:
|
|
1814
|
-
paddingX:
|
|
1815
|
-
paddingY:
|
|
1816
|
-
borderRadius:
|
|
1817
|
-
disabled:
|
|
1810
|
+
const h = y, W = e, {
|
|
1811
|
+
nbId: w,
|
|
1812
|
+
display: he,
|
|
1813
|
+
textColor: ve,
|
|
1814
|
+
paddingX: ke,
|
|
1815
|
+
paddingY: Ce,
|
|
1816
|
+
borderRadius: ue,
|
|
1817
|
+
disabled: J,
|
|
1818
1818
|
fontFamily: Ee,
|
|
1819
|
-
fontSize:
|
|
1820
|
-
fontWeight:
|
|
1821
|
-
currentList:
|
|
1822
|
-
allowDuplicates:
|
|
1823
|
-
minChips:
|
|
1824
|
-
maxChips:
|
|
1825
|
-
inputPosition:
|
|
1826
|
-
width:
|
|
1827
|
-
inputName:
|
|
1828
|
-
inputPlaceholder:
|
|
1829
|
-
inputUppercase:
|
|
1830
|
-
inputReadonly:
|
|
1831
|
-
inputAutocomplete:
|
|
1832
|
-
required:
|
|
1833
|
-
textAlign:
|
|
1834
|
-
hasBorderRadius:
|
|
1835
|
-
activeTextStyle:
|
|
1836
|
-
theme:
|
|
1837
|
-
inputStyle:
|
|
1819
|
+
fontSize: Le,
|
|
1820
|
+
fontWeight: te,
|
|
1821
|
+
currentList: U,
|
|
1822
|
+
allowDuplicates: R,
|
|
1823
|
+
minChips: ae,
|
|
1824
|
+
maxChips: G,
|
|
1825
|
+
inputPosition: K,
|
|
1826
|
+
width: xe,
|
|
1827
|
+
inputName: re,
|
|
1828
|
+
inputPlaceholder: E,
|
|
1829
|
+
inputUppercase: pe,
|
|
1830
|
+
inputReadonly: Z,
|
|
1831
|
+
inputAutocomplete: ge,
|
|
1832
|
+
required: be,
|
|
1833
|
+
textAlign: ye,
|
|
1834
|
+
hasBorderRadius: $,
|
|
1835
|
+
activeTextStyle: x,
|
|
1836
|
+
theme: S,
|
|
1837
|
+
inputStyle: Te,
|
|
1838
1838
|
lightBgColor: qe,
|
|
1839
|
-
lightBgColorFocus:
|
|
1840
|
-
lightBorderColor:
|
|
1841
|
-
lightBorderColorFocus:
|
|
1839
|
+
lightBgColorFocus: Be,
|
|
1840
|
+
lightBorderColor: et,
|
|
1841
|
+
lightBorderColorFocus: Ue,
|
|
1842
1842
|
lightDisabledBgColor: tt,
|
|
1843
|
-
lightTextColor:
|
|
1844
|
-
lightChipBgColor:
|
|
1845
|
-
lightChipTextColor:
|
|
1846
|
-
lightChipRemoveColor:
|
|
1847
|
-
lightDisabledBorderColor:
|
|
1848
|
-
darkBgColor:
|
|
1843
|
+
lightTextColor: dt,
|
|
1844
|
+
lightChipBgColor: Ge,
|
|
1845
|
+
lightChipTextColor: Se,
|
|
1846
|
+
lightChipRemoveColor: me,
|
|
1847
|
+
lightDisabledBorderColor: ct,
|
|
1848
|
+
darkBgColor: rt,
|
|
1849
1849
|
darkBgColorFocus: at,
|
|
1850
|
-
darkBorderColor:
|
|
1851
|
-
darkBorderColorFocus:
|
|
1852
|
-
darkDisabledBgColor:
|
|
1850
|
+
darkBorderColor: ft,
|
|
1851
|
+
darkBorderColorFocus: Ke,
|
|
1852
|
+
darkDisabledBgColor: Pe,
|
|
1853
1853
|
darkTextColor: lt,
|
|
1854
|
-
darkChipBgColor:
|
|
1855
|
-
darkChipTextColor:
|
|
1856
|
-
darkChipRemoveColor:
|
|
1857
|
-
darkDisabledBorderColor:
|
|
1858
|
-
tabIndex:
|
|
1859
|
-
hasTabIndexEnter:
|
|
1860
|
-
ariaLabel:
|
|
1854
|
+
darkChipBgColor: nt,
|
|
1855
|
+
darkChipTextColor: Ae,
|
|
1856
|
+
darkChipRemoveColor: p,
|
|
1857
|
+
darkDisabledBorderColor: k,
|
|
1858
|
+
tabIndex: ie,
|
|
1859
|
+
hasTabIndexEnter: P,
|
|
1860
|
+
ariaLabel: se,
|
|
1861
1861
|
ariaAttrs: je,
|
|
1862
|
-
caretColor:
|
|
1863
|
-
selectionBgColor:
|
|
1862
|
+
caretColor: $e,
|
|
1863
|
+
selectionBgColor: Y,
|
|
1864
1864
|
selectionTextColor: c,
|
|
1865
|
-
showLabel:
|
|
1866
|
-
label:
|
|
1867
|
-
labelBackground:
|
|
1868
|
-
labelPadding:
|
|
1869
|
-
labelBorderRadius:
|
|
1870
|
-
labelLeft:
|
|
1865
|
+
showLabel: g,
|
|
1866
|
+
label: de,
|
|
1867
|
+
labelBackground: ee,
|
|
1868
|
+
labelPadding: le,
|
|
1869
|
+
labelBorderRadius: _e,
|
|
1870
|
+
labelLeft: we,
|
|
1871
1871
|
inputLabelMarginActive: Oe,
|
|
1872
1872
|
labelActiveTop: Fe,
|
|
1873
|
-
labelActiveLeft:
|
|
1874
|
-
fontFamilyLabel:
|
|
1875
|
-
fontSizeLabel:
|
|
1876
|
-
fontSizeLabelActive:
|
|
1877
|
-
fontWeightLabel:
|
|
1878
|
-
lightTextColorLabel:
|
|
1879
|
-
lightTextColorLabelActive:
|
|
1880
|
-
darkTextColorLabel:
|
|
1873
|
+
labelActiveLeft: He,
|
|
1874
|
+
fontFamilyLabel: ot,
|
|
1875
|
+
fontSizeLabel: m,
|
|
1876
|
+
fontSizeLabelActive: M,
|
|
1877
|
+
fontWeightLabel: D,
|
|
1878
|
+
lightTextColorLabel: Ye,
|
|
1879
|
+
lightTextColorLabelActive: I,
|
|
1880
|
+
darkTextColorLabel: Re,
|
|
1881
1881
|
darkTextColorLabelActive: L
|
|
1882
|
-
} =
|
|
1883
|
-
const l =
|
|
1882
|
+
} = sa(W), ce = X(""), Qe = X(null), j = X(null), Xe = X(null), b = X([]), T = X(!1), B = a(() => {
|
|
1883
|
+
const l = J.value ? "component-disabled" : "", s = he.value !== "b" ? "inline-block" : "block", z = !xe.value || xe.value < 185 ? 185 : xe.value, Q = ve ? ve.value : "ffffff", Kt = $e.value ? $e.value : "", Lt = Y.value ? Y.value : "", Yt = c.value ? c.value : "", pt = ke.value !== 0 && !ke.value || ke.value < 0 ? 1 : ke.value, bt = Ce.value !== 0 && !Ce.value || Ce.value < 0 ? 0.2 : Ce.value, Mt = ue.value !== 0 && !ue.value || ue.value < 0 ? 0 : ue.value, Qt = Ee.value ? Ee.value : "'Lato', sans-serif", Xt = Le.value ? Le.value : "1.6rem", Jt = te.value !== 0 && !te.value || te.value < 0 ? 100 : te.value, Tt = ae.value !== 0 && !ae.value || ae.value < 0 ? 0 : ae.value, Zt = G.value !== 0 && !G.value || G.value < 0 ? 10 : G.value, ea = !K.value || !["top", "bottom"].includes(K.value) ? "bottom" : K.value, ta = !Te.value || !["background", "line", "border"].includes(Te.value) ? "background" : Te.value, zt = S.value ? S.value : "light", Dt = g.value ? g.value : !1, It = we.value !== 0 && !we.value || we.value < 0 ? 5 : we.value, st = ee.value ? ee.value : "transparent", Ct = Oe.value !== 0 && !Oe.value || Oe.value < 0 ? 15 : Oe.value, gt = le.value ? le.value : "1px 5px", Nt = _e.value !== 0 && !_e.value || _e.value < 0 ? 0 : _e.value, aa = Fe.value !== 0 && !Fe.value || Fe.value < 0 ? 13 : Fe.value, Wt = He.value !== 0 && !He.value || He.value < 0 ? 5 : He.value, ne = ot.value ? ot.value : "'Lato', sans-serif", la = m.value ? m.value : "1em", u = M.value ? M.value : "0.8em", t = D.value ? D.value : 400, n = Ye.value ? Ye.value : "#333333", r = Re.value ? Re.value : "#ffffff", i = I.value ? I.value : "#333333", d = L.value ? L.value : "#ffffff";
|
|
1884
1884
|
return {
|
|
1885
1885
|
disabled: l,
|
|
1886
1886
|
display: s,
|
|
1887
|
-
width:
|
|
1888
|
-
font:
|
|
1889
|
-
fontSize:
|
|
1890
|
-
fontWeight:
|
|
1891
|
-
textColor:
|
|
1892
|
-
caretColor:
|
|
1893
|
-
selectionBgColor:
|
|
1894
|
-
selectionTextColor:
|
|
1895
|
-
paddingX:
|
|
1896
|
-
paddingY:
|
|
1897
|
-
borderRadius:
|
|
1898
|
-
minChips:
|
|
1899
|
-
maxChips:
|
|
1900
|
-
inputPosition:
|
|
1901
|
-
inputStyle:
|
|
1902
|
-
theme:
|
|
1903
|
-
showLabel:
|
|
1904
|
-
labelLeft:
|
|
1905
|
-
labelBackground:
|
|
1906
|
-
inputLabelMarginActive:
|
|
1907
|
-
labelPadding:
|
|
1908
|
-
labelBorderRadius:
|
|
1909
|
-
labelActiveTop:
|
|
1910
|
-
labelActiveLeft:
|
|
1911
|
-
fontFamilyLabel:
|
|
1912
|
-
fontSizeLabel:
|
|
1887
|
+
width: z,
|
|
1888
|
+
font: Qt,
|
|
1889
|
+
fontSize: Xt,
|
|
1890
|
+
fontWeight: Jt,
|
|
1891
|
+
textColor: Q,
|
|
1892
|
+
caretColor: Kt,
|
|
1893
|
+
selectionBgColor: Lt,
|
|
1894
|
+
selectionTextColor: Yt,
|
|
1895
|
+
paddingX: pt,
|
|
1896
|
+
paddingY: bt,
|
|
1897
|
+
borderRadius: Mt,
|
|
1898
|
+
minChips: Tt,
|
|
1899
|
+
maxChips: Zt,
|
|
1900
|
+
inputPosition: ea,
|
|
1901
|
+
inputStyle: ta,
|
|
1902
|
+
theme: zt,
|
|
1903
|
+
showLabel: Dt,
|
|
1904
|
+
labelLeft: It,
|
|
1905
|
+
labelBackground: st,
|
|
1906
|
+
inputLabelMarginActive: Ct,
|
|
1907
|
+
labelPadding: gt,
|
|
1908
|
+
labelBorderRadius: Nt,
|
|
1909
|
+
labelActiveTop: aa,
|
|
1910
|
+
labelActiveLeft: Wt,
|
|
1911
|
+
fontFamilyLabel: ne,
|
|
1912
|
+
fontSizeLabel: la,
|
|
1913
1913
|
fontSizeLabelActive: u,
|
|
1914
|
-
fontWeightLabel:
|
|
1915
|
-
lightTextColorLabel:
|
|
1916
|
-
darkTextColorLabel:
|
|
1917
|
-
lightTextColorLabelActive:
|
|
1918
|
-
darkTextColorLabelActive:
|
|
1914
|
+
fontWeightLabel: t,
|
|
1915
|
+
lightTextColorLabel: n,
|
|
1916
|
+
darkTextColorLabel: r,
|
|
1917
|
+
lightTextColorLabelActive: i,
|
|
1918
|
+
darkTextColorLabelActive: d
|
|
1919
1919
|
};
|
|
1920
|
-
}),
|
|
1921
|
-
const l =
|
|
1920
|
+
}), N = a(() => B.value.disabled), Bt = a(() => {
|
|
1921
|
+
const l = B.value, s = St.value;
|
|
1922
1922
|
return {
|
|
1923
1923
|
display: l.display,
|
|
1924
1924
|
// Adiciona padding-top quando o label está ativo para evitar que seja cortado
|
|
1925
|
-
paddingTop: s &&
|
|
1925
|
+
paddingTop: s && g.value ? `${Math.abs(l.labelActiveTop)}px` : "0"
|
|
1926
1926
|
};
|
|
1927
1927
|
}), At = a(() => {
|
|
1928
|
-
const l =
|
|
1928
|
+
const l = B.value, s = St.value;
|
|
1929
1929
|
return {
|
|
1930
1930
|
color: l.textColor,
|
|
1931
1931
|
padding: `${l.paddingY}rem ${l.paddingX}rem`,
|
|
1932
1932
|
fontSize: l.fontSize,
|
|
1933
1933
|
fontWeight: l.fontWeight,
|
|
1934
|
-
textAlign:
|
|
1935
|
-
marginTop: s &&
|
|
1934
|
+
textAlign: ye.value,
|
|
1935
|
+
marginTop: s && g.value ? `${l.inputLabelMarginActive}px` : "0"
|
|
1936
1936
|
};
|
|
1937
|
-
}),
|
|
1938
|
-
switch (
|
|
1937
|
+
}), xt = a(() => {
|
|
1938
|
+
switch (x.value) {
|
|
1939
1939
|
case "italic":
|
|
1940
1940
|
return "component__text--italic";
|
|
1941
1941
|
case "oblique":
|
|
@@ -1943,46 +1943,46 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
1943
1943
|
default:
|
|
1944
1944
|
return "component__text--normal";
|
|
1945
1945
|
}
|
|
1946
|
-
}),
|
|
1947
|
-
const l =
|
|
1948
|
-
return l.inputStyle !== "line" &&
|
|
1949
|
-
}),
|
|
1946
|
+
}), $t = a(() => {
|
|
1947
|
+
const l = B.value;
|
|
1948
|
+
return l.inputStyle !== "line" && $.value ? { borderRadius: `${l.borderRadius}rem` } : {};
|
|
1949
|
+
}), mt = a(() => B.value.font), Me = a(() => B.value.textColor), it = a(() => B.value.inputPosition === "top" ? "column" : "column-reverse"), vt = a(() => {
|
|
1950
1950
|
const l = {};
|
|
1951
|
-
je.value && Object.keys(je.value).forEach((
|
|
1951
|
+
je.value && Object.keys(je.value).forEach((Q) => l[`aria-${Q}`] = je.value[Q]);
|
|
1952
1952
|
const s = {
|
|
1953
|
-
"aria-label":
|
|
1954
|
-
"aria-disabled":
|
|
1953
|
+
"aria-label": se.value,
|
|
1954
|
+
"aria-disabled": J.value,
|
|
1955
1955
|
...l
|
|
1956
1956
|
};
|
|
1957
1957
|
return Object.fromEntries(
|
|
1958
|
-
Object.entries(s).filter(([
|
|
1958
|
+
Object.entries(s).filter(([z, Q]) => Q != null)
|
|
1959
1959
|
);
|
|
1960
1960
|
}), ut = a(() => {
|
|
1961
|
-
const l =
|
|
1961
|
+
const l = B.value;
|
|
1962
1962
|
return l.caretColor || (l.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1963
|
-
}),
|
|
1964
|
-
const l =
|
|
1963
|
+
}), V = a(() => {
|
|
1964
|
+
const l = B.value;
|
|
1965
1965
|
return l.selectionBgColor || (l.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1966
|
-
}),
|
|
1967
|
-
const l =
|
|
1966
|
+
}), _t = a(() => {
|
|
1967
|
+
const l = B.value;
|
|
1968
1968
|
return l.selectionTextColor || (l.theme === "dark" ? "#000000" : "#ffffff");
|
|
1969
1969
|
}), Pt = a(() => ({
|
|
1970
1970
|
caretColor: ut.value
|
|
1971
|
-
})),
|
|
1972
|
-
"--selection-bg-color":
|
|
1973
|
-
"--selection-text-color":
|
|
1971
|
+
})), ht = a(() => ({
|
|
1972
|
+
"--selection-bg-color": V.value,
|
|
1973
|
+
"--selection-text-color": _t.value
|
|
1974
1974
|
})), Ot = a(() => {
|
|
1975
|
-
const l =
|
|
1975
|
+
const l = B.value, s = {
|
|
1976
1976
|
width: `${l.width}px`
|
|
1977
1977
|
};
|
|
1978
1978
|
return l.display === "block" ? { width: "auto" } : s;
|
|
1979
|
-
}),
|
|
1980
|
-
const l =
|
|
1979
|
+
}), Je = a(() => re.value ? re.value : `${w.value}-name-label`), St = a(() => T.value || b.value.length > 0 || ce.value && ce.value.trim().length > 0), Ft = a(() => g.value ? T.value || b.value.length > 0 ? E.value : "" : E.value), qt = a(() => {
|
|
1980
|
+
const l = B.value, s = St.value, z = s ? l.lightTextColorLabelActive : l.lightTextColorLabel, Q = s ? l.darkTextColorLabelActive : l.darkTextColorLabel;
|
|
1981
1981
|
return {
|
|
1982
1982
|
fontFamily: l.fontFamilyLabel,
|
|
1983
1983
|
fontSize: s ? l.fontSizeLabelActive : l.fontSizeLabel,
|
|
1984
1984
|
fontWeight: l.fontWeightLabel,
|
|
1985
|
-
color: l.theme === "dark" ?
|
|
1985
|
+
color: l.theme === "dark" ? Q : z,
|
|
1986
1986
|
top: s ? `${l.labelActiveTop}px` : "50%",
|
|
1987
1987
|
left: s ? `${l.labelActiveLeft}px` : `${l.labelLeft}px`,
|
|
1988
1988
|
transform: s ? "translateY(0)" : "translateY(-50%)",
|
|
@@ -1992,14 +1992,14 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
1992
1992
|
borderRadius: s ? `${l.labelBorderRadius}rem` : "0"
|
|
1993
1993
|
};
|
|
1994
1994
|
}), jt = a(() => {
|
|
1995
|
-
switch (
|
|
1995
|
+
switch (S.value) {
|
|
1996
1996
|
case "dark":
|
|
1997
1997
|
return "component__theme--dark";
|
|
1998
1998
|
default:
|
|
1999
1999
|
return "component__theme--light";
|
|
2000
2000
|
}
|
|
2001
2001
|
}), Ht = a(() => {
|
|
2002
|
-
switch (
|
|
2002
|
+
switch (Te.value) {
|
|
2003
2003
|
case "line":
|
|
2004
2004
|
return "component__input--line";
|
|
2005
2005
|
case "border":
|
|
@@ -2009,92 +2009,92 @@ const Ll = ["for"], Tl = ["id"], Bl = { class: "chip-text" }, Al = ["onClick"],
|
|
|
2009
2009
|
}
|
|
2010
2010
|
}), Ut = () => {
|
|
2011
2011
|
h("clicked");
|
|
2012
|
-
},
|
|
2012
|
+
}, Vt = () => {
|
|
2013
2013
|
T.value = !0, h("focused");
|
|
2014
|
-
},
|
|
2014
|
+
}, Gt = () => {
|
|
2015
2015
|
T.value = !1, h("blurred");
|
|
2016
|
-
},
|
|
2017
|
-
if (!(
|
|
2016
|
+
}, wt = (l) => {
|
|
2017
|
+
if (!(J.value || Z.value) && l.key === "Enter" && ce.value.trim() !== "") {
|
|
2018
2018
|
l.preventDefault();
|
|
2019
|
-
let s =
|
|
2020
|
-
|
|
2019
|
+
let s = ce.value.trim();
|
|
2020
|
+
pe.value && (s = s.toUpperCase()), (R.value || !b.value.includes(s)) && Rt(s), ce.value = "";
|
|
2021
2021
|
}
|
|
2022
|
-
},
|
|
2023
|
-
|
|
2024
|
-
},
|
|
2025
|
-
|
|
2022
|
+
}, Rt = (l) => {
|
|
2023
|
+
b.value.push(l), h("added", l);
|
|
2024
|
+
}, kt = (l) => {
|
|
2025
|
+
b.value = b.value.filter((s) => s !== l), h("removed", l);
|
|
2026
2026
|
};
|
|
2027
|
-
return U
|
|
2028
|
-
|
|
2029
|
-
}),
|
|
2027
|
+
return H(U, (l) => {
|
|
2028
|
+
b.value = l, h("changed", l);
|
|
2029
|
+
}), H(ce, (l) => {
|
|
2030
2030
|
h("input-changed", l);
|
|
2031
|
-
}), (l, s) => o(
|
|
2031
|
+
}), (l, s) => o(w) ? (F(), q("div", ua({
|
|
2032
2032
|
key: 0,
|
|
2033
|
-
class: ["nb-wrapper",
|
|
2034
|
-
style: [
|
|
2033
|
+
class: ["nb-wrapper", N.value],
|
|
2034
|
+
style: [Bt.value],
|
|
2035
2035
|
role: "input"
|
|
2036
|
-
},
|
|
2037
|
-
o(
|
|
2036
|
+
}, vt.value, { onClick: Ut }), [
|
|
2037
|
+
o(g) ? (F(), q("label", {
|
|
2038
2038
|
key: 0,
|
|
2039
|
-
for:
|
|
2039
|
+
for: Je.value,
|
|
2040
2040
|
class: "component__label",
|
|
2041
2041
|
style: We([qt.value])
|
|
2042
|
-
},
|
|
2043
|
-
|
|
2044
|
-
id: o(
|
|
2042
|
+
}, yt(o(de)), 13, Ll)) : Ve("", !0),
|
|
2043
|
+
fe("div", {
|
|
2044
|
+
id: o(w),
|
|
2045
2045
|
ref_key: "chipsContainer",
|
|
2046
|
-
ref:
|
|
2046
|
+
ref: Qe,
|
|
2047
2047
|
class: Ne(["nb-reset", "component", jt.value, Ht.value]),
|
|
2048
|
-
style: We([At.value, Ot.value,
|
|
2048
|
+
style: We([At.value, Ot.value, $t.value])
|
|
2049
2049
|
}, [
|
|
2050
|
-
|
|
2050
|
+
b.value.length > 0 ? (F(), q("div", {
|
|
2051
2051
|
key: 0,
|
|
2052
2052
|
ref_key: "chips",
|
|
2053
|
-
ref:
|
|
2053
|
+
ref: Xe,
|
|
2054
2054
|
class: "chips"
|
|
2055
2055
|
}, [
|
|
2056
|
-
(
|
|
2057
|
-
key:
|
|
2056
|
+
(F(!0), q(Ea, null, Pa(b.value, (z) => (F(), q("div", {
|
|
2057
|
+
key: z,
|
|
2058
2058
|
class: "chip"
|
|
2059
2059
|
}, [
|
|
2060
|
-
|
|
2061
|
-
chips:
|
|
2062
|
-
chip:
|
|
2063
|
-
removeChip:
|
|
2060
|
+
na(l.$slots, "chip", {
|
|
2061
|
+
chips: b.value,
|
|
2062
|
+
chip: z,
|
|
2063
|
+
removeChip: kt
|
|
2064
2064
|
}, () => [
|
|
2065
|
-
|
|
2066
|
-
!o(
|
|
2065
|
+
fe("span", Bl, yt(z), 1),
|
|
2066
|
+
!o(J) && !o(Z) ? (F(), q("span", {
|
|
2067
2067
|
key: 0,
|
|
2068
2068
|
class: "chip-remove",
|
|
2069
|
-
onClick: (
|
|
2070
|
-
}, "×", 8, Al)) :
|
|
2069
|
+
onClick: (Q) => kt(z)
|
|
2070
|
+
}, "×", 8, Al)) : Ve("", !0)
|
|
2071
2071
|
], !0)
|
|
2072
2072
|
]))), 128))
|
|
2073
|
-
], 512)) :
|
|
2074
|
-
|
|
2073
|
+
], 512)) : Ve("", !0),
|
|
2074
|
+
da(fe("input", {
|
|
2075
2075
|
ref_key: "chipInput",
|
|
2076
|
-
ref:
|
|
2076
|
+
ref: j,
|
|
2077
2077
|
type: "text",
|
|
2078
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
2079
|
-
id:
|
|
2080
|
-
name:
|
|
2078
|
+
"onUpdate:modelValue": s[0] || (s[0] = (z) => ce.value = z),
|
|
2079
|
+
id: Je.value,
|
|
2080
|
+
name: Je.value,
|
|
2081
2081
|
placeholder: Ft.value,
|
|
2082
|
-
readonly: o(
|
|
2083
|
-
autocomplete: o(
|
|
2084
|
-
required: o(
|
|
2085
|
-
tabindex: o(
|
|
2086
|
-
class: Ne(["chips-input",
|
|
2087
|
-
style: We([Pt.value,
|
|
2088
|
-
onKeydown: s[1] || (s[1] = Et((
|
|
2089
|
-
onFocus:
|
|
2090
|
-
onBlur:
|
|
2082
|
+
readonly: o(Z),
|
|
2083
|
+
autocomplete: o(ge),
|
|
2084
|
+
required: o(be),
|
|
2085
|
+
tabindex: o(J) || o(Z) ? -1 : o(ie),
|
|
2086
|
+
class: Ne(["chips-input", xt.value]),
|
|
2087
|
+
style: We([Pt.value, ht.value]),
|
|
2088
|
+
onKeydown: s[1] || (s[1] = Et((z) => !o(J) && o(P) && wt(z), ["enter"])),
|
|
2089
|
+
onFocus: Vt,
|
|
2090
|
+
onBlur: Gt
|
|
2091
2091
|
}, null, 46, $l), [
|
|
2092
|
-
[
|
|
2092
|
+
[Fa, ce.value]
|
|
2093
2093
|
])
|
|
2094
2094
|
], 14, Tl)
|
|
2095
|
-
], 16)) :
|
|
2095
|
+
], 16)) : Ve("", !0);
|
|
2096
2096
|
}
|
|
2097
|
-
}), wl = /* @__PURE__ */
|
|
2097
|
+
}), wl = /* @__PURE__ */ ca(_l, [["__scopeId", "data-v-f0e7f67f"]]);
|
|
2098
2098
|
const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex"], Dl = /* @__PURE__ */ Object.assign({
|
|
2099
2099
|
name: "NbTextarea",
|
|
2100
2100
|
inheritAttrs: !1
|
|
@@ -2109,8 +2109,8 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2109
2109
|
type: String,
|
|
2110
2110
|
default: "b",
|
|
2111
2111
|
validator: (e = "b") => {
|
|
2112
|
-
const
|
|
2113
|
-
return ["b", "ib"].includes(
|
|
2112
|
+
const y = e.toLowerCase();
|
|
2113
|
+
return ["b", "ib"].includes(y);
|
|
2114
2114
|
}
|
|
2115
2115
|
},
|
|
2116
2116
|
tabIndex: {
|
|
@@ -2463,186 +2463,186 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2463
2463
|
"clicked",
|
|
2464
2464
|
"entered"
|
|
2465
2465
|
],
|
|
2466
|
-
setup(e, { emit:
|
|
2467
|
-
|
|
2466
|
+
setup(e, { emit: y }) {
|
|
2467
|
+
ia((l) => ({
|
|
2468
2468
|
"4960d069": T.value,
|
|
2469
|
-
"614b5d5a": o(
|
|
2470
|
-
"5aba69d7":
|
|
2471
|
-
"58e639e9":
|
|
2472
|
-
"4f3d8b41":
|
|
2473
|
-
"6612c6f4": o(
|
|
2474
|
-
"52473b5c": o(
|
|
2475
|
-
"75ccd86e": o(
|
|
2476
|
-
bf84bdec: o(
|
|
2477
|
-
"574a3426": o(
|
|
2478
|
-
"6778837c": o(
|
|
2469
|
+
"614b5d5a": o(Ge),
|
|
2470
|
+
"5aba69d7": $t.value,
|
|
2471
|
+
"58e639e9": mt.value,
|
|
2472
|
+
"4f3d8b41": Me.value,
|
|
2473
|
+
"6612c6f4": o(rt),
|
|
2474
|
+
"52473b5c": o(ct),
|
|
2475
|
+
"75ccd86e": o(Se),
|
|
2476
|
+
bf84bdec: o(me),
|
|
2477
|
+
"574a3426": o(dt),
|
|
2478
|
+
"6778837c": o(Ue),
|
|
2479
2479
|
"13113fb6": o(tt),
|
|
2480
2480
|
"578551fe": o(at),
|
|
2481
|
-
d049e1fe:
|
|
2482
|
-
d2d7a144:
|
|
2483
|
-
"51b6909d":
|
|
2484
|
-
27593086:
|
|
2485
|
-
c1840740:
|
|
2481
|
+
d049e1fe: St.value,
|
|
2482
|
+
d2d7a144: B.value,
|
|
2483
|
+
"51b6909d": N.value,
|
|
2484
|
+
27593086: Bt.value,
|
|
2485
|
+
c1840740: xt.value,
|
|
2486
2486
|
"0ac8140c": l.styleButtonColor,
|
|
2487
2487
|
"5bbff31f": At.value
|
|
2488
|
-
})),
|
|
2489
|
-
|
|
2488
|
+
})), oa(() => {
|
|
2489
|
+
I.value = qe.value;
|
|
2490
2490
|
}), ma(() => {
|
|
2491
|
-
|
|
2491
|
+
Gt();
|
|
2492
2492
|
});
|
|
2493
|
-
const h =
|
|
2494
|
-
nbId:
|
|
2495
|
-
display:
|
|
2496
|
-
hasTabIndexEnter:
|
|
2497
|
-
ariaLabel:
|
|
2498
|
-
ariaAttrs:
|
|
2499
|
-
textColor:
|
|
2500
|
-
caretColor:
|
|
2493
|
+
const h = y, W = e, {
|
|
2494
|
+
nbId: w,
|
|
2495
|
+
display: he,
|
|
2496
|
+
hasTabIndexEnter: ve,
|
|
2497
|
+
ariaLabel: ke,
|
|
2498
|
+
ariaAttrs: Ce,
|
|
2499
|
+
textColor: ue,
|
|
2500
|
+
caretColor: J,
|
|
2501
2501
|
selectionBgColor: Ee,
|
|
2502
|
-
selectionTextColor:
|
|
2503
|
-
hasBorderRadius:
|
|
2504
|
-
borderRadius:
|
|
2505
|
-
disabled:
|
|
2506
|
-
fontFamily:
|
|
2507
|
-
fontSize:
|
|
2508
|
-
fontWeight:
|
|
2509
|
-
fontFamilyMsg:
|
|
2510
|
-
fontSizeMsg:
|
|
2511
|
-
fontWeightMsg:
|
|
2512
|
-
textMessageColor:
|
|
2513
|
-
inputWidth:
|
|
2514
|
-
inputStyle:
|
|
2515
|
-
activeTextStyle:
|
|
2516
|
-
inputReadonly:
|
|
2517
|
-
hasTrim:
|
|
2518
|
-
inputUppercase:
|
|
2519
|
-
inputName:
|
|
2520
|
-
inputPlaceholder:
|
|
2502
|
+
selectionTextColor: Le,
|
|
2503
|
+
hasBorderRadius: te,
|
|
2504
|
+
borderRadius: U,
|
|
2505
|
+
disabled: R,
|
|
2506
|
+
fontFamily: ae,
|
|
2507
|
+
fontSize: G,
|
|
2508
|
+
fontWeight: K,
|
|
2509
|
+
fontFamilyMsg: xe,
|
|
2510
|
+
fontSizeMsg: re,
|
|
2511
|
+
fontWeightMsg: E,
|
|
2512
|
+
textMessageColor: pe,
|
|
2513
|
+
inputWidth: Z,
|
|
2514
|
+
inputStyle: ge,
|
|
2515
|
+
activeTextStyle: be,
|
|
2516
|
+
inputReadonly: ye,
|
|
2517
|
+
hasTrim: $,
|
|
2518
|
+
inputUppercase: x,
|
|
2519
|
+
inputName: S,
|
|
2520
|
+
inputPlaceholder: Te,
|
|
2521
2521
|
inputText: qe,
|
|
2522
|
-
theme:
|
|
2523
|
-
tabindex:
|
|
2524
|
-
lightBgColor:
|
|
2522
|
+
theme: Be,
|
|
2523
|
+
tabindex: et,
|
|
2524
|
+
lightBgColor: Ue,
|
|
2525
2525
|
lightBgColorFocus: tt,
|
|
2526
|
-
lightDisabledBgColor:
|
|
2527
|
-
lightTextColor:
|
|
2528
|
-
darkBgColor:
|
|
2529
|
-
darkBgColorFocus:
|
|
2530
|
-
darkDisabledBgColor:
|
|
2531
|
-
darkTextColor:
|
|
2526
|
+
lightDisabledBgColor: dt,
|
|
2527
|
+
lightTextColor: Ge,
|
|
2528
|
+
darkBgColor: Se,
|
|
2529
|
+
darkBgColorFocus: me,
|
|
2530
|
+
darkDisabledBgColor: ct,
|
|
2531
|
+
darkTextColor: rt,
|
|
2532
2532
|
textAlign: at,
|
|
2533
|
-
showMsg:
|
|
2534
|
-
hasMsg:
|
|
2535
|
-
showLabel:
|
|
2533
|
+
showMsg: ft,
|
|
2534
|
+
hasMsg: Ke,
|
|
2535
|
+
showLabel: Pe,
|
|
2536
2536
|
labelBackground: lt,
|
|
2537
|
-
labelPadding:
|
|
2538
|
-
labelBorderRadius:
|
|
2539
|
-
labelLeft:
|
|
2540
|
-
inputLabelMarginActive:
|
|
2541
|
-
labelActiveTop:
|
|
2542
|
-
labelActiveLeft:
|
|
2543
|
-
fontFamilyLabel:
|
|
2537
|
+
labelPadding: nt,
|
|
2538
|
+
labelBorderRadius: Ae,
|
|
2539
|
+
labelLeft: p,
|
|
2540
|
+
inputLabelMarginActive: k,
|
|
2541
|
+
labelActiveTop: ie,
|
|
2542
|
+
labelActiveLeft: P,
|
|
2543
|
+
fontFamilyLabel: se,
|
|
2544
2544
|
fontSizeLabel: je,
|
|
2545
|
-
fontSizeLabelActive:
|
|
2546
|
-
fontWeightLabel:
|
|
2545
|
+
fontSizeLabelActive: $e,
|
|
2546
|
+
fontWeightLabel: Y,
|
|
2547
2547
|
lightTextColorLabel: c,
|
|
2548
|
-
lightTextColorLabelActive:
|
|
2549
|
-
darkTextColorLabel:
|
|
2550
|
-
darkTextColorLabelActive:
|
|
2551
|
-
rows:
|
|
2552
|
-
cols:
|
|
2553
|
-
maxlength:
|
|
2548
|
+
lightTextColorLabelActive: g,
|
|
2549
|
+
darkTextColorLabel: de,
|
|
2550
|
+
darkTextColorLabelActive: ee,
|
|
2551
|
+
rows: le,
|
|
2552
|
+
cols: _e,
|
|
2553
|
+
maxlength: we,
|
|
2554
2554
|
minlength: Oe,
|
|
2555
2555
|
wrap: Fe,
|
|
2556
|
-
spellcheck:
|
|
2557
|
-
autofocus:
|
|
2558
|
-
resize:
|
|
2559
|
-
autoResize:
|
|
2560
|
-
minRows:
|
|
2561
|
-
maxRows:
|
|
2562
|
-
} =
|
|
2563
|
-
const l =
|
|
2556
|
+
spellcheck: He,
|
|
2557
|
+
autofocus: ot,
|
|
2558
|
+
resize: m,
|
|
2559
|
+
autoResize: M,
|
|
2560
|
+
minRows: D,
|
|
2561
|
+
maxRows: Ye
|
|
2562
|
+
} = sa(W), I = X(""), Re = X(!1), L = a(() => {
|
|
2563
|
+
const l = R.value ? "component-disabled" : "", s = he.value !== "b" ? "inline-block" : "block", z = ue ? ue.value : "ffffff", Q = J.value ? J.value : "", Kt = Ee.value ? Ee.value : "", Lt = Le.value ? Le.value : "", Yt = te.value ? te.value : !1, pt = U.value !== 0 && !U.value || U.value < 0 ? 0 : U.value, bt = ae.value ? ae.value : "'Lato', sans-serif", Mt = G.value && G.value >= 0 ? G.value : null, Qt = K.value !== 0 && !K.value || K.value < 0 ? 100 : K.value, Xt = xe.value ? xe.value : "'Lato', sans-serif", Jt = re.value ? re.value : "1em", Tt = E.value !== 0 && !E.value || E.value < 0 ? 100 : E.value, Zt = pe.value ? pe.value : "#f15574", ea = Z.value ? Z.value : 200, ta = be.value ? be.value : "normal", zt = ye.value ? ye.value : !1, Dt = x.value ? x.value : !1, It = Be.value ? Be.value : "normal", st = at.value ? at.value : "left", Ct = ge.value ? ge.value : "background", gt = Pe.value ? Pe.value : !1, Nt = p.value !== 0 && !p.value || p.value < 0 ? 5 : p.value, aa = lt.value ? lt.value : "transparent", Wt = k.value !== 0 && !k.value || k.value < 0 ? 15 : k.value, ne = nt.value ? nt.value : "1px 5px", la = Ae.value !== 0 && !Ae.value || Ae.value < 0 ? 0 : Ae.value, u = ie.value !== 0 && !ie.value || ie.value < 0 ? -13 : ie.value, t = P.value !== 0 && !P.value || P.value < 0 ? -10 : P.value, n = se.value ? se.value : "'Lato', sans-serif", r = je.value ? je.value : "1em", i = $e.value ? $e.value : "0.8em", d = Y.value ? Y.value : 400, f = c.value ? c.value : "#ffffff", v = de.value ? de.value : "#000000", C = g.value ? g.value : "#ffffff", A = ee.value ? ee.value : "#000000", _ = le.value && le.value > 0 ? le.value : 2, O = _e.value && _e.value > 0 ? _e.value : 20, oe = we.value !== null && we.value >= 0 ? we.value : null, ze = Oe.value !== null && Oe.value >= 0 ? Oe.value : null, Ze = Fe.value && ["soft", "hard", "off"].includes(Fe.value) ? Fe.value : "soft", De = He.value !== void 0 ? He.value : "default", Ie = ot.value !== void 0 ? ot.value : !1, fa = m.value && ["none", "both", "vertical", "horizontal"].includes(m.value) ? m.value : "vertical", va = M.value !== void 0 ? M.value : !1, pa = D.value !== null && D.value > 0 ? D.value : null, ba = Ye.value !== null && Ye.value > 0 ? Ye.value : null;
|
|
2564
2564
|
return {
|
|
2565
2565
|
disabled: l,
|
|
2566
2566
|
display: s,
|
|
2567
|
-
font:
|
|
2568
|
-
fontSize:
|
|
2569
|
-
fontWeight:
|
|
2570
|
-
fontFamilyMsg:
|
|
2571
|
-
fontSizeMsg:
|
|
2572
|
-
fontWeightMsg:
|
|
2573
|
-
textMessageColor:
|
|
2574
|
-
textColor:
|
|
2575
|
-
caretColor:
|
|
2576
|
-
selectionBgColor:
|
|
2577
|
-
selectionTextColor:
|
|
2578
|
-
hasBorderRadius:
|
|
2579
|
-
borderRadius:
|
|
2580
|
-
textAlign:
|
|
2581
|
-
inputWidth:
|
|
2582
|
-
activeTextStyle:
|
|
2583
|
-
inputReadonly:
|
|
2584
|
-
inputUppercase:
|
|
2585
|
-
theme:
|
|
2586
|
-
inputStyle:
|
|
2587
|
-
showLabel:
|
|
2588
|
-
labelBackground:
|
|
2589
|
-
labelPadding:
|
|
2590
|
-
labelBorderRadius:
|
|
2591
|
-
labelLeft:
|
|
2592
|
-
inputLabelMarginActive:
|
|
2567
|
+
font: bt,
|
|
2568
|
+
fontSize: Mt,
|
|
2569
|
+
fontWeight: Qt,
|
|
2570
|
+
fontFamilyMsg: Xt,
|
|
2571
|
+
fontSizeMsg: Jt,
|
|
2572
|
+
fontWeightMsg: Tt,
|
|
2573
|
+
textMessageColor: Zt,
|
|
2574
|
+
textColor: z,
|
|
2575
|
+
caretColor: Q,
|
|
2576
|
+
selectionBgColor: Kt,
|
|
2577
|
+
selectionTextColor: Lt,
|
|
2578
|
+
hasBorderRadius: Yt,
|
|
2579
|
+
borderRadius: pt,
|
|
2580
|
+
textAlign: st,
|
|
2581
|
+
inputWidth: ea,
|
|
2582
|
+
activeTextStyle: ta,
|
|
2583
|
+
inputReadonly: zt,
|
|
2584
|
+
inputUppercase: Dt,
|
|
2585
|
+
theme: It,
|
|
2586
|
+
inputStyle: Ct,
|
|
2587
|
+
showLabel: gt,
|
|
2588
|
+
labelBackground: aa,
|
|
2589
|
+
labelPadding: ne,
|
|
2590
|
+
labelBorderRadius: la,
|
|
2591
|
+
labelLeft: Nt,
|
|
2592
|
+
inputLabelMarginActive: Wt,
|
|
2593
2593
|
labelActiveTop: u,
|
|
2594
|
-
labelActiveLeft:
|
|
2595
|
-
fontFamilyLabel:
|
|
2596
|
-
fontSizeLabel:
|
|
2597
|
-
fontSizeLabelActive:
|
|
2598
|
-
fontWeightLabel:
|
|
2599
|
-
lightTextColorLabel:
|
|
2600
|
-
darkTextColorLabel:
|
|
2601
|
-
lightTextColorLabelActive:
|
|
2602
|
-
darkTextColorLabelActive:
|
|
2603
|
-
rows:
|
|
2604
|
-
cols:
|
|
2605
|
-
maxlength:
|
|
2606
|
-
minlength:
|
|
2607
|
-
wrap:
|
|
2608
|
-
spellcheck:
|
|
2609
|
-
autofocus:
|
|
2610
|
-
resize:
|
|
2594
|
+
labelActiveLeft: t,
|
|
2595
|
+
fontFamilyLabel: n,
|
|
2596
|
+
fontSizeLabel: r,
|
|
2597
|
+
fontSizeLabelActive: i,
|
|
2598
|
+
fontWeightLabel: d,
|
|
2599
|
+
lightTextColorLabel: f,
|
|
2600
|
+
darkTextColorLabel: v,
|
|
2601
|
+
lightTextColorLabelActive: C,
|
|
2602
|
+
darkTextColorLabelActive: A,
|
|
2603
|
+
rows: _,
|
|
2604
|
+
cols: O,
|
|
2605
|
+
maxlength: oe,
|
|
2606
|
+
minlength: ze,
|
|
2607
|
+
wrap: Ze,
|
|
2608
|
+
spellcheck: De,
|
|
2609
|
+
autofocus: Ie,
|
|
2610
|
+
resize: fa,
|
|
2611
2611
|
autoResize: va,
|
|
2612
2612
|
minRows: pa,
|
|
2613
2613
|
maxRows: ba
|
|
2614
2614
|
};
|
|
2615
|
-
}),
|
|
2615
|
+
}), ce = a(() => L.value.disabled), Qe = a(() => ({
|
|
2616
2616
|
display: L.value.display
|
|
2617
|
-
})),
|
|
2617
|
+
})), j = a(() => {
|
|
2618
2618
|
const l = L.value;
|
|
2619
2619
|
return l.fontSize ? `${l.fontSize}em` : "1.2em";
|
|
2620
|
-
}),
|
|
2621
|
-
const l = L.value, s =
|
|
2620
|
+
}), Xe = a(() => {
|
|
2621
|
+
const l = L.value, s = Je.value;
|
|
2622
2622
|
return {
|
|
2623
|
-
fontSize:
|
|
2623
|
+
fontSize: j.value,
|
|
2624
2624
|
fontWeight: l.fontWeight,
|
|
2625
|
-
marginTop: s &&
|
|
2625
|
+
marginTop: s && Pe.value ? `${l.inputLabelMarginActive}px` : "0"
|
|
2626
2626
|
};
|
|
2627
|
-
}),
|
|
2627
|
+
}), b = a(() => {
|
|
2628
2628
|
const l = L.value;
|
|
2629
2629
|
return l.inputStyle !== "line" && l.hasBorderRadius ? { borderRadius: `${l.borderRadius}rem` } : {};
|
|
2630
|
-
}), T = a(() => L.value.font),
|
|
2630
|
+
}), T = a(() => L.value.font), B = a(() => L.value.fontFamilyMsg), N = a(() => L.value.fontSizeMsg), Bt = a(() => L.value.fontWeightMsg), At = a(() => L.value.textColor), xt = a(() => L.value.textMessageColor), $t = a(() => {
|
|
2631
2631
|
const l = L.value;
|
|
2632
2632
|
return l.caretColor || (l.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2633
|
-
}),
|
|
2633
|
+
}), mt = a(() => {
|
|
2634
2634
|
const l = L.value;
|
|
2635
2635
|
return l.selectionBgColor || (l.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
2636
|
-
}),
|
|
2636
|
+
}), Me = a(() => {
|
|
2637
2637
|
const l = L.value;
|
|
2638
2638
|
return l.selectionTextColor || (l.theme === "dark" ? "#000000" : "#ffffff");
|
|
2639
|
-
}),
|
|
2639
|
+
}), it = a(() => {
|
|
2640
2640
|
const l = L.value;
|
|
2641
2641
|
return l.display === "block" ? { width: "100%" } : {
|
|
2642
2642
|
width: `${l.inputWidth}px`
|
|
2643
2643
|
};
|
|
2644
|
-
}),
|
|
2645
|
-
switch (
|
|
2644
|
+
}), vt = a(() => {
|
|
2645
|
+
switch (ge.value) {
|
|
2646
2646
|
case "line":
|
|
2647
2647
|
return "component__input--line";
|
|
2648
2648
|
case "border":
|
|
@@ -2659,33 +2659,33 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2659
2659
|
default:
|
|
2660
2660
|
return "component__input--active--normal";
|
|
2661
2661
|
}
|
|
2662
|
-
}),
|
|
2662
|
+
}), V = a(() => {
|
|
2663
2663
|
switch (L.value.theme) {
|
|
2664
2664
|
case "dark":
|
|
2665
2665
|
return "component__theme--dark";
|
|
2666
2666
|
default:
|
|
2667
2667
|
return "component__theme--light";
|
|
2668
2668
|
}
|
|
2669
|
-
}),
|
|
2670
|
-
a(() =>
|
|
2671
|
-
const
|
|
2669
|
+
}), _t = a(() => L.value.inputReadonly ? "component__input--read-only" : ""), Pt = a(() => L.value.inputUppercase ? "component__input--uppercase" : ""), ht = a(() => S.value ? S.value : `${w.value}-name-label`), Ot = a(() => Pe.value ? Re.value ? Te.value : "" : Te.value), Je = a(() => Re.value || I.value && I.value.trim().length > 0);
|
|
2670
|
+
a(() => Re.value ? "component__input--active" : "component__input--no-active");
|
|
2671
|
+
const St = a(() => "6px 10px"), Ft = a(() => !!(ft.value && Ke.value)), qt = a(() => {
|
|
2672
2672
|
const l = {};
|
|
2673
|
-
|
|
2673
|
+
Ce.value && Object.keys(Ce.value).forEach((Q) => l[`aria-${Q}`] = Ce.value[Q]);
|
|
2674
2674
|
const s = {
|
|
2675
|
-
"aria-label":
|
|
2676
|
-
"aria-disabled":
|
|
2675
|
+
"aria-label": ke.value,
|
|
2676
|
+
"aria-disabled": R.value,
|
|
2677
2677
|
...l
|
|
2678
2678
|
};
|
|
2679
2679
|
return Object.fromEntries(
|
|
2680
|
-
Object.entries(s).filter(([
|
|
2680
|
+
Object.entries(s).filter(([z, Q]) => Q != null)
|
|
2681
2681
|
);
|
|
2682
2682
|
}), jt = a(() => {
|
|
2683
|
-
const l = L.value, s =
|
|
2683
|
+
const l = L.value, s = Je.value, z = s ? l.lightTextColorLabelActive : l.lightTextColorLabel, Q = s ? l.darkTextColorLabelActive : l.darkTextColorLabel;
|
|
2684
2684
|
return {
|
|
2685
2685
|
fontFamily: l.fontFamilyLabel,
|
|
2686
2686
|
fontSize: s ? l.fontSizeLabelActive : l.fontSizeLabel,
|
|
2687
2687
|
fontWeight: l.fontWeightLabel,
|
|
2688
|
-
color: l.theme === "dark" ?
|
|
2688
|
+
color: l.theme === "dark" ? Q : z,
|
|
2689
2689
|
top: s ? `${l.labelActiveTop}px` : "50%",
|
|
2690
2690
|
left: s ? `${l.labelActiveLeft}px` : `${l.labelLeft}px`,
|
|
2691
2691
|
transform: s ? "translateY(0)" : "translateY(-50%)",
|
|
@@ -2710,81 +2710,81 @@ const Rl = ["id"], Ml = ["for"], zl = ["id", "name", "placeholder", "disabled",
|
|
|
2710
2710
|
return l.maxlength !== null && (s.maxlength = l.maxlength), l.minlength !== null && (s.minlength = l.minlength), s;
|
|
2711
2711
|
}), Ut = a(() => ({
|
|
2712
2712
|
resize: L.value.resize
|
|
2713
|
-
})),
|
|
2713
|
+
})), Vt = a(() => L.value.wrap === "off" ? {
|
|
2714
2714
|
whiteSpace: "nowrap",
|
|
2715
2715
|
overflowX: "auto"
|
|
2716
|
-
} : {}),
|
|
2717
|
-
|
|
2718
|
-
},
|
|
2716
|
+
} : {}), Gt = () => {
|
|
2717
|
+
I.value = qe.value;
|
|
2718
|
+
}, wt = () => {
|
|
2719
2719
|
h("clicked");
|
|
2720
|
-
},
|
|
2721
|
-
|
|
2722
|
-
},
|
|
2723
|
-
let l =
|
|
2724
|
-
|
|
2720
|
+
}, Rt = () => {
|
|
2721
|
+
R.value || L.value.inputReadonly || !ve.value || h("entered", I.value);
|
|
2722
|
+
}, kt = () => {
|
|
2723
|
+
let l = I.value;
|
|
2724
|
+
$.value && (l = l.trim()), h("current-value", l);
|
|
2725
2725
|
};
|
|
2726
|
-
return
|
|
2727
|
-
l !==
|
|
2728
|
-
}, { immediate: !0 }),
|
|
2729
|
-
|
|
2730
|
-
}),
|
|
2726
|
+
return H(qe, (l) => {
|
|
2727
|
+
l !== I.value && (I.value = l);
|
|
2728
|
+
}, { immediate: !0 }), H(I, (l) => {
|
|
2729
|
+
$.value && (l = l.trim()), h("changed", l);
|
|
2730
|
+
}), H(Re, (l) => {
|
|
2731
2731
|
h(l ? "focused" : "blurred");
|
|
2732
|
-
}),
|
|
2733
|
-
|
|
2734
|
-
}, { immediate: !0 }), (l, s) => o(
|
|
2732
|
+
}), H(I, () => {
|
|
2733
|
+
kt();
|
|
2734
|
+
}, { immediate: !0 }), (l, s) => o(w) ? (F(), q("div", ua({
|
|
2735
2735
|
key: 0,
|
|
2736
|
-
class: ["nb-wrapper",
|
|
2737
|
-
style: [
|
|
2736
|
+
class: ["nb-wrapper", ce.value],
|
|
2737
|
+
style: [Qe.value, it.value, b.value],
|
|
2738
2738
|
role: "input"
|
|
2739
2739
|
}, qt.value), [
|
|
2740
|
-
|
|
2741
|
-
id: o(
|
|
2742
|
-
class: Ne(["nb-reset", "component",
|
|
2743
|
-
style: We([
|
|
2744
|
-
onClick:
|
|
2740
|
+
fe("div", {
|
|
2741
|
+
id: o(w),
|
|
2742
|
+
class: Ne(["nb-reset", "component", V.value, _t.value, vt.value]),
|
|
2743
|
+
style: We([Xe.value, it.value, b.value]),
|
|
2744
|
+
onClick: wt
|
|
2745
2745
|
}, [
|
|
2746
|
-
o(
|
|
2746
|
+
o(Pe) ? (F(), q("label", {
|
|
2747
2747
|
key: 0,
|
|
2748
|
-
for:
|
|
2748
|
+
for: ht.value,
|
|
2749
2749
|
class: "component__label",
|
|
2750
2750
|
style: We([jt.value])
|
|
2751
|
-
},
|
|
2752
|
-
|
|
2753
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
2754
|
-
id:
|
|
2755
|
-
name:
|
|
2751
|
+
}, yt(e.label), 13, Ml)) : Ve("", !0),
|
|
2752
|
+
da(fe("textarea", ua({
|
|
2753
|
+
"onUpdate:modelValue": s[0] || (s[0] = (z) => I.value = z),
|
|
2754
|
+
id: ht.value,
|
|
2755
|
+
name: ht.value
|
|
2756
2756
|
}, Ht.value, {
|
|
2757
2757
|
class: ["component__input", [
|
|
2758
2758
|
Pt.value,
|
|
2759
2759
|
ut.value
|
|
2760
2760
|
]],
|
|
2761
2761
|
placeholder: Ot.value,
|
|
2762
|
-
disabled: o(
|
|
2762
|
+
disabled: o(R) || o(ye),
|
|
2763
2763
|
required: e.required,
|
|
2764
|
-
readonly: o(
|
|
2764
|
+
readonly: o(ye),
|
|
2765
2765
|
autocomplete: e.inputAutocomplete,
|
|
2766
|
-
tabindex: o(
|
|
2766
|
+
tabindex: o(R) || o(ye) ? -1 : o(et),
|
|
2767
2767
|
role: "textbox",
|
|
2768
|
-
style: [
|
|
2769
|
-
onFocus: s[1] || (s[1] = (
|
|
2770
|
-
onBlur: s[2] || (s[2] = (
|
|
2771
|
-
onInput:
|
|
2772
|
-
onKeydown: s[3] || (s[3] = Et((
|
|
2768
|
+
style: [b.value, Ut.value, Vt.value],
|
|
2769
|
+
onFocus: s[1] || (s[1] = (z) => Re.value = !0),
|
|
2770
|
+
onBlur: s[2] || (s[2] = (z) => Re.value = !1),
|
|
2771
|
+
onInput: kt,
|
|
2772
|
+
onKeydown: s[3] || (s[3] = Et((z) => !o(R) && o(ve) && Rt(), ["enter"]))
|
|
2773
2773
|
}), null, 16, zl), [
|
|
2774
|
-
[
|
|
2774
|
+
[Fa, I.value]
|
|
2775
2775
|
])
|
|
2776
2776
|
], 14, Rl),
|
|
2777
|
-
Ft.value ? (
|
|
2777
|
+
Ft.value ? (F(), q("div", {
|
|
2778
2778
|
key: 0,
|
|
2779
2779
|
class: Ne(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
2780
2780
|
}, [
|
|
2781
|
-
|
|
2782
|
-
ga(
|
|
2781
|
+
na(l.$slots, "message", {}, () => [
|
|
2782
|
+
ga(yt(e.message), 1)
|
|
2783
2783
|
], !0)
|
|
2784
|
-
], 2)) :
|
|
2785
|
-
], 16)) :
|
|
2784
|
+
], 2)) : Ve("", !0)
|
|
2785
|
+
], 16)) : Ve("", !0);
|
|
2786
2786
|
}
|
|
2787
|
-
}), Il = /* @__PURE__ */
|
|
2787
|
+
}), Il = /* @__PURE__ */ ca(Dl, [["__scopeId", "data-v-23147953"]]);
|
|
2788
2788
|
const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "min", "max", "step", "tabindex"], Pl = /* @__PURE__ */ Object.assign({
|
|
2789
2789
|
name: "NbDatePicker",
|
|
2790
2790
|
inheritAttrs: !1
|
|
@@ -2799,8 +2799,8 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
2799
2799
|
type: String,
|
|
2800
2800
|
default: "b",
|
|
2801
2801
|
validator: (e = "b") => {
|
|
2802
|
-
const
|
|
2803
|
-
return ["b", "ib"].includes(
|
|
2802
|
+
const y = e.toLowerCase();
|
|
2803
|
+
return ["b", "ib"].includes(y);
|
|
2804
2804
|
}
|
|
2805
2805
|
},
|
|
2806
2806
|
tabIndex: {
|
|
@@ -2819,11 +2819,6 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
2819
2819
|
type: Object,
|
|
2820
2820
|
default: () => ({})
|
|
2821
2821
|
},
|
|
2822
|
-
textColor: {
|
|
2823
|
-
// TESTAR AINDA
|
|
2824
|
-
type: String,
|
|
2825
|
-
default: "#ffffff"
|
|
2826
|
-
},
|
|
2827
2822
|
caretColor: {
|
|
2828
2823
|
type: String,
|
|
2829
2824
|
default: "",
|
|
@@ -3012,7 +3007,7 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3012
3007
|
},
|
|
3013
3008
|
darkTextColor: {
|
|
3014
3009
|
type: String,
|
|
3015
|
-
default: "#
|
|
3010
|
+
default: "#ffffff"
|
|
3016
3011
|
},
|
|
3017
3012
|
tabindex: {
|
|
3018
3013
|
type: [String, Number],
|
|
@@ -3120,118 +3115,117 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3120
3115
|
"clicked",
|
|
3121
3116
|
"entered"
|
|
3122
3117
|
],
|
|
3123
|
-
setup(e, { emit:
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
"
|
|
3131
|
-
|
|
3132
|
-
"
|
|
3133
|
-
"
|
|
3134
|
-
"
|
|
3135
|
-
"
|
|
3136
|
-
"
|
|
3137
|
-
|
|
3138
|
-
"
|
|
3139
|
-
"
|
|
3140
|
-
"
|
|
3141
|
-
"
|
|
3142
|
-
"
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
"
|
|
3146
|
-
"
|
|
3147
|
-
"
|
|
3118
|
+
setup(e, { emit: y }) {
|
|
3119
|
+
ia((t) => ({
|
|
3120
|
+
d1380992: Me.value,
|
|
3121
|
+
"1a12f8b9": xt.value,
|
|
3122
|
+
c62c42b0: o(Ke),
|
|
3123
|
+
da27db6e: Pt.value,
|
|
3124
|
+
e47f764a: ht.value,
|
|
3125
|
+
"947ebc9a": Ot.value,
|
|
3126
|
+
"31fbb978": o(Ae),
|
|
3127
|
+
"577efc78": o(nt),
|
|
3128
|
+
"76f889e0": o(Pe),
|
|
3129
|
+
"016a4e96": V.value,
|
|
3130
|
+
"6e4106d8": o(lt),
|
|
3131
|
+
"5e201b0e": z.value,
|
|
3132
|
+
b6a9fb2c: Q.value,
|
|
3133
|
+
"066a02f4": o(ft),
|
|
3134
|
+
"1ee389e0": o(rt),
|
|
3135
|
+
"057a93a8": o(at),
|
|
3136
|
+
"5e72b7f0": o(p),
|
|
3137
|
+
"87b4e862": kt.value,
|
|
3138
|
+
d0803e60: it.value,
|
|
3139
|
+
ec2f8de2: vt.value,
|
|
3140
|
+
"19c28478": ut.value,
|
|
3141
|
+
"57cff15c": _t.value,
|
|
3142
|
+
"6ec14870": t.styleButtonColor
|
|
3148
3143
|
}));
|
|
3149
3144
|
const h = nl(
|
|
3150
3145
|
() => import("@vlalg-nimbus/nb-calendar").then((t) => t.Calendar ? t.Calendar : t.default && t.default.Calendar ? t.default.Calendar : t.default)
|
|
3151
3146
|
);
|
|
3152
|
-
|
|
3153
|
-
|
|
3147
|
+
oa(() => {
|
|
3148
|
+
m.value = Be.value;
|
|
3154
3149
|
}), ma(() => {
|
|
3155
|
-
|
|
3150
|
+
Lt();
|
|
3156
3151
|
});
|
|
3157
|
-
const
|
|
3158
|
-
nbId:
|
|
3159
|
-
display:
|
|
3160
|
-
hasTabIndexEnter:
|
|
3161
|
-
ariaLabel:
|
|
3162
|
-
ariaAttrs:
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
darkTextColorLabel: nt,
|
|
3152
|
+
const W = y, w = e, {
|
|
3153
|
+
nbId: he,
|
|
3154
|
+
display: ve,
|
|
3155
|
+
hasTabIndexEnter: ke,
|
|
3156
|
+
ariaLabel: Ce,
|
|
3157
|
+
ariaAttrs: ue,
|
|
3158
|
+
caretColor: J,
|
|
3159
|
+
selectionBgColor: Ee,
|
|
3160
|
+
selectionTextColor: Le,
|
|
3161
|
+
hasBorderRadius: te,
|
|
3162
|
+
borderRadius: U,
|
|
3163
|
+
disabled: R,
|
|
3164
|
+
fontFamily: ae,
|
|
3165
|
+
fontSize: G,
|
|
3166
|
+
fontWeight: K,
|
|
3167
|
+
fontFamilyMsg: xe,
|
|
3168
|
+
fontSizeMsg: re,
|
|
3169
|
+
fontWeightMsg: E,
|
|
3170
|
+
textMessageColor: pe,
|
|
3171
|
+
inputWidth: Z,
|
|
3172
|
+
inputStyle: ge,
|
|
3173
|
+
activeTextStyle: be,
|
|
3174
|
+
sizeMediaQuery: ye,
|
|
3175
|
+
inputReadonly: $,
|
|
3176
|
+
inputType: x,
|
|
3177
|
+
hasTrim: S,
|
|
3178
|
+
inputUppercase: Te,
|
|
3179
|
+
inputName: qe,
|
|
3180
|
+
inputText: Be,
|
|
3181
|
+
min: et,
|
|
3182
|
+
max: Ue,
|
|
3183
|
+
step: tt,
|
|
3184
|
+
useCustomCalendar: dt,
|
|
3185
|
+
locale: Ge,
|
|
3186
|
+
theme: Se,
|
|
3187
|
+
allowRange: me,
|
|
3188
|
+
tabindex: ct,
|
|
3189
|
+
lightBgColor: rt,
|
|
3190
|
+
lightBgColorFocus: at,
|
|
3191
|
+
lightDisabledBgColor: ft,
|
|
3192
|
+
lightTextColor: Ke,
|
|
3193
|
+
darkBgColor: Pe,
|
|
3194
|
+
darkBgColorFocus: lt,
|
|
3195
|
+
darkDisabledBgColor: nt,
|
|
3196
|
+
darkTextColor: Ae,
|
|
3197
|
+
textAlign: p,
|
|
3198
|
+
showMsg: k,
|
|
3199
|
+
hasMsg: ie,
|
|
3200
|
+
showLabel: P,
|
|
3201
|
+
labelBackground: se,
|
|
3202
|
+
labelPadding: je,
|
|
3203
|
+
labelBorderRadius: $e,
|
|
3204
|
+
labelLeft: Y,
|
|
3205
|
+
inputLabelMarginActive: c,
|
|
3206
|
+
labelActiveTop: g,
|
|
3207
|
+
labelActiveLeft: de,
|
|
3208
|
+
fontFamilyLabel: ee,
|
|
3209
|
+
fontSizeLabel: le,
|
|
3210
|
+
fontSizeLabelActive: _e,
|
|
3211
|
+
fontWeightLabel: we,
|
|
3212
|
+
lightTextColorLabel: Oe,
|
|
3213
|
+
lightTextColorLabelActive: Fe,
|
|
3214
|
+
darkTextColorLabel: He,
|
|
3221
3215
|
darkTextColorLabelActive: ot
|
|
3222
|
-
} =
|
|
3223
|
-
if (!
|
|
3216
|
+
} = sa(w), m = X(""), M = X(""), D = X(""), Ye = X(""), I = X(!1), Re = X(!1), L = a(() => {
|
|
3217
|
+
if (!m.value)
|
|
3224
3218
|
return null;
|
|
3225
|
-
if (
|
|
3219
|
+
if (me.value && typeof m.value == "string" && m.value.startsWith("{"))
|
|
3226
3220
|
try {
|
|
3227
|
-
const t = JSON.parse(
|
|
3221
|
+
const t = JSON.parse(m.value);
|
|
3228
3222
|
if (t && (t.startDate || t.endDate)) {
|
|
3229
3223
|
const n = (r) => {
|
|
3230
3224
|
if (!r)
|
|
3231
3225
|
return null;
|
|
3232
3226
|
if (/^\d{4}-\d{2}-\d{2}$/.test(r)) {
|
|
3233
|
-
const [i,
|
|
3234
|
-
return new Date(i,
|
|
3227
|
+
const [i, d, f] = r.split("-").map(Number);
|
|
3228
|
+
return new Date(i, d - 1, f);
|
|
3235
3229
|
}
|
|
3236
3230
|
return new Date(r);
|
|
3237
3231
|
};
|
|
@@ -3242,136 +3236,136 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3242
3236
|
}
|
|
3243
3237
|
} catch {
|
|
3244
3238
|
}
|
|
3245
|
-
if (
|
|
3246
|
-
const [t, n, r] =
|
|
3239
|
+
if (x.value === "date" && typeof m.value == "string" && /^\d{4}-\d{2}-\d{2}$/.test(m.value)) {
|
|
3240
|
+
const [t, n, r] = m.value.split("-").map(Number);
|
|
3247
3241
|
return new Date(t, n - 1, r);
|
|
3248
3242
|
}
|
|
3249
|
-
return
|
|
3250
|
-
}),
|
|
3243
|
+
return m.value;
|
|
3244
|
+
}), ce = (t, n, r) => {
|
|
3251
3245
|
if (!t)
|
|
3252
3246
|
return "";
|
|
3253
|
-
const i = r ||
|
|
3247
|
+
const i = r || Ge.value;
|
|
3254
3248
|
if (n === "date") {
|
|
3255
|
-
if (
|
|
3249
|
+
if (me.value && typeof t == "string" && t.startsWith("{"))
|
|
3256
3250
|
try {
|
|
3257
|
-
const
|
|
3258
|
-
if (
|
|
3259
|
-
const f = (
|
|
3260
|
-
if (!
|
|
3251
|
+
const d = JSON.parse(t);
|
|
3252
|
+
if (d && (d.startDate || d.endDate)) {
|
|
3253
|
+
const f = (A) => {
|
|
3254
|
+
if (!A)
|
|
3261
3255
|
return "";
|
|
3262
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
3263
|
-
const [
|
|
3264
|
-
return i === "pt-BR" ? `${
|
|
3256
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(A)) {
|
|
3257
|
+
const [_, O, oe] = A.split("-");
|
|
3258
|
+
return i === "pt-BR" ? `${oe}/${O}/${_}` : `${O}/${oe}/${_}`;
|
|
3265
3259
|
}
|
|
3266
|
-
return
|
|
3267
|
-
},
|
|
3268
|
-
if (
|
|
3269
|
-
return `${
|
|
3270
|
-
if (
|
|
3271
|
-
return
|
|
3272
|
-
if (
|
|
3273
|
-
return
|
|
3260
|
+
return A;
|
|
3261
|
+
}, v = f(d.startDate), C = f(d.endDate);
|
|
3262
|
+
if (v && C)
|
|
3263
|
+
return `${v} - ${C}`;
|
|
3264
|
+
if (v)
|
|
3265
|
+
return v;
|
|
3266
|
+
if (C)
|
|
3267
|
+
return C;
|
|
3274
3268
|
}
|
|
3275
3269
|
} catch {
|
|
3276
3270
|
}
|
|
3277
3271
|
if (typeof t == "string" && /^\d{4}-\d{2}-\d{2}$/.test(t)) {
|
|
3278
|
-
const [
|
|
3279
|
-
return i === "pt-BR" ? `${
|
|
3272
|
+
const [d, f, v] = t.split("-");
|
|
3273
|
+
return i === "pt-BR" ? `${v}/${f}/${d}` : `${f}/${v}/${d}`;
|
|
3280
3274
|
}
|
|
3281
3275
|
return t;
|
|
3282
3276
|
} else if (n === "datetime-local") {
|
|
3283
3277
|
if (typeof t == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/.test(t)) {
|
|
3284
|
-
const [
|
|
3285
|
-
return i === "pt-BR" ? `${
|
|
3278
|
+
const [d, f] = t.split("T"), [v, C, A] = d.split("-");
|
|
3279
|
+
return i === "pt-BR" ? `${A}/${C}/${v} ${f}` : `${C}/${A}/${v} ${f}`;
|
|
3286
3280
|
}
|
|
3287
3281
|
return t;
|
|
3288
3282
|
} else if (n === "month") {
|
|
3289
3283
|
if (typeof t == "string" && /^\d{4}-\d{2}$/.test(t)) {
|
|
3290
|
-
const [
|
|
3291
|
-
return `${f}/${
|
|
3284
|
+
const [d, f] = t.split("-");
|
|
3285
|
+
return `${f}/${d}`;
|
|
3292
3286
|
}
|
|
3293
3287
|
return t;
|
|
3294
3288
|
} else if (n === "week") {
|
|
3295
3289
|
if (typeof t == "string" && /^\d{4}-W\d{2}$/i.test(t)) {
|
|
3296
|
-
const
|
|
3297
|
-
if (
|
|
3298
|
-
return i === "pt-BR" ? `Semana ${
|
|
3290
|
+
const d = t.match(/^(\d{4})-W(\d{2})$/i);
|
|
3291
|
+
if (d)
|
|
3292
|
+
return i === "pt-BR" ? `Semana ${d[2]} de ${d[1]}` : `Week ${d[2]} of ${d[1]}`;
|
|
3299
3293
|
}
|
|
3300
3294
|
return t;
|
|
3301
3295
|
}
|
|
3302
3296
|
return t;
|
|
3303
|
-
},
|
|
3297
|
+
}, Qe = (t, n, r) => {
|
|
3304
3298
|
if (!t || !t.trim())
|
|
3305
3299
|
return "";
|
|
3306
|
-
const i = t.trim(),
|
|
3300
|
+
const i = t.trim(), d = r || Ge.value;
|
|
3307
3301
|
if (n === "date") {
|
|
3308
|
-
if (
|
|
3309
|
-
const f = i.split(/\s*-\s*/).map((
|
|
3310
|
-
if (
|
|
3302
|
+
if (me.value && i.includes("-")) {
|
|
3303
|
+
const f = i.split(/\s*-\s*/).map((_) => _.trim()), v = (_) => {
|
|
3304
|
+
if (!_)
|
|
3311
3305
|
return null;
|
|
3312
|
-
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(
|
|
3313
|
-
const
|
|
3314
|
-
if (
|
|
3315
|
-
const [
|
|
3316
|
-
return `${
|
|
3306
|
+
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(_)) {
|
|
3307
|
+
const O = _.split("/");
|
|
3308
|
+
if (d === "pt-BR") {
|
|
3309
|
+
const [oe, ze, Ze] = O, De = oe.padStart(2, "0"), Ie = ze.padStart(2, "0");
|
|
3310
|
+
return `${Ze}-${Ie}-${De}`;
|
|
3317
3311
|
} else {
|
|
3318
|
-
const [
|
|
3319
|
-
return `${
|
|
3312
|
+
const [oe, ze, Ze] = O, De = ze.padStart(2, "0"), Ie = oe.padStart(2, "0");
|
|
3313
|
+
return `${Ze}-${Ie}-${De}`;
|
|
3320
3314
|
}
|
|
3321
|
-
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(
|
|
3322
|
-
const
|
|
3323
|
-
return `${
|
|
3315
|
+
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(_)) {
|
|
3316
|
+
const O = _.split("-"), [oe, ze, Ze] = O, De = Ze.padStart(2, "0"), Ie = ze.padStart(2, "0");
|
|
3317
|
+
return `${oe}-${Ie}-${De}`;
|
|
3324
3318
|
}
|
|
3325
3319
|
return null;
|
|
3326
3320
|
};
|
|
3327
|
-
let
|
|
3328
|
-
if (
|
|
3329
|
-
const
|
|
3330
|
-
if (new Date(
|
|
3331
|
-
const
|
|
3332
|
-
|
|
3321
|
+
let C = v(f[0]), A = f[1] ? v(f[1]) : null;
|
|
3322
|
+
if (C && A) {
|
|
3323
|
+
const _ = new Date(C);
|
|
3324
|
+
if (new Date(A) < _) {
|
|
3325
|
+
const oe = C;
|
|
3326
|
+
C = A, A = oe;
|
|
3333
3327
|
}
|
|
3334
|
-
return JSON.stringify({ startDate:
|
|
3335
|
-
} else if (
|
|
3336
|
-
return JSON.stringify({ startDate:
|
|
3328
|
+
return JSON.stringify({ startDate: C, endDate: A });
|
|
3329
|
+
} else if (C)
|
|
3330
|
+
return JSON.stringify({ startDate: C, endDate: null });
|
|
3337
3331
|
return "";
|
|
3338
3332
|
}
|
|
3339
3333
|
if (/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(i)) {
|
|
3340
3334
|
const f = i.split("/");
|
|
3341
|
-
if (
|
|
3342
|
-
const [
|
|
3343
|
-
return `${
|
|
3335
|
+
if (d === "pt-BR") {
|
|
3336
|
+
const [v, C, A] = f, _ = v.padStart(2, "0"), O = C.padStart(2, "0");
|
|
3337
|
+
return `${A}-${O}-${_}`;
|
|
3344
3338
|
} else {
|
|
3345
|
-
const [
|
|
3346
|
-
return `${
|
|
3339
|
+
const [v, C, A] = f, _ = C.padStart(2, "0"), O = v.padStart(2, "0");
|
|
3340
|
+
return `${A}-${O}-${_}`;
|
|
3347
3341
|
}
|
|
3348
3342
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(i)) {
|
|
3349
|
-
const f = i.split("-"), [
|
|
3350
|
-
return `${
|
|
3343
|
+
const f = i.split("-"), [v, C, A] = f, _ = A.padStart(2, "0"), O = C.padStart(2, "0");
|
|
3344
|
+
return `${v}-${O}-${_}`;
|
|
3351
3345
|
}
|
|
3352
3346
|
return "";
|
|
3353
3347
|
} else if (n === "datetime-local") {
|
|
3354
3348
|
if (/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}(:\d{1,2})?$/.test(i)) {
|
|
3355
|
-
const [f,
|
|
3356
|
-
if (
|
|
3357
|
-
const [
|
|
3358
|
-
return `${
|
|
3349
|
+
const [f, v] = i.split(" "), C = f.split("/");
|
|
3350
|
+
if (d === "pt-BR") {
|
|
3351
|
+
const [A, _, O] = C, oe = A.padStart(2, "0"), ze = _.padStart(2, "0"), De = v.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3352
|
+
return `${O}-${ze}-${oe}T${De}`;
|
|
3359
3353
|
} else {
|
|
3360
|
-
const [
|
|
3361
|
-
return `${
|
|
3354
|
+
const [A, _, O] = C, oe = _.padStart(2, "0"), ze = A.padStart(2, "0"), De = v.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3355
|
+
return `${O}-${ze}-${oe}T${De}`;
|
|
3362
3356
|
}
|
|
3363
3357
|
} else if (/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}(:\d{1,2})?$/.test(i)) {
|
|
3364
|
-
const [f,
|
|
3365
|
-
return `${
|
|
3358
|
+
const [f, v] = i.split("T"), C = f.split("-"), [A, _, O] = C, oe = O.padStart(2, "0"), ze = _.padStart(2, "0"), De = v.split(":").map((Ie) => Ie.padStart(2, "0")).join(":");
|
|
3359
|
+
return `${A}-${ze}-${oe}T${De}`;
|
|
3366
3360
|
}
|
|
3367
3361
|
return "";
|
|
3368
3362
|
} else if (n === "month") {
|
|
3369
3363
|
if (/^\d{1,2}\/\d{4}$/.test(i)) {
|
|
3370
|
-
const [f,
|
|
3371
|
-
return `${
|
|
3364
|
+
const [f, v] = i.split("/"), C = f.padStart(2, "0");
|
|
3365
|
+
return `${v}-${C}`;
|
|
3372
3366
|
} else if (/^\d{4}-\d{1,2}$/.test(i)) {
|
|
3373
|
-
const [f,
|
|
3374
|
-
return `${f}-${
|
|
3367
|
+
const [f, v] = i.split("-"), C = v.padStart(2, "0");
|
|
3368
|
+
return `${f}-${C}`;
|
|
3375
3369
|
}
|
|
3376
3370
|
return "";
|
|
3377
3371
|
} else if (n === "week") {
|
|
@@ -3380,85 +3374,84 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3380
3374
|
const f = i.match(/semana\s+W?(\d{2})\s+de\s+(\d{4})/i);
|
|
3381
3375
|
if (f)
|
|
3382
3376
|
return `${f[2]}-W${f[1]}`;
|
|
3383
|
-
const
|
|
3384
|
-
return
|
|
3377
|
+
const v = i.match(/week\s+W?(\d{2})\s+of\s+(\d{4})/i);
|
|
3378
|
+
return v ? `${v[2]}-W${v[1]}` : "";
|
|
3385
3379
|
}
|
|
3386
3380
|
return i;
|
|
3387
|
-
},
|
|
3388
|
-
const t =
|
|
3381
|
+
}, j = X(!1), Xe = X({ top: 0, left: 0 }), b = X(null), T = X(null), B = a(() => dt.value === !0), N = a(() => {
|
|
3382
|
+
const t = R.value ? "component-disabled" : "", n = ve.value !== "b" ? "inline-block" : "block", r = J.value ? J.value : "", i = Ee.value ? Ee.value : "", d = Le.value ? Le.value : "", f = te.value ? te.value : !1, v = U.value !== 0 && !U.value || U.value < 0 ? 0 : U.value, C = ae.value ? ae.value : "'Lato', sans-serif", A = G.value && G.value >= 0 ? G.value : null, _ = K.value !== 0 && !K.value || K.value < 0 ? 100 : K.value, O = xe.value ? xe.value : "'Lato', sans-serif", oe = re.value ? re.value : "1em", ze = E.value !== 0 && !E.value || E.value < 0 ? 100 : E.value, Ze = pe.value ? pe.value : "#f15574", De = Z.value ? Z.value : 200, Ie = be.value ? be.value : "normal", fa = "sm", va = $.value ? $.value : !1, pa = x.value ? x.value : "date", ba = Te.value ? Te.value : !1, ha = Se.value ? Se.value : "normal", Ca = p.value ? p.value : "left", xa = ge.value ? ge.value : "background", Sa = P.value ? P.value : !1, Va = Y.value !== 0 && !Y.value || Y.value < 0 ? 5 : Y.value, ka = se.value ? se.value : "transparent", La = c.value !== 0 && !c.value || c.value < 0 ? 15 : c.value, Ta = je.value ? je.value : "1px 5px", Ba = $e.value !== 0 && !$e.value || $e.value < 0 ? 0 : $e.value, Aa = g.value !== 0 && !g.value || g.value < 0 ? -13 : g.value, $a = de.value !== 0 && !de.value || de.value < 0 ? -10 : de.value, _a = ee.value ? ee.value : "'Lato', sans-serif", wa = le.value ? le.value : "1em", Ra = _e.value ? _e.value : "0.8em", Ma = we.value ? we.value : 400, za = Oe.value ? Oe.value : "#ffffff", Da = He.value ? He.value : "#000000", Ia = Fe.value ? Fe.value : "#ffffff", Na = ot.value ? ot.value : "#000000";
|
|
3389
3383
|
return {
|
|
3390
3384
|
disabled: t,
|
|
3391
3385
|
display: n,
|
|
3392
|
-
font:
|
|
3393
|
-
fontSize:
|
|
3394
|
-
fontWeight:
|
|
3395
|
-
fontFamilyMsg:
|
|
3396
|
-
fontSizeMsg:
|
|
3397
|
-
fontWeightMsg:
|
|
3398
|
-
textMessageColor:
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
darkTextColorLabelActive: Ea
|
|
3386
|
+
font: C,
|
|
3387
|
+
fontSize: A,
|
|
3388
|
+
fontWeight: _,
|
|
3389
|
+
fontFamilyMsg: O,
|
|
3390
|
+
fontSizeMsg: oe,
|
|
3391
|
+
fontWeightMsg: ze,
|
|
3392
|
+
textMessageColor: Ze,
|
|
3393
|
+
caretColor: r,
|
|
3394
|
+
selectionBgColor: i,
|
|
3395
|
+
selectionTextColor: d,
|
|
3396
|
+
hasBorderRadius: f,
|
|
3397
|
+
borderRadius: v,
|
|
3398
|
+
textAlign: Ca,
|
|
3399
|
+
inputWidth: De,
|
|
3400
|
+
activeTextStyle: Ie,
|
|
3401
|
+
sizeMediaQuery: fa,
|
|
3402
|
+
inputReadonly: va,
|
|
3403
|
+
inputType: pa,
|
|
3404
|
+
inputUppercase: ba,
|
|
3405
|
+
theme: ha,
|
|
3406
|
+
inputStyle: xa,
|
|
3407
|
+
showLabel: Sa,
|
|
3408
|
+
labelBackground: ka,
|
|
3409
|
+
labelPadding: Ta,
|
|
3410
|
+
labelBorderRadius: Ba,
|
|
3411
|
+
labelLeft: Va,
|
|
3412
|
+
inputLabelMarginActive: La,
|
|
3413
|
+
labelActiveTop: Aa,
|
|
3414
|
+
labelActiveLeft: $a,
|
|
3415
|
+
fontFamilyLabel: _a,
|
|
3416
|
+
fontSizeLabel: wa,
|
|
3417
|
+
fontSizeLabelActive: Ra,
|
|
3418
|
+
fontWeightLabel: Ma,
|
|
3419
|
+
lightTextColorLabel: za,
|
|
3420
|
+
darkTextColorLabel: Da,
|
|
3421
|
+
lightTextColorLabelActive: Ia,
|
|
3422
|
+
darkTextColorLabelActive: Na
|
|
3430
3423
|
};
|
|
3431
|
-
}),
|
|
3432
|
-
display:
|
|
3433
|
-
})),
|
|
3434
|
-
const t =
|
|
3424
|
+
}), Bt = a(() => N.value.disabled), At = a(() => ({
|
|
3425
|
+
display: N.value.display
|
|
3426
|
+
})), xt = a(() => {
|
|
3427
|
+
const t = N.value;
|
|
3435
3428
|
return t.fontSize ? `${t.fontSize}em` : "1.2em";
|
|
3436
|
-
}),
|
|
3437
|
-
const t =
|
|
3429
|
+
}), $t = a(() => {
|
|
3430
|
+
const t = N.value, n = wt.value;
|
|
3438
3431
|
return {
|
|
3439
|
-
fontSize:
|
|
3432
|
+
fontSize: xt.value,
|
|
3440
3433
|
fontWeight: t.fontWeight,
|
|
3441
|
-
marginTop: n &&
|
|
3434
|
+
marginTop: n && P.value ? `${t.inputLabelMarginActive}px` : "0"
|
|
3442
3435
|
};
|
|
3443
|
-
}),
|
|
3444
|
-
const t =
|
|
3436
|
+
}), mt = a(() => {
|
|
3437
|
+
const t = N.value;
|
|
3445
3438
|
return t.inputStyle !== "line" && t.hasBorderRadius ? { borderRadius: `${t.borderRadius}rem` } : {};
|
|
3446
|
-
}),
|
|
3447
|
-
const t =
|
|
3439
|
+
}), Me = a(() => N.value.font), it = a(() => N.value.fontFamilyMsg), vt = a(() => N.value.fontSizeMsg), ut = a(() => N.value.fontWeightMsg), V = a(() => Se.value === "dark" ? Ae.value : Ke.value), _t = a(() => N.value.textMessageColor), Pt = a(() => {
|
|
3440
|
+
const t = N.value;
|
|
3448
3441
|
return t.caretColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
3449
|
-
}),
|
|
3450
|
-
const t =
|
|
3442
|
+
}), ht = a(() => {
|
|
3443
|
+
const t = N.value;
|
|
3451
3444
|
return t.selectionBgColor || (t.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
3452
|
-
}),
|
|
3453
|
-
const t =
|
|
3445
|
+
}), Ot = a(() => {
|
|
3446
|
+
const t = N.value;
|
|
3454
3447
|
return t.selectionTextColor || (t.theme === "dark" ? "#000000" : "#ffffff");
|
|
3455
|
-
}),
|
|
3456
|
-
const t =
|
|
3448
|
+
}), Je = a(() => {
|
|
3449
|
+
const t = N.value;
|
|
3457
3450
|
return t.display === "block" ? { width: "100%" } : {
|
|
3458
3451
|
width: `${t.inputWidth}px`
|
|
3459
3452
|
};
|
|
3460
|
-
}),
|
|
3461
|
-
switch (
|
|
3453
|
+
}), St = a(() => {
|
|
3454
|
+
switch (ge.value) {
|
|
3462
3455
|
case "line":
|
|
3463
3456
|
return "component__input--line";
|
|
3464
3457
|
case "border":
|
|
@@ -3466,8 +3459,8 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3466
3459
|
default:
|
|
3467
3460
|
return "component__input--background";
|
|
3468
3461
|
}
|
|
3469
|
-
}),
|
|
3470
|
-
switch (
|
|
3462
|
+
}), Ft = a(() => {
|
|
3463
|
+
switch (N.value.activeTextStyle) {
|
|
3471
3464
|
case "italic":
|
|
3472
3465
|
return "component__input--active--italic";
|
|
3473
3466
|
case "oblique":
|
|
@@ -3475,34 +3468,34 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3475
3468
|
default:
|
|
3476
3469
|
return "component__input--active--normal";
|
|
3477
3470
|
}
|
|
3478
|
-
}),
|
|
3479
|
-
switch (
|
|
3471
|
+
}), qt = a(() => "component__sm"), jt = a(() => {
|
|
3472
|
+
switch (N.value.theme) {
|
|
3480
3473
|
case "dark":
|
|
3481
3474
|
return "component__theme--dark";
|
|
3482
3475
|
default:
|
|
3483
3476
|
return "component__theme--light";
|
|
3484
3477
|
}
|
|
3485
|
-
}),
|
|
3486
|
-
a(() =>
|
|
3487
|
-
const
|
|
3478
|
+
}), Ht = a(() => N.value.inputReadonly ? "component__input--read-only" : ""), Ut = a(() => N.value.inputUppercase ? "component__input--uppercase" : ""), Vt = a(() => qe.value ? qe.value : `${he.value}-name-label`), Gt = a(() => ""), wt = a(() => I.value || M.value && M.value.trim().length > 0), Rt = a(() => !M.value || M.value.trim().length === 0 ? "component__input--empty" : "");
|
|
3479
|
+
a(() => I.value ? "component__input--active" : "component__input--no-active");
|
|
3480
|
+
const kt = a(() => "6px 10px"), l = a(() => !!(k.value && ie.value)), s = a(() => {
|
|
3488
3481
|
const t = {};
|
|
3489
|
-
|
|
3482
|
+
ue.value && Object.keys(ue.value).forEach((i) => t[`aria-${i}`] = ue.value[i]);
|
|
3490
3483
|
const n = {
|
|
3491
|
-
"aria-label":
|
|
3492
|
-
"aria-disabled":
|
|
3484
|
+
"aria-label": Ce.value,
|
|
3485
|
+
"aria-disabled": R.value,
|
|
3493
3486
|
...t
|
|
3494
3487
|
};
|
|
3495
3488
|
return Object.fromEntries(
|
|
3496
3489
|
Object.entries(n).filter(([r, i]) => i != null)
|
|
3497
3490
|
);
|
|
3498
|
-
}),
|
|
3499
|
-
const t =
|
|
3491
|
+
}), z = a(() => {
|
|
3492
|
+
const t = Se.value === "dark" ? Pe.value : rt.value, n = Se.value === "dark" ? Ae.value : Ke.value;
|
|
3500
3493
|
return t === "transparent" || t === "#transparent" || !t ? n : t;
|
|
3501
|
-
}),
|
|
3502
|
-
const t =
|
|
3494
|
+
}), Q = a(() => {
|
|
3495
|
+
const t = Se.value === "dark" ? lt.value : at.value, n = Se.value === "dark" ? Ae.value : Ke.value;
|
|
3503
3496
|
return t === "transparent" || t === "#transparent" || !t ? n : t;
|
|
3504
|
-
}),
|
|
3505
|
-
const t =
|
|
3497
|
+
}), Kt = a(() => {
|
|
3498
|
+
const t = N.value, n = wt.value, r = n ? t.lightTextColorLabelActive : t.lightTextColorLabel, i = n ? t.darkTextColorLabelActive : t.darkTextColorLabel;
|
|
3506
3499
|
return {
|
|
3507
3500
|
fontFamily: t.fontFamilyLabel,
|
|
3508
3501
|
fontSize: n ? t.fontSizeLabelActive : t.fontSizeLabel,
|
|
@@ -3518,292 +3511,292 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3518
3511
|
};
|
|
3519
3512
|
});
|
|
3520
3513
|
a(() => {
|
|
3521
|
-
const t =
|
|
3514
|
+
const t = N.value;
|
|
3522
3515
|
return t.theme === "dark" ? t.darkTextColorLabelActive : t.lightTextColorLabelActive;
|
|
3523
3516
|
});
|
|
3524
|
-
const
|
|
3525
|
-
|
|
3526
|
-
},
|
|
3527
|
-
|
|
3528
|
-
},
|
|
3529
|
-
|
|
3530
|
-
},
|
|
3531
|
-
|
|
3532
|
-
const t =
|
|
3517
|
+
const Lt = () => {
|
|
3518
|
+
m.value = Be.value, Ye.value = x.value;
|
|
3519
|
+
}, Yt = () => {
|
|
3520
|
+
W("clicked");
|
|
3521
|
+
}, pt = () => {
|
|
3522
|
+
R.value || N.value.inputReadonly || !ke.value || W("entered", m.value);
|
|
3523
|
+
}, bt = () => {
|
|
3524
|
+
b.value && ya(() => {
|
|
3525
|
+
const t = b.value.closest(".nb-wrapper"), n = 4;
|
|
3533
3526
|
if (t) {
|
|
3534
|
-
const r = t.getBoundingClientRect(), i =
|
|
3535
|
-
|
|
3536
|
-
top: `${
|
|
3527
|
+
const r = t.getBoundingClientRect(), i = b.value.getBoundingClientRect(), d = i.bottom - r.top + n, f = i.left - r.left;
|
|
3528
|
+
Xe.value = {
|
|
3529
|
+
top: `${d}px`,
|
|
3537
3530
|
left: `${f}px`
|
|
3538
3531
|
};
|
|
3539
3532
|
} else {
|
|
3540
|
-
const r =
|
|
3541
|
-
|
|
3533
|
+
const r = b.value.getBoundingClientRect(), i = window.scrollY || window.pageYOffset, d = window.scrollX || window.pageXOffset;
|
|
3534
|
+
Xe.value = {
|
|
3542
3535
|
top: `${r.bottom + i + n}px`,
|
|
3543
|
-
left: `${r.left +
|
|
3536
|
+
left: `${r.left + d}px`
|
|
3544
3537
|
};
|
|
3545
3538
|
}
|
|
3546
3539
|
});
|
|
3547
|
-
},
|
|
3540
|
+
}, Mt = a(() => ({
|
|
3548
3541
|
position: "absolute",
|
|
3549
|
-
top:
|
|
3550
|
-
left:
|
|
3542
|
+
top: Xe.value.top,
|
|
3543
|
+
left: Xe.value.left,
|
|
3551
3544
|
zIndex: 1e3
|
|
3552
|
-
})),
|
|
3553
|
-
|
|
3554
|
-
|
|
3545
|
+
})), Qt = () => {
|
|
3546
|
+
I.value = !0, W("focused"), B.value && (j.value = !1, requestAnimationFrame(() => {
|
|
3547
|
+
bt(), j.value = !0;
|
|
3555
3548
|
}));
|
|
3556
|
-
},
|
|
3557
|
-
t.relatedTarget &&
|
|
3549
|
+
}, Xt = (t) => {
|
|
3550
|
+
t.relatedTarget && T.value && T.value.contains(t.relatedTarget) || setTimeout(() => {
|
|
3558
3551
|
var i;
|
|
3559
3552
|
const n = document.activeElement;
|
|
3560
|
-
if (
|
|
3561
|
-
if (
|
|
3553
|
+
if (j.value) {
|
|
3554
|
+
if (T.value && T.value.contains(n) || t.relatedTarget && T.value && T.value.contains(t.relatedTarget))
|
|
3562
3555
|
return;
|
|
3563
|
-
if (n === document.body &&
|
|
3564
|
-
const
|
|
3565
|
-
if (Array.from(
|
|
3556
|
+
if (n === document.body && T.value) {
|
|
3557
|
+
const d = T.value.querySelectorAll('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
3558
|
+
if (Array.from(d).some((v) => v === document.activeElement || v.contains(document.activeElement)))
|
|
3566
3559
|
return;
|
|
3567
3560
|
}
|
|
3568
3561
|
}
|
|
3569
|
-
const r = (i =
|
|
3570
|
-
r && r.contains(n) ||
|
|
3562
|
+
const r = (i = b.value) == null ? void 0 : i.closest(".component");
|
|
3563
|
+
r && r.contains(n) || b.value !== n && (I.value = !1, j.value = !1, W("blurred"));
|
|
3571
3564
|
}, 200);
|
|
3572
|
-
},
|
|
3573
|
-
|
|
3574
|
-
|
|
3565
|
+
}, Jt = () => {
|
|
3566
|
+
B.value && (j.value, j.value = !1, requestAnimationFrame(() => {
|
|
3567
|
+
bt(), j.value = !0;
|
|
3575
3568
|
}));
|
|
3576
|
-
},
|
|
3569
|
+
}, Tt = (t) => {
|
|
3577
3570
|
if (!t || !(t instanceof Date))
|
|
3578
3571
|
return null;
|
|
3579
3572
|
const n = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0");
|
|
3580
3573
|
return `${n}-${r}-${i}`;
|
|
3581
|
-
},
|
|
3574
|
+
}, Zt = (t) => {
|
|
3582
3575
|
let n = "";
|
|
3583
3576
|
if (!t)
|
|
3584
3577
|
n = "";
|
|
3585
|
-
else if (
|
|
3578
|
+
else if (me.value && typeof t == "object" && !(t instanceof Date)) {
|
|
3586
3579
|
if (t.startDate === null && t.endDate === null)
|
|
3587
3580
|
n = "";
|
|
3588
3581
|
else if (t.startDate || t.endDate) {
|
|
3589
3582
|
const i = {
|
|
3590
3583
|
// Converter startDate para string ISO se existir
|
|
3591
|
-
startDate: t.startDate ?
|
|
3584
|
+
startDate: t.startDate ? Tt(t.startDate) : null,
|
|
3592
3585
|
// Converter endDate para string ISO se existir
|
|
3593
|
-
endDate: t.endDate ?
|
|
3586
|
+
endDate: t.endDate ? Tt(t.endDate) : null
|
|
3594
3587
|
};
|
|
3595
3588
|
n = JSON.stringify(i);
|
|
3596
3589
|
}
|
|
3597
3590
|
} else
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
const r = n ?
|
|
3601
|
-
|
|
3602
|
-
},
|
|
3603
|
-
if (!
|
|
3604
|
-
|
|
3591
|
+
x.value === "date" ? t instanceof Date ? n = Tt(t) : typeof t == "string" && (n = t) : (x.value === "month" || x.value === "time" || x.value === "datetime-local" || x.value === "week") && (n = typeof t == "string" ? t : "");
|
|
3592
|
+
u = !0, m.value = n;
|
|
3593
|
+
const r = n ? ce(n, x.value) : "";
|
|
3594
|
+
M.value = r, D.value = r;
|
|
3595
|
+
}, ea = () => {
|
|
3596
|
+
if (!B.value) {
|
|
3597
|
+
m.value = M.value;
|
|
3605
3598
|
return;
|
|
3606
3599
|
}
|
|
3607
|
-
|
|
3608
|
-
const t =
|
|
3609
|
-
start:
|
|
3610
|
-
end:
|
|
3611
|
-
} : null, n =
|
|
3600
|
+
ne = !0;
|
|
3601
|
+
const t = b.value ? {
|
|
3602
|
+
start: b.value.selectionStart,
|
|
3603
|
+
end: b.value.selectionEnd
|
|
3604
|
+
} : null, n = M.value.trim();
|
|
3612
3605
|
if (!n || n.length === 0) {
|
|
3613
|
-
|
|
3614
|
-
|
|
3606
|
+
u = !0, m.value = "", M.value = "", D.value = "", setTimeout(() => {
|
|
3607
|
+
ne = !1;
|
|
3615
3608
|
}, 50);
|
|
3616
3609
|
return;
|
|
3617
3610
|
}
|
|
3618
|
-
if (
|
|
3619
|
-
const i =
|
|
3620
|
-
if (
|
|
3611
|
+
if (x.value === "date") {
|
|
3612
|
+
const i = me.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}$/;
|
|
3613
|
+
if (me.value) {
|
|
3621
3614
|
if (n.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/), n.length > 23 && !i.test(n)) {
|
|
3622
|
-
|
|
3623
|
-
const
|
|
3624
|
-
|
|
3615
|
+
M.value = D.value, t && b.value && ya(() => {
|
|
3616
|
+
const d = Math.min(t.start, D.value.length);
|
|
3617
|
+
b.value.setSelectionRange(d, d);
|
|
3625
3618
|
}), setTimeout(() => {
|
|
3626
|
-
|
|
3619
|
+
ne = !1;
|
|
3627
3620
|
}, 50);
|
|
3628
3621
|
return;
|
|
3629
3622
|
}
|
|
3630
3623
|
if (!i.test(n) && n.length <= 23) {
|
|
3631
3624
|
setTimeout(() => {
|
|
3632
|
-
|
|
3625
|
+
ne = !1;
|
|
3633
3626
|
}, 50);
|
|
3634
3627
|
return;
|
|
3635
3628
|
}
|
|
3636
3629
|
} else {
|
|
3637
3630
|
if (n.length > 10 && !i.test(n)) {
|
|
3638
|
-
|
|
3639
|
-
const
|
|
3640
|
-
|
|
3631
|
+
M.value = D.value, t && b.value && ya(() => {
|
|
3632
|
+
const d = Math.min(t.start, D.value.length);
|
|
3633
|
+
b.value.setSelectionRange(d, d);
|
|
3641
3634
|
}), setTimeout(() => {
|
|
3642
|
-
|
|
3635
|
+
ne = !1;
|
|
3643
3636
|
}, 50);
|
|
3644
3637
|
return;
|
|
3645
3638
|
}
|
|
3646
3639
|
if (!i.test(n) && n.length <= 10) {
|
|
3647
3640
|
setTimeout(() => {
|
|
3648
|
-
|
|
3641
|
+
ne = !1;
|
|
3649
3642
|
}, 50);
|
|
3650
3643
|
return;
|
|
3651
3644
|
}
|
|
3652
3645
|
}
|
|
3653
3646
|
}
|
|
3654
3647
|
let r = null;
|
|
3655
|
-
if (
|
|
3656
|
-
if (
|
|
3648
|
+
if (x.value === "date")
|
|
3649
|
+
if (me.value)
|
|
3657
3650
|
if (n.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*(\d{1,2}\/\d{1,2}\/\d{4})$/))
|
|
3658
|
-
if (r =
|
|
3659
|
-
|
|
3651
|
+
if (r = Qe(n, x.value), r && r !== m.value)
|
|
3652
|
+
u = !0, m.value = r, D.value = n;
|
|
3660
3653
|
else {
|
|
3661
3654
|
setTimeout(() => {
|
|
3662
|
-
|
|
3655
|
+
ne = !1;
|
|
3663
3656
|
}, 50);
|
|
3664
3657
|
return;
|
|
3665
3658
|
}
|
|
3666
3659
|
else if (n.includes("-")) {
|
|
3667
|
-
const
|
|
3668
|
-
if (
|
|
3669
|
-
const f =
|
|
3670
|
-
if (
|
|
3671
|
-
const
|
|
3672
|
-
|
|
3660
|
+
const d = n.match(/^(\d{1,2}\/\d{1,2}\/\d{4})\s*-\s*$/);
|
|
3661
|
+
if (d) {
|
|
3662
|
+
const f = d[1], v = Qe(f, x.value);
|
|
3663
|
+
if (v) {
|
|
3664
|
+
const C = JSON.stringify({ startDate: v, endDate: null });
|
|
3665
|
+
C !== m.value && (u = !0, m.value = C, D.value = n);
|
|
3673
3666
|
} else {
|
|
3674
|
-
|
|
3675
|
-
|
|
3667
|
+
D.value = n, setTimeout(() => {
|
|
3668
|
+
ne = !1;
|
|
3676
3669
|
}, 50);
|
|
3677
3670
|
return;
|
|
3678
3671
|
}
|
|
3679
3672
|
} else {
|
|
3680
|
-
|
|
3681
|
-
|
|
3673
|
+
D.value = n, setTimeout(() => {
|
|
3674
|
+
ne = !1;
|
|
3682
3675
|
}, 50);
|
|
3683
3676
|
return;
|
|
3684
3677
|
}
|
|
3685
3678
|
} else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(n))
|
|
3686
|
-
if (r =
|
|
3679
|
+
if (r = Qe(n, x.value), r) {
|
|
3687
3680
|
const f = JSON.stringify({ startDate: r, endDate: null });
|
|
3688
|
-
f !==
|
|
3681
|
+
f !== m.value && (u = !0, m.value = f, D.value = n);
|
|
3689
3682
|
} else {
|
|
3690
|
-
|
|
3691
|
-
|
|
3683
|
+
D.value = n, setTimeout(() => {
|
|
3684
|
+
ne = !1;
|
|
3692
3685
|
}, 50);
|
|
3693
3686
|
return;
|
|
3694
3687
|
}
|
|
3695
3688
|
else {
|
|
3696
|
-
|
|
3697
|
-
|
|
3689
|
+
D.value = n, setTimeout(() => {
|
|
3690
|
+
ne = !1;
|
|
3698
3691
|
}, 50);
|
|
3699
3692
|
return;
|
|
3700
3693
|
}
|
|
3701
3694
|
else if (/^\d{1,2}\/\d{1,2}\/\d{4}$|^\d{4}-\d{1,2}-\d{1,2}$/.test(n))
|
|
3702
|
-
r =
|
|
3695
|
+
r = Qe(n, x.value), r && r !== m.value && (u = !0, m.value = r, D.value = n);
|
|
3703
3696
|
else {
|
|
3704
3697
|
setTimeout(() => {
|
|
3705
|
-
|
|
3698
|
+
ne = !1;
|
|
3706
3699
|
}, 50);
|
|
3707
3700
|
return;
|
|
3708
3701
|
}
|
|
3709
3702
|
else
|
|
3710
|
-
r =
|
|
3703
|
+
r = Qe(n, x.value), r && r !== m.value && (u = !0, m.value = r, D.value = n);
|
|
3711
3704
|
setTimeout(() => {
|
|
3712
|
-
|
|
3705
|
+
ne = !1;
|
|
3713
3706
|
}, 50);
|
|
3714
|
-
},
|
|
3707
|
+
}, ta = (t) => {
|
|
3715
3708
|
}, zt = (t) => {
|
|
3716
3709
|
var i;
|
|
3717
|
-
if (!
|
|
3710
|
+
if (!j.value || !T.value || !b.value)
|
|
3718
3711
|
return;
|
|
3719
3712
|
const n = t.target;
|
|
3720
|
-
if ((i =
|
|
3713
|
+
if ((i = b.value) == null || i.closest(".nb-wrapper"), T.value && T.value.contains(n) || t.defaultPrevented || t.cancelBubble || T.value && T.value.contains(n))
|
|
3721
3714
|
return;
|
|
3722
3715
|
let r = n;
|
|
3723
3716
|
for (; r && r !== document.body; ) {
|
|
3724
|
-
if (r ===
|
|
3717
|
+
if (r === T.value || T.value && T.value.contains(r))
|
|
3725
3718
|
return;
|
|
3726
3719
|
r = r.parentElement;
|
|
3727
3720
|
}
|
|
3728
3721
|
setTimeout(() => {
|
|
3729
|
-
if (!
|
|
3722
|
+
if (!j.value || !T.value || T.value && T.value.contains(n))
|
|
3730
3723
|
return;
|
|
3731
3724
|
for (r = n; r && r !== document.body; ) {
|
|
3732
|
-
if (r ===
|
|
3725
|
+
if (r === T.value || T.value && T.value.contains(r))
|
|
3733
3726
|
return;
|
|
3734
3727
|
r = r.parentElement;
|
|
3735
3728
|
}
|
|
3736
3729
|
if (!document.body.contains(n))
|
|
3737
3730
|
return;
|
|
3738
|
-
|
|
3731
|
+
b.value && (n === b.value || b.value.contains(n)) || (j.value = !1, (!M.value || M.value.trim().length === 0) && (I.value = !1));
|
|
3739
3732
|
}, 50);
|
|
3740
3733
|
}, Dt = () => {
|
|
3741
|
-
|
|
3734
|
+
j.value && B.value && bt();
|
|
3742
3735
|
}, It = () => {
|
|
3743
|
-
|
|
3736
|
+
j.value && B.value && bt();
|
|
3744
3737
|
};
|
|
3745
|
-
let
|
|
3738
|
+
let st = null, Ct = null, gt = { top: 0, left: 0 };
|
|
3746
3739
|
const Nt = () => {
|
|
3747
|
-
if (!
|
|
3740
|
+
if (!j.value || !B.value || !b.value)
|
|
3748
3741
|
return;
|
|
3749
|
-
const t =
|
|
3742
|
+
const t = b.value.closest(".nb-wrapper"), n = 4;
|
|
3750
3743
|
let r, i;
|
|
3751
3744
|
if (t) {
|
|
3752
|
-
const
|
|
3753
|
-
r = f.bottom -
|
|
3745
|
+
const d = t.getBoundingClientRect(), f = b.value.getBoundingClientRect();
|
|
3746
|
+
r = f.bottom - d.top + n, i = f.left - d.left;
|
|
3754
3747
|
} else {
|
|
3755
|
-
const
|
|
3756
|
-
r =
|
|
3748
|
+
const d = b.value.getBoundingClientRect(), f = window.scrollY || window.pageYOffset, v = window.scrollX || window.pageXOffset;
|
|
3749
|
+
r = d.bottom + f + n, i = d.left + v;
|
|
3757
3750
|
}
|
|
3758
|
-
(
|
|
3751
|
+
(gt.top !== r || gt.left !== i) && (gt.top = r, gt.left = i, Xe.value = {
|
|
3759
3752
|
top: `${r}px`,
|
|
3760
3753
|
left: `${i}px`
|
|
3761
|
-
}),
|
|
3762
|
-
},
|
|
3763
|
-
if (!
|
|
3754
|
+
}), Ct = requestAnimationFrame(Nt);
|
|
3755
|
+
}, aa = () => {
|
|
3756
|
+
if (!b.value || !B.value)
|
|
3764
3757
|
return;
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
}),
|
|
3768
|
-
const t =
|
|
3769
|
-
t &&
|
|
3758
|
+
gt = { top: 0, left: 0 }, Nt(), st = new ResizeObserver(() => {
|
|
3759
|
+
j.value && bt();
|
|
3760
|
+
}), st.observe(b.value);
|
|
3761
|
+
const t = b.value.closest(".component");
|
|
3762
|
+
t && st.observe(t);
|
|
3770
3763
|
}, Wt = () => {
|
|
3771
|
-
|
|
3764
|
+
Ct !== null && (cancelAnimationFrame(Ct), Ct = null), st && (st.disconnect(), st = null);
|
|
3772
3765
|
};
|
|
3773
|
-
|
|
3774
|
-
t &&
|
|
3775
|
-
|
|
3766
|
+
H(j, (t) => {
|
|
3767
|
+
t && B.value ? ya(() => {
|
|
3768
|
+
aa();
|
|
3776
3769
|
}) : Wt();
|
|
3777
|
-
}),
|
|
3778
|
-
|
|
3770
|
+
}), oa(() => {
|
|
3771
|
+
m.value = Be.value, M.value = ce(Be.value, x.value), document.addEventListener("click", zt, !1), window.addEventListener("scroll", Dt, { capture: !0, passive: !0 }), window.addEventListener("resize", It);
|
|
3779
3772
|
}), ma(() => {
|
|
3780
|
-
|
|
3781
|
-
}),
|
|
3782
|
-
|
|
3783
|
-
}, { immediate: !0 }),
|
|
3784
|
-
|
|
3785
|
-
}),
|
|
3786
|
-
if (t !==
|
|
3787
|
-
|
|
3788
|
-
const n =
|
|
3789
|
-
|
|
3773
|
+
Lt(), Wt(), document.removeEventListener("click", zt), window.removeEventListener("scroll", Dt, { capture: !0, passive: !0 }), window.removeEventListener("resize", It);
|
|
3774
|
+
}), H(x, (t) => {
|
|
3775
|
+
Ye.value = t;
|
|
3776
|
+
}, { immediate: !0 }), H(Ge, () => {
|
|
3777
|
+
m.value && B.value && (M.value = ce(m.value, x.value));
|
|
3778
|
+
}), H(Be, (t) => {
|
|
3779
|
+
if (t !== m.value) {
|
|
3780
|
+
m.value = t;
|
|
3781
|
+
const n = ce(t, x.value);
|
|
3782
|
+
M.value = n, D.value = n;
|
|
3790
3783
|
}
|
|
3791
3784
|
}, { immediate: !0 });
|
|
3792
|
-
let
|
|
3793
|
-
const
|
|
3794
|
-
|
|
3795
|
-
|
|
3785
|
+
let ne = !1;
|
|
3786
|
+
const la = () => {
|
|
3787
|
+
ne = !0, setTimeout(() => {
|
|
3788
|
+
ne = !1;
|
|
3796
3789
|
}, 100);
|
|
3797
3790
|
};
|
|
3798
|
-
let
|
|
3799
|
-
return
|
|
3800
|
-
if (
|
|
3801
|
-
const n =
|
|
3802
|
-
n !==
|
|
3791
|
+
let u = !1;
|
|
3792
|
+
return H(() => m.value, (t) => {
|
|
3793
|
+
if (B.value && !u && !ne) {
|
|
3794
|
+
const n = ce(t, x.value);
|
|
3795
|
+
n !== M.value && (M.value = n, D.value = n);
|
|
3803
3796
|
}
|
|
3804
|
-
|
|
3805
|
-
}),
|
|
3806
|
-
if (
|
|
3797
|
+
u = !1;
|
|
3798
|
+
}), H(m, (t) => {
|
|
3799
|
+
if (S.value && (t = t.trim()), me.value && typeof t == "string" && t.startsWith("{"))
|
|
3807
3800
|
try {
|
|
3808
3801
|
const n = JSON.parse(t);
|
|
3809
3802
|
if (n && (n.startDate || n.endDate)) {
|
|
@@ -3811,112 +3804,112 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3811
3804
|
if (!f)
|
|
3812
3805
|
return null;
|
|
3813
3806
|
if (/^\d{4}-\d{2}-\d{2}$/.test(f)) {
|
|
3814
|
-
const [
|
|
3815
|
-
return new Date(
|
|
3807
|
+
const [v, C, A] = f.split("-").map(Number);
|
|
3808
|
+
return new Date(v, C - 1, A);
|
|
3816
3809
|
}
|
|
3817
3810
|
return new Date(f);
|
|
3818
|
-
}, i = n.startDate ? r(n.startDate) : null,
|
|
3819
|
-
|
|
3811
|
+
}, i = n.startDate ? r(n.startDate) : null, d = n.endDate ? r(n.endDate) : null;
|
|
3812
|
+
W("changed", { startDate: i, endDate: d });
|
|
3820
3813
|
return;
|
|
3821
3814
|
}
|
|
3822
3815
|
} catch {
|
|
3823
3816
|
}
|
|
3824
|
-
|
|
3825
|
-
}),
|
|
3826
|
-
|
|
3827
|
-
}),
|
|
3828
|
-
|
|
3829
|
-
}), (t, n) => o(
|
|
3817
|
+
W("changed", t);
|
|
3818
|
+
}), H(I, (t) => {
|
|
3819
|
+
W(t ? "focused" : "blurred");
|
|
3820
|
+
}), H(m, (t) => {
|
|
3821
|
+
S.value && (t = t.trim()), W("current-value", t);
|
|
3822
|
+
}), (t, n) => o(he) ? (F(), q("div", ua({
|
|
3830
3823
|
key: 0,
|
|
3831
|
-
class: ["nb-wrapper",
|
|
3832
|
-
style: [
|
|
3824
|
+
class: ["nb-wrapper", Bt.value],
|
|
3825
|
+
style: [At.value, Je.value, mt.value],
|
|
3833
3826
|
role: "input"
|
|
3834
|
-
},
|
|
3835
|
-
|
|
3836
|
-
id: o(
|
|
3837
|
-
class: Ne(["nb-reset", "component",
|
|
3838
|
-
style: We([
|
|
3839
|
-
onClick:
|
|
3827
|
+
}, s.value), [
|
|
3828
|
+
fe("div", {
|
|
3829
|
+
id: o(he),
|
|
3830
|
+
class: Ne(["nb-reset", "component", qt.value, jt.value, Ht.value, St.value]),
|
|
3831
|
+
style: We([$t.value, Je.value, mt.value]),
|
|
3832
|
+
onClick: Yt
|
|
3840
3833
|
}, [
|
|
3841
|
-
o(
|
|
3834
|
+
o(P) ? (F(), q("label", {
|
|
3842
3835
|
key: 0,
|
|
3843
|
-
for:
|
|
3836
|
+
for: Vt.value,
|
|
3844
3837
|
class: "component__label",
|
|
3845
|
-
style: We([
|
|
3846
|
-
},
|
|
3847
|
-
|
|
3838
|
+
style: We([Kt.value])
|
|
3839
|
+
}, yt(e.label), 13, Wl)) : Ve("", !0),
|
|
3840
|
+
da(fe("input", {
|
|
3848
3841
|
ref_key: "inputRef",
|
|
3849
|
-
ref:
|
|
3850
|
-
"onUpdate:modelValue": n[0] || (n[0] = (r) =>
|
|
3851
|
-
onInput:
|
|
3842
|
+
ref: b,
|
|
3843
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => M.value = r),
|
|
3844
|
+
onInput: ea,
|
|
3852
3845
|
onKeydown: [
|
|
3853
|
-
|
|
3854
|
-
n[1] || (n[1] = Et((r) => !o(
|
|
3846
|
+
la,
|
|
3847
|
+
n[1] || (n[1] = Et((r) => !o(R) && o(ke) && pt(), ["enter"]))
|
|
3855
3848
|
],
|
|
3856
|
-
id:
|
|
3857
|
-
name:
|
|
3858
|
-
type:
|
|
3849
|
+
id: Vt.value,
|
|
3850
|
+
name: Vt.value,
|
|
3851
|
+
type: B.value ? "text" : Ye.value,
|
|
3859
3852
|
class: Ne(["component__input", [
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3853
|
+
Ut.value,
|
|
3854
|
+
Ft.value,
|
|
3855
|
+
Rt.value
|
|
3863
3856
|
]]),
|
|
3864
|
-
placeholder:
|
|
3865
|
-
disabled: o(
|
|
3857
|
+
placeholder: Gt.value,
|
|
3858
|
+
disabled: o(R) || o($),
|
|
3866
3859
|
required: e.required,
|
|
3867
|
-
readonly: o(
|
|
3860
|
+
readonly: o($),
|
|
3868
3861
|
autocomplete: e.inputAutocomplete,
|
|
3869
|
-
min:
|
|
3870
|
-
max:
|
|
3871
|
-
step:
|
|
3872
|
-
tabindex: o(
|
|
3862
|
+
min: B.value ? void 0 : o(et),
|
|
3863
|
+
max: B.value ? void 0 : o(Ue),
|
|
3864
|
+
step: B.value ? void 0 : o(tt),
|
|
3865
|
+
tabindex: o(R) || o($) ? -1 : o(ct),
|
|
3873
3866
|
role: "input",
|
|
3874
|
-
style: We([
|
|
3875
|
-
onFocus:
|
|
3876
|
-
onBlur:
|
|
3877
|
-
onClick:
|
|
3867
|
+
style: We([mt.value]),
|
|
3868
|
+
onFocus: Qt,
|
|
3869
|
+
onBlur: Xt,
|
|
3870
|
+
onClick: Jt
|
|
3878
3871
|
}, null, 46, El), [
|
|
3879
|
-
[
|
|
3872
|
+
[Oa, M.value]
|
|
3880
3873
|
])
|
|
3881
3874
|
], 14, Nl),
|
|
3882
|
-
|
|
3875
|
+
l.value ? (F(), q("div", {
|
|
3883
3876
|
key: 0,
|
|
3884
3877
|
class: Ne(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
3885
3878
|
}, [
|
|
3886
|
-
|
|
3887
|
-
ga(
|
|
3879
|
+
na(t.$slots, "message", {}, () => [
|
|
3880
|
+
ga(yt(e.message), 1)
|
|
3888
3881
|
], !0)
|
|
3889
|
-
], 2)) :
|
|
3890
|
-
|
|
3882
|
+
], 2)) : Ve("", !0),
|
|
3883
|
+
B.value && j.value ? (F(), q("div", {
|
|
3891
3884
|
key: 1,
|
|
3892
3885
|
ref_key: "calendarRef",
|
|
3893
|
-
ref:
|
|
3886
|
+
ref: T,
|
|
3894
3887
|
class: "datepicker__custom-calendar-wrapper",
|
|
3895
|
-
style: We(
|
|
3896
|
-
onClick: n[4] || (n[4] =
|
|
3897
|
-
onMousedown: n[5] || (n[5] =
|
|
3888
|
+
style: We(Mt.value),
|
|
3889
|
+
onClick: n[4] || (n[4] = ra((r) => Re.value = !0, ["stop"])),
|
|
3890
|
+
onMousedown: n[5] || (n[5] = ra((r) => Re.value = !0, ["stop"]))
|
|
3898
3891
|
}, [
|
|
3899
3892
|
ol(o(h), {
|
|
3900
|
-
"nb-id": `${o(
|
|
3901
|
-
value:
|
|
3902
|
-
"input-type": o(
|
|
3903
|
-
min: o(
|
|
3904
|
-
max: o(
|
|
3905
|
-
step: o(
|
|
3906
|
-
disabled: o(
|
|
3893
|
+
"nb-id": `${o(he)}-calendar`,
|
|
3894
|
+
value: L.value,
|
|
3895
|
+
"input-type": o(x),
|
|
3896
|
+
min: o(et),
|
|
3897
|
+
max: o(Ue),
|
|
3898
|
+
step: o(tt),
|
|
3899
|
+
disabled: o(R),
|
|
3907
3900
|
width: 350,
|
|
3908
|
-
locale: o(
|
|
3909
|
-
theme: o(
|
|
3910
|
-
"allow-range": o(
|
|
3911
|
-
onChanged:
|
|
3912
|
-
onDateSelected:
|
|
3913
|
-
onMousedown: n[2] || (n[2] = (r) =>
|
|
3914
|
-
onClick: n[3] || (n[3] = (r) =>
|
|
3901
|
+
locale: o(Ge),
|
|
3902
|
+
theme: o(Se),
|
|
3903
|
+
"allow-range": o(me),
|
|
3904
|
+
onChanged: Zt,
|
|
3905
|
+
onDateSelected: ta,
|
|
3906
|
+
onMousedown: n[2] || (n[2] = (r) => Re.value = !0),
|
|
3907
|
+
onClick: n[3] || (n[3] = (r) => Re.value = !0)
|
|
3915
3908
|
}, null, 8, ["nb-id", "value", "input-type", "min", "max", "step", "disabled", "locale", "theme", "allow-range"])
|
|
3916
|
-
], 36)) :
|
|
3917
|
-
], 16)) :
|
|
3909
|
+
], 36)) : Ve("", !0)
|
|
3910
|
+
], 16)) : Ve("", !0);
|
|
3918
3911
|
}
|
|
3919
|
-
}), Ol = /* @__PURE__ */
|
|
3912
|
+
}), Ol = /* @__PURE__ */ ca(Pl, [["__scopeId", "data-v-037a727a"]]), Wa = {
|
|
3920
3913
|
NbInputRadio: dl,
|
|
3921
3914
|
NbInputCheckbox: bl,
|
|
3922
3915
|
NbInput: kl,
|
|
@@ -3925,9 +3918,9 @@ const Nl = ["id"], Wl = ["for"], El = ["id", "name", "type", "placeholder", "dis
|
|
|
3925
3918
|
NbDatePicker: Ol
|
|
3926
3919
|
}, ql = {
|
|
3927
3920
|
install(e) {
|
|
3928
|
-
for (const
|
|
3929
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3930
|
-
const h =
|
|
3921
|
+
for (const y in Wa)
|
|
3922
|
+
if (Object.prototype.hasOwnProperty.call(Wa, y)) {
|
|
3923
|
+
const h = Wa[y];
|
|
3931
3924
|
e.component(h.name, h);
|
|
3932
3925
|
}
|
|
3933
3926
|
}
|