@vlalg-nimbus/nb-inputs 7.0.0 → 7.0.2
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/README.md +46 -44
- package/dist/nb-inputs.js +719 -671
- 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 G, openBlock as V, createElementBlock as S, normalizeClass as Y, normalizeStyle as ie, createElementVNode as x, 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 [A, g] of r)
|
|
5
|
+
i[A] = 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 A = Object.keys(i);
|
|
62
|
+
A.length !== 2 && (r = !0), A.every((H) => ["value", "text"].includes(H)) || (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
|
+
a1fa0ca8: de.value,
|
|
157
|
+
bcde41d0: Be.value,
|
|
158
|
+
"1f33883d": ke.value,
|
|
159
|
+
"26009c15": Ce.value,
|
|
160
|
+
"2b29f2bb": me.value,
|
|
161
|
+
"22a81ed4": be.value,
|
|
162
|
+
"53911f01": he.value,
|
|
163
|
+
"2a2cf01d": xe.value,
|
|
164
|
+
e7f0267a: Le.value,
|
|
165
|
+
fec27868: Ve.value,
|
|
166
|
+
"06d0fff9": 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, A = e, g = X(null), {
|
|
171
|
+
ariaLabel: H,
|
|
172
|
+
ariaAttrs: E,
|
|
173
|
+
currentOption: F,
|
|
174
|
+
valueType: ee,
|
|
175
|
+
display: k,
|
|
176
|
+
options: j,
|
|
177
|
+
theme: te,
|
|
178
|
+
lightTextColor: K,
|
|
179
|
+
lightColor: B,
|
|
180
|
+
lightColorHover: R,
|
|
181
|
+
darkTextColor: U,
|
|
182
|
+
darkColor: _,
|
|
183
|
+
darkColorHover: w,
|
|
184
|
+
hoverEffect: Q,
|
|
185
|
+
activeHoverEffect: ae,
|
|
186
|
+
itemGap: $,
|
|
187
|
+
internalGap: P,
|
|
188
|
+
scale: D,
|
|
189
|
+
disabled: L,
|
|
190
|
+
fontFamily: le,
|
|
191
|
+
fontSize: z,
|
|
192
|
+
fontWeight: M
|
|
193
|
+
} = Xe(A), y = t(() => {
|
|
194
|
+
const u = L.value ? "component-disabled" : "", c = k.value !== "b" ? "inline-block" : "block", O = le.value ? le.value : "'Lato', sans-serif", b = z.value ? z.value : "1.6em", N = !M.value || M.value < 0 ? 200 : M.value, fe = [!1, !0].includes(Q.value) ? Q.value : !1, C = [!1, !0].includes(ae.value) ? ae.value : !1, ue = !$.value || $.value < 0 ? 15 : $.value, o = !P.value || P.value < 0 ? 6 : P.value, s = !D.value || D.value < 0 ? 1 : D.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: C,
|
|
200
|
+
itemGap: ue,
|
|
201
|
+
internalGap: o,
|
|
202
|
+
scale: s,
|
|
203
|
+
font: O,
|
|
178
204
|
fontSize: b,
|
|
179
|
-
fontWeight:
|
|
205
|
+
fontWeight: N
|
|
180
206
|
};
|
|
181
|
-
}),
|
|
182
|
-
display:
|
|
183
|
-
})),
|
|
184
|
-
const u =
|
|
207
|
+
}), m = 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(j.value) && j.value.constructor === Array && j.value.length > 0), ne = t(() => te.value === "dark" ? "component__theme--dark" : "component__theme--light"), de = t(() => y.value.font), be = t(() => K.value), he = t(() => B.value), me = t(() => y.value.hoverEffect ? R.value : B.value), Ce = t(() => y.value.activeHoverEffect ? R.value : B.value), Ve = t(() => U.value), Se = t(() => _.value), Le = t(() => y.value.hoverEffect ? w.value : _.value), xe = t(() => y.value.activeHoverEffect ? w.value : _.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
|
+
E.value && Object.keys(E.value).forEach((b) => u[`aria-${b}`] = E.value[b]);
|
|
206
226
|
const c = {
|
|
207
|
-
"aria-label":
|
|
208
|
-
"aria-disabled":
|
|
227
|
+
"aria-label": H.value,
|
|
228
|
+
"aria-disabled": L.value,
|
|
209
229
|
...u
|
|
210
230
|
};
|
|
211
231
|
return Object.fromEntries(
|
|
212
|
-
Object.entries(c).filter(([
|
|
232
|
+
Object.entries(c).filter(([O, b]) => b != null)
|
|
213
233
|
);
|
|
214
|
-
}),
|
|
215
|
-
const u =
|
|
216
|
-
u && ["string"].includes(
|
|
217
|
-
},
|
|
218
|
-
|
|
234
|
+
}), ce = () => {
|
|
235
|
+
const u = F.value;
|
|
236
|
+
u && ["string"].includes(ee.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 G(F, (u, c) => {
|
|
241
|
+
u !== c && ce();
|
|
242
|
+
}), G(g, (u, c) => {
|
|
243
|
+
u !== c && (i("current-value", u), i("changed", u));
|
|
244
|
+
}), (u, c) => e.nbId && ge.value ? (V(), S("div", {
|
|
225
245
|
key: 0,
|
|
226
|
-
class:
|
|
227
|
-
style:
|
|
246
|
+
class: Y(["nb-wrapper", m.value]),
|
|
247
|
+
style: ie([f.value, _e.value])
|
|
228
248
|
}, [
|
|
229
|
-
|
|
249
|
+
x("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
|
+
(V(!0), S(xt, null, kt(l(j), (O, b) => (V(), S("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(x("input", {
|
|
260
|
+
id: `${e.nbId}-${O.value}`,
|
|
261
|
+
"onUpdate:modelValue": c[0] || (c[0] = (N) => g.value = N),
|
|
242
262
|
type: "radio",
|
|
243
263
|
class: "component-radio__item--input",
|
|
244
|
-
disabled: l(
|
|
245
|
-
value:
|
|
264
|
+
disabled: l(L),
|
|
265
|
+
value: O.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
|
+
x("label", {
|
|
272
|
+
for: `${e.nbId}-${O.value}`,
|
|
273
|
+
tabindex: l(L) ? -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((N) => !l(L) && e.hasTabIndexEnter && N.target.click(), ["prevent"]), ["enter"])),
|
|
277
|
+
c[2] || (c[2] = Me(Ke((N) => !l(L) && e.hasTabIndexSpace && N.target.click(), ["prevent"]), ["space"]))
|
|
258
278
|
]
|
|
259
279
|
}, [
|
|
260
|
-
c[3] || (c[3] =
|
|
261
|
-
|
|
262
|
-
style:
|
|
263
|
-
},
|
|
264
|
-
], 40,
|
|
280
|
+
c[3] || (c[3] = x("div", null, null, -1)),
|
|
281
|
+
x("span", {
|
|
282
|
+
style: ie([oe.value])
|
|
283
|
+
}, je(O.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-e82994f8"]]);
|
|
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 A = Object.keys(i);
|
|
345
|
+
A.length !== 2 && (r = !0), A.every((H) => ["value", "text"].includes(H)) || (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: {
|
|
369
|
+
type: String,
|
|
370
|
+
default: "#cccccc"
|
|
371
|
+
},
|
|
372
|
+
lightColorHover: {
|
|
336
373
|
type: String,
|
|
337
|
-
default: "
|
|
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
|
+
"0519fcd8": he.value,
|
|
453
|
+
b12a9a00: O.value,
|
|
454
|
+
"605adc23": c.value,
|
|
455
|
+
"3ab12825": u.value,
|
|
456
|
+
ced77406: Se.value,
|
|
457
|
+
"589d2aa3": Ve.value,
|
|
458
|
+
"40c69c3c": Le.value,
|
|
459
|
+
"73a49619": Ce.value,
|
|
460
|
+
e10b6c28: me.value,
|
|
461
|
+
"7c5e381c": Te.value,
|
|
462
|
+
"59ef2d96": _e.value,
|
|
463
|
+
"0e4bd04a": Be.value,
|
|
464
|
+
"4d94e71a": Ie.value,
|
|
465
|
+
"396645e1": ke.value,
|
|
466
|
+
"39ced5b4": xe.value
|
|
467
|
+
})), Qe(() => {
|
|
468
|
+
C();
|
|
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, A = e, g = X(null), {
|
|
471
|
+
ariaLabel: H,
|
|
472
|
+
ariaAttrs: E,
|
|
473
|
+
currentOption: F,
|
|
474
|
+
display: ee,
|
|
475
|
+
options: k,
|
|
476
|
+
theme: j,
|
|
477
|
+
lightTextColor: te,
|
|
478
|
+
lightColor: K,
|
|
479
|
+
lightColorHover: B,
|
|
480
|
+
darkTextColor: R,
|
|
481
|
+
darkColor: U,
|
|
482
|
+
darkColorHover: _,
|
|
483
|
+
boxRadius: w,
|
|
484
|
+
hoverEffect: Q,
|
|
485
|
+
activeHoverEffect: ae,
|
|
486
|
+
itemGap: $,
|
|
487
|
+
internalGap: P,
|
|
488
|
+
scale: D,
|
|
489
|
+
type: L,
|
|
490
|
+
background: le,
|
|
491
|
+
disabled: z,
|
|
492
|
+
fontFamily: M,
|
|
493
|
+
fontSize: y,
|
|
494
|
+
fontWeight: m
|
|
495
|
+
} = Xe(A), f = t(() => {
|
|
496
|
+
const o = z.value ? "component-disabled" : "", s = ee.value !== "b" ? "inline-block" : "block", q = M.value ? M.value : "'Lato', sans-serif", I = y.value ? y.value : "1.6em", p = m.value !== 0 && !m.value || m.value < 0 ? 200 : m.value, ve = w.value !== 0 && !w.value || w.value < 0 ? 0 : w.value, T = [!1, !0].includes(Q.value) ? Q.value : !1, Ne = [!1, !0].includes(ae.value) ? ae.value : !1, Re = $.value !== 0 && !$.value || $.value < 0 ? 15 : $.value, $e = P.value !== 0 && !P.value || P.value < 0 ? 6 : P.value, Oe = ["box", "circle"].includes(L.value) ? L.value : "box", We = !D.value || D.value < 0 ? 1 : D.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
|
-
|
|
456
|
-
|
|
457
|
-
background: ye,
|
|
458
|
-
fontSize: m,
|
|
459
|
-
fontWeight: G
|
|
499
|
+
display: s,
|
|
500
|
+
boxRadius: ve,
|
|
501
|
+
hoverEffect: T,
|
|
502
|
+
activeHoverEffect: Ne,
|
|
503
|
+
itemGap: Re,
|
|
504
|
+
internalGap: $e,
|
|
505
|
+
scale: We,
|
|
506
|
+
type: Oe,
|
|
507
|
+
font: q,
|
|
508
|
+
background: Ae,
|
|
509
|
+
fontSize: I,
|
|
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(k.value) && k.value.constructor === Array && k.value.length > 0), be = t(() => j.value === "dark" ? "component__theme--dark" : "component__theme--light"), he = t(() => f.value.font), me = t(() => te.value), Ce = t(() => K.value), Ve = t(() => f.value.hoverEffect ? B.value : K.value), Se = t(() => f.value.activeHoverEffect ? B.value : K.value), Le = t(() => {
|
|
521
|
+
const o = f.value;
|
|
522
|
+
return o.activeHoverEffect && o.background ? `${B.value}80` : B.value;
|
|
523
|
+
}), xe = t(() => R.value), ke = t(() => U.value), Be = t(() => f.value.hoverEffect ? _.value : U.value), _e = t(() => f.value.activeHoverEffect ? _.value : U.value), Ie = t(() => {
|
|
524
|
+
const o = f.value;
|
|
525
|
+
return o.activeHoverEffect && o.background ? `${_.value}80` : _.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 = j.value === "dark" ? R.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
|
+
}), O = 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" : ""), N = t(() => ({
|
|
541
|
+
zoom: f.value.scale
|
|
542
|
+
})), fe = t(() => {
|
|
495
543
|
const o = {};
|
|
496
|
-
|
|
497
|
-
const
|
|
498
|
-
"aria-label":
|
|
499
|
-
"aria-disabled":
|
|
544
|
+
E.value && Object.keys(E.value).forEach((I) => o[`aria-${I}`] = E.value[I]);
|
|
545
|
+
const s = {
|
|
546
|
+
"aria-label": H.value,
|
|
547
|
+
"aria-disabled": z.value,
|
|
500
548
|
...o
|
|
501
549
|
};
|
|
502
550
|
return Object.fromEntries(
|
|
503
|
-
Object.entries(
|
|
551
|
+
Object.entries(s).filter(([q, I]) => I != null)
|
|
504
552
|
);
|
|
505
|
-
}),
|
|
506
|
-
|
|
507
|
-
},
|
|
508
|
-
|
|
553
|
+
}), C = () => {
|
|
554
|
+
g.value = F.value;
|
|
555
|
+
}, ue = () => {
|
|
556
|
+
i("clicked");
|
|
509
557
|
};
|
|
510
|
-
return
|
|
511
|
-
o !==
|
|
512
|
-
}),
|
|
513
|
-
o !==
|
|
514
|
-
}), (o,
|
|
558
|
+
return G(F, (o, s) => {
|
|
559
|
+
o !== s && C();
|
|
560
|
+
}), G(g, (o, s) => {
|
|
561
|
+
o !== s && (i("current-value", o), i("changed", o));
|
|
562
|
+
}), (o, s) => e.nbId && de.value ? (V(), S("div", {
|
|
515
563
|
key: 0,
|
|
516
|
-
class:
|
|
517
|
-
style:
|
|
564
|
+
class: Y(["nb-wrapper", se.value]),
|
|
565
|
+
style: ie([oe.value, N.value])
|
|
518
566
|
}, [
|
|
519
|
-
|
|
567
|
+
x("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
|
-
(
|
|
526
|
-
key:
|
|
573
|
+
(V(!0), S(xt, null, kt(l(k), (q, I) => (V(), S("div", {
|
|
574
|
+
key: I,
|
|
527
575
|
class: "component-checkbox__item"
|
|
528
576
|
}, [
|
|
529
|
-
|
|
530
|
-
id: `${e.nbId}-${
|
|
531
|
-
"onUpdate:modelValue":
|
|
577
|
+
Je(x("input", {
|
|
578
|
+
id: `${e.nbId}-${q.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(z),
|
|
583
|
+
value: q.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
|
+
x("label", {
|
|
590
|
+
for: `${e.nbId}-${q.value}`,
|
|
591
|
+
class: Y([[b.value], "component-checkbox__item--label"]),
|
|
592
|
+
tabindex: l(z) ? -1 : Array.isArray(e.tabIndex) ? e.tabIndex[I] : e.tabIndex >= 0 ? e.tabIndex : I + 1,
|
|
545
593
|
onKeydown: [
|
|
546
|
-
|
|
547
|
-
|
|
594
|
+
s[1] || (s[1] = Me(Ke((p) => !l(z) && e.hasTabIndexEnter && p.target.click(), ["prevent"]), ["enter"])),
|
|
595
|
+
s[2] || (s[2] = Me(Ke((p) => !l(z) && e.hasTabIndexSpace && p.target.click(), ["prevent"]), ["space"]))
|
|
548
596
|
]
|
|
549
597
|
}, [
|
|
550
|
-
|
|
551
|
-
class:
|
|
598
|
+
x("div", {
|
|
599
|
+
class: Y([ce.value])
|
|
552
600
|
}, null, 2),
|
|
553
|
-
|
|
554
|
-
style:
|
|
555
|
-
},
|
|
601
|
+
x("span", {
|
|
602
|
+
style: ie([ne.value])
|
|
603
|
+
}, je(q.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-4be141a9"]]);
|
|
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
|
-
|
|
961
|
+
setup(e, { emit: r }) {
|
|
962
|
+
Ue((a) => ({
|
|
915
963
|
"7db11dc6": lt.value,
|
|
916
|
-
"465ec593":
|
|
917
|
-
"0bd0a5e4": l(
|
|
964
|
+
"465ec593": Pe.value,
|
|
965
|
+
"0bd0a5e4": l(ke),
|
|
918
966
|
"490fdeba": n.value,
|
|
919
|
-
"09c697b5":
|
|
920
|
-
"497da60d":
|
|
921
|
-
"5e478652": l(
|
|
922
|
-
"65dc7d59": l(
|
|
923
|
-
"7caea4a6": l(
|
|
924
|
-
"7d9d18e5": l(
|
|
925
|
-
"40dc79c4": l(
|
|
926
|
-
"3febb3de": l(
|
|
927
|
-
55340077: l(
|
|
928
|
-
"6cbaee7c":
|
|
929
|
-
ccb4758c: l(
|
|
930
|
-
"3734d3be": l(
|
|
931
|
-
"35bcd232": l(
|
|
932
|
-
"86db4b1e": l(
|
|
933
|
-
eebf601a: l(
|
|
934
|
-
"6540ecda": l(
|
|
935
|
-
83825256: l(
|
|
936
|
-
f52be38a: l(
|
|
937
|
-
"23886af6": l(
|
|
938
|
-
"5b006382": l(
|
|
967
|
+
"09c697b5": h.value,
|
|
968
|
+
"497da60d": W.value,
|
|
969
|
+
"5e478652": l(u),
|
|
970
|
+
"65dc7d59": l(ve),
|
|
971
|
+
"7caea4a6": l(c),
|
|
972
|
+
"7d9d18e5": l(We),
|
|
973
|
+
"40dc79c4": l(Te),
|
|
974
|
+
"3febb3de": l(Ie),
|
|
975
|
+
55340077: l(ce),
|
|
976
|
+
"6cbaee7c": At.value,
|
|
977
|
+
ccb4758c: l(Be),
|
|
978
|
+
"3734d3be": l(_e),
|
|
979
|
+
"35bcd232": l(p),
|
|
980
|
+
"86db4b1e": l(O),
|
|
981
|
+
eebf601a: l(Oe),
|
|
982
|
+
"6540ecda": l(xe),
|
|
983
|
+
83825256: l(Se),
|
|
984
|
+
f52be38a: l(Le),
|
|
985
|
+
"23886af6": l(Ce),
|
|
986
|
+
"5b006382": l(Ve),
|
|
939
987
|
"3eca0d2c": Bt.value,
|
|
940
988
|
b46ea296: It.value,
|
|
941
|
-
"21492e8a":
|
|
942
|
-
"01e48fba":
|
|
989
|
+
"21492e8a": Tt.value,
|
|
990
|
+
"01e48fba": Et.value,
|
|
943
991
|
"0f7f0fdd": Ct.value,
|
|
944
|
-
"060b01ca": l(
|
|
992
|
+
"060b01ca": l(b),
|
|
945
993
|
"21c08896": bt.value,
|
|
946
994
|
"8b25c7ac": ot.value,
|
|
947
995
|
"5b17912e": nt.value,
|
|
948
996
|
"6f485452": ut.value,
|
|
949
|
-
"501e5a2c":
|
|
997
|
+
"501e5a2c": qe.value,
|
|
950
998
|
dcd9aea4: a.styleButtonColor,
|
|
951
999
|
"16e77a5a": rt.value
|
|
952
|
-
})),
|
|
953
|
-
|
|
1000
|
+
})), Qe(() => {
|
|
1001
|
+
J.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:
|
|
1005
|
+
const i = r, A = e, {
|
|
1006
|
+
display: g,
|
|
1007
|
+
hasTabIndexEnter: H,
|
|
1008
|
+
ariaLabel: E,
|
|
1009
|
+
ariaAttrs: F,
|
|
1010
|
+
textColor: ee,
|
|
1011
|
+
caretColor: k,
|
|
1012
|
+
selectionBgColor: j,
|
|
1013
|
+
selectionTextColor: te,
|
|
1014
|
+
hasBorderRadius: K,
|
|
1015
|
+
borderRadius: B,
|
|
1016
|
+
disabled: R,
|
|
1017
|
+
fontFamily: U,
|
|
1018
|
+
fontSize: _,
|
|
1019
|
+
fontWeight: w,
|
|
1020
|
+
fontFamilyMsg: Q,
|
|
1021
|
+
fontSizeMsg: ae,
|
|
1022
|
+
fontWeightMsg: $,
|
|
1023
|
+
textMessageColor: P,
|
|
976
1024
|
inputWidth: D,
|
|
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 =
|
|
1025
|
+
inputStyle: L,
|
|
1026
|
+
activeTextStyle: le,
|
|
1027
|
+
sizeMediaQuery: z,
|
|
1028
|
+
inputReadonly: M,
|
|
1029
|
+
showInputEye: y,
|
|
1030
|
+
inputType: m,
|
|
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: O,
|
|
1054
|
+
textAlign: b,
|
|
1055
|
+
showMsg: N,
|
|
1056
|
+
hasMsg: fe,
|
|
1057
|
+
hasIcon: C,
|
|
1058
|
+
iconDirection: ue,
|
|
1059
|
+
iconPadding: o,
|
|
1060
|
+
iconPaddingInput: s,
|
|
1061
|
+
iconMargin: q,
|
|
1062
|
+
iconBorderRadius: I,
|
|
1063
|
+
iconLightTextColor: p,
|
|
1064
|
+
iconDarkTextColor: ve,
|
|
1065
|
+
iconLightBgColor: T,
|
|
1066
|
+
iconDarkBgColor: Ne,
|
|
1067
|
+
iconLightBgColorActive: Re,
|
|
1068
|
+
iconDarkBgColorActive: $e,
|
|
1069
|
+
iconLightDisabledBgColor: Oe,
|
|
1070
|
+
iconDarkDisabledBgColor: We,
|
|
1071
|
+
iconWidth: Ae,
|
|
1072
|
+
iconSize: He
|
|
1073
|
+
} = Xe(A), J = X(""), Ee = X(""), pe = X(!1), we = X(!1), d = t(() => {
|
|
1074
|
+
const a = R.value ? "component-disabled" : "", v = g.value !== "b" ? "inline-block" : "block", ye = ee ? ee.value : "ffffff", De = k.value ? k.value : "", $t = j.value ? j.value : "", zt = te.value ? te.value : "", Mt = K.value ? K.value : !1, Ot = !B.value || B.value < 0 ? 0 : B.value, Wt = U.value ? U.value : "'Lato', sans-serif", Ht = _.value && _.value >= 0 ? _.value : null, Ft = !w.value || w.value < 0 ? 100 : w.value, jt = Q.value ? Q.value : "'Lato', sans-serif", Pt = ae.value ? ae.value : "1em", qt = !$.value || $.value < 0 ? 100 : $.value, Gt = P.value ? P.value : "#f15574", Kt = D.value ? D.value : 200, Ut = le.value ? le.value : "normal", Qt = z.value ? z.value : "xs", Xt = M.value ? M.value : !1, Yt = y.value ? y.value : !1, Jt = m.value ? m.value : "text", Zt = se.value ? se.value : !1, ea = de.value ? de.value : "normal", ta = b.value ? b.value : "left", aa = L.value ? L.value : "background", la = o.value ? o.value : "5px 10px", oa = q.value ? q.value : "0", na = s.value ? s.value : 10, ua = p.value ? p.value : "#000000", ra = ve.value ? ve.value : "#000000", ia = T.value ? T.value : "transparent", sa = Ne.value ? Ne.value : "transparent", da = I.value ? I.value : 0, 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
|
+
}), W = t(() => {
|
|
1148
|
+
const a = d.value;
|
|
1101
1149
|
return a.selectionTextColor || (a.theme === "dark" ? "#000000" : "#ffffff");
|
|
1102
|
-
}),
|
|
1103
|
-
const a =
|
|
1150
|
+
}), Z = 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 (L.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(() => !!(N.value && fe.value)), mt = t(() => {
|
|
1147
1195
|
const a = {};
|
|
1148
|
-
|
|
1149
|
-
const
|
|
1150
|
-
"aria-label":
|
|
1151
|
-
"aria-disabled":
|
|
1196
|
+
F.value && Object.keys(F.value).forEach((De) => a[`aria-${De}`] = F.value[De]);
|
|
1197
|
+
const v = {
|
|
1198
|
+
"aria-label": E.value,
|
|
1199
|
+
"aria-disabled": R.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(() => C.value ? `${He.value}rem` : "0"), Bt = t(() => C.value ? `${Ae.value}px` : "0"), _t = t(() => C.value ? `component__icon--${ue.value}` : ""), It = t(() => {
|
|
1206
|
+
const a = d.value;
|
|
1207
|
+
return C.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 C.value ? a.iconMargin : "0";
|
|
1211
|
+
}), At = t(() => {
|
|
1212
|
+
const a = d.value;
|
|
1213
|
+
return C.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 C.value ? `${a.iconBorderRadius}rem` : "0";
|
|
1217
|
+
}), wt = t(() => {
|
|
1218
|
+
const a = d.value;
|
|
1219
|
+
return C.value ? ue.value === "left" ? { paddingLeft: `${a.iconPaddingInput}px` } : { paddingRight: `${a.iconPaddingInput}px` } : {};
|
|
1220
|
+
}), Dt = () => {
|
|
1221
|
+
J.value = ne.value, Ee.value = m.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 = m.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
|
+
R.value || d.value.inputReadonly || !H.value || i("entered", J.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 G(m, (a) => {
|
|
1234
|
+
Ee.value = a;
|
|
1235
|
+
}, { immediate: !0 }), G(ne, (a) => {
|
|
1236
|
+
a !== J.value && (J.value = a);
|
|
1237
|
+
}, { immediate: !0 }), G(J, (a) => {
|
|
1238
|
+
f.value && (a = a.trim()), i("changed", a);
|
|
1239
|
+
}), G(we, (a) => {
|
|
1240
|
+
i(a ? "focused" : "blurred");
|
|
1241
|
+
}), G(pe, (a) => {
|
|
1242
|
+
i("show-input-eye", a);
|
|
1243
|
+
}, { immediate: !0 }), G(J, (a) => {
|
|
1244
|
+
f.value && (a = a.trim()), i("current-value", a);
|
|
1245
|
+
}), G(m, (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 ? (V(), S("div", Ye({
|
|
1203
1251
|
key: 0,
|
|
1204
1252
|
class: ["nb-wrapper", et.value],
|
|
1205
|
-
style: [tt.value,
|
|
1253
|
+
style: [tt.value, Z.value, ze.value],
|
|
1206
1254
|
role: "input"
|
|
1207
|
-
},
|
|
1208
|
-
|
|
1255
|
+
}, mt.value), [
|
|
1256
|
+
x("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, Z.value, ze.value]),
|
|
1260
|
+
onClick: Nt
|
|
1213
1261
|
}, [
|
|
1214
|
-
|
|
1262
|
+
Ge.value ? (V(), S("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
|
+
x("span", wa, [
|
|
1269
|
+
e.inputEyeCustomIcon ? (V(), S("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
|
+
])) : (V(), S("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(x("input", {
|
|
1279
|
+
"onUpdate:modelValue": v[0] || (v[0] = (ye) => J.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(R) || l(M),
|
|
1242
1290
|
required: e.required,
|
|
1243
|
-
readonly: l(
|
|
1291
|
+
readonly: l(M),
|
|
1244
1292
|
autocomplete: e.inputAutocomplete,
|
|
1245
|
-
tabindex: l(
|
|
1293
|
+
tabindex: l(R) || l(M) ? -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(R) && l(H) && Rt(), ["enter"]))
|
|
1299
|
+
}, null, 46, Na), [
|
|
1300
|
+
[ha, J.value]
|
|
1253
1301
|
]),
|
|
1254
|
-
l(
|
|
1302
|
+
l(C) ? (V(), S("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] = x("span", null, "♥", -1))
|
|
1261
1309
|
], !0)
|
|
1262
|
-
], 10,
|
|
1263
|
-
], 14,
|
|
1264
|
-
|
|
1310
|
+
], 10, Ra)) : re("", !0)
|
|
1311
|
+
], 14, Ea),
|
|
1312
|
+
ht.value ? (V(), S("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-d689f281"]]);
|
|
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
|
-
"1549ffc9":
|
|
1529
|
-
"73ec4a48":
|
|
1530
|
-
"1eee568c": l(
|
|
1531
|
-
"6d90e4bc": l(
|
|
1532
|
-
"16339c1b": l(
|
|
1533
|
-
"56fd01b6": l(
|
|
1534
|
-
"22c193ce": l(
|
|
1535
|
-
"5f1758d7": l(
|
|
1536
|
-
"6e7cb926": l(
|
|
1537
|
-
"6d719d0e": l(
|
|
1538
|
-
"327fd4f2": l(
|
|
1539
|
-
"27897b22": l(
|
|
1540
|
-
"0215623a": l(
|
|
1541
|
-
"8e9d877a": l(
|
|
1542
|
-
"37cf217d": l(
|
|
1543
|
-
"1171ab91": l(
|
|
1544
|
-
"99a84312":
|
|
1545
|
-
"3b55b689":
|
|
1546
|
-
"53c05fe1":
|
|
1574
|
+
setup(e, { emit: r }) {
|
|
1575
|
+
Ue((n) => ({
|
|
1576
|
+
"1549ffc9": Ae.value,
|
|
1577
|
+
"73ec4a48": J.value,
|
|
1578
|
+
"1eee568c": l(be),
|
|
1579
|
+
"6d90e4bc": l(se),
|
|
1580
|
+
"16339c1b": l(ge),
|
|
1581
|
+
"56fd01b6": l(he),
|
|
1582
|
+
"22c193ce": l(me),
|
|
1583
|
+
"5f1758d7": l(Ce),
|
|
1584
|
+
"6e7cb926": l(_e),
|
|
1585
|
+
"6d719d0e": l(Se),
|
|
1586
|
+
"327fd4f2": l(xe),
|
|
1587
|
+
"27897b22": l(Ie),
|
|
1588
|
+
"0215623a": l(ce),
|
|
1589
|
+
"8e9d877a": l(Te),
|
|
1590
|
+
"37cf217d": l(ne),
|
|
1591
|
+
"1171ab91": l(ke),
|
|
1592
|
+
"99a84312": pe.value,
|
|
1593
|
+
"3b55b689": we.value,
|
|
1594
|
+
"53c05fe1": d.value,
|
|
1547
1595
|
"9f4dd54c": n.styleButtonColor,
|
|
1548
|
-
"2a052b02":
|
|
1549
|
-
beaeb8f4: l(
|
|
1550
|
-
"019f1fff": l(
|
|
1551
|
-
"0b7af21c": l(
|
|
1552
|
-
"6b816d6b": l(
|
|
1553
|
-
})),
|
|
1554
|
-
|
|
1596
|
+
"2a052b02": He.value,
|
|
1597
|
+
beaeb8f4: l(de),
|
|
1598
|
+
"019f1fff": l(Ve),
|
|
1599
|
+
"0b7af21c": l(Be),
|
|
1600
|
+
"6b816d6b": l(u)
|
|
1601
|
+
})), Qe(() => {
|
|
1602
|
+
B.value.length > 0 && (p.value = B.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:
|
|
1604
|
+
const i = r, A = e, {
|
|
1605
|
+
display: g,
|
|
1606
|
+
textColor: H,
|
|
1607
|
+
paddingX: E,
|
|
1608
|
+
paddingY: F,
|
|
1609
|
+
borderRadius: ee,
|
|
1610
|
+
disabled: k,
|
|
1611
|
+
fontFamily: j,
|
|
1612
|
+
fontSize: te,
|
|
1613
|
+
fontWeight: K,
|
|
1614
|
+
currentList: B,
|
|
1615
|
+
allowDuplicates: R,
|
|
1616
|
+
minChips: U,
|
|
1617
|
+
maxChips: _,
|
|
1618
|
+
inputPosition: w,
|
|
1619
|
+
width: Q,
|
|
1620
|
+
inputName: ae,
|
|
1621
|
+
inputPlaceholder: $,
|
|
1622
|
+
inputUppercase: P,
|
|
1575
1623
|
inputReadonly: D,
|
|
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 =
|
|
1624
|
+
inputAutocomplete: L,
|
|
1625
|
+
required: le,
|
|
1626
|
+
textAlign: z,
|
|
1627
|
+
hasBorderRadius: M,
|
|
1628
|
+
activeTextStyle: y,
|
|
1629
|
+
theme: m,
|
|
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: O,
|
|
1653
|
+
ariaLabel: b,
|
|
1654
|
+
ariaAttrs: N,
|
|
1655
|
+
caretColor: fe,
|
|
1656
|
+
selectionBgColor: C,
|
|
1657
|
+
selectionTextColor: ue
|
|
1658
|
+
} = Xe(A), o = X(""), s = X(null), q = X(null), I = X(null), p = X([]), ve = X(!1), T = t(() => {
|
|
1659
|
+
const n = k.value ? "component-disabled" : "", h = g.value !== "b" ? "inline-block" : "block", W = !Q.value || Q.value < 185 ? 185 : Q.value, Z = H ? H.value : "ffffff", it = fe.value ? fe.value : "", st = C.value ? C.value : "", dt = ue.value ? ue.value : "", ct = !E.value || E.value < 0 ? 1 : E.value, ft = !F.value || F.value < 0 ? 0.2 : F.value, vt = !ee.value || ee.value < 0 ? 0 : ee.value, Ge = j.value ? j.value : "'Lato', sans-serif", pt = te.value ? te.value : "1.6rem", yt = !K.value || K.value < 0 ? 100 : K.value, gt = !U.value || U.value < 0 ? 0 : U.value, bt = !_.value || _.value < 0 ? 10 : _.value, ht = !w.value || !["top", "bottom"].includes(w.value) ? "bottom" : w.value, mt = !f.value || !["background", "line", "border"].includes(f.value) ? "background" : f.value, Ct = m.value ? m.value : "light";
|
|
1612
1660
|
return {
|
|
1613
1661
|
disabled: n,
|
|
1614
|
-
display:
|
|
1615
|
-
width:
|
|
1616
|
-
font:
|
|
1617
|
-
fontSize:
|
|
1662
|
+
display: h,
|
|
1663
|
+
width: W,
|
|
1664
|
+
font: Ge,
|
|
1665
|
+
fontSize: pt,
|
|
1618
1666
|
fontWeight: yt,
|
|
1619
|
-
textColor:
|
|
1667
|
+
textColor: Z,
|
|
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(() => T.value.disabled), Re = t(() => ({
|
|
1681
|
+
display: T.value.display
|
|
1682
|
+
})), $e = t(() => {
|
|
1683
|
+
const n = T.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: z.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 = T.value;
|
|
1702
|
+
return n.inputStyle !== "line" && M.value ? { borderRadius: `${n.borderRadius}rem` } : {};
|
|
1703
|
+
}), Ae = t(() => T.value.font), He = t(() => T.value.textColor), J = t(() => T.value.inputPosition === "top" ? "column" : "column-reverse"), Ee = t(() => {
|
|
1656
1704
|
const n = {};
|
|
1657
|
-
|
|
1658
|
-
const
|
|
1659
|
-
"aria-label":
|
|
1660
|
-
"aria-disabled":
|
|
1705
|
+
N.value && Object.keys(N.value).forEach((Z) => n[`aria-${Z}`] = N.value[Z]);
|
|
1706
|
+
const h = {
|
|
1707
|
+
"aria-label": b.value,
|
|
1708
|
+
"aria-disabled": k.value,
|
|
1661
1709
|
...n
|
|
1662
1710
|
};
|
|
1663
1711
|
return Object.fromEntries(
|
|
1664
|
-
Object.entries(
|
|
1712
|
+
Object.entries(h).filter(([W, Z]) => Z != null)
|
|
1665
1713
|
);
|
|
1666
|
-
}),
|
|
1667
|
-
const n =
|
|
1714
|
+
}), pe = t(() => {
|
|
1715
|
+
const n = T.value;
|
|
1668
1716
|
return n.caretColor || (n.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1669
|
-
}),
|
|
1670
|
-
const n =
|
|
1717
|
+
}), we = t(() => {
|
|
1718
|
+
const n = T.value;
|
|
1671
1719
|
return n.selectionBgColor || (n.theme === "dark" ? "#00d4ff" : "#007bff");
|
|
1672
|
-
}),
|
|
1673
|
-
const n =
|
|
1720
|
+
}), d = t(() => {
|
|
1721
|
+
const n = T.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 = T.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 (m.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 (!(k.value || D.value) && n.key === "Enter" && o.value.trim() !== "") {
|
|
1709
1757
|
n.preventDefault();
|
|
1710
|
-
let
|
|
1711
|
-
|
|
1758
|
+
let h = o.value.trim();
|
|
1759
|
+
P.value && (h = h.toUpperCase()), (R.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 G(B, (n) => {
|
|
1767
|
+
p.value = n, i("changed", n);
|
|
1768
|
+
}), G(o, (n) => {
|
|
1769
|
+
i("input-changed", n);
|
|
1770
|
+
}), (n, h) => e.nbId ? (V(), S("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
|
+
x("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 ? (V(), S("div", {
|
|
1736
1784
|
key: 0,
|
|
1737
1785
|
ref_key: "chips",
|
|
1738
|
-
ref:
|
|
1786
|
+
ref: I,
|
|
1739
1787
|
class: "chips"
|
|
1740
1788
|
}, [
|
|
1741
|
-
(
|
|
1742
|
-
key:
|
|
1789
|
+
(V(!0), S(xt, null, kt(p.value, (W) => (V(), S("div", {
|
|
1790
|
+
key: W,
|
|
1743
1791
|
class: "chip"
|
|
1744
1792
|
}, [
|
|
1745
|
-
|
|
1746
|
-
chips:
|
|
1747
|
-
chip:
|
|
1748
|
-
removeChip:
|
|
1793
|
+
Fe(n.$slots, "chip", {
|
|
1794
|
+
chips: p.value,
|
|
1795
|
+
chip: W,
|
|
1796
|
+
removeChip: qe
|
|
1749
1797
|
}, () => [
|
|
1750
|
-
|
|
1751
|
-
!l(
|
|
1798
|
+
x("span", Oa, je(W), 1),
|
|
1799
|
+
!l(k) && !l(D) ? (V(), S("span", {
|
|
1752
1800
|
key: 0,
|
|
1753
1801
|
class: "chip-remove",
|
|
1754
|
-
onClick: (
|
|
1755
|
-
}, "×", 8, Wa)) :
|
|
1802
|
+
onClick: (Z) => qe(W)
|
|
1803
|
+
}, "×", 8, Wa)) : re("", !0)
|
|
1756
1804
|
], !0)
|
|
1757
1805
|
]))), 128))
|
|
1758
|
-
], 512)) :
|
|
1759
|
-
|
|
1806
|
+
], 512)) : re("", !0),
|
|
1807
|
+
Je(x("input", {
|
|
1760
1808
|
ref_key: "chipInput",
|
|
1761
|
-
ref:
|
|
1809
|
+
ref: q,
|
|
1762
1810
|
type: "text",
|
|
1763
|
-
"onUpdate:modelValue":
|
|
1764
|
-
name: l(
|
|
1765
|
-
placeholder: l(
|
|
1811
|
+
"onUpdate:modelValue": h[0] || (h[0] = (W) => o.value = W),
|
|
1812
|
+
name: l(ae),
|
|
1813
|
+
placeholder: l($),
|
|
1766
1814
|
readonly: l(D),
|
|
1767
|
-
autocomplete: l(
|
|
1768
|
-
required: l(
|
|
1769
|
-
tabindex: l(
|
|
1770
|
-
class:
|
|
1771
|
-
style:
|
|
1772
|
-
onKeydown:
|
|
1815
|
+
autocomplete: l(L),
|
|
1816
|
+
required: l(le),
|
|
1817
|
+
tabindex: l(k) || l(D) ? -1 : l(c),
|
|
1818
|
+
class: Y(["chips-input", Oe.value]),
|
|
1819
|
+
style: ie([et.value, tt.value]),
|
|
1820
|
+
onKeydown: h[1] || (h[1] = Me((W) => !l(k) && l(O) && ut(W), ["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-4af4ff9b"]]), 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
|
};
|