@vlalg-nimbus/nb-inputs 7.0.2 → 7.0.3
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 +345 -345
- package/dist/nb-inputs.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/nb-inputs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useCssVars as Ue, onMounted as Qe, ref as X, toRefs as Xe, computed as t, watch as
|
|
1
|
+
import { useCssVars as Ue, onMounted as Qe, ref as X, toRefs as Xe, computed as t, watch as U, openBlock as B, createElementBlock as _, normalizeClass as Y, normalizeStyle as ie, createElementVNode as I, mergeProps as Ye, Fragment as xt, renderList as kt, unref as l, withDirectives as Je, vModelRadio as ya, withKeys as Me, withModifiers as Ke, toDisplayString as je, createCommentVNode as re, vModelCheckbox as ga, onUnmounted as ba, renderSlot as Fe, createTextVNode as Vt, vModelDynamic as ha, vModelText as ma } from "vue";
|
|
2
2
|
const Ze = (e, r) => {
|
|
3
3
|
const i = e.__vccOpts || e;
|
|
4
|
-
for (const [
|
|
5
|
-
i[
|
|
4
|
+
for (const [L, g] of r)
|
|
5
|
+
i[L] = g;
|
|
6
6
|
return i;
|
|
7
7
|
}, Ca = ["id"], Va = ["id", "disabled", "value", "name"], Sa = ["for", "tabindex"], xa = /* @__PURE__ */ Object.assign({
|
|
8
8
|
name: "NbInputRadio",
|
|
@@ -58,8 +58,8 @@ const Ze = (e, r) => {
|
|
|
58
58
|
return !1;
|
|
59
59
|
let r = !1;
|
|
60
60
|
for (const i of e) {
|
|
61
|
-
const
|
|
62
|
-
|
|
61
|
+
const L = Object.keys(i);
|
|
62
|
+
L.length !== 2 && (r = !0), L.every((j) => ["value", "text"].includes(j)) || (r = !0);
|
|
63
63
|
}
|
|
64
64
|
if (!r)
|
|
65
65
|
return e;
|
|
@@ -153,58 +153,58 @@ const Ze = (e, r) => {
|
|
|
153
153
|
emits: ["current-value", "changed", "clicked"],
|
|
154
154
|
setup(e, { emit: r }) {
|
|
155
155
|
Ue((u) => ({
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
"
|
|
156
|
+
"63057c4e": de.value,
|
|
157
|
+
"6d2148c5": Be.value,
|
|
158
|
+
"73ed536a": ke.value,
|
|
159
|
+
"0bccd482": Ce.value,
|
|
160
|
+
"0af040e8": me.value,
|
|
161
|
+
e60e51f2: be.value,
|
|
162
|
+
"16d82e98": he.value,
|
|
163
|
+
c61d13e0: xe.value,
|
|
164
|
+
"134eb614": Le.value,
|
|
165
|
+
f7e68d8e: Ve.value,
|
|
166
|
+
"1444b3e6": Se.value
|
|
167
167
|
})), Qe(() => {
|
|
168
168
|
ce();
|
|
169
169
|
});
|
|
170
|
-
const i = r,
|
|
171
|
-
ariaLabel:
|
|
172
|
-
ariaAttrs:
|
|
173
|
-
currentOption:
|
|
174
|
-
valueType:
|
|
175
|
-
display:
|
|
176
|
-
options:
|
|
170
|
+
const i = r, L = e, g = X(null), {
|
|
171
|
+
ariaLabel: j,
|
|
172
|
+
ariaAttrs: T,
|
|
173
|
+
currentOption: z,
|
|
174
|
+
valueType: J,
|
|
175
|
+
display: A,
|
|
176
|
+
options: P,
|
|
177
177
|
theme: te,
|
|
178
|
-
lightTextColor:
|
|
179
|
-
lightColor:
|
|
180
|
-
lightColorHover:
|
|
181
|
-
darkTextColor:
|
|
182
|
-
darkColor:
|
|
183
|
-
darkColorHover:
|
|
178
|
+
lightTextColor: q,
|
|
179
|
+
lightColor: C,
|
|
180
|
+
lightColorHover: M,
|
|
181
|
+
darkTextColor: G,
|
|
182
|
+
darkColor: V,
|
|
183
|
+
darkColorHover: E,
|
|
184
184
|
hoverEffect: Q,
|
|
185
185
|
activeHoverEffect: ae,
|
|
186
|
-
itemGap:
|
|
187
|
-
internalGap:
|
|
188
|
-
scale:
|
|
189
|
-
disabled:
|
|
186
|
+
itemGap: w,
|
|
187
|
+
internalGap: O,
|
|
188
|
+
scale: S,
|
|
189
|
+
disabled: N,
|
|
190
190
|
fontFamily: le,
|
|
191
|
-
fontSize:
|
|
192
|
-
fontWeight:
|
|
193
|
-
} = Xe(
|
|
194
|
-
const u =
|
|
191
|
+
fontSize: W,
|
|
192
|
+
fontWeight: R
|
|
193
|
+
} = Xe(L), y = t(() => {
|
|
194
|
+
const u = N.value ? "component-disabled" : "", c = A.value !== "b" ? "inline-block" : "block", H = le.value ? le.value : "'Lato', sans-serif", b = W.value ? W.value : "1.6em", $ = R.value !== 0 && !R.value || R.value < 0 ? 200 : R.value, fe = [!1, !0].includes(Q.value) ? Q.value : !1, k = [!1, !0].includes(ae.value) ? ae.value : !1, ue = w.value !== 0 && !w.value || w.value < 0 ? 15 : w.value, o = O.value !== 0 && !O.value || O.value < 0 ? 6 : O.value, s = S.value !== 0 && !S.value || S.value < 0 ? 1 : S.value;
|
|
195
195
|
return {
|
|
196
196
|
disabled: u,
|
|
197
197
|
display: c,
|
|
198
198
|
hoverEffect: fe,
|
|
199
|
-
activeHoverEffect:
|
|
199
|
+
activeHoverEffect: k,
|
|
200
200
|
itemGap: ue,
|
|
201
201
|
internalGap: o,
|
|
202
202
|
scale: s,
|
|
203
|
-
font:
|
|
203
|
+
font: H,
|
|
204
204
|
fontSize: b,
|
|
205
|
-
fontWeight:
|
|
205
|
+
fontWeight: $
|
|
206
206
|
};
|
|
207
|
-
}),
|
|
207
|
+
}), x = t(() => y.value.disabled), f = t(() => ({
|
|
208
208
|
display: y.value.display
|
|
209
209
|
})), se = t(() => y.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), oe = t(() => {
|
|
210
210
|
const u = y.value;
|
|
@@ -212,7 +212,7 @@ const Ze = (e, r) => {
|
|
|
212
212
|
fontSize: u.fontSize,
|
|
213
213
|
fontWeight: u.fontWeight
|
|
214
214
|
};
|
|
215
|
-
}), ge = t(() => Array.isArray(
|
|
215
|
+
}), ge = t(() => Array.isArray(P.value) && P.value.constructor === Array && P.value.length > 0), ne = t(() => te.value === "dark" ? "component__theme--dark" : "component__theme--light"), de = t(() => y.value.font), be = t(() => q.value), he = t(() => C.value), me = t(() => y.value.hoverEffect ? M.value : C.value), Ce = t(() => y.value.activeHoverEffect ? M.value : C.value), Ve = t(() => G.value), Se = t(() => V.value), Le = t(() => y.value.hoverEffect ? E.value : V.value), xe = t(() => y.value.activeHoverEffect ? E.value : V.value), ke = t(() => {
|
|
216
216
|
const c = y.value.internalGap;
|
|
217
217
|
return !c || c < 0 ? 0 : `${c}px`;
|
|
218
218
|
}), Be = t(() => {
|
|
@@ -222,71 +222,71 @@ const Ze = (e, r) => {
|
|
|
222
222
|
zoom: y.value.scale
|
|
223
223
|
})), Ie = t(() => {
|
|
224
224
|
const u = {};
|
|
225
|
-
|
|
225
|
+
T.value && Object.keys(T.value).forEach((b) => u[`aria-${b}`] = T.value[b]);
|
|
226
226
|
const c = {
|
|
227
|
-
"aria-label":
|
|
228
|
-
"aria-disabled":
|
|
227
|
+
"aria-label": j.value,
|
|
228
|
+
"aria-disabled": N.value,
|
|
229
229
|
...u
|
|
230
230
|
};
|
|
231
231
|
return Object.fromEntries(
|
|
232
|
-
Object.entries(c).filter(([
|
|
232
|
+
Object.entries(c).filter(([H, b]) => b != null)
|
|
233
233
|
);
|
|
234
234
|
}), ce = () => {
|
|
235
|
-
const u =
|
|
236
|
-
u && ["string"].includes(
|
|
235
|
+
const u = z.value;
|
|
236
|
+
u && ["string"].includes(J.value) ? g.value = u.toString().toLowerCase() : g.value = u;
|
|
237
237
|
}, Te = () => {
|
|
238
238
|
i("clicked");
|
|
239
239
|
};
|
|
240
|
-
return
|
|
240
|
+
return U(z, (u, c) => {
|
|
241
241
|
u !== c && ce();
|
|
242
|
-
}),
|
|
242
|
+
}), U(g, (u, c) => {
|
|
243
243
|
u !== c && (i("current-value", u), i("changed", u));
|
|
244
|
-
}), (u, c) => e.nbId && ge.value ? (
|
|
244
|
+
}), (u, c) => e.nbId && ge.value ? (B(), _("div", {
|
|
245
245
|
key: 0,
|
|
246
|
-
class: Y(["nb-wrapper",
|
|
246
|
+
class: Y(["nb-wrapper", x.value]),
|
|
247
247
|
style: ie([f.value, _e.value])
|
|
248
248
|
}, [
|
|
249
|
-
|
|
249
|
+
I("div", Ye({
|
|
250
250
|
id: e.nbId,
|
|
251
251
|
role: "radiogroup"
|
|
252
252
|
}, Ie.value, {
|
|
253
253
|
class: ["nb-reset", "component", se.value, ne.value]
|
|
254
254
|
}), [
|
|
255
|
-
(
|
|
255
|
+
(B(!0), _(xt, null, kt(l(P), (H, b) => (B(), _("div", {
|
|
256
256
|
key: b,
|
|
257
257
|
class: "component-radio__item"
|
|
258
258
|
}, [
|
|
259
|
-
Je(
|
|
260
|
-
id: `${e.nbId}-${
|
|
261
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
259
|
+
Je(I("input", {
|
|
260
|
+
id: `${e.nbId}-${H.value}`,
|
|
261
|
+
"onUpdate:modelValue": c[0] || (c[0] = ($) => g.value = $),
|
|
262
262
|
type: "radio",
|
|
263
263
|
class: "component-radio__item--input",
|
|
264
|
-
disabled: l(
|
|
265
|
-
value:
|
|
264
|
+
disabled: l(N),
|
|
265
|
+
value: H.value,
|
|
266
266
|
name: e.groupName,
|
|
267
267
|
onClick: Te
|
|
268
268
|
}, null, 8, Va), [
|
|
269
269
|
[ya, g.value]
|
|
270
270
|
]),
|
|
271
|
-
|
|
272
|
-
for: `${e.nbId}-${
|
|
273
|
-
tabindex: l(
|
|
271
|
+
I("label", {
|
|
272
|
+
for: `${e.nbId}-${H.value}`,
|
|
273
|
+
tabindex: l(N) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[b] : e.tabIndex >= 0 ? e.tabIndex : b + 1,
|
|
274
274
|
class: "component-radio__item--label",
|
|
275
275
|
onKeydown: [
|
|
276
|
-
c[1] || (c[1] = Me(Ke((
|
|
277
|
-
c[2] || (c[2] = Me(Ke((
|
|
276
|
+
c[1] || (c[1] = Me(Ke(($) => !l(N) && e.hasTabIndexEnter && $.target.click(), ["prevent"]), ["enter"])),
|
|
277
|
+
c[2] || (c[2] = Me(Ke(($) => !l(N) && e.hasTabIndexSpace && $.target.click(), ["prevent"]), ["space"]))
|
|
278
278
|
]
|
|
279
279
|
}, [
|
|
280
|
-
c[3] || (c[3] =
|
|
281
|
-
|
|
280
|
+
c[3] || (c[3] = I("div", null, null, -1)),
|
|
281
|
+
I("span", {
|
|
282
282
|
style: ie([oe.value])
|
|
283
|
-
}, je(
|
|
283
|
+
}, je(H.text), 5)
|
|
284
284
|
], 40, Sa)
|
|
285
285
|
]))), 128))
|
|
286
286
|
], 16, Ca)
|
|
287
287
|
], 6)) : re("", !0);
|
|
288
288
|
}
|
|
289
|
-
}), ka = /* @__PURE__ */ Ze(xa, [["__scopeId", "data-v-
|
|
289
|
+
}), ka = /* @__PURE__ */ Ze(xa, [["__scopeId", "data-v-01a4e4c4"]]);
|
|
290
290
|
const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabindex"], Ta = /* @__PURE__ */ Object.assign({
|
|
291
291
|
name: "NbInputCheckbox",
|
|
292
292
|
inheritAttrs: !1
|
|
@@ -341,8 +341,8 @@ const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabin
|
|
|
341
341
|
return !1;
|
|
342
342
|
let r = !1;
|
|
343
343
|
for (const i of e) {
|
|
344
|
-
const
|
|
345
|
-
|
|
344
|
+
const L = Object.keys(i);
|
|
345
|
+
L.length !== 2 && (r = !0), L.every((j) => ["value", "text"].includes(j)) || (r = !0);
|
|
346
346
|
}
|
|
347
347
|
if (!r)
|
|
348
348
|
return e;
|
|
@@ -449,64 +449,64 @@ const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabin
|
|
|
449
449
|
emits: ["current-value", "changed", "clicked"],
|
|
450
450
|
setup(e, { emit: r }) {
|
|
451
451
|
Ue((o) => ({
|
|
452
|
-
"
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
"
|
|
458
|
-
"
|
|
459
|
-
"
|
|
460
|
-
|
|
461
|
-
"
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
"
|
|
466
|
-
"
|
|
452
|
+
"3da3c754": he.value,
|
|
453
|
+
a292c67c: H.value,
|
|
454
|
+
af8fd636: c.value,
|
|
455
|
+
fae33e32: u.value,
|
|
456
|
+
"7136033f": Se.value,
|
|
457
|
+
"70c2fd36": Ve.value,
|
|
458
|
+
"16c426a4": Le.value,
|
|
459
|
+
"5c748e17": Ce.value,
|
|
460
|
+
"1f7212ea": me.value,
|
|
461
|
+
"30d23ab4": Te.value,
|
|
462
|
+
af0e089a: _e.value,
|
|
463
|
+
ee5c3e4e: Be.value,
|
|
464
|
+
edaa5bd0: Ie.value,
|
|
465
|
+
"024f53ba": ke.value,
|
|
466
|
+
"494a1614": xe.value
|
|
467
467
|
})), Qe(() => {
|
|
468
|
-
|
|
468
|
+
k();
|
|
469
469
|
});
|
|
470
|
-
const i = r,
|
|
471
|
-
ariaLabel:
|
|
472
|
-
ariaAttrs:
|
|
473
|
-
currentOption:
|
|
474
|
-
display:
|
|
475
|
-
options:
|
|
476
|
-
theme:
|
|
470
|
+
const i = r, L = e, g = X(null), {
|
|
471
|
+
ariaLabel: j,
|
|
472
|
+
ariaAttrs: T,
|
|
473
|
+
currentOption: z,
|
|
474
|
+
display: J,
|
|
475
|
+
options: A,
|
|
476
|
+
theme: P,
|
|
477
477
|
lightTextColor: te,
|
|
478
|
-
lightColor:
|
|
479
|
-
lightColorHover:
|
|
480
|
-
darkTextColor:
|
|
481
|
-
darkColor:
|
|
482
|
-
darkColorHover:
|
|
483
|
-
boxRadius:
|
|
478
|
+
lightColor: q,
|
|
479
|
+
lightColorHover: C,
|
|
480
|
+
darkTextColor: M,
|
|
481
|
+
darkColor: G,
|
|
482
|
+
darkColorHover: V,
|
|
483
|
+
boxRadius: E,
|
|
484
484
|
hoverEffect: Q,
|
|
485
485
|
activeHoverEffect: ae,
|
|
486
|
-
itemGap:
|
|
487
|
-
internalGap:
|
|
488
|
-
scale:
|
|
489
|
-
type:
|
|
486
|
+
itemGap: w,
|
|
487
|
+
internalGap: O,
|
|
488
|
+
scale: S,
|
|
489
|
+
type: N,
|
|
490
490
|
background: le,
|
|
491
|
-
disabled:
|
|
492
|
-
fontFamily:
|
|
491
|
+
disabled: W,
|
|
492
|
+
fontFamily: R,
|
|
493
493
|
fontSize: y,
|
|
494
|
-
fontWeight:
|
|
495
|
-
} = Xe(
|
|
496
|
-
const o =
|
|
494
|
+
fontWeight: x
|
|
495
|
+
} = Xe(L), f = t(() => {
|
|
496
|
+
const o = W.value ? "component-disabled" : "", s = J.value !== "b" ? "inline-block" : "block", K = R.value ? R.value : "'Lato', sans-serif", m = y.value ? y.value : "1.6em", p = x.value !== 0 && !x.value || x.value < 0 ? 200 : x.value, ve = E.value !== 0 && !E.value || E.value < 0 ? 0 : E.value, D = [!1, !0].includes(Q.value) ? Q.value : !1, Ne = [!1, !0].includes(ae.value) ? ae.value : !1, Re = w.value !== 0 && !w.value || w.value < 0 ? 15 : w.value, $e = O.value !== 0 && !O.value || O.value < 0 ? 6 : O.value, Oe = ["box", "circle"].includes(N.value) ? N.value : "box", We = S.value !== 0 && !S.value || S.value < 0 ? 1 : S.value, Ae = [!1, !0].includes(le.value) ? le.value : !1;
|
|
497
497
|
return {
|
|
498
498
|
disabled: o,
|
|
499
499
|
display: s,
|
|
500
500
|
boxRadius: ve,
|
|
501
|
-
hoverEffect:
|
|
501
|
+
hoverEffect: D,
|
|
502
502
|
activeHoverEffect: Ne,
|
|
503
503
|
itemGap: Re,
|
|
504
504
|
internalGap: $e,
|
|
505
505
|
scale: We,
|
|
506
506
|
type: Oe,
|
|
507
|
-
font:
|
|
507
|
+
font: K,
|
|
508
508
|
background: Ae,
|
|
509
|
-
fontSize:
|
|
509
|
+
fontSize: m,
|
|
510
510
|
fontWeight: p
|
|
511
511
|
};
|
|
512
512
|
}), se = t(() => f.value.disabled), oe = t(() => ({
|
|
@@ -517,14 +517,14 @@ const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabin
|
|
|
517
517
|
fontSize: o.fontSize,
|
|
518
518
|
fontWeight: o.fontWeight
|
|
519
519
|
};
|
|
520
|
-
}), de = t(() => Array.isArray(
|
|
520
|
+
}), de = t(() => Array.isArray(A.value) && A.value.constructor === Array && A.value.length > 0), be = t(() => P.value === "dark" ? "component__theme--dark" : "component__theme--light"), he = t(() => f.value.font), me = t(() => te.value), Ce = t(() => q.value), Ve = t(() => f.value.hoverEffect ? C.value : q.value), Se = t(() => f.value.activeHoverEffect ? C.value : q.value), Le = t(() => {
|
|
521
521
|
const o = f.value;
|
|
522
|
-
return o.activeHoverEffect && o.background ? `${
|
|
523
|
-
}), xe = t(() =>
|
|
522
|
+
return o.activeHoverEffect && o.background ? `${C.value}80` : C.value;
|
|
523
|
+
}), xe = t(() => M.value), ke = t(() => G.value), Be = t(() => f.value.hoverEffect ? V.value : G.value), _e = t(() => f.value.activeHoverEffect ? V.value : G.value), Ie = t(() => {
|
|
524
524
|
const o = f.value;
|
|
525
|
-
return o.activeHoverEffect && o.background ? `${
|
|
525
|
+
return o.activeHoverEffect && o.background ? `${V.value}80` : V.value;
|
|
526
526
|
}), ce = t(() => f.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), Te = t(() => {
|
|
527
|
-
const o = f.value, s =
|
|
527
|
+
const o = f.value, s = P.value === "dark" ? M.value : te.value;
|
|
528
528
|
return o.background ? "#ffffff" : s;
|
|
529
529
|
});
|
|
530
530
|
t(() => f.value.background ? "19px" : "auto");
|
|
@@ -534,79 +534,79 @@ const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabin
|
|
|
534
534
|
}), c = t(() => {
|
|
535
535
|
const o = f.value;
|
|
536
536
|
return `${o.boxRadius > 7 ? 7 : o.boxRadius}px`;
|
|
537
|
-
}),
|
|
537
|
+
}), H = t(() => {
|
|
538
538
|
const s = f.value.itemGap;
|
|
539
539
|
return !s || s < 0 ? 0 : `${s}px`;
|
|
540
|
-
}), b = t(() => f.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""),
|
|
540
|
+
}), b = t(() => f.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), $ = t(() => ({
|
|
541
541
|
zoom: f.value.scale
|
|
542
542
|
})), fe = t(() => {
|
|
543
543
|
const o = {};
|
|
544
|
-
|
|
544
|
+
T.value && Object.keys(T.value).forEach((m) => o[`aria-${m}`] = T.value[m]);
|
|
545
545
|
const s = {
|
|
546
|
-
"aria-label":
|
|
547
|
-
"aria-disabled":
|
|
546
|
+
"aria-label": j.value,
|
|
547
|
+
"aria-disabled": W.value,
|
|
548
548
|
...o
|
|
549
549
|
};
|
|
550
550
|
return Object.fromEntries(
|
|
551
|
-
Object.entries(s).filter(([
|
|
551
|
+
Object.entries(s).filter(([K, m]) => m != null)
|
|
552
552
|
);
|
|
553
|
-
}),
|
|
554
|
-
g.value =
|
|
553
|
+
}), k = () => {
|
|
554
|
+
g.value = z.value;
|
|
555
555
|
}, ue = () => {
|
|
556
556
|
i("clicked");
|
|
557
557
|
};
|
|
558
|
-
return
|
|
559
|
-
o !== s &&
|
|
560
|
-
}),
|
|
558
|
+
return U(z, (o, s) => {
|
|
559
|
+
o !== s && k();
|
|
560
|
+
}), U(g, (o, s) => {
|
|
561
561
|
o !== s && (i("current-value", o), i("changed", o));
|
|
562
|
-
}), (o, s) => e.nbId && de.value ? (
|
|
562
|
+
}), (o, s) => e.nbId && de.value ? (B(), _("div", {
|
|
563
563
|
key: 0,
|
|
564
564
|
class: Y(["nb-wrapper", se.value]),
|
|
565
|
-
style: ie([oe.value,
|
|
565
|
+
style: ie([oe.value, $.value])
|
|
566
566
|
}, [
|
|
567
|
-
|
|
567
|
+
I("div", Ye({
|
|
568
568
|
id: e.nbId,
|
|
569
569
|
role: "group"
|
|
570
570
|
}, fe.value, {
|
|
571
571
|
class: ["nb-reset", "component", ge.value, be.value]
|
|
572
572
|
}), [
|
|
573
|
-
(
|
|
574
|
-
key:
|
|
573
|
+
(B(!0), _(xt, null, kt(l(A), (K, m) => (B(), _("div", {
|
|
574
|
+
key: m,
|
|
575
575
|
class: "component-checkbox__item"
|
|
576
576
|
}, [
|
|
577
|
-
Je(
|
|
578
|
-
id: `${e.nbId}-${
|
|
577
|
+
Je(I("input", {
|
|
578
|
+
id: `${e.nbId}-${K.value}`,
|
|
579
579
|
"onUpdate:modelValue": s[0] || (s[0] = (p) => g.value = p),
|
|
580
580
|
type: "checkbox",
|
|
581
581
|
class: "component-checkbox__item--input",
|
|
582
|
-
disabled: l(
|
|
583
|
-
value:
|
|
582
|
+
disabled: l(W),
|
|
583
|
+
value: K.value,
|
|
584
584
|
name: e.groupName,
|
|
585
585
|
onClick: ue
|
|
586
586
|
}, null, 8, _a), [
|
|
587
587
|
[ga, g.value]
|
|
588
588
|
]),
|
|
589
|
-
|
|
590
|
-
for: `${e.nbId}-${
|
|
589
|
+
I("label", {
|
|
590
|
+
for: `${e.nbId}-${K.value}`,
|
|
591
591
|
class: Y([[b.value], "component-checkbox__item--label"]),
|
|
592
|
-
tabindex: l(
|
|
592
|
+
tabindex: l(W) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[m] : e.tabIndex >= 0 ? e.tabIndex : m + 1,
|
|
593
593
|
onKeydown: [
|
|
594
|
-
s[1] || (s[1] = Me(Ke((p) => !l(
|
|
595
|
-
s[2] || (s[2] = Me(Ke((p) => !l(
|
|
594
|
+
s[1] || (s[1] = Me(Ke((p) => !l(W) && e.hasTabIndexEnter && p.target.click(), ["prevent"]), ["enter"])),
|
|
595
|
+
s[2] || (s[2] = Me(Ke((p) => !l(W) && e.hasTabIndexSpace && p.target.click(), ["prevent"]), ["space"]))
|
|
596
596
|
]
|
|
597
597
|
}, [
|
|
598
|
-
|
|
598
|
+
I("div", {
|
|
599
599
|
class: Y([ce.value])
|
|
600
600
|
}, null, 2),
|
|
601
|
-
|
|
601
|
+
I("span", {
|
|
602
602
|
style: ie([ne.value])
|
|
603
|
-
}, je(
|
|
603
|
+
}, je(K.text), 5)
|
|
604
604
|
], 42, Ia)
|
|
605
605
|
]))), 128))
|
|
606
606
|
], 16, Ba)
|
|
607
607
|
], 6)) : re("", !0);
|
|
608
608
|
}
|
|
609
|
-
}), Aa = /* @__PURE__ */ Ze(Ta, [["__scopeId", "data-v-
|
|
609
|
+
}), Aa = /* @__PURE__ */ Ze(Ta, [["__scopeId", "data-v-9de547d7"]]);
|
|
610
610
|
const Ea = ["id"], wa = {
|
|
611
611
|
class: /* @__PURE__ */ Y(["component__eye-icon", "fas"])
|
|
612
612
|
}, Da = { key: 0 }, La = { key: 1 }, Na = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex"], Ra = ["for"], $a = /* @__PURE__ */ Object.assign({
|
|
@@ -960,74 +960,74 @@ const Ea = ["id"], wa = {
|
|
|
960
960
|
],
|
|
961
961
|
setup(e, { emit: r }) {
|
|
962
962
|
Ue((a) => ({
|
|
963
|
-
"
|
|
964
|
-
"
|
|
965
|
-
"
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
"
|
|
969
|
-
"
|
|
970
|
-
|
|
971
|
-
"
|
|
972
|
-
"
|
|
973
|
-
"
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
"
|
|
979
|
-
"
|
|
980
|
-
"
|
|
981
|
-
|
|
982
|
-
"
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
"
|
|
986
|
-
"
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
"
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
"
|
|
993
|
-
"
|
|
994
|
-
"
|
|
995
|
-
"
|
|
996
|
-
|
|
997
|
-
"
|
|
998
|
-
|
|
999
|
-
"
|
|
963
|
+
"25f791c3": lt.value,
|
|
964
|
+
"3d5c00a6": Pe.value,
|
|
965
|
+
"84e89398": l(ke),
|
|
966
|
+
f2f5a786: n.value,
|
|
967
|
+
dc59d062: h.value,
|
|
968
|
+
"006a87a7": F.value,
|
|
969
|
+
"0d8a7f28": l(u),
|
|
970
|
+
fbddcb1a: l(ve),
|
|
971
|
+
"3b2c30d3": l(c),
|
|
972
|
+
"3489fa7f": l(We),
|
|
973
|
+
"7dd8fc90": l(Te),
|
|
974
|
+
b903a192: l(Ie),
|
|
975
|
+
b82bd5c6: l(ce),
|
|
976
|
+
ff8e3f30: At.value,
|
|
977
|
+
a7168458: l(Be),
|
|
978
|
+
"2469a938": l(_e),
|
|
979
|
+
"4f809d0d": l(p),
|
|
980
|
+
"737f3c0b": l(H),
|
|
981
|
+
a160bcce: l(Oe),
|
|
982
|
+
"9811fd00": l(xe),
|
|
983
|
+
"694bf26f": l(Se),
|
|
984
|
+
"0d768e55": l(Le),
|
|
985
|
+
"6a98859c": l(Ce),
|
|
986
|
+
"7735009c": l(Ve),
|
|
987
|
+
b7e1fae0: Bt.value,
|
|
988
|
+
"5c5f065b": It.value,
|
|
989
|
+
"67536bb8": Tt.value,
|
|
990
|
+
ec1de058: Et.value,
|
|
991
|
+
ab1b6c12: Ct.value,
|
|
992
|
+
"4cd94e38": l(b),
|
|
993
|
+
"362fd65b": bt.value,
|
|
994
|
+
"6587d678": ot.value,
|
|
995
|
+
"7d815303": nt.value,
|
|
996
|
+
e9061d28: ut.value,
|
|
997
|
+
"4faa4b74": qe.value,
|
|
998
|
+
48298054: a.styleButtonColor,
|
|
999
|
+
"8fff680e": rt.value
|
|
1000
1000
|
})), Qe(() => {
|
|
1001
|
-
|
|
1001
|
+
Z.value = ne.value;
|
|
1002
1002
|
}), ba(() => {
|
|
1003
1003
|
Dt();
|
|
1004
1004
|
});
|
|
1005
|
-
const i = r,
|
|
1005
|
+
const i = r, L = e, {
|
|
1006
1006
|
display: g,
|
|
1007
|
-
hasTabIndexEnter:
|
|
1008
|
-
ariaLabel:
|
|
1009
|
-
ariaAttrs:
|
|
1010
|
-
textColor:
|
|
1011
|
-
caretColor:
|
|
1012
|
-
selectionBgColor:
|
|
1007
|
+
hasTabIndexEnter: j,
|
|
1008
|
+
ariaLabel: T,
|
|
1009
|
+
ariaAttrs: z,
|
|
1010
|
+
textColor: J,
|
|
1011
|
+
caretColor: A,
|
|
1012
|
+
selectionBgColor: P,
|
|
1013
1013
|
selectionTextColor: te,
|
|
1014
|
-
hasBorderRadius:
|
|
1015
|
-
borderRadius:
|
|
1016
|
-
disabled:
|
|
1017
|
-
fontFamily:
|
|
1018
|
-
fontSize:
|
|
1019
|
-
fontWeight:
|
|
1014
|
+
hasBorderRadius: q,
|
|
1015
|
+
borderRadius: C,
|
|
1016
|
+
disabled: M,
|
|
1017
|
+
fontFamily: G,
|
|
1018
|
+
fontSize: V,
|
|
1019
|
+
fontWeight: E,
|
|
1020
1020
|
fontFamilyMsg: Q,
|
|
1021
1021
|
fontSizeMsg: ae,
|
|
1022
|
-
fontWeightMsg:
|
|
1023
|
-
textMessageColor:
|
|
1024
|
-
inputWidth:
|
|
1025
|
-
inputStyle:
|
|
1022
|
+
fontWeightMsg: w,
|
|
1023
|
+
textMessageColor: O,
|
|
1024
|
+
inputWidth: S,
|
|
1025
|
+
inputStyle: N,
|
|
1026
1026
|
activeTextStyle: le,
|
|
1027
|
-
sizeMediaQuery:
|
|
1028
|
-
inputReadonly:
|
|
1027
|
+
sizeMediaQuery: W,
|
|
1028
|
+
inputReadonly: R,
|
|
1029
1029
|
showInputEye: y,
|
|
1030
|
-
inputType:
|
|
1030
|
+
inputType: x,
|
|
1031
1031
|
hasTrim: f,
|
|
1032
1032
|
inputUppercase: se,
|
|
1033
1033
|
inputName: oe,
|
|
@@ -1050,19 +1050,19 @@ const Ea = ["id"], wa = {
|
|
|
1050
1050
|
darkDisabledBgColor: Te,
|
|
1051
1051
|
darkTextColor: u,
|
|
1052
1052
|
darkDisabledEyeBgColor: c,
|
|
1053
|
-
lightDisabledEyeBgColor:
|
|
1053
|
+
lightDisabledEyeBgColor: H,
|
|
1054
1054
|
textAlign: b,
|
|
1055
|
-
showMsg:
|
|
1055
|
+
showMsg: $,
|
|
1056
1056
|
hasMsg: fe,
|
|
1057
|
-
hasIcon:
|
|
1057
|
+
hasIcon: k,
|
|
1058
1058
|
iconDirection: ue,
|
|
1059
1059
|
iconPadding: o,
|
|
1060
1060
|
iconPaddingInput: s,
|
|
1061
|
-
iconMargin:
|
|
1062
|
-
iconBorderRadius:
|
|
1061
|
+
iconMargin: K,
|
|
1062
|
+
iconBorderRadius: m,
|
|
1063
1063
|
iconLightTextColor: p,
|
|
1064
1064
|
iconDarkTextColor: ve,
|
|
1065
|
-
iconLightBgColor:
|
|
1065
|
+
iconLightBgColor: D,
|
|
1066
1066
|
iconDarkBgColor: Ne,
|
|
1067
1067
|
iconLightBgColorActive: Re,
|
|
1068
1068
|
iconDarkBgColorActive: $e,
|
|
@@ -1070,8 +1070,8 @@ const Ea = ["id"], wa = {
|
|
|
1070
1070
|
iconDarkDisabledBgColor: We,
|
|
1071
1071
|
iconWidth: Ae,
|
|
1072
1072
|
iconSize: He
|
|
1073
|
-
} = Xe(
|
|
1074
|
-
const a =
|
|
1073
|
+
} = Xe(L), Z = X(""), Ee = X(""), pe = X(!1), we = X(!1), d = t(() => {
|
|
1074
|
+
const a = M.value ? "component-disabled" : "", v = g.value !== "b" ? "inline-block" : "block", ye = J ? J.value : "ffffff", De = A.value ? A.value : "", $t = P.value ? P.value : "", zt = te.value ? te.value : "", Mt = q.value ? q.value : !1, Ot = C.value !== 0 && !C.value || C.value < 0 ? 0 : C.value, Wt = G.value ? G.value : "'Lato', sans-serif", Ht = V.value && V.value >= 0 ? V.value : null, Ft = E.value !== 0 && !E.value || E.value < 0 ? 100 : E.value, jt = Q.value ? Q.value : "'Lato', sans-serif", Pt = ae.value ? ae.value : "1em", qt = w.value !== 0 && !w.value || w.value < 0 ? 100 : w.value, Gt = O.value ? O.value : "#f15574", Kt = S.value ? S.value : 200, Ut = le.value ? le.value : "normal", Qt = W.value ? W.value : "xs", Xt = R.value ? R.value : !1, Yt = y.value ? y.value : !1, Jt = x.value ? x.value : "text", Zt = se.value ? se.value : !1, ea = de.value ? de.value : "normal", ta = b.value ? b.value : "left", aa = N.value ? N.value : "background", la = o.value ? o.value : "5px 10px", oa = K.value ? K.value : "0", na = s.value ? s.value : 10, ua = p.value ? p.value : "#000000", ra = ve.value ? ve.value : "#000000", ia = D.value ? D.value : "transparent", sa = Ne.value ? Ne.value : "transparent", da = m.value !== 0 && !m.value || m.value < 0 ? 0 : m.value, ca = Re.value ? Re.value : "transparent", fa = $e.value ? $e.value : "transparent", va = Ae.value ? Ae.value : 32, pa = He.value ? He.value : 1;
|
|
1075
1075
|
return {
|
|
1076
1076
|
disabled: a,
|
|
1077
1077
|
display: v,
|
|
@@ -1144,16 +1144,16 @@ const Ea = ["id"], wa = {
|
|
|
1144
1144
|
}), h = t(() => {
|
|
1145
1145
|
const a = d.value;
|
|
1146
1146
|
return a.selectionBgColor || (a.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1147
|
-
}),
|
|
1147
|
+
}), F = t(() => {
|
|
1148
1148
|
const a = d.value;
|
|
1149
1149
|
return a.selectionTextColor || (a.theme === "dark" ? "#000000" : "#ffffff");
|
|
1150
|
-
}),
|
|
1150
|
+
}), ee = t(() => {
|
|
1151
1151
|
const a = d.value;
|
|
1152
1152
|
return a.display === "block" ? { width: "100%" } : {
|
|
1153
1153
|
width: `${a.inputWidth}px`
|
|
1154
1154
|
};
|
|
1155
1155
|
}), it = t(() => {
|
|
1156
|
-
switch (
|
|
1156
|
+
switch (N.value) {
|
|
1157
1157
|
case "line":
|
|
1158
1158
|
return "component__input--line";
|
|
1159
1159
|
case "border":
|
|
@@ -1191,92 +1191,92 @@ const Ea = ["id"], wa = {
|
|
|
1191
1191
|
}), ft = t(() => d.value.inputReadonly ? "component__input--read-only" : ""), vt = t(() => d.value.inputUppercase ? "component__input--uppercase" : ""), Ge = t(() => {
|
|
1192
1192
|
const a = d.value;
|
|
1193
1193
|
return !!(a.showInputEye && a.inputType === "password");
|
|
1194
|
-
}), pt = t(() => pe.value ? be.value : me.value), yt = t(() => d.value.inputType === "password" ? "component__input__eye-default--hidden" : ""), gt = t(() => we.value ? "component__input--active" : "component__input--no-active"), bt = t(() => Ge.value ? "6px 50px 6px 10px" : "6px 10px"), ht = t(() => !!(
|
|
1194
|
+
}), pt = t(() => pe.value ? be.value : me.value), yt = t(() => d.value.inputType === "password" ? "component__input__eye-default--hidden" : ""), gt = t(() => we.value ? "component__input--active" : "component__input--no-active"), bt = t(() => Ge.value ? "6px 50px 6px 10px" : "6px 10px"), ht = t(() => !!($.value && fe.value)), mt = t(() => {
|
|
1195
1195
|
const a = {};
|
|
1196
|
-
|
|
1196
|
+
z.value && Object.keys(z.value).forEach((De) => a[`aria-${De}`] = z.value[De]);
|
|
1197
1197
|
const v = {
|
|
1198
|
-
"aria-label":
|
|
1199
|
-
"aria-disabled":
|
|
1198
|
+
"aria-label": T.value,
|
|
1199
|
+
"aria-disabled": M.value,
|
|
1200
1200
|
...a
|
|
1201
1201
|
};
|
|
1202
1202
|
return Object.fromEntries(
|
|
1203
1203
|
Object.entries(v).filter(([ye, De]) => De != null)
|
|
1204
1204
|
);
|
|
1205
|
-
}), Ct = t(() =>
|
|
1205
|
+
}), Ct = t(() => k.value ? `${He.value}rem` : "0"), Bt = t(() => k.value ? `${Ae.value}px` : "0"), _t = t(() => k.value ? `component__icon--${ue.value}` : ""), It = t(() => {
|
|
1206
1206
|
const a = d.value;
|
|
1207
|
-
return
|
|
1207
|
+
return k.value ? a.iconPadding : "0";
|
|
1208
1208
|
}), Tt = t(() => {
|
|
1209
1209
|
const a = d.value;
|
|
1210
|
-
return
|
|
1210
|
+
return k.value ? a.iconMargin : "0";
|
|
1211
1211
|
}), At = t(() => {
|
|
1212
1212
|
const a = d.value;
|
|
1213
|
-
return
|
|
1213
|
+
return k.value ? a.theme === "dark" ? a.iconDarkBgColor : a.iconLightBgColor : "transparent";
|
|
1214
1214
|
}), Et = t(() => {
|
|
1215
1215
|
const a = d.value;
|
|
1216
|
-
return
|
|
1216
|
+
return k.value ? `${a.iconBorderRadius}rem` : "0";
|
|
1217
1217
|
}), wt = t(() => {
|
|
1218
1218
|
const a = d.value;
|
|
1219
|
-
return
|
|
1219
|
+
return k.value ? ue.value === "left" ? { paddingLeft: `${a.iconPaddingInput}px` } : { paddingRight: `${a.iconPaddingInput}px` } : {};
|
|
1220
1220
|
}), Dt = () => {
|
|
1221
|
-
|
|
1221
|
+
Z.value = ne.value, Ee.value = x.value;
|
|
1222
1222
|
}, Lt = () => {
|
|
1223
1223
|
const a = d.value;
|
|
1224
1224
|
if (a.inputReadonly || a.disabled)
|
|
1225
1225
|
return;
|
|
1226
1226
|
const v = !pe.value;
|
|
1227
|
-
v ? Ee.value = "text" : Ee.value =
|
|
1227
|
+
v ? Ee.value = "text" : Ee.value = x.value, pe.value = v;
|
|
1228
1228
|
}, Nt = () => {
|
|
1229
1229
|
i("clicked");
|
|
1230
1230
|
}, Rt = () => {
|
|
1231
|
-
|
|
1231
|
+
M.value || d.value.inputReadonly || !j.value || i("entered", Z.value);
|
|
1232
1232
|
};
|
|
1233
|
-
return
|
|
1233
|
+
return U(x, (a) => {
|
|
1234
1234
|
Ee.value = a;
|
|
1235
|
-
}, { immediate: !0 }),
|
|
1236
|
-
a !==
|
|
1237
|
-
}, { immediate: !0 }),
|
|
1235
|
+
}, { immediate: !0 }), U(ne, (a) => {
|
|
1236
|
+
a !== Z.value && (Z.value = a);
|
|
1237
|
+
}, { immediate: !0 }), U(Z, (a) => {
|
|
1238
1238
|
f.value && (a = a.trim()), i("changed", a);
|
|
1239
|
-
}),
|
|
1239
|
+
}), U(we, (a) => {
|
|
1240
1240
|
i(a ? "focused" : "blurred");
|
|
1241
|
-
}),
|
|
1241
|
+
}), U(pe, (a) => {
|
|
1242
1242
|
i("show-input-eye", a);
|
|
1243
|
-
}, { immediate: !0 }),
|
|
1243
|
+
}, { immediate: !0 }), U(Z, (a) => {
|
|
1244
1244
|
f.value && (a = a.trim()), i("current-value", a);
|
|
1245
|
-
}),
|
|
1245
|
+
}), U(x, (a) => {
|
|
1246
1246
|
a === "password" && nextTick(() => {
|
|
1247
1247
|
const v = document.getElementById(oe.value);
|
|
1248
1248
|
v && (v.type = "password", v.removeAttribute("autocomplete"));
|
|
1249
1249
|
});
|
|
1250
|
-
}), (a, v) => e.nbId ? (
|
|
1250
|
+
}), (a, v) => e.nbId ? (B(), _("div", Ye({
|
|
1251
1251
|
key: 0,
|
|
1252
1252
|
class: ["nb-wrapper", et.value],
|
|
1253
|
-
style: [tt.value,
|
|
1253
|
+
style: [tt.value, ee.value, ze.value],
|
|
1254
1254
|
role: "input"
|
|
1255
1255
|
}, mt.value), [
|
|
1256
|
-
|
|
1256
|
+
I("div", {
|
|
1257
1257
|
id: e.nbId,
|
|
1258
1258
|
class: Y(["nb-reset", "component", dt.value, ct.value, ft.value, it.value]),
|
|
1259
|
-
style: ie([at.value,
|
|
1259
|
+
style: ie([at.value, ee.value, ze.value]),
|
|
1260
1260
|
onClick: Nt
|
|
1261
1261
|
}, [
|
|
1262
|
-
Ge.value ? (
|
|
1262
|
+
Ge.value ? (B(), _("div", {
|
|
1263
1263
|
key: 0,
|
|
1264
1264
|
class: Y(["component__eye", gt.value]),
|
|
1265
1265
|
style: ie([ze.value]),
|
|
1266
1266
|
onClick: Lt
|
|
1267
1267
|
}, [
|
|
1268
|
-
|
|
1269
|
-
e.inputEyeCustomIcon ? (
|
|
1268
|
+
I("span", wa, [
|
|
1269
|
+
e.inputEyeCustomIcon ? (B(), _("span", La, [
|
|
1270
1270
|
pe.value ? Fe(a.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
1271
1271
|
v[4] || (v[4] = Vt("show"))
|
|
1272
1272
|
], !0) : Fe(a.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1273
1273
|
v[5] || (v[5] = Vt("hidden"))
|
|
1274
1274
|
], !0)
|
|
1275
|
-
])) : (
|
|
1275
|
+
])) : (B(), _("span", Da, je(pt.value), 1))
|
|
1276
1276
|
])
|
|
1277
1277
|
], 6)) : re("", !0),
|
|
1278
|
-
Je(
|
|
1279
|
-
"onUpdate:modelValue": v[0] || (v[0] = (ye) =>
|
|
1278
|
+
Je(I("input", {
|
|
1279
|
+
"onUpdate:modelValue": v[0] || (v[0] = (ye) => Z.value = ye),
|
|
1280
1280
|
id: l(oe),
|
|
1281
1281
|
name: l(oe),
|
|
1282
1282
|
type: Ee.value,
|
|
@@ -1286,30 +1286,30 @@ const Ea = ["id"], wa = {
|
|
|
1286
1286
|
st.value
|
|
1287
1287
|
]]),
|
|
1288
1288
|
placeholder: l(ge),
|
|
1289
|
-
disabled: l(
|
|
1289
|
+
disabled: l(M) || l(R),
|
|
1290
1290
|
required: e.required,
|
|
1291
|
-
readonly: l(
|
|
1291
|
+
readonly: l(R),
|
|
1292
1292
|
autocomplete: e.inputAutocomplete,
|
|
1293
|
-
tabindex: l(
|
|
1293
|
+
tabindex: l(M) || l(R) ? -1 : l(he),
|
|
1294
1294
|
role: "input",
|
|
1295
1295
|
style: ie([ze.value, wt.value]),
|
|
1296
1296
|
onFocus: v[1] || (v[1] = (ye) => we.value = !0),
|
|
1297
1297
|
onBlur: v[2] || (v[2] = (ye) => we.value = !1),
|
|
1298
|
-
onKeydown: v[3] || (v[3] = Me((ye) => !l(
|
|
1298
|
+
onKeydown: v[3] || (v[3] = Me((ye) => !l(M) && l(j) && Rt(), ["enter"]))
|
|
1299
1299
|
}, null, 46, Na), [
|
|
1300
|
-
[ha,
|
|
1300
|
+
[ha, Z.value]
|
|
1301
1301
|
]),
|
|
1302
|
-
l(
|
|
1302
|
+
l(k) ? (B(), _("label", {
|
|
1303
1303
|
key: 1,
|
|
1304
1304
|
for: l(oe),
|
|
1305
1305
|
class: Y(["component__icon", _t.value])
|
|
1306
1306
|
}, [
|
|
1307
1307
|
Fe(a.$slots, "icon", {}, () => [
|
|
1308
|
-
v[6] || (v[6] =
|
|
1308
|
+
v[6] || (v[6] = I("span", null, "♥", -1))
|
|
1309
1309
|
], !0)
|
|
1310
1310
|
], 10, Ra)) : re("", !0)
|
|
1311
1311
|
], 14, Ea),
|
|
1312
|
-
ht.value ? (
|
|
1312
|
+
ht.value ? (B(), _("div", {
|
|
1313
1313
|
key: 0,
|
|
1314
1314
|
class: Y(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
1315
1315
|
}, [
|
|
@@ -1319,7 +1319,7 @@ const Ea = ["id"], wa = {
|
|
|
1319
1319
|
], 2)) : re("", !0)
|
|
1320
1320
|
], 16)) : re("", !0);
|
|
1321
1321
|
}
|
|
1322
|
-
}), za = /* @__PURE__ */ Ze($a, [["__scopeId", "data-v-
|
|
1322
|
+
}), za = /* @__PURE__ */ Ze($a, [["__scopeId", "data-v-66f1b6ed"]]);
|
|
1323
1323
|
const Ma = ["id"], Oa = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name", "placeholder", "readonly", "autocomplete", "required", "tabindex"], Fa = /* @__PURE__ */ Object.assign({
|
|
1324
1324
|
name: "NbInputChip",
|
|
1325
1325
|
inheritAttrs: !1
|
|
@@ -1573,60 +1573,60 @@ const Ma = ["id"], Oa = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1573
1573
|
emits: ["clicked", "changed", "removed", "added", "input-changed", "focused", "blurred"],
|
|
1574
1574
|
setup(e, { emit: r }) {
|
|
1575
1575
|
Ue((n) => ({
|
|
1576
|
-
"
|
|
1577
|
-
"
|
|
1578
|
-
"
|
|
1579
|
-
"
|
|
1580
|
-
"
|
|
1581
|
-
"
|
|
1582
|
-
"
|
|
1583
|
-
"
|
|
1584
|
-
"
|
|
1585
|
-
|
|
1586
|
-
"
|
|
1587
|
-
"
|
|
1588
|
-
"
|
|
1589
|
-
"
|
|
1590
|
-
"
|
|
1591
|
-
"
|
|
1592
|
-
|
|
1593
|
-
"
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
"
|
|
1597
|
-
|
|
1598
|
-
"
|
|
1599
|
-
"
|
|
1600
|
-
"
|
|
1576
|
+
"9f3dabd4": Ae.value,
|
|
1577
|
+
"99630b2e": Z.value,
|
|
1578
|
+
"28fd42c7": l(be),
|
|
1579
|
+
"301a1aef": l(se),
|
|
1580
|
+
"0344bae8": l(ge),
|
|
1581
|
+
"440e2083": l(he),
|
|
1582
|
+
"1006335b": l(me),
|
|
1583
|
+
"0db24924": l(Ce),
|
|
1584
|
+
"3828550e": l(_e),
|
|
1585
|
+
aadc9bbe: l(Se),
|
|
1586
|
+
"864d2dcc": l(xe),
|
|
1587
|
+
"04ba6296": l(Ie),
|
|
1588
|
+
"91afc5e6": l(ce),
|
|
1589
|
+
"74008e56": l(Te),
|
|
1590
|
+
"5c923ad0": l(ne),
|
|
1591
|
+
"7fe6c844": l(ke),
|
|
1592
|
+
ed759bec: pe.value,
|
|
1593
|
+
"6018cfdc": we.value,
|
|
1594
|
+
54227074: d.value,
|
|
1595
|
+
c52b97b2: n.styleButtonColor,
|
|
1596
|
+
"2371d88c": He.value,
|
|
1597
|
+
"4f4393d3": l(de),
|
|
1598
|
+
"0d7f21cc": l(Ve),
|
|
1599
|
+
"94dc4df6": l(Be),
|
|
1600
|
+
"6be37dfe": l(u)
|
|
1601
1601
|
})), Qe(() => {
|
|
1602
|
-
|
|
1602
|
+
C.value.length > 0 && (p.value = C.value);
|
|
1603
1603
|
});
|
|
1604
|
-
const i = r,
|
|
1604
|
+
const i = r, L = e, {
|
|
1605
1605
|
display: g,
|
|
1606
|
-
textColor:
|
|
1607
|
-
paddingX:
|
|
1608
|
-
paddingY:
|
|
1609
|
-
borderRadius:
|
|
1610
|
-
disabled:
|
|
1611
|
-
fontFamily:
|
|
1606
|
+
textColor: j,
|
|
1607
|
+
paddingX: T,
|
|
1608
|
+
paddingY: z,
|
|
1609
|
+
borderRadius: J,
|
|
1610
|
+
disabled: A,
|
|
1611
|
+
fontFamily: P,
|
|
1612
1612
|
fontSize: te,
|
|
1613
|
-
fontWeight:
|
|
1614
|
-
currentList:
|
|
1615
|
-
allowDuplicates:
|
|
1616
|
-
minChips:
|
|
1617
|
-
maxChips:
|
|
1618
|
-
inputPosition:
|
|
1613
|
+
fontWeight: q,
|
|
1614
|
+
currentList: C,
|
|
1615
|
+
allowDuplicates: M,
|
|
1616
|
+
minChips: G,
|
|
1617
|
+
maxChips: V,
|
|
1618
|
+
inputPosition: E,
|
|
1619
1619
|
width: Q,
|
|
1620
1620
|
inputName: ae,
|
|
1621
|
-
inputPlaceholder:
|
|
1622
|
-
inputUppercase:
|
|
1623
|
-
inputReadonly:
|
|
1624
|
-
inputAutocomplete:
|
|
1621
|
+
inputPlaceholder: w,
|
|
1622
|
+
inputUppercase: O,
|
|
1623
|
+
inputReadonly: S,
|
|
1624
|
+
inputAutocomplete: N,
|
|
1625
1625
|
required: le,
|
|
1626
|
-
textAlign:
|
|
1627
|
-
hasBorderRadius:
|
|
1626
|
+
textAlign: W,
|
|
1627
|
+
hasBorderRadius: R,
|
|
1628
1628
|
activeTextStyle: y,
|
|
1629
|
-
theme:
|
|
1629
|
+
theme: x,
|
|
1630
1630
|
inputStyle: f,
|
|
1631
1631
|
lightBgColor: se,
|
|
1632
1632
|
lightBgColorFocus: oe,
|
|
@@ -1649,22 +1649,22 @@ const Ma = ["id"], Oa = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1649
1649
|
darkChipRemoveColor: Te,
|
|
1650
1650
|
darkDisabledBorderColor: u,
|
|
1651
1651
|
tabIndex: c,
|
|
1652
|
-
hasTabIndexEnter:
|
|
1652
|
+
hasTabIndexEnter: H,
|
|
1653
1653
|
ariaLabel: b,
|
|
1654
|
-
ariaAttrs:
|
|
1654
|
+
ariaAttrs: $,
|
|
1655
1655
|
caretColor: fe,
|
|
1656
|
-
selectionBgColor:
|
|
1656
|
+
selectionBgColor: k,
|
|
1657
1657
|
selectionTextColor: ue
|
|
1658
|
-
} = Xe(
|
|
1659
|
-
const n =
|
|
1658
|
+
} = Xe(L), o = X(""), s = X(null), K = X(null), m = X(null), p = X([]), ve = X(!1), D = t(() => {
|
|
1659
|
+
const n = A.value ? "component-disabled" : "", h = g.value !== "b" ? "inline-block" : "block", F = !Q.value || Q.value < 185 ? 185 : Q.value, ee = j ? j.value : "ffffff", it = fe.value ? fe.value : "", st = k.value ? k.value : "", dt = ue.value ? ue.value : "", ct = T.value !== 0 && !T.value || T.value < 0 ? 1 : T.value, ft = z.value !== 0 && !z.value || z.value < 0 ? 0.2 : z.value, vt = J.value !== 0 && !J.value || J.value < 0 ? 0 : J.value, Ge = P.value ? P.value : "'Lato', sans-serif", pt = te.value ? te.value : "1.6rem", yt = q.value !== 0 && !q.value || q.value < 0 ? 100 : q.value, gt = G.value !== 0 && !G.value || G.value < 0 ? 0 : G.value, bt = V.value !== 0 && !V.value || V.value < 0 ? 10 : V.value, ht = !E.value || !["top", "bottom"].includes(E.value) ? "bottom" : E.value, mt = !f.value || !["background", "line", "border"].includes(f.value) ? "background" : f.value, Ct = x.value ? x.value : "light";
|
|
1660
1660
|
return {
|
|
1661
1661
|
disabled: n,
|
|
1662
1662
|
display: h,
|
|
1663
|
-
width:
|
|
1663
|
+
width: F,
|
|
1664
1664
|
font: Ge,
|
|
1665
1665
|
fontSize: pt,
|
|
1666
1666
|
fontWeight: yt,
|
|
1667
|
-
textColor:
|
|
1667
|
+
textColor: ee,
|
|
1668
1668
|
caretColor: it,
|
|
1669
1669
|
selectionBgColor: st,
|
|
1670
1670
|
selectionTextColor: dt,
|
|
@@ -1677,16 +1677,16 @@ const Ma = ["id"], Oa = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1677
1677
|
inputStyle: mt,
|
|
1678
1678
|
theme: Ct
|
|
1679
1679
|
};
|
|
1680
|
-
}), Ne = t(() =>
|
|
1681
|
-
display:
|
|
1680
|
+
}), Ne = t(() => D.value.disabled), Re = t(() => ({
|
|
1681
|
+
display: D.value.display
|
|
1682
1682
|
})), $e = t(() => {
|
|
1683
|
-
const n =
|
|
1683
|
+
const n = D.value;
|
|
1684
1684
|
return {
|
|
1685
1685
|
color: n.textColor,
|
|
1686
1686
|
padding: `${n.paddingY}rem ${n.paddingX}rem`,
|
|
1687
1687
|
fontSize: n.fontSize,
|
|
1688
1688
|
fontWeight: n.fontWeight,
|
|
1689
|
-
textAlign:
|
|
1689
|
+
textAlign: W.value
|
|
1690
1690
|
};
|
|
1691
1691
|
}), Oe = t(() => {
|
|
1692
1692
|
switch (y.value) {
|
|
@@ -1698,27 +1698,27 @@ const Ma = ["id"], Oa = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1698
1698
|
return "component__text--normal";
|
|
1699
1699
|
}
|
|
1700
1700
|
}), We = t(() => {
|
|
1701
|
-
const n =
|
|
1702
|
-
return n.inputStyle !== "line" &&
|
|
1703
|
-
}), Ae = t(() =>
|
|
1701
|
+
const n = D.value;
|
|
1702
|
+
return n.inputStyle !== "line" && R.value ? { borderRadius: `${n.borderRadius}rem` } : {};
|
|
1703
|
+
}), Ae = t(() => D.value.font), He = t(() => D.value.textColor), Z = t(() => D.value.inputPosition === "top" ? "column" : "column-reverse"), Ee = t(() => {
|
|
1704
1704
|
const n = {};
|
|
1705
|
-
|
|
1705
|
+
$.value && Object.keys($.value).forEach((ee) => n[`aria-${ee}`] = $.value[ee]);
|
|
1706
1706
|
const h = {
|
|
1707
1707
|
"aria-label": b.value,
|
|
1708
|
-
"aria-disabled":
|
|
1708
|
+
"aria-disabled": A.value,
|
|
1709
1709
|
...n
|
|
1710
1710
|
};
|
|
1711
1711
|
return Object.fromEntries(
|
|
1712
|
-
Object.entries(h).filter(([
|
|
1712
|
+
Object.entries(h).filter(([F, ee]) => ee != null)
|
|
1713
1713
|
);
|
|
1714
1714
|
}), pe = t(() => {
|
|
1715
|
-
const n =
|
|
1715
|
+
const n = D.value;
|
|
1716
1716
|
return n.caretColor || (n.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1717
1717
|
}), we = t(() => {
|
|
1718
|
-
const n =
|
|
1718
|
+
const n = D.value;
|
|
1719
1719
|
return n.selectionBgColor || (n.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1720
1720
|
}), d = t(() => {
|
|
1721
|
-
const n =
|
|
1721
|
+
const n = D.value;
|
|
1722
1722
|
return n.selectionTextColor || (n.theme === "dark" ? "#000000" : "#ffffff");
|
|
1723
1723
|
}), et = t(() => ({
|
|
1724
1724
|
caretColor: pe.value
|
|
@@ -1726,12 +1726,12 @@ const Ma = ["id"], Oa = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1726
1726
|
"--selection-bg-color": we.value,
|
|
1727
1727
|
"--selection-text-color": d.value
|
|
1728
1728
|
})), Pe = t(() => {
|
|
1729
|
-
const n =
|
|
1729
|
+
const n = D.value, h = {
|
|
1730
1730
|
width: `${n.width}px`
|
|
1731
1731
|
};
|
|
1732
1732
|
return n.display === "block" ? { width: "auto" } : h;
|
|
1733
1733
|
}), at = t(() => {
|
|
1734
|
-
switch (
|
|
1734
|
+
switch (x.value) {
|
|
1735
1735
|
case "dark":
|
|
1736
1736
|
return "component__theme--dark";
|
|
1737
1737
|
default:
|
|
@@ -1753,71 +1753,71 @@ const Ma = ["id"], Oa = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1753
1753
|
}, nt = () => {
|
|
1754
1754
|
ve.value = !1, i("blurred");
|
|
1755
1755
|
}, ut = (n) => {
|
|
1756
|
-
if (!(
|
|
1756
|
+
if (!(A.value || S.value) && n.key === "Enter" && o.value.trim() !== "") {
|
|
1757
1757
|
n.preventDefault();
|
|
1758
1758
|
let h = o.value.trim();
|
|
1759
|
-
|
|
1759
|
+
O.value && (h = h.toUpperCase()), (M.value || !p.value.includes(h)) && rt(h), o.value = "";
|
|
1760
1760
|
}
|
|
1761
1761
|
}, rt = (n) => {
|
|
1762
1762
|
p.value.push(n), i("added", n);
|
|
1763
1763
|
}, qe = (n) => {
|
|
1764
1764
|
p.value = p.value.filter((h) => h !== n), i("removed", n);
|
|
1765
1765
|
};
|
|
1766
|
-
return
|
|
1766
|
+
return U(C, (n) => {
|
|
1767
1767
|
p.value = n, i("changed", n);
|
|
1768
|
-
}),
|
|
1768
|
+
}), U(o, (n) => {
|
|
1769
1769
|
i("input-changed", n);
|
|
1770
|
-
}), (n, h) => e.nbId ? (
|
|
1770
|
+
}), (n, h) => e.nbId ? (B(), _("div", Ye({
|
|
1771
1771
|
key: 0,
|
|
1772
1772
|
class: ["nb-wrapper", Ne.value],
|
|
1773
1773
|
style: [Re.value],
|
|
1774
1774
|
role: "input"
|
|
1775
1775
|
}, Ee.value, { onClick: lt }), [
|
|
1776
|
-
|
|
1776
|
+
I("div", {
|
|
1777
1777
|
id: e.nbId,
|
|
1778
1778
|
ref_key: "chipsContainer",
|
|
1779
1779
|
ref: s,
|
|
1780
1780
|
class: Y(["nb-reset", "component", at.value, ze.value]),
|
|
1781
1781
|
style: ie([$e.value, Pe.value, We.value])
|
|
1782
1782
|
}, [
|
|
1783
|
-
p.value.length > 0 ? (
|
|
1783
|
+
p.value.length > 0 ? (B(), _("div", {
|
|
1784
1784
|
key: 0,
|
|
1785
1785
|
ref_key: "chips",
|
|
1786
|
-
ref:
|
|
1786
|
+
ref: m,
|
|
1787
1787
|
class: "chips"
|
|
1788
1788
|
}, [
|
|
1789
|
-
(
|
|
1790
|
-
key:
|
|
1789
|
+
(B(!0), _(xt, null, kt(p.value, (F) => (B(), _("div", {
|
|
1790
|
+
key: F,
|
|
1791
1791
|
class: "chip"
|
|
1792
1792
|
}, [
|
|
1793
1793
|
Fe(n.$slots, "chip", {
|
|
1794
1794
|
chips: p.value,
|
|
1795
|
-
chip:
|
|
1795
|
+
chip: F,
|
|
1796
1796
|
removeChip: qe
|
|
1797
1797
|
}, () => [
|
|
1798
|
-
|
|
1799
|
-
!l(
|
|
1798
|
+
I("span", Oa, je(F), 1),
|
|
1799
|
+
!l(A) && !l(S) ? (B(), _("span", {
|
|
1800
1800
|
key: 0,
|
|
1801
1801
|
class: "chip-remove",
|
|
1802
|
-
onClick: (
|
|
1802
|
+
onClick: (ee) => qe(F)
|
|
1803
1803
|
}, "×", 8, Wa)) : re("", !0)
|
|
1804
1804
|
], !0)
|
|
1805
1805
|
]))), 128))
|
|
1806
1806
|
], 512)) : re("", !0),
|
|
1807
|
-
Je(
|
|
1807
|
+
Je(I("input", {
|
|
1808
1808
|
ref_key: "chipInput",
|
|
1809
|
-
ref:
|
|
1809
|
+
ref: K,
|
|
1810
1810
|
type: "text",
|
|
1811
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
1811
|
+
"onUpdate:modelValue": h[0] || (h[0] = (F) => o.value = F),
|
|
1812
1812
|
name: l(ae),
|
|
1813
|
-
placeholder: l(
|
|
1814
|
-
readonly: l(
|
|
1815
|
-
autocomplete: l(
|
|
1813
|
+
placeholder: l(w),
|
|
1814
|
+
readonly: l(S),
|
|
1815
|
+
autocomplete: l(N),
|
|
1816
1816
|
required: l(le),
|
|
1817
|
-
tabindex: l(
|
|
1817
|
+
tabindex: l(A) || l(S) ? -1 : l(c),
|
|
1818
1818
|
class: Y(["chips-input", Oe.value]),
|
|
1819
1819
|
style: ie([et.value, tt.value]),
|
|
1820
|
-
onKeydown: h[1] || (h[1] = Me((
|
|
1820
|
+
onKeydown: h[1] || (h[1] = Me((F) => !l(A) && l(H) && ut(F), ["enter"])),
|
|
1821
1821
|
onFocus: ot,
|
|
1822
1822
|
onBlur: nt
|
|
1823
1823
|
}, null, 46, Ha), [
|
|
@@ -1826,7 +1826,7 @@ const Ma = ["id"], Oa = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1826
1826
|
], 14, Ma)
|
|
1827
1827
|
], 16)) : re("", !0);
|
|
1828
1828
|
}
|
|
1829
|
-
}), ja = /* @__PURE__ */ Ze(Fa, [["__scopeId", "data-v-
|
|
1829
|
+
}), ja = /* @__PURE__ */ Ze(Fa, [["__scopeId", "data-v-c52ee364"]]), St = {
|
|
1830
1830
|
NbInputRadio: ka,
|
|
1831
1831
|
NbInputCheckbox: Aa,
|
|
1832
1832
|
NbInput: za,
|