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