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