@vlalg-nimbus/nb-inputs 7.0.1 → 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 +732 -684
- package/dist/nb-inputs.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/nb-inputs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
}, Ca = ["id"], Va = ["id", "disabled", "value", "name"],
|
|
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
|
+
const Ze = (e, r) => {
|
|
3
|
+
const i = e.__vccOpts || e;
|
|
4
|
+
for (const [L, g] of r)
|
|
5
|
+
i[L] = g;
|
|
6
|
+
return i;
|
|
7
|
+
}, Ca = ["id"], Va = ["id", "disabled", "value", "name"], Sa = ["for", "tabindex"], xa = /* @__PURE__ */ Object.assign({
|
|
8
8
|
name: "NbInputRadio",
|
|
9
9
|
inheritAttrs: !1
|
|
10
10
|
}, {
|
|
@@ -18,14 +18,14 @@ const Ye = (e, i) => {
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: "b",
|
|
20
20
|
validator: (e = "b") => {
|
|
21
|
-
const
|
|
22
|
-
return ["b", "ib"].includes(
|
|
21
|
+
const r = e ? e.toLowerCase() : "";
|
|
22
|
+
return ["b", "ib"].includes(r);
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
tabIndex: {
|
|
26
26
|
type: [Number, Array],
|
|
27
27
|
default: 0,
|
|
28
|
-
validator: (e,
|
|
28
|
+
validator: (e, r) => Array.isArray(e) ? e.length === r.options.length : !0
|
|
29
29
|
},
|
|
30
30
|
hasTabIndexEnter: {
|
|
31
31
|
type: Boolean,
|
|
@@ -56,12 +56,12 @@ const Ye = (e, i) => {
|
|
|
56
56
|
validator: (e) => {
|
|
57
57
|
if (!e.length)
|
|
58
58
|
return !1;
|
|
59
|
-
let
|
|
60
|
-
for (const
|
|
61
|
-
const
|
|
62
|
-
|
|
59
|
+
let r = !1;
|
|
60
|
+
for (const i of e) {
|
|
61
|
+
const L = Object.keys(i);
|
|
62
|
+
L.length !== 2 && (r = !0), L.every((j) => ["value", "text"].includes(j)) || (r = !0);
|
|
63
63
|
}
|
|
64
|
-
if (!
|
|
64
|
+
if (!r)
|
|
65
65
|
return e;
|
|
66
66
|
}
|
|
67
67
|
},
|
|
@@ -74,13 +74,39 @@ const Ye = (e, i) => {
|
|
|
74
74
|
default: "boolean",
|
|
75
75
|
validator: (e) => ["boolean", "string", "number"].indexOf(e) !== -1
|
|
76
76
|
},
|
|
77
|
-
|
|
77
|
+
theme: {
|
|
78
78
|
type: String,
|
|
79
|
-
default: "
|
|
79
|
+
default: "light",
|
|
80
|
+
validator: (e) => {
|
|
81
|
+
const r = e ? e.toLowerCase() : "";
|
|
82
|
+
return ["light", "dark"].includes(r);
|
|
83
|
+
}
|
|
80
84
|
},
|
|
81
|
-
|
|
85
|
+
// Cores do tema light
|
|
86
|
+
lightTextColor: {
|
|
82
87
|
type: String,
|
|
83
|
-
default: "#
|
|
88
|
+
default: "#333333"
|
|
89
|
+
},
|
|
90
|
+
lightColor: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: "#cccccc"
|
|
93
|
+
},
|
|
94
|
+
lightColorHover: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: "#bbbbbb"
|
|
97
|
+
},
|
|
98
|
+
// Cores do tema dark
|
|
99
|
+
darkTextColor: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: "#e0e0e0"
|
|
102
|
+
},
|
|
103
|
+
darkColor: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: "#555555"
|
|
106
|
+
},
|
|
107
|
+
darkColorHover: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: "#666666"
|
|
84
110
|
},
|
|
85
111
|
hoverEffect: {
|
|
86
112
|
type: Boolean,
|
|
@@ -92,10 +118,6 @@ const Ye = (e, i) => {
|
|
|
92
118
|
default: !1,
|
|
93
119
|
validator: (e) => [!0, !1].indexOf(e) !== -1
|
|
94
120
|
},
|
|
95
|
-
colorHover: {
|
|
96
|
-
type: String,
|
|
97
|
-
default: "#a6a6a6"
|
|
98
|
-
},
|
|
99
121
|
itemGap: {
|
|
100
122
|
type: Number,
|
|
101
123
|
default: 15
|
|
@@ -129,145 +151,143 @@ const Ye = (e, i) => {
|
|
|
129
151
|
}
|
|
130
152
|
},
|
|
131
153
|
emits: ["current-value", "changed", "clicked"],
|
|
132
|
-
setup(e, { emit:
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
"
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
154
|
+
setup(e, { emit: r }) {
|
|
155
|
+
Ue((u) => ({
|
|
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
|
+
})), Qe(() => {
|
|
168
|
+
ce();
|
|
144
169
|
});
|
|
145
|
-
const
|
|
146
|
-
ariaLabel:
|
|
147
|
-
ariaAttrs:
|
|
148
|
-
currentOption:
|
|
149
|
-
valueType:
|
|
150
|
-
display:
|
|
151
|
-
options:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
+
theme: te,
|
|
178
|
+
lightTextColor: q,
|
|
179
|
+
lightColor: C,
|
|
180
|
+
lightColorHover: M,
|
|
181
|
+
darkTextColor: G,
|
|
182
|
+
darkColor: V,
|
|
183
|
+
darkColorHover: E,
|
|
184
|
+
hoverEffect: Q,
|
|
185
|
+
activeHoverEffect: ae,
|
|
186
|
+
itemGap: w,
|
|
187
|
+
internalGap: O,
|
|
188
|
+
scale: S,
|
|
189
|
+
disabled: N,
|
|
190
|
+
fontFamily: le,
|
|
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;
|
|
166
195
|
return {
|
|
167
196
|
disabled: u,
|
|
168
197
|
display: c,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
internalGap: G,
|
|
176
|
-
scale: re,
|
|
177
|
-
font: $,
|
|
198
|
+
hoverEffect: fe,
|
|
199
|
+
activeHoverEffect: k,
|
|
200
|
+
itemGap: ue,
|
|
201
|
+
internalGap: o,
|
|
202
|
+
scale: s,
|
|
203
|
+
font: H,
|
|
178
204
|
fontSize: b,
|
|
179
|
-
fontWeight:
|
|
205
|
+
fontWeight: $
|
|
180
206
|
};
|
|
181
|
-
}),
|
|
182
|
-
display:
|
|
183
|
-
})),
|
|
184
|
-
const u =
|
|
207
|
+
}), x = t(() => y.value.disabled), f = t(() => ({
|
|
208
|
+
display: y.value.display
|
|
209
|
+
})), se = t(() => y.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), oe = t(() => {
|
|
210
|
+
const u = y.value;
|
|
185
211
|
return {
|
|
186
212
|
fontSize: u.fontSize,
|
|
187
213
|
fontWeight: u.fontWeight
|
|
188
214
|
};
|
|
189
|
-
}),
|
|
190
|
-
const
|
|
191
|
-
return u.hoverEffect ? u.colorHover : u.color;
|
|
192
|
-
}), ue = t(() => {
|
|
193
|
-
const u = v.value;
|
|
194
|
-
return u.activeHoverEffect ? u.colorHover : u.color;
|
|
195
|
-
}), fe = t(() => {
|
|
196
|
-
const c = v.value.internalGap;
|
|
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
|
+
const c = y.value.internalGap;
|
|
197
217
|
return !c || c < 0 ? 0 : `${c}px`;
|
|
198
|
-
}),
|
|
199
|
-
const c =
|
|
218
|
+
}), Be = t(() => {
|
|
219
|
+
const c = y.value.itemGap;
|
|
200
220
|
return !c || c < 0 ? 0 : `${c}px`;
|
|
201
|
-
}),
|
|
202
|
-
zoom:
|
|
203
|
-
})),
|
|
221
|
+
}), _e = t(() => ({
|
|
222
|
+
zoom: y.value.scale
|
|
223
|
+
})), Ie = t(() => {
|
|
204
224
|
const u = {};
|
|
205
|
-
|
|
225
|
+
T.value && Object.keys(T.value).forEach((b) => u[`aria-${b}`] = T.value[b]);
|
|
206
226
|
const c = {
|
|
207
|
-
"aria-label":
|
|
208
|
-
"aria-disabled":
|
|
227
|
+
"aria-label": j.value,
|
|
228
|
+
"aria-disabled": N.value,
|
|
209
229
|
...u
|
|
210
230
|
};
|
|
211
231
|
return Object.fromEntries(
|
|
212
|
-
Object.entries(c).filter(([
|
|
232
|
+
Object.entries(c).filter(([H, b]) => b != null)
|
|
213
233
|
);
|
|
214
|
-
}),
|
|
215
|
-
const u =
|
|
216
|
-
u && ["string"].includes(
|
|
217
|
-
},
|
|
218
|
-
|
|
234
|
+
}), ce = () => {
|
|
235
|
+
const u = z.value;
|
|
236
|
+
u && ["string"].includes(J.value) ? g.value = u.toString().toLowerCase() : g.value = u;
|
|
237
|
+
}, Te = () => {
|
|
238
|
+
i("clicked");
|
|
219
239
|
};
|
|
220
|
-
return
|
|
221
|
-
u !== c &&
|
|
222
|
-
}),
|
|
223
|
-
u !== c && (
|
|
224
|
-
}), (u, c) => e.nbId &&
|
|
240
|
+
return U(z, (u, c) => {
|
|
241
|
+
u !== c && ce();
|
|
242
|
+
}), U(g, (u, c) => {
|
|
243
|
+
u !== c && (i("current-value", u), i("changed", u));
|
|
244
|
+
}), (u, c) => e.nbId && ge.value ? (B(), _("div", {
|
|
225
245
|
key: 0,
|
|
226
|
-
class:
|
|
227
|
-
style:
|
|
246
|
+
class: Y(["nb-wrapper", x.value]),
|
|
247
|
+
style: ie([f.value, _e.value])
|
|
228
248
|
}, [
|
|
229
|
-
|
|
249
|
+
I("div", Ye({
|
|
230
250
|
id: e.nbId,
|
|
231
251
|
role: "radiogroup"
|
|
232
|
-
},
|
|
233
|
-
class: ["nb-reset", "component",
|
|
252
|
+
}, Ie.value, {
|
|
253
|
+
class: ["nb-reset", "component", se.value, ne.value]
|
|
234
254
|
}), [
|
|
235
|
-
(
|
|
255
|
+
(B(!0), _(xt, null, kt(l(P), (H, b) => (B(), _("div", {
|
|
236
256
|
key: b,
|
|
237
257
|
class: "component-radio__item"
|
|
238
258
|
}, [
|
|
239
|
-
|
|
240
|
-
id: `${e.nbId}-${
|
|
241
|
-
"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 = $),
|
|
242
262
|
type: "radio",
|
|
243
263
|
class: "component-radio__item--input",
|
|
244
|
-
disabled: l(
|
|
245
|
-
value:
|
|
264
|
+
disabled: l(N),
|
|
265
|
+
value: H.value,
|
|
246
266
|
name: e.groupName,
|
|
247
|
-
onClick:
|
|
267
|
+
onClick: Te
|
|
248
268
|
}, null, 8, Va), [
|
|
249
|
-
[ya,
|
|
269
|
+
[ya, g.value]
|
|
250
270
|
]),
|
|
251
|
-
|
|
252
|
-
for: `${e.nbId}-${
|
|
253
|
-
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,
|
|
254
274
|
class: "component-radio__item--label",
|
|
255
275
|
onKeydown: [
|
|
256
|
-
c[1] || (c[1] =
|
|
257
|
-
c[2] || (c[2] =
|
|
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"]))
|
|
258
278
|
]
|
|
259
279
|
}, [
|
|
260
|
-
c[3] || (c[3] =
|
|
261
|
-
|
|
262
|
-
style:
|
|
263
|
-
},
|
|
264
|
-
], 40,
|
|
280
|
+
c[3] || (c[3] = I("div", null, null, -1)),
|
|
281
|
+
I("span", {
|
|
282
|
+
style: ie([oe.value])
|
|
283
|
+
}, je(H.text), 5)
|
|
284
|
+
], 40, Sa)
|
|
265
285
|
]))), 128))
|
|
266
286
|
], 16, Ca)
|
|
267
|
-
], 6)) :
|
|
287
|
+
], 6)) : re("", !0);
|
|
268
288
|
}
|
|
269
|
-
}), ka = /* @__PURE__ */
|
|
270
|
-
const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabindex"],
|
|
289
|
+
}), ka = /* @__PURE__ */ Ze(xa, [["__scopeId", "data-v-01a4e4c4"]]);
|
|
290
|
+
const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabindex"], Ta = /* @__PURE__ */ Object.assign({
|
|
271
291
|
name: "NbInputCheckbox",
|
|
272
292
|
inheritAttrs: !1
|
|
273
293
|
}, {
|
|
@@ -281,14 +301,14 @@ const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabin
|
|
|
281
301
|
type: String,
|
|
282
302
|
default: "b",
|
|
283
303
|
validator: (e = "b") => {
|
|
284
|
-
const
|
|
285
|
-
return ["b", "ib"].includes(
|
|
304
|
+
const r = e ? e.toLowerCase() : "";
|
|
305
|
+
return ["b", "ib"].includes(r);
|
|
286
306
|
}
|
|
287
307
|
},
|
|
288
308
|
tabIndex: {
|
|
289
309
|
type: [Number, Array],
|
|
290
310
|
default: 0,
|
|
291
|
-
validator: (e,
|
|
311
|
+
validator: (e, r) => Array.isArray(e) ? e.length === r.options.length : !0
|
|
292
312
|
},
|
|
293
313
|
hasTabIndexEnter: {
|
|
294
314
|
type: Boolean,
|
|
@@ -319,12 +339,12 @@ const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabin
|
|
|
319
339
|
validator: (e) => {
|
|
320
340
|
if (!e.length)
|
|
321
341
|
return !1;
|
|
322
|
-
let
|
|
323
|
-
for (const
|
|
324
|
-
const
|
|
325
|
-
|
|
342
|
+
let r = !1;
|
|
343
|
+
for (const i of e) {
|
|
344
|
+
const L = Object.keys(i);
|
|
345
|
+
L.length !== 2 && (r = !0), L.every((j) => ["value", "text"].includes(j)) || (r = !0);
|
|
326
346
|
}
|
|
327
|
-
if (!
|
|
347
|
+
if (!r)
|
|
328
348
|
return e;
|
|
329
349
|
}
|
|
330
350
|
},
|
|
@@ -332,9 +352,39 @@ const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabin
|
|
|
332
352
|
type: Array,
|
|
333
353
|
default: () => []
|
|
334
354
|
},
|
|
335
|
-
|
|
355
|
+
theme: {
|
|
356
|
+
type: String,
|
|
357
|
+
default: "light",
|
|
358
|
+
validator: (e) => {
|
|
359
|
+
const r = e ? e.toLowerCase() : "";
|
|
360
|
+
return ["light", "dark"].includes(r);
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
// Cores do tema light
|
|
364
|
+
lightTextColor: {
|
|
365
|
+
type: String,
|
|
366
|
+
default: "#333333"
|
|
367
|
+
},
|
|
368
|
+
lightColor: {
|
|
336
369
|
type: String,
|
|
337
|
-
default: "
|
|
370
|
+
default: "#cccccc"
|
|
371
|
+
},
|
|
372
|
+
lightColorHover: {
|
|
373
|
+
type: String,
|
|
374
|
+
default: "#bbbbbb"
|
|
375
|
+
},
|
|
376
|
+
// Cores do tema dark
|
|
377
|
+
darkTextColor: {
|
|
378
|
+
type: String,
|
|
379
|
+
default: "#e0e0e0"
|
|
380
|
+
},
|
|
381
|
+
darkColor: {
|
|
382
|
+
type: String,
|
|
383
|
+
default: "#555555"
|
|
384
|
+
},
|
|
385
|
+
darkColorHover: {
|
|
386
|
+
type: String,
|
|
387
|
+
default: "#666666"
|
|
338
388
|
},
|
|
339
389
|
boxRadius: {
|
|
340
390
|
type: Number,
|
|
@@ -354,10 +404,6 @@ const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabin
|
|
|
354
404
|
default: !1,
|
|
355
405
|
validator: (e) => [!0, !1].indexOf(e) !== -1
|
|
356
406
|
},
|
|
357
|
-
colorHover: {
|
|
358
|
-
type: String,
|
|
359
|
-
default: "#a6a6a6"
|
|
360
|
-
},
|
|
361
407
|
itemGap: {
|
|
362
408
|
type: Number,
|
|
363
409
|
default: 15
|
|
@@ -401,167 +447,169 @@ const Ba = ["id"], _a = ["id", "disabled", "value", "name"], Ia = ["for", "tabin
|
|
|
401
447
|
}
|
|
402
448
|
},
|
|
403
449
|
emits: ["current-value", "changed", "clicked"],
|
|
404
|
-
setup(e, { emit:
|
|
405
|
-
|
|
406
|
-
"
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
"
|
|
411
|
-
"
|
|
412
|
-
"
|
|
413
|
-
"
|
|
414
|
-
"
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
450
|
+
setup(e, { emit: r }) {
|
|
451
|
+
Ue((o) => ({
|
|
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
|
+
})), Qe(() => {
|
|
468
|
+
k();
|
|
419
469
|
});
|
|
420
|
-
const
|
|
421
|
-
ariaLabel:
|
|
422
|
-
ariaAttrs:
|
|
423
|
-
currentOption:
|
|
424
|
-
display:
|
|
425
|
-
options:
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
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
|
+
lightTextColor: te,
|
|
478
|
+
lightColor: q,
|
|
479
|
+
lightColorHover: C,
|
|
480
|
+
darkTextColor: M,
|
|
481
|
+
darkColor: G,
|
|
482
|
+
darkColorHover: V,
|
|
483
|
+
boxRadius: E,
|
|
484
|
+
hoverEffect: Q,
|
|
485
|
+
activeHoverEffect: ae,
|
|
486
|
+
itemGap: w,
|
|
487
|
+
internalGap: O,
|
|
488
|
+
scale: S,
|
|
489
|
+
type: N,
|
|
490
|
+
background: le,
|
|
491
|
+
disabled: W,
|
|
492
|
+
fontFamily: R,
|
|
493
|
+
fontSize: y,
|
|
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;
|
|
443
497
|
return {
|
|
444
498
|
disabled: o,
|
|
445
|
-
display:
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
type: Ne,
|
|
456
|
-
font: z,
|
|
457
|
-
background: ye,
|
|
499
|
+
display: s,
|
|
500
|
+
boxRadius: ve,
|
|
501
|
+
hoverEffect: D,
|
|
502
|
+
activeHoverEffect: Ne,
|
|
503
|
+
itemGap: Re,
|
|
504
|
+
internalGap: $e,
|
|
505
|
+
scale: We,
|
|
506
|
+
type: Oe,
|
|
507
|
+
font: K,
|
|
508
|
+
background: Ae,
|
|
458
509
|
fontSize: m,
|
|
459
|
-
fontWeight:
|
|
510
|
+
fontWeight: p
|
|
460
511
|
};
|
|
461
|
-
}),
|
|
462
|
-
display:
|
|
463
|
-
})),
|
|
464
|
-
const o =
|
|
512
|
+
}), se = t(() => f.value.disabled), oe = t(() => ({
|
|
513
|
+
display: f.value.display
|
|
514
|
+
})), ge = t(() => f.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), ne = t(() => {
|
|
515
|
+
const o = f.value;
|
|
465
516
|
return {
|
|
466
517
|
fontSize: o.fontSize,
|
|
467
518
|
fontWeight: o.fontWeight
|
|
468
519
|
};
|
|
469
|
-
}),
|
|
470
|
-
const o =
|
|
471
|
-
return o.
|
|
472
|
-
}),
|
|
473
|
-
const o =
|
|
474
|
-
return o.activeHoverEffect
|
|
475
|
-
}),
|
|
476
|
-
const o =
|
|
477
|
-
return o.
|
|
478
|
-
}), Ve = t(() => p.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), pe = t(() => {
|
|
479
|
-
const o = p.value;
|
|
480
|
-
return o.background ? "#ffffff" : o.textColor;
|
|
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
|
+
const o = f.value;
|
|
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
|
+
const o = f.value;
|
|
525
|
+
return o.activeHoverEffect && o.background ? `${V.value}80` : V.value;
|
|
526
|
+
}), ce = t(() => f.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), Te = t(() => {
|
|
527
|
+
const o = f.value, s = P.value === "dark" ? M.value : te.value;
|
|
528
|
+
return o.background ? "#ffffff" : s;
|
|
481
529
|
});
|
|
482
|
-
t(() =>
|
|
483
|
-
const
|
|
484
|
-
const
|
|
485
|
-
return !
|
|
486
|
-
}), u = t(() => {
|
|
487
|
-
const o = p.value;
|
|
488
|
-
return `${o.boxRadius > 7 ? 7 : o.boxRadius}px`;
|
|
530
|
+
t(() => f.value.background ? "19px" : "auto");
|
|
531
|
+
const u = t(() => {
|
|
532
|
+
const s = f.value.internalGap;
|
|
533
|
+
return !s || s < 0 ? 0 : `${s}px`;
|
|
489
534
|
}), c = t(() => {
|
|
490
|
-
const
|
|
491
|
-
return
|
|
492
|
-
}),
|
|
493
|
-
|
|
494
|
-
|
|
535
|
+
const o = f.value;
|
|
536
|
+
return `${o.boxRadius > 7 ? 7 : o.boxRadius}px`;
|
|
537
|
+
}), H = t(() => {
|
|
538
|
+
const s = f.value.itemGap;
|
|
539
|
+
return !s || s < 0 ? 0 : `${s}px`;
|
|
540
|
+
}), b = t(() => f.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), $ = t(() => ({
|
|
541
|
+
zoom: f.value.scale
|
|
542
|
+
})), fe = t(() => {
|
|
495
543
|
const o = {};
|
|
496
|
-
|
|
497
|
-
const
|
|
498
|
-
"aria-label":
|
|
499
|
-
"aria-disabled":
|
|
544
|
+
T.value && Object.keys(T.value).forEach((m) => o[`aria-${m}`] = T.value[m]);
|
|
545
|
+
const s = {
|
|
546
|
+
"aria-label": j.value,
|
|
547
|
+
"aria-disabled": W.value,
|
|
500
548
|
...o
|
|
501
549
|
};
|
|
502
550
|
return Object.fromEntries(
|
|
503
|
-
Object.entries(
|
|
551
|
+
Object.entries(s).filter(([K, m]) => m != null)
|
|
504
552
|
);
|
|
505
|
-
}),
|
|
506
|
-
|
|
507
|
-
},
|
|
508
|
-
|
|
553
|
+
}), k = () => {
|
|
554
|
+
g.value = z.value;
|
|
555
|
+
}, ue = () => {
|
|
556
|
+
i("clicked");
|
|
509
557
|
};
|
|
510
|
-
return
|
|
511
|
-
o !==
|
|
512
|
-
}),
|
|
513
|
-
o !==
|
|
514
|
-
}), (o,
|
|
558
|
+
return U(z, (o, s) => {
|
|
559
|
+
o !== s && k();
|
|
560
|
+
}), U(g, (o, s) => {
|
|
561
|
+
o !== s && (i("current-value", o), i("changed", o));
|
|
562
|
+
}), (o, s) => e.nbId && de.value ? (B(), _("div", {
|
|
515
563
|
key: 0,
|
|
516
|
-
class:
|
|
517
|
-
style:
|
|
564
|
+
class: Y(["nb-wrapper", se.value]),
|
|
565
|
+
style: ie([oe.value, $.value])
|
|
518
566
|
}, [
|
|
519
|
-
|
|
567
|
+
I("div", Ye({
|
|
520
568
|
id: e.nbId,
|
|
521
569
|
role: "group"
|
|
522
|
-
},
|
|
523
|
-
class: ["nb-reset", "component",
|
|
570
|
+
}, fe.value, {
|
|
571
|
+
class: ["nb-reset", "component", ge.value, be.value]
|
|
524
572
|
}), [
|
|
525
|
-
(
|
|
573
|
+
(B(!0), _(xt, null, kt(l(A), (K, m) => (B(), _("div", {
|
|
526
574
|
key: m,
|
|
527
575
|
class: "component-checkbox__item"
|
|
528
576
|
}, [
|
|
529
|
-
|
|
530
|
-
id: `${e.nbId}-${
|
|
531
|
-
"onUpdate:modelValue":
|
|
577
|
+
Je(I("input", {
|
|
578
|
+
id: `${e.nbId}-${K.value}`,
|
|
579
|
+
"onUpdate:modelValue": s[0] || (s[0] = (p) => g.value = p),
|
|
532
580
|
type: "checkbox",
|
|
533
581
|
class: "component-checkbox__item--input",
|
|
534
|
-
disabled: l(
|
|
535
|
-
value:
|
|
582
|
+
disabled: l(W),
|
|
583
|
+
value: K.value,
|
|
536
584
|
name: e.groupName,
|
|
537
|
-
onClick:
|
|
585
|
+
onClick: ue
|
|
538
586
|
}, null, 8, _a), [
|
|
539
|
-
[ga,
|
|
587
|
+
[ga, g.value]
|
|
540
588
|
]),
|
|
541
|
-
|
|
542
|
-
for: `${e.nbId}-${
|
|
543
|
-
class:
|
|
544
|
-
tabindex: l(
|
|
589
|
+
I("label", {
|
|
590
|
+
for: `${e.nbId}-${K.value}`,
|
|
591
|
+
class: Y([[b.value], "component-checkbox__item--label"]),
|
|
592
|
+
tabindex: l(W) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[m] : e.tabIndex >= 0 ? e.tabIndex : m + 1,
|
|
545
593
|
onKeydown: [
|
|
546
|
-
|
|
547
|
-
|
|
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"]))
|
|
548
596
|
]
|
|
549
597
|
}, [
|
|
550
|
-
|
|
551
|
-
class:
|
|
598
|
+
I("div", {
|
|
599
|
+
class: Y([ce.value])
|
|
552
600
|
}, null, 2),
|
|
553
|
-
|
|
554
|
-
style:
|
|
555
|
-
},
|
|
601
|
+
I("span", {
|
|
602
|
+
style: ie([ne.value])
|
|
603
|
+
}, je(K.text), 5)
|
|
556
604
|
], 42, Ia)
|
|
557
605
|
]))), 128))
|
|
558
606
|
], 16, Ba)
|
|
559
|
-
], 6)) :
|
|
607
|
+
], 6)) : re("", !0);
|
|
560
608
|
}
|
|
561
|
-
}),
|
|
562
|
-
const
|
|
563
|
-
class: /* @__PURE__ */
|
|
564
|
-
},
|
|
609
|
+
}), Aa = /* @__PURE__ */ Ze(Ta, [["__scopeId", "data-v-9de547d7"]]);
|
|
610
|
+
const Ea = ["id"], wa = {
|
|
611
|
+
class: /* @__PURE__ */ Y(["component__eye-icon", "fas"])
|
|
612
|
+
}, Da = { key: 0 }, La = { key: 1 }, Na = ["id", "name", "type", "placeholder", "disabled", "required", "readonly", "autocomplete", "tabindex"], Ra = ["for"], $a = /* @__PURE__ */ Object.assign({
|
|
565
613
|
name: "NbInput",
|
|
566
614
|
inheritAttrs: !1
|
|
567
615
|
}, {
|
|
@@ -575,8 +623,8 @@ const wa = ["id"], Ea = {
|
|
|
575
623
|
type: String,
|
|
576
624
|
default: "b",
|
|
577
625
|
validator: (e = "b") => {
|
|
578
|
-
const
|
|
579
|
-
return ["b", "ib"].includes(
|
|
626
|
+
const r = e.toLowerCase();
|
|
627
|
+
return ["b", "ib"].includes(r);
|
|
580
628
|
}
|
|
581
629
|
},
|
|
582
630
|
tabIndex: {
|
|
@@ -910,123 +958,123 @@ const wa = ["id"], Ea = {
|
|
|
910
958
|
"clicked",
|
|
911
959
|
"entered"
|
|
912
960
|
],
|
|
913
|
-
setup(e, { emit:
|
|
914
|
-
|
|
915
|
-
"
|
|
916
|
-
"
|
|
917
|
-
"
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
"
|
|
921
|
-
"
|
|
922
|
-
|
|
923
|
-
"
|
|
924
|
-
"
|
|
925
|
-
"
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
"
|
|
931
|
-
"
|
|
932
|
-
"
|
|
933
|
-
|
|
934
|
-
"
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
"
|
|
938
|
-
"
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
"
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
"
|
|
945
|
-
"
|
|
946
|
-
"
|
|
947
|
-
"
|
|
948
|
-
|
|
949
|
-
"
|
|
950
|
-
|
|
951
|
-
"
|
|
952
|
-
})),
|
|
953
|
-
|
|
961
|
+
setup(e, { emit: r }) {
|
|
962
|
+
Ue((a) => ({
|
|
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
|
+
})), Qe(() => {
|
|
1001
|
+
Z.value = ne.value;
|
|
954
1002
|
}), ba(() => {
|
|
955
|
-
|
|
1003
|
+
Dt();
|
|
956
1004
|
});
|
|
957
|
-
const
|
|
958
|
-
display:
|
|
959
|
-
hasTabIndexEnter:
|
|
960
|
-
ariaLabel:
|
|
961
|
-
ariaAttrs:
|
|
962
|
-
textColor:
|
|
963
|
-
caretColor:
|
|
964
|
-
selectionBgColor:
|
|
965
|
-
selectionTextColor:
|
|
966
|
-
hasBorderRadius:
|
|
967
|
-
borderRadius:
|
|
968
|
-
disabled:
|
|
969
|
-
fontFamily:
|
|
970
|
-
fontSize:
|
|
971
|
-
fontWeight:
|
|
972
|
-
fontFamilyMsg:
|
|
973
|
-
fontSizeMsg:
|
|
974
|
-
fontWeightMsg:
|
|
975
|
-
textMessageColor:
|
|
976
|
-
inputWidth:
|
|
977
|
-
inputStyle:
|
|
978
|
-
activeTextStyle:
|
|
979
|
-
sizeMediaQuery:
|
|
980
|
-
inputReadonly:
|
|
981
|
-
showInputEye:
|
|
982
|
-
inputType:
|
|
983
|
-
hasTrim:
|
|
984
|
-
inputUppercase:
|
|
985
|
-
inputName:
|
|
986
|
-
inputPlaceholder:
|
|
987
|
-
inputText:
|
|
988
|
-
theme:
|
|
989
|
-
inputEyeIcon:
|
|
990
|
-
tabindex:
|
|
991
|
-
inputEyeIconHidden:
|
|
992
|
-
lightBgColor:
|
|
993
|
-
lightBgColorFocus:
|
|
994
|
-
lightEyeBgColor:
|
|
995
|
-
lightEyeBgColorActive:
|
|
996
|
-
lightDisabledBgColor:
|
|
997
|
-
lightTextColor:
|
|
998
|
-
darkBgColor:
|
|
999
|
-
darkBgColorFocus:
|
|
1000
|
-
darkEyeBgColor:
|
|
1001
|
-
darkEyeBgColorActive:
|
|
1002
|
-
darkDisabledBgColor:
|
|
1003
|
-
darkTextColor:
|
|
1004
|
-
darkDisabledEyeBgColor:
|
|
1005
|
-
lightDisabledEyeBgColor:
|
|
1006
|
-
textAlign:
|
|
1007
|
-
showMsg:
|
|
1008
|
-
hasMsg:
|
|
1009
|
-
hasIcon:
|
|
1010
|
-
iconDirection:
|
|
1011
|
-
iconPadding:
|
|
1012
|
-
iconPaddingInput:
|
|
1013
|
-
iconMargin:
|
|
1014
|
-
iconBorderRadius:
|
|
1015
|
-
iconLightTextColor:
|
|
1016
|
-
iconDarkTextColor:
|
|
1017
|
-
iconLightBgColor:
|
|
1018
|
-
iconDarkBgColor:
|
|
1019
|
-
iconLightBgColorActive:
|
|
1020
|
-
iconDarkBgColorActive:
|
|
1021
|
-
iconLightDisabledBgColor:
|
|
1022
|
-
iconDarkDisabledBgColor:
|
|
1023
|
-
iconWidth:
|
|
1024
|
-
iconSize:
|
|
1025
|
-
} =
|
|
1026
|
-
const a =
|
|
1005
|
+
const i = r, L = e, {
|
|
1006
|
+
display: g,
|
|
1007
|
+
hasTabIndexEnter: j,
|
|
1008
|
+
ariaLabel: T,
|
|
1009
|
+
ariaAttrs: z,
|
|
1010
|
+
textColor: J,
|
|
1011
|
+
caretColor: A,
|
|
1012
|
+
selectionBgColor: P,
|
|
1013
|
+
selectionTextColor: te,
|
|
1014
|
+
hasBorderRadius: q,
|
|
1015
|
+
borderRadius: C,
|
|
1016
|
+
disabled: M,
|
|
1017
|
+
fontFamily: G,
|
|
1018
|
+
fontSize: V,
|
|
1019
|
+
fontWeight: E,
|
|
1020
|
+
fontFamilyMsg: Q,
|
|
1021
|
+
fontSizeMsg: ae,
|
|
1022
|
+
fontWeightMsg: w,
|
|
1023
|
+
textMessageColor: O,
|
|
1024
|
+
inputWidth: S,
|
|
1025
|
+
inputStyle: N,
|
|
1026
|
+
activeTextStyle: le,
|
|
1027
|
+
sizeMediaQuery: W,
|
|
1028
|
+
inputReadonly: R,
|
|
1029
|
+
showInputEye: y,
|
|
1030
|
+
inputType: x,
|
|
1031
|
+
hasTrim: f,
|
|
1032
|
+
inputUppercase: se,
|
|
1033
|
+
inputName: oe,
|
|
1034
|
+
inputPlaceholder: ge,
|
|
1035
|
+
inputText: ne,
|
|
1036
|
+
theme: de,
|
|
1037
|
+
inputEyeIcon: be,
|
|
1038
|
+
tabindex: he,
|
|
1039
|
+
inputEyeIconHidden: me,
|
|
1040
|
+
lightBgColor: Ce,
|
|
1041
|
+
lightBgColorFocus: Ve,
|
|
1042
|
+
lightEyeBgColor: Se,
|
|
1043
|
+
lightEyeBgColorActive: Le,
|
|
1044
|
+
lightDisabledBgColor: xe,
|
|
1045
|
+
lightTextColor: ke,
|
|
1046
|
+
darkBgColor: Be,
|
|
1047
|
+
darkBgColorFocus: _e,
|
|
1048
|
+
darkEyeBgColor: Ie,
|
|
1049
|
+
darkEyeBgColorActive: ce,
|
|
1050
|
+
darkDisabledBgColor: Te,
|
|
1051
|
+
darkTextColor: u,
|
|
1052
|
+
darkDisabledEyeBgColor: c,
|
|
1053
|
+
lightDisabledEyeBgColor: H,
|
|
1054
|
+
textAlign: b,
|
|
1055
|
+
showMsg: $,
|
|
1056
|
+
hasMsg: fe,
|
|
1057
|
+
hasIcon: k,
|
|
1058
|
+
iconDirection: ue,
|
|
1059
|
+
iconPadding: o,
|
|
1060
|
+
iconPaddingInput: s,
|
|
1061
|
+
iconMargin: K,
|
|
1062
|
+
iconBorderRadius: m,
|
|
1063
|
+
iconLightTextColor: p,
|
|
1064
|
+
iconDarkTextColor: ve,
|
|
1065
|
+
iconLightBgColor: D,
|
|
1066
|
+
iconDarkBgColor: Ne,
|
|
1067
|
+
iconLightBgColorActive: Re,
|
|
1068
|
+
iconDarkBgColorActive: $e,
|
|
1069
|
+
iconLightDisabledBgColor: Oe,
|
|
1070
|
+
iconDarkDisabledBgColor: We,
|
|
1071
|
+
iconWidth: Ae,
|
|
1072
|
+
iconSize: He
|
|
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;
|
|
1027
1075
|
return {
|
|
1028
1076
|
disabled: a,
|
|
1029
|
-
display:
|
|
1077
|
+
display: v,
|
|
1030
1078
|
font: Wt,
|
|
1031
1079
|
fontSize: Ht,
|
|
1032
1080
|
fontWeight: Ft,
|
|
@@ -1034,12 +1082,12 @@ const wa = ["id"], Ea = {
|
|
|
1034
1082
|
fontSizeMsg: Pt,
|
|
1035
1083
|
fontWeightMsg: qt,
|
|
1036
1084
|
textMessageColor: Gt,
|
|
1037
|
-
textColor:
|
|
1038
|
-
caretColor:
|
|
1039
|
-
selectionBgColor:
|
|
1040
|
-
selectionTextColor:
|
|
1041
|
-
hasBorderRadius:
|
|
1042
|
-
borderRadius:
|
|
1085
|
+
textColor: ye,
|
|
1086
|
+
caretColor: De,
|
|
1087
|
+
selectionBgColor: $t,
|
|
1088
|
+
selectionTextColor: zt,
|
|
1089
|
+
hasBorderRadius: Mt,
|
|
1090
|
+
borderRadius: Ot,
|
|
1043
1091
|
textAlign: ta,
|
|
1044
1092
|
inputWidth: Kt,
|
|
1045
1093
|
activeTextStyle: Ut,
|
|
@@ -1060,16 +1108,16 @@ const wa = ["id"], Ea = {
|
|
|
1060
1108
|
iconBorderRadius: da,
|
|
1061
1109
|
iconLightBgColorActive: ca,
|
|
1062
1110
|
iconDarkBgColorActive: fa,
|
|
1063
|
-
iconWidth:
|
|
1064
|
-
iconSize:
|
|
1111
|
+
iconWidth: va,
|
|
1112
|
+
iconSize: pa
|
|
1065
1113
|
};
|
|
1066
|
-
}), et = t(() =>
|
|
1067
|
-
display:
|
|
1068
|
-
})),
|
|
1069
|
-
const a =
|
|
1114
|
+
}), et = t(() => d.value.disabled), tt = t(() => ({
|
|
1115
|
+
display: d.value.display
|
|
1116
|
+
})), Pe = t(() => {
|
|
1117
|
+
const a = d.value;
|
|
1070
1118
|
if (a.fontSize)
|
|
1071
1119
|
return `${a.fontSize}em`;
|
|
1072
|
-
let
|
|
1120
|
+
let v = "";
|
|
1073
1121
|
switch (a.sizeMediaQuery) {
|
|
1074
1122
|
case "sm":
|
|
1075
1123
|
return "1.2em";
|
|
@@ -1078,34 +1126,34 @@ const wa = ["id"], Ea = {
|
|
|
1078
1126
|
case "lg":
|
|
1079
1127
|
return "2em";
|
|
1080
1128
|
default:
|
|
1081
|
-
|
|
1129
|
+
v = "1.2em";
|
|
1082
1130
|
}
|
|
1083
|
-
return
|
|
1131
|
+
return v;
|
|
1084
1132
|
}), at = t(() => {
|
|
1085
|
-
const a =
|
|
1133
|
+
const a = d.value;
|
|
1086
1134
|
return {
|
|
1087
|
-
fontSize:
|
|
1135
|
+
fontSize: Pe.value,
|
|
1088
1136
|
fontWeight: a.fontWeight
|
|
1089
1137
|
};
|
|
1090
|
-
}),
|
|
1091
|
-
const a =
|
|
1138
|
+
}), ze = t(() => {
|
|
1139
|
+
const a = d.value;
|
|
1092
1140
|
return a.inputStyle !== "line" && a.hasBorderRadius ? { borderRadius: `${a.borderRadius}rem` } : {};
|
|
1093
|
-
}), lt = t(() =>
|
|
1094
|
-
const a =
|
|
1141
|
+
}), lt = t(() => d.value.font), ot = t(() => d.value.fontFamilyMsg), nt = t(() => d.value.fontSizeMsg), ut = t(() => d.value.fontWeightMsg), rt = t(() => d.value.textColor), qe = t(() => d.value.textMessageColor), n = t(() => {
|
|
1142
|
+
const a = d.value;
|
|
1095
1143
|
return a.caretColor || (a.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1096
|
-
}),
|
|
1097
|
-
const a =
|
|
1144
|
+
}), h = t(() => {
|
|
1145
|
+
const a = d.value;
|
|
1098
1146
|
return a.selectionBgColor || (a.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1099
|
-
}),
|
|
1100
|
-
const a =
|
|
1147
|
+
}), F = t(() => {
|
|
1148
|
+
const a = d.value;
|
|
1101
1149
|
return a.selectionTextColor || (a.theme === "dark" ? "#000000" : "#ffffff");
|
|
1102
|
-
}),
|
|
1103
|
-
const a =
|
|
1150
|
+
}), ee = t(() => {
|
|
1151
|
+
const a = d.value;
|
|
1104
1152
|
return a.display === "block" ? { width: "100%" } : {
|
|
1105
1153
|
width: `${a.inputWidth}px`
|
|
1106
1154
|
};
|
|
1107
1155
|
}), it = t(() => {
|
|
1108
|
-
switch (
|
|
1156
|
+
switch (N.value) {
|
|
1109
1157
|
case "line":
|
|
1110
1158
|
return "component__input--line";
|
|
1111
1159
|
case "border":
|
|
@@ -1114,7 +1162,7 @@ const wa = ["id"], Ea = {
|
|
|
1114
1162
|
return "component__input--background";
|
|
1115
1163
|
}
|
|
1116
1164
|
}), st = t(() => {
|
|
1117
|
-
switch (
|
|
1165
|
+
switch (d.value.activeTextStyle) {
|
|
1118
1166
|
case "italic":
|
|
1119
1167
|
return "component__input--active--italic";
|
|
1120
1168
|
case "oblique":
|
|
@@ -1123,7 +1171,7 @@ const wa = ["id"], Ea = {
|
|
|
1123
1171
|
return "component__input--active--normal";
|
|
1124
1172
|
}
|
|
1125
1173
|
}), dt = t(() => {
|
|
1126
|
-
switch (
|
|
1174
|
+
switch (d.value.sizeMediaQuery) {
|
|
1127
1175
|
case "sm":
|
|
1128
1176
|
return "component__sm";
|
|
1129
1177
|
case "md":
|
|
@@ -1134,145 +1182,145 @@ const wa = ["id"], Ea = {
|
|
|
1134
1182
|
return "";
|
|
1135
1183
|
}
|
|
1136
1184
|
}), ct = t(() => {
|
|
1137
|
-
switch (
|
|
1185
|
+
switch (d.value.theme) {
|
|
1138
1186
|
case "dark":
|
|
1139
1187
|
return "component__theme--dark";
|
|
1140
1188
|
default:
|
|
1141
1189
|
return "component__theme--light";
|
|
1142
1190
|
}
|
|
1143
|
-
}), ft = t(() =>
|
|
1144
|
-
const a =
|
|
1191
|
+
}), ft = t(() => d.value.inputReadonly ? "component__input--read-only" : ""), vt = t(() => d.value.inputUppercase ? "component__input--uppercase" : ""), Ge = t(() => {
|
|
1192
|
+
const a = d.value;
|
|
1145
1193
|
return !!(a.showInputEye && a.inputType === "password");
|
|
1146
|
-
}),
|
|
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(() => {
|
|
1147
1195
|
const a = {};
|
|
1148
|
-
|
|
1149
|
-
const
|
|
1150
|
-
"aria-label":
|
|
1151
|
-
"aria-disabled":
|
|
1196
|
+
z.value && Object.keys(z.value).forEach((De) => a[`aria-${De}`] = z.value[De]);
|
|
1197
|
+
const v = {
|
|
1198
|
+
"aria-label": T.value,
|
|
1199
|
+
"aria-disabled": M.value,
|
|
1152
1200
|
...a
|
|
1153
1201
|
};
|
|
1154
1202
|
return Object.fromEntries(
|
|
1155
|
-
Object.entries(
|
|
1203
|
+
Object.entries(v).filter(([ye, De]) => De != null)
|
|
1156
1204
|
);
|
|
1157
|
-
}), Ct = t(() =>
|
|
1158
|
-
const a =
|
|
1159
|
-
return
|
|
1160
|
-
}), At = t(() => {
|
|
1161
|
-
const a = s.value;
|
|
1162
|
-
return M.value ? a.iconMargin : "0";
|
|
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
|
+
const a = d.value;
|
|
1207
|
+
return k.value ? a.iconPadding : "0";
|
|
1163
1208
|
}), Tt = t(() => {
|
|
1164
|
-
const a =
|
|
1165
|
-
return
|
|
1166
|
-
}),
|
|
1167
|
-
const a =
|
|
1168
|
-
return
|
|
1209
|
+
const a = d.value;
|
|
1210
|
+
return k.value ? a.iconMargin : "0";
|
|
1211
|
+
}), At = t(() => {
|
|
1212
|
+
const a = d.value;
|
|
1213
|
+
return k.value ? a.theme === "dark" ? a.iconDarkBgColor : a.iconLightBgColor : "transparent";
|
|
1169
1214
|
}), Et = t(() => {
|
|
1170
|
-
const a =
|
|
1171
|
-
return
|
|
1172
|
-
}),
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1215
|
+
const a = d.value;
|
|
1216
|
+
return k.value ? `${a.iconBorderRadius}rem` : "0";
|
|
1217
|
+
}), wt = t(() => {
|
|
1218
|
+
const a = d.value;
|
|
1219
|
+
return k.value ? ue.value === "left" ? { paddingLeft: `${a.iconPaddingInput}px` } : { paddingRight: `${a.iconPaddingInput}px` } : {};
|
|
1220
|
+
}), Dt = () => {
|
|
1221
|
+
Z.value = ne.value, Ee.value = x.value;
|
|
1222
|
+
}, Lt = () => {
|
|
1223
|
+
const a = d.value;
|
|
1176
1224
|
if (a.inputReadonly || a.disabled)
|
|
1177
1225
|
return;
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1226
|
+
const v = !pe.value;
|
|
1227
|
+
v ? Ee.value = "text" : Ee.value = x.value, pe.value = v;
|
|
1228
|
+
}, Nt = () => {
|
|
1229
|
+
i("clicked");
|
|
1180
1230
|
}, Rt = () => {
|
|
1181
|
-
|
|
1182
|
-
}, $t = () => {
|
|
1183
|
-
T.value || s.value.inputReadonly || !W.value || r("entered", ae.value);
|
|
1231
|
+
M.value || d.value.inputReadonly || !j.value || i("entered", Z.value);
|
|
1184
1232
|
};
|
|
1185
|
-
return
|
|
1186
|
-
|
|
1187
|
-
}, { immediate: !0 }),
|
|
1188
|
-
a !==
|
|
1189
|
-
}, { immediate: !0 }),
|
|
1190
|
-
|
|
1191
|
-
}),
|
|
1192
|
-
|
|
1193
|
-
}),
|
|
1194
|
-
|
|
1195
|
-
}, { immediate: !0 }),
|
|
1196
|
-
|
|
1197
|
-
}),
|
|
1233
|
+
return U(x, (a) => {
|
|
1234
|
+
Ee.value = a;
|
|
1235
|
+
}, { immediate: !0 }), U(ne, (a) => {
|
|
1236
|
+
a !== Z.value && (Z.value = a);
|
|
1237
|
+
}, { immediate: !0 }), U(Z, (a) => {
|
|
1238
|
+
f.value && (a = a.trim()), i("changed", a);
|
|
1239
|
+
}), U(we, (a) => {
|
|
1240
|
+
i(a ? "focused" : "blurred");
|
|
1241
|
+
}), U(pe, (a) => {
|
|
1242
|
+
i("show-input-eye", a);
|
|
1243
|
+
}, { immediate: !0 }), U(Z, (a) => {
|
|
1244
|
+
f.value && (a = a.trim()), i("current-value", a);
|
|
1245
|
+
}), U(x, (a) => {
|
|
1198
1246
|
a === "password" && nextTick(() => {
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1247
|
+
const v = document.getElementById(oe.value);
|
|
1248
|
+
v && (v.type = "password", v.removeAttribute("autocomplete"));
|
|
1201
1249
|
});
|
|
1202
|
-
}), (a,
|
|
1250
|
+
}), (a, v) => e.nbId ? (B(), _("div", Ye({
|
|
1203
1251
|
key: 0,
|
|
1204
1252
|
class: ["nb-wrapper", et.value],
|
|
1205
|
-
style: [tt.value,
|
|
1253
|
+
style: [tt.value, ee.value, ze.value],
|
|
1206
1254
|
role: "input"
|
|
1207
|
-
},
|
|
1208
|
-
|
|
1255
|
+
}, mt.value), [
|
|
1256
|
+
I("div", {
|
|
1209
1257
|
id: e.nbId,
|
|
1210
|
-
class:
|
|
1211
|
-
style:
|
|
1212
|
-
onClick:
|
|
1258
|
+
class: Y(["nb-reset", "component", dt.value, ct.value, ft.value, it.value]),
|
|
1259
|
+
style: ie([at.value, ee.value, ze.value]),
|
|
1260
|
+
onClick: Nt
|
|
1213
1261
|
}, [
|
|
1214
|
-
|
|
1262
|
+
Ge.value ? (B(), _("div", {
|
|
1215
1263
|
key: 0,
|
|
1216
|
-
class:
|
|
1217
|
-
style:
|
|
1218
|
-
onClick:
|
|
1264
|
+
class: Y(["component__eye", gt.value]),
|
|
1265
|
+
style: ie([ze.value]),
|
|
1266
|
+
onClick: Lt
|
|
1219
1267
|
}, [
|
|
1220
|
-
|
|
1221
|
-
e.inputEyeCustomIcon ? (
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
], !0) :
|
|
1225
|
-
|
|
1268
|
+
I("span", wa, [
|
|
1269
|
+
e.inputEyeCustomIcon ? (B(), _("span", La, [
|
|
1270
|
+
pe.value ? Fe(a.$slots, "eye-icon-show", { key: 0 }, () => [
|
|
1271
|
+
v[4] || (v[4] = Vt("show"))
|
|
1272
|
+
], !0) : Fe(a.$slots, "eye-icon-hidden", { key: 1 }, () => [
|
|
1273
|
+
v[5] || (v[5] = Vt("hidden"))
|
|
1226
1274
|
], !0)
|
|
1227
|
-
])) : (
|
|
1275
|
+
])) : (B(), _("span", Da, je(pt.value), 1))
|
|
1228
1276
|
])
|
|
1229
|
-
], 6)) :
|
|
1230
|
-
|
|
1231
|
-
"onUpdate:modelValue":
|
|
1232
|
-
id: l(
|
|
1233
|
-
name: l(
|
|
1234
|
-
type:
|
|
1235
|
-
class:
|
|
1236
|
-
|
|
1277
|
+
], 6)) : re("", !0),
|
|
1278
|
+
Je(I("input", {
|
|
1279
|
+
"onUpdate:modelValue": v[0] || (v[0] = (ye) => Z.value = ye),
|
|
1280
|
+
id: l(oe),
|
|
1281
|
+
name: l(oe),
|
|
1282
|
+
type: Ee.value,
|
|
1283
|
+
class: Y(["component__input", [
|
|
1284
|
+
vt.value,
|
|
1237
1285
|
yt.value,
|
|
1238
1286
|
st.value
|
|
1239
1287
|
]]),
|
|
1240
|
-
placeholder: l(
|
|
1241
|
-
disabled: l(
|
|
1288
|
+
placeholder: l(ge),
|
|
1289
|
+
disabled: l(M) || l(R),
|
|
1242
1290
|
required: e.required,
|
|
1243
|
-
readonly: l(
|
|
1291
|
+
readonly: l(R),
|
|
1244
1292
|
autocomplete: e.inputAutocomplete,
|
|
1245
|
-
tabindex: l(
|
|
1293
|
+
tabindex: l(M) || l(R) ? -1 : l(he),
|
|
1246
1294
|
role: "input",
|
|
1247
|
-
style:
|
|
1248
|
-
onFocus:
|
|
1249
|
-
onBlur:
|
|
1250
|
-
onKeydown:
|
|
1251
|
-
}, null, 46,
|
|
1252
|
-
[
|
|
1295
|
+
style: ie([ze.value, wt.value]),
|
|
1296
|
+
onFocus: v[1] || (v[1] = (ye) => we.value = !0),
|
|
1297
|
+
onBlur: v[2] || (v[2] = (ye) => we.value = !1),
|
|
1298
|
+
onKeydown: v[3] || (v[3] = Me((ye) => !l(M) && l(j) && Rt(), ["enter"]))
|
|
1299
|
+
}, null, 46, Na), [
|
|
1300
|
+
[ha, Z.value]
|
|
1253
1301
|
]),
|
|
1254
|
-
l(
|
|
1302
|
+
l(k) ? (B(), _("label", {
|
|
1255
1303
|
key: 1,
|
|
1256
|
-
for: l(
|
|
1257
|
-
class:
|
|
1304
|
+
for: l(oe),
|
|
1305
|
+
class: Y(["component__icon", _t.value])
|
|
1258
1306
|
}, [
|
|
1259
|
-
|
|
1260
|
-
|
|
1307
|
+
Fe(a.$slots, "icon", {}, () => [
|
|
1308
|
+
v[6] || (v[6] = I("span", null, "♥", -1))
|
|
1261
1309
|
], !0)
|
|
1262
|
-
], 10,
|
|
1263
|
-
], 14,
|
|
1264
|
-
|
|
1310
|
+
], 10, Ra)) : re("", !0)
|
|
1311
|
+
], 14, Ea),
|
|
1312
|
+
ht.value ? (B(), _("div", {
|
|
1265
1313
|
key: 0,
|
|
1266
|
-
class:
|
|
1314
|
+
class: Y(["component__message", e.hasCustomMsg ? "component__message--custom" : "component__message--default"])
|
|
1267
1315
|
}, [
|
|
1268
|
-
|
|
1269
|
-
Vt(
|
|
1316
|
+
Fe(a.$slots, "message", {}, () => [
|
|
1317
|
+
Vt(je(e.message), 1)
|
|
1270
1318
|
], !0)
|
|
1271
|
-
], 2)) :
|
|
1272
|
-
], 16)) :
|
|
1319
|
+
], 2)) : re("", !0)
|
|
1320
|
+
], 16)) : re("", !0);
|
|
1273
1321
|
}
|
|
1274
|
-
}),
|
|
1275
|
-
const
|
|
1322
|
+
}), za = /* @__PURE__ */ Ze($a, [["__scopeId", "data-v-66f1b6ed"]]);
|
|
1323
|
+
const Ma = ["id"], Oa = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name", "placeholder", "readonly", "autocomplete", "required", "tabindex"], Fa = /* @__PURE__ */ Object.assign({
|
|
1276
1324
|
name: "NbInputChip",
|
|
1277
1325
|
inheritAttrs: !1
|
|
1278
1326
|
}, {
|
|
@@ -1286,8 +1334,8 @@ const Oa = ["id"], La = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1286
1334
|
type: String,
|
|
1287
1335
|
default: "b",
|
|
1288
1336
|
validator: (e = "b") => {
|
|
1289
|
-
const
|
|
1290
|
-
return ["b", "ib"].includes(
|
|
1337
|
+
const r = e.toLowerCase();
|
|
1338
|
+
return ["b", "ib"].includes(r);
|
|
1291
1339
|
}
|
|
1292
1340
|
},
|
|
1293
1341
|
tabIndex: {
|
|
@@ -1523,125 +1571,125 @@ const Oa = ["id"], La = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1523
1571
|
}
|
|
1524
1572
|
},
|
|
1525
1573
|
emits: ["clicked", "changed", "removed", "added", "input-changed", "focused", "blurred"],
|
|
1526
|
-
setup(e, { emit:
|
|
1527
|
-
|
|
1528
|
-
"
|
|
1529
|
-
"
|
|
1530
|
-
"
|
|
1531
|
-
"
|
|
1532
|
-
"
|
|
1533
|
-
"
|
|
1534
|
-
"
|
|
1535
|
-
"
|
|
1536
|
-
"
|
|
1537
|
-
|
|
1538
|
-
"
|
|
1539
|
-
"
|
|
1540
|
-
"
|
|
1541
|
-
"
|
|
1542
|
-
"
|
|
1543
|
-
"
|
|
1544
|
-
|
|
1545
|
-
"
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
"
|
|
1549
|
-
|
|
1550
|
-
"
|
|
1551
|
-
"
|
|
1552
|
-
"
|
|
1553
|
-
})),
|
|
1554
|
-
|
|
1574
|
+
setup(e, { emit: r }) {
|
|
1575
|
+
Ue((n) => ({
|
|
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
|
+
})), Qe(() => {
|
|
1602
|
+
C.value.length > 0 && (p.value = C.value);
|
|
1555
1603
|
});
|
|
1556
|
-
const
|
|
1557
|
-
display:
|
|
1558
|
-
textColor:
|
|
1559
|
-
paddingX:
|
|
1560
|
-
paddingY:
|
|
1561
|
-
borderRadius:
|
|
1562
|
-
disabled:
|
|
1563
|
-
fontFamily:
|
|
1564
|
-
fontSize:
|
|
1565
|
-
fontWeight:
|
|
1566
|
-
currentList:
|
|
1567
|
-
allowDuplicates:
|
|
1568
|
-
minChips:
|
|
1569
|
-
maxChips:
|
|
1570
|
-
inputPosition:
|
|
1571
|
-
width:
|
|
1572
|
-
inputName:
|
|
1573
|
-
inputPlaceholder:
|
|
1574
|
-
inputUppercase:
|
|
1575
|
-
inputReadonly:
|
|
1576
|
-
inputAutocomplete:
|
|
1577
|
-
required:
|
|
1578
|
-
textAlign:
|
|
1579
|
-
hasBorderRadius:
|
|
1580
|
-
activeTextStyle:
|
|
1581
|
-
theme:
|
|
1582
|
-
inputStyle:
|
|
1583
|
-
lightBgColor:
|
|
1584
|
-
lightBgColorFocus:
|
|
1585
|
-
lightBorderColor:
|
|
1586
|
-
lightBorderColorFocus:
|
|
1587
|
-
lightDisabledBgColor:
|
|
1588
|
-
lightTextColor:
|
|
1589
|
-
lightChipBgColor:
|
|
1590
|
-
lightChipTextColor:
|
|
1591
|
-
lightChipRemoveColor:
|
|
1592
|
-
lightDisabledBorderColor:
|
|
1593
|
-
darkBgColor:
|
|
1594
|
-
darkBgColorFocus:
|
|
1595
|
-
darkBorderColor:
|
|
1596
|
-
darkBorderColorFocus:
|
|
1597
|
-
darkDisabledBgColor:
|
|
1598
|
-
darkTextColor:
|
|
1599
|
-
darkChipBgColor:
|
|
1600
|
-
darkChipTextColor:
|
|
1601
|
-
darkChipRemoveColor:
|
|
1602
|
-
darkDisabledBorderColor:
|
|
1603
|
-
tabIndex:
|
|
1604
|
-
hasTabIndexEnter:
|
|
1605
|
-
ariaLabel:
|
|
1606
|
-
ariaAttrs:
|
|
1607
|
-
caretColor:
|
|
1608
|
-
selectionBgColor:
|
|
1609
|
-
selectionTextColor:
|
|
1610
|
-
} =
|
|
1611
|
-
const n =
|
|
1604
|
+
const i = r, L = e, {
|
|
1605
|
+
display: g,
|
|
1606
|
+
textColor: j,
|
|
1607
|
+
paddingX: T,
|
|
1608
|
+
paddingY: z,
|
|
1609
|
+
borderRadius: J,
|
|
1610
|
+
disabled: A,
|
|
1611
|
+
fontFamily: P,
|
|
1612
|
+
fontSize: te,
|
|
1613
|
+
fontWeight: q,
|
|
1614
|
+
currentList: C,
|
|
1615
|
+
allowDuplicates: M,
|
|
1616
|
+
minChips: G,
|
|
1617
|
+
maxChips: V,
|
|
1618
|
+
inputPosition: E,
|
|
1619
|
+
width: Q,
|
|
1620
|
+
inputName: ae,
|
|
1621
|
+
inputPlaceholder: w,
|
|
1622
|
+
inputUppercase: O,
|
|
1623
|
+
inputReadonly: S,
|
|
1624
|
+
inputAutocomplete: N,
|
|
1625
|
+
required: le,
|
|
1626
|
+
textAlign: W,
|
|
1627
|
+
hasBorderRadius: R,
|
|
1628
|
+
activeTextStyle: y,
|
|
1629
|
+
theme: x,
|
|
1630
|
+
inputStyle: f,
|
|
1631
|
+
lightBgColor: se,
|
|
1632
|
+
lightBgColorFocus: oe,
|
|
1633
|
+
lightBorderColor: ge,
|
|
1634
|
+
lightBorderColorFocus: ne,
|
|
1635
|
+
lightDisabledBgColor: de,
|
|
1636
|
+
lightTextColor: be,
|
|
1637
|
+
lightChipBgColor: he,
|
|
1638
|
+
lightChipTextColor: me,
|
|
1639
|
+
lightChipRemoveColor: Ce,
|
|
1640
|
+
lightDisabledBorderColor: Ve,
|
|
1641
|
+
darkBgColor: Se,
|
|
1642
|
+
darkBgColorFocus: Le,
|
|
1643
|
+
darkBorderColor: xe,
|
|
1644
|
+
darkBorderColorFocus: ke,
|
|
1645
|
+
darkDisabledBgColor: Be,
|
|
1646
|
+
darkTextColor: _e,
|
|
1647
|
+
darkChipBgColor: Ie,
|
|
1648
|
+
darkChipTextColor: ce,
|
|
1649
|
+
darkChipRemoveColor: Te,
|
|
1650
|
+
darkDisabledBorderColor: u,
|
|
1651
|
+
tabIndex: c,
|
|
1652
|
+
hasTabIndexEnter: H,
|
|
1653
|
+
ariaLabel: b,
|
|
1654
|
+
ariaAttrs: $,
|
|
1655
|
+
caretColor: fe,
|
|
1656
|
+
selectionBgColor: k,
|
|
1657
|
+
selectionTextColor: ue
|
|
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";
|
|
1612
1660
|
return {
|
|
1613
1661
|
disabled: n,
|
|
1614
|
-
display:
|
|
1615
|
-
width:
|
|
1616
|
-
font:
|
|
1617
|
-
fontSize:
|
|
1662
|
+
display: h,
|
|
1663
|
+
width: F,
|
|
1664
|
+
font: Ge,
|
|
1665
|
+
fontSize: pt,
|
|
1618
1666
|
fontWeight: yt,
|
|
1619
|
-
textColor:
|
|
1667
|
+
textColor: ee,
|
|
1620
1668
|
caretColor: it,
|
|
1621
1669
|
selectionBgColor: st,
|
|
1622
1670
|
selectionTextColor: dt,
|
|
1623
1671
|
paddingX: ct,
|
|
1624
1672
|
paddingY: ft,
|
|
1625
|
-
borderRadius:
|
|
1673
|
+
borderRadius: vt,
|
|
1626
1674
|
minChips: gt,
|
|
1627
1675
|
maxChips: bt,
|
|
1628
|
-
inputPosition:
|
|
1629
|
-
inputStyle:
|
|
1676
|
+
inputPosition: ht,
|
|
1677
|
+
inputStyle: mt,
|
|
1630
1678
|
theme: Ct
|
|
1631
1679
|
};
|
|
1632
|
-
}),
|
|
1633
|
-
display:
|
|
1634
|
-
})),
|
|
1635
|
-
const n =
|
|
1680
|
+
}), Ne = t(() => D.value.disabled), Re = t(() => ({
|
|
1681
|
+
display: D.value.display
|
|
1682
|
+
})), $e = t(() => {
|
|
1683
|
+
const n = D.value;
|
|
1636
1684
|
return {
|
|
1637
1685
|
color: n.textColor,
|
|
1638
1686
|
padding: `${n.paddingY}rem ${n.paddingX}rem`,
|
|
1639
1687
|
fontSize: n.fontSize,
|
|
1640
1688
|
fontWeight: n.fontWeight,
|
|
1641
|
-
textAlign:
|
|
1689
|
+
textAlign: W.value
|
|
1642
1690
|
};
|
|
1643
|
-
}),
|
|
1644
|
-
switch (
|
|
1691
|
+
}), Oe = t(() => {
|
|
1692
|
+
switch (y.value) {
|
|
1645
1693
|
case "italic":
|
|
1646
1694
|
return "component__text--italic";
|
|
1647
1695
|
case "oblique":
|
|
@@ -1649,48 +1697,48 @@ const Oa = ["id"], La = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1649
1697
|
default:
|
|
1650
1698
|
return "component__text--normal";
|
|
1651
1699
|
}
|
|
1652
|
-
}),
|
|
1653
|
-
const n =
|
|
1654
|
-
return n.inputStyle !== "line" &&
|
|
1655
|
-
}),
|
|
1700
|
+
}), We = 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(() => {
|
|
1656
1704
|
const n = {};
|
|
1657
|
-
|
|
1658
|
-
const
|
|
1659
|
-
"aria-label":
|
|
1660
|
-
"aria-disabled":
|
|
1705
|
+
$.value && Object.keys($.value).forEach((ee) => n[`aria-${ee}`] = $.value[ee]);
|
|
1706
|
+
const h = {
|
|
1707
|
+
"aria-label": b.value,
|
|
1708
|
+
"aria-disabled": A.value,
|
|
1661
1709
|
...n
|
|
1662
1710
|
};
|
|
1663
1711
|
return Object.fromEntries(
|
|
1664
|
-
Object.entries(
|
|
1712
|
+
Object.entries(h).filter(([F, ee]) => ee != null)
|
|
1665
1713
|
);
|
|
1666
|
-
}),
|
|
1667
|
-
const n =
|
|
1714
|
+
}), pe = t(() => {
|
|
1715
|
+
const n = D.value;
|
|
1668
1716
|
return n.caretColor || (n.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1669
|
-
}),
|
|
1670
|
-
const n =
|
|
1717
|
+
}), we = t(() => {
|
|
1718
|
+
const n = D.value;
|
|
1671
1719
|
return n.selectionBgColor || (n.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1672
|
-
}),
|
|
1673
|
-
const n =
|
|
1720
|
+
}), d = t(() => {
|
|
1721
|
+
const n = D.value;
|
|
1674
1722
|
return n.selectionTextColor || (n.theme === "dark" ? "#000000" : "#ffffff");
|
|
1675
1723
|
}), et = t(() => ({
|
|
1676
|
-
caretColor:
|
|
1724
|
+
caretColor: pe.value
|
|
1677
1725
|
})), tt = t(() => ({
|
|
1678
|
-
"--selection-bg-color":
|
|
1679
|
-
"--selection-text-color":
|
|
1680
|
-
})),
|
|
1681
|
-
const n =
|
|
1726
|
+
"--selection-bg-color": we.value,
|
|
1727
|
+
"--selection-text-color": d.value
|
|
1728
|
+
})), Pe = t(() => {
|
|
1729
|
+
const n = D.value, h = {
|
|
1682
1730
|
width: `${n.width}px`
|
|
1683
1731
|
};
|
|
1684
|
-
return n.display === "block" ? { width: "auto" } :
|
|
1732
|
+
return n.display === "block" ? { width: "auto" } : h;
|
|
1685
1733
|
}), at = t(() => {
|
|
1686
|
-
switch (
|
|
1734
|
+
switch (x.value) {
|
|
1687
1735
|
case "dark":
|
|
1688
1736
|
return "component__theme--dark";
|
|
1689
1737
|
default:
|
|
1690
1738
|
return "component__theme--light";
|
|
1691
1739
|
}
|
|
1692
|
-
}),
|
|
1693
|
-
switch (
|
|
1740
|
+
}), ze = t(() => {
|
|
1741
|
+
switch (f.value) {
|
|
1694
1742
|
case "line":
|
|
1695
1743
|
return "component__input--line";
|
|
1696
1744
|
case "border":
|
|
@@ -1699,96 +1747,96 @@ const Oa = ["id"], La = { class: "chip-text" }, Wa = ["onClick"], Ha = ["name",
|
|
|
1699
1747
|
return "component__input--background";
|
|
1700
1748
|
}
|
|
1701
1749
|
}), lt = () => {
|
|
1702
|
-
|
|
1750
|
+
i("clicked");
|
|
1703
1751
|
}, ot = () => {
|
|
1704
|
-
|
|
1752
|
+
ve.value = !0, i("focused");
|
|
1705
1753
|
}, nt = () => {
|
|
1706
|
-
|
|
1754
|
+
ve.value = !1, i("blurred");
|
|
1707
1755
|
}, ut = (n) => {
|
|
1708
|
-
if (!(
|
|
1756
|
+
if (!(A.value || S.value) && n.key === "Enter" && o.value.trim() !== "") {
|
|
1709
1757
|
n.preventDefault();
|
|
1710
|
-
let
|
|
1711
|
-
|
|
1758
|
+
let h = o.value.trim();
|
|
1759
|
+
O.value && (h = h.toUpperCase()), (M.value || !p.value.includes(h)) && rt(h), o.value = "";
|
|
1712
1760
|
}
|
|
1713
1761
|
}, rt = (n) => {
|
|
1714
|
-
|
|
1715
|
-
},
|
|
1716
|
-
|
|
1762
|
+
p.value.push(n), i("added", n);
|
|
1763
|
+
}, qe = (n) => {
|
|
1764
|
+
p.value = p.value.filter((h) => h !== n), i("removed", n);
|
|
1717
1765
|
};
|
|
1718
|
-
return
|
|
1719
|
-
|
|
1720
|
-
}),
|
|
1721
|
-
|
|
1722
|
-
}), (n,
|
|
1766
|
+
return U(C, (n) => {
|
|
1767
|
+
p.value = n, i("changed", n);
|
|
1768
|
+
}), U(o, (n) => {
|
|
1769
|
+
i("input-changed", n);
|
|
1770
|
+
}), (n, h) => e.nbId ? (B(), _("div", Ye({
|
|
1723
1771
|
key: 0,
|
|
1724
|
-
class: ["nb-wrapper",
|
|
1725
|
-
style: [
|
|
1772
|
+
class: ["nb-wrapper", Ne.value],
|
|
1773
|
+
style: [Re.value],
|
|
1726
1774
|
role: "input"
|
|
1727
|
-
},
|
|
1728
|
-
|
|
1775
|
+
}, Ee.value, { onClick: lt }), [
|
|
1776
|
+
I("div", {
|
|
1729
1777
|
id: e.nbId,
|
|
1730
1778
|
ref_key: "chipsContainer",
|
|
1731
|
-
ref:
|
|
1732
|
-
class:
|
|
1733
|
-
style:
|
|
1779
|
+
ref: s,
|
|
1780
|
+
class: Y(["nb-reset", "component", at.value, ze.value]),
|
|
1781
|
+
style: ie([$e.value, Pe.value, We.value])
|
|
1734
1782
|
}, [
|
|
1735
|
-
|
|
1783
|
+
p.value.length > 0 ? (B(), _("div", {
|
|
1736
1784
|
key: 0,
|
|
1737
1785
|
ref_key: "chips",
|
|
1738
|
-
ref:
|
|
1786
|
+
ref: m,
|
|
1739
1787
|
class: "chips"
|
|
1740
1788
|
}, [
|
|
1741
|
-
(
|
|
1742
|
-
key:
|
|
1789
|
+
(B(!0), _(xt, null, kt(p.value, (F) => (B(), _("div", {
|
|
1790
|
+
key: F,
|
|
1743
1791
|
class: "chip"
|
|
1744
1792
|
}, [
|
|
1745
|
-
|
|
1746
|
-
chips:
|
|
1747
|
-
chip:
|
|
1748
|
-
removeChip:
|
|
1793
|
+
Fe(n.$slots, "chip", {
|
|
1794
|
+
chips: p.value,
|
|
1795
|
+
chip: F,
|
|
1796
|
+
removeChip: qe
|
|
1749
1797
|
}, () => [
|
|
1750
|
-
|
|
1751
|
-
!l(
|
|
1798
|
+
I("span", Oa, je(F), 1),
|
|
1799
|
+
!l(A) && !l(S) ? (B(), _("span", {
|
|
1752
1800
|
key: 0,
|
|
1753
1801
|
class: "chip-remove",
|
|
1754
|
-
onClick: (
|
|
1755
|
-
}, "×", 8, Wa)) :
|
|
1802
|
+
onClick: (ee) => qe(F)
|
|
1803
|
+
}, "×", 8, Wa)) : re("", !0)
|
|
1756
1804
|
], !0)
|
|
1757
1805
|
]))), 128))
|
|
1758
|
-
], 512)) :
|
|
1759
|
-
|
|
1806
|
+
], 512)) : re("", !0),
|
|
1807
|
+
Je(I("input", {
|
|
1760
1808
|
ref_key: "chipInput",
|
|
1761
|
-
ref:
|
|
1809
|
+
ref: K,
|
|
1762
1810
|
type: "text",
|
|
1763
|
-
"onUpdate:modelValue":
|
|
1764
|
-
name: l(
|
|
1765
|
-
placeholder: l(
|
|
1766
|
-
readonly: l(
|
|
1767
|
-
autocomplete: l(
|
|
1768
|
-
required: l(
|
|
1769
|
-
tabindex: l(
|
|
1770
|
-
class:
|
|
1771
|
-
style:
|
|
1772
|
-
onKeydown:
|
|
1811
|
+
"onUpdate:modelValue": h[0] || (h[0] = (F) => o.value = F),
|
|
1812
|
+
name: l(ae),
|
|
1813
|
+
placeholder: l(w),
|
|
1814
|
+
readonly: l(S),
|
|
1815
|
+
autocomplete: l(N),
|
|
1816
|
+
required: l(le),
|
|
1817
|
+
tabindex: l(A) || l(S) ? -1 : l(c),
|
|
1818
|
+
class: Y(["chips-input", Oe.value]),
|
|
1819
|
+
style: ie([et.value, tt.value]),
|
|
1820
|
+
onKeydown: h[1] || (h[1] = Me((F) => !l(A) && l(H) && ut(F), ["enter"])),
|
|
1773
1821
|
onFocus: ot,
|
|
1774
1822
|
onBlur: nt
|
|
1775
1823
|
}, null, 46, Ha), [
|
|
1776
|
-
[
|
|
1824
|
+
[ma, o.value]
|
|
1777
1825
|
])
|
|
1778
|
-
], 14,
|
|
1779
|
-
], 16)) :
|
|
1826
|
+
], 14, Ma)
|
|
1827
|
+
], 16)) : re("", !0);
|
|
1780
1828
|
}
|
|
1781
|
-
}), ja = /* @__PURE__ */
|
|
1829
|
+
}), ja = /* @__PURE__ */ Ze(Fa, [["__scopeId", "data-v-c52ee364"]]), St = {
|
|
1782
1830
|
NbInputRadio: ka,
|
|
1783
|
-
NbInputCheckbox:
|
|
1784
|
-
NbInput:
|
|
1831
|
+
NbInputCheckbox: Aa,
|
|
1832
|
+
NbInput: za,
|
|
1785
1833
|
NbInputChip: ja
|
|
1786
1834
|
}, qa = {
|
|
1787
1835
|
install(e) {
|
|
1788
|
-
for (const
|
|
1789
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1790
|
-
const
|
|
1791
|
-
e.component(
|
|
1836
|
+
for (const r in St)
|
|
1837
|
+
if (Object.prototype.hasOwnProperty.call(St, r)) {
|
|
1838
|
+
const i = St[r];
|
|
1839
|
+
e.component(i.name, i);
|
|
1792
1840
|
}
|
|
1793
1841
|
}
|
|
1794
1842
|
};
|