@vlalg-nimbus/nb-inputs 5.0.0 → 6.0.1

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 CHANGED
@@ -1,10 +1,10 @@
1
- import { useCssVars as le, unref as S, onMounted as oe, ref as ue, toRefs as ne, computed as l, watch as w, openBlock as C, createElementBlock as H, normalizeClass as L, normalizeStyle as j, createElementVNode as f, Fragment as re, renderList as se, withDirectives as ce, vModelRadio as Ve, toDisplayString as ie, createCommentVNode as de, vModelCheckbox as ge } from "vue";
2
- const fe = (e, u) => {
1
+ import { useCssVars as oe, unref as W, onMounted as ue, ref as ne, toRefs as re, computed as l, watch as F, openBlock as E, createElementBlock as N, normalizeClass as H, normalizeStyle as T, createElementVNode as f, Fragment as se, renderList as ce, withDirectives as ie, vModelRadio as He, toDisplayString as de, createCommentVNode as fe, vModelCheckbox as Ee } from "vue";
2
+ const ve = (e, o) => {
3
3
  const s = e.__vccOpts || e;
4
- for (const [d, i] of u)
4
+ for (const [d, i] of o)
5
5
  s[d] = i;
6
6
  return s;
7
- }, xe = ["id"], he = ["id", "disabled", "value", "name"], _e = ["for"], ke = /* @__PURE__ */ Object.assign({
7
+ }, Ne = ["id"], Ge = ["id", "disabled", "value", "name"], Ie = ["for"], ze = /* @__PURE__ */ Object.assign({
8
8
  name: "NbInputRadio",
9
9
  inheritAttrs: !1
10
10
  }, {
@@ -18,8 +18,8 @@ const fe = (e, u) => {
18
18
  type: String,
19
19
  default: "b",
20
20
  validator: (e = "b") => {
21
- const u = e ? e.toLowerCase() : "";
22
- return ["b", "ib"].includes(u);
21
+ const o = e ? e.toLowerCase() : "";
22
+ return ["b", "ib"].includes(o);
23
23
  }
24
24
  },
25
25
  groupName: {
@@ -35,12 +35,12 @@ const fe = (e, u) => {
35
35
  validator: (e) => {
36
36
  if (!e.length)
37
37
  return !1;
38
- let u = !1;
38
+ let o = !1;
39
39
  for (const s of e) {
40
40
  const d = Object.keys(s);
41
- d.length !== 2 && (u = !0), d.every((v) => ["value", "text"].includes(v)) || (u = !0);
41
+ d.length !== 2 && (o = !0), d.every((v) => ["value", "text"].includes(v)) || (o = !0);
42
42
  }
43
- if (!u)
43
+ if (!o)
44
44
  return e;
45
45
  }
46
46
  },
@@ -108,124 +108,122 @@ const fe = (e, u) => {
108
108
  }
109
109
  },
110
110
  emits: ["current-value", "changed"],
111
- setup(e, { emit: u }) {
112
- le((a) => ({
113
- "0bac77b8": T.value,
114
- "0eddad90": Q.value,
115
- "74d3f1e2": J.value,
116
- "8286d8a4": S(x),
117
- e9788dcc: M.value,
118
- "64045ab5": K.value,
119
- "53fcbd96": P.value,
120
- "79f0cc47": U.value
121
- })), oe(() => {
122
- W();
111
+ setup(e, { emit: o }) {
112
+ oe((a) => ({
113
+ "332021a8": P.value,
114
+ "72f1d6d0": Z.value,
115
+ "58cb65f2": X.value,
116
+ "31a858b6": W(x),
117
+ "6935ba22": J.value,
118
+ "69da0486": Y.value,
119
+ "93607da6": Q.value,
120
+ "2646dd62": K.value
121
+ })), ue(() => {
122
+ q();
123
123
  });
124
- const s = u, d = e, i = ue(null), {
124
+ const s = o, d = e, i = ne(null), {
125
125
  currentOption: v,
126
- valueType: E,
127
- display: _,
128
- options: V,
129
- textColor: g,
130
- color: N,
131
- hoverEffect: G,
132
- activeHoverEffect: I,
126
+ valueType: G,
127
+ display: h,
128
+ options: m,
129
+ textColor: I,
130
+ color: g,
131
+ hoverEffect: z,
132
+ activeHoverEffect: O,
133
133
  colorHover: x,
134
- itemGap: y,
135
- internalGap: b,
136
- scale: h,
137
- disabled: $,
134
+ itemGap: k,
135
+ internalGap: p,
136
+ scale: b,
137
+ disabled: _,
138
138
  fontFamily: A,
139
- fontSize: O,
140
- fontWeight: k
141
- } = ne(d), r = l(() => {
142
- const a = $.value ? "component-disabled" : "", n = _.value !== "b" ? "inline-block" : "block", p = A.value ? A.value : "'Lato', sans-serif", t = O.value ? O.value : "1.6em", o = !k.value || k.value < 0 ? 200 : k.value, m = g.value ? g.value : "black", z = N.value ? N.value : "#767676", R = [!1, !0].includes(G.value) ? G.value : !1, X = [!1, !0].includes(I.value) ? I.value : !1, Y = x.value ? x.value : "#a6a6a6", Z = !y.value || y.value < 0 ? 15 : y.value, ee = !b.value || b.value < 0 ? 6 : b.value, te = !h.value || h.value < 0 ? 1 : h.value;
139
+ fontSize: $,
140
+ fontWeight: S
141
+ } = re(d), c = l(() => {
142
+ const a = _.value ? "component-disabled" : "", u = h.value !== "b" ? "inline-block" : "block", y = A.value ? A.value : "'Lato', sans-serif", w = $.value ? $.value : "1.6em", R = !S.value || S.value < 0 ? 200 : S.value, te = I.value ? I.value : "black", ae = g.value ? g.value : "#767676", D = [!1, !0].includes(z.value) ? z.value : !1, t = [!1, !0].includes(O.value) ? O.value : !1, n = x.value ? x.value : "#a6a6a6", V = !k.value || k.value < 0 ? 15 : k.value, B = !p.value || p.value < 0 ? 6 : p.value, L = !b.value || b.value < 0 ? 1 : b.value;
143
143
  return {
144
144
  disabled: a,
145
- display: n,
146
- textColor: m,
147
- color: z,
148
- hoverEffect: R,
149
- activeHoverEffect: X,
150
- colorHover: Y,
151
- itemGap: Z,
152
- internalGap: ee,
153
- scale: te,
154
- font: p,
155
- fontSize: t,
156
- fontWeight: o
157
- };
158
- }), c = l(() => r.value.disabled), B = l(() => {
159
- const a = r.value;
160
- return {
161
- display: a.display,
162
- transform: `scale(${a.scale})`
145
+ display: u,
146
+ textColor: te,
147
+ color: ae,
148
+ hoverEffect: D,
149
+ activeHoverEffect: t,
150
+ colorHover: n,
151
+ itemGap: V,
152
+ internalGap: B,
153
+ scale: L,
154
+ font: y,
155
+ fontSize: w,
156
+ fontWeight: R
163
157
  };
164
- }), q = l(() => r.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), D = l(() => {
165
- const a = r.value;
158
+ }), j = l(() => c.value.disabled), C = l(() => ({
159
+ display: c.value.display
160
+ })), r = l(() => c.value.display === "inline-block" ? "component-radio__item--display-inline" : "component-radio__item--display-block"), M = l(() => {
161
+ const a = c.value;
166
162
  return {
167
163
  fontSize: a.fontSize,
168
164
  fontWeight: a.fontWeight
169
165
  };
170
- }), F = l(() => Array.isArray(V.value) && V.value.constructor === Array && V.value.length > 0), T = l(() => r.value.font), M = l(() => r.value.textColor), U = l(() => r.value.color), P = l(() => {
171
- const a = r.value;
166
+ }), U = l(() => Array.isArray(m.value) && m.value.constructor === Array && m.value.length > 0), P = l(() => c.value.font), J = l(() => c.value.textColor), K = l(() => c.value.color), Q = l(() => {
167
+ const a = c.value;
172
168
  return a.hoverEffect ? a.colorHover : a.color;
173
- }), J = l(() => {
174
- const a = r.value;
169
+ }), X = l(() => {
170
+ const a = c.value;
175
171
  return a.activeHoverEffect ? a.colorHover : a.color;
176
- }), K = l(() => {
177
- const n = r.value.internalGap;
178
- return !n || n < 0 ? 0 : `${n}px`;
179
- }), Q = l(() => {
180
- const n = r.value.itemGap;
181
- return !n || n < 0 ? 0 : `${n}px`;
182
- }), W = () => {
172
+ }), Y = l(() => {
173
+ const u = c.value.internalGap;
174
+ return !u || u < 0 ? 0 : `${u}px`;
175
+ }), Z = l(() => {
176
+ const u = c.value.itemGap;
177
+ return !u || u < 0 ? 0 : `${u}px`;
178
+ }), ee = l(() => ({
179
+ zoom: c.value.scale
180
+ })), q = () => {
183
181
  const a = v.value;
184
- a && (["string"].includes(E.value) ? i.value = a.toString().toLowerCase() : i.value = a);
182
+ a && (["string"].includes(G.value) ? i.value = a.toString().toLowerCase() : i.value = a);
185
183
  };
186
- return w(v, (a, n) => {
187
- a !== n && W();
188
- }), w(i, (a, n) => {
189
- a !== n && (s("current-value", a), s("changed", a));
190
- }), (a, n) => e.nbId && F.value ? (C(), H("div", {
184
+ return F(v, (a, u) => {
185
+ a !== u && q();
186
+ }), F(i, (a, u) => {
187
+ a !== u && (s("current-value", a), s("changed", a));
188
+ }), (a, u) => e.nbId && U.value ? (E(), N("div", {
191
189
  key: 0,
192
- class: L(["nb-wrapper", c.value]),
193
- style: j([B.value])
190
+ class: H(["nb-wrapper", j.value]),
191
+ style: T([C.value, ee.value])
194
192
  }, [
195
193
  f("div", {
196
194
  id: e.nbId,
197
- class: L(["nb-reset", "component", q.value])
195
+ class: H(["nb-reset", "component", r.value])
198
196
  }, [
199
- (C(!0), H(re, null, se(S(V), (p, t) => (C(), H("div", {
200
- key: t,
197
+ (E(!0), N(se, null, ce(W(m), (y, w) => (E(), N("div", {
198
+ key: w,
201
199
  class: "component-radio__item"
202
200
  }, [
203
- ce(f("input", {
204
- id: `${e.nbId}-${p.value}`,
205
- "onUpdate:modelValue": n[0] || (n[0] = (o) => i.value = o),
201
+ ie(f("input", {
202
+ id: `${e.nbId}-${y.value}`,
203
+ "onUpdate:modelValue": u[0] || (u[0] = (R) => i.value = R),
206
204
  type: "radio",
207
205
  class: "component-radio__item--input",
208
- disabled: S($),
209
- value: p.value,
206
+ disabled: W(_),
207
+ value: y.value,
210
208
  name: e.groupName
211
- }, null, 8, he), [
212
- [Ve, i.value]
209
+ }, null, 8, Ge), [
210
+ [He, i.value]
213
211
  ]),
214
212
  f("label", {
215
- for: `${e.nbId}-${p.value}`,
213
+ for: `${e.nbId}-${y.value}`,
216
214
  class: "component-radio__item--label"
217
215
  }, [
218
- n[1] || (n[1] = f("div", null, null, -1)),
216
+ u[1] || (u[1] = f("div", null, null, -1)),
219
217
  f("span", {
220
- style: j([D.value])
221
- }, ie(p.text), 5)
222
- ], 8, _e)
218
+ style: T([M.value])
219
+ }, de(y.text), 5)
220
+ ], 8, Ie)
223
221
  ]))), 128))
224
- ], 10, xe)
225
- ], 6)) : de("", !0);
222
+ ], 10, Ne)
223
+ ], 6)) : fe("", !0);
226
224
  }
227
- }), Se = /* @__PURE__ */ fe(ke, [["__scopeId", "data-v-76b4799e"]]);
228
- const Ce = ["id"], He = ["id", "disabled", "value", "name"], Ee = ["for"], Ne = /* @__PURE__ */ Object.assign({
225
+ }), Oe = /* @__PURE__ */ ve(ze, [["__scopeId", "data-v-b27520fa"]]);
226
+ const Ae = ["id"], $e = ["id", "disabled", "value", "name"], we = ["for"], Re = /* @__PURE__ */ Object.assign({
229
227
  name: "NbInputCheckbox",
230
228
  inheritAttrs: !1
231
229
  }, {
@@ -239,8 +237,8 @@ const Ce = ["id"], He = ["id", "disabled", "value", "name"], Ee = ["for"], Ne =
239
237
  type: String,
240
238
  default: "b",
241
239
  validator: (e = "b") => {
242
- const u = e ? e.toLowerCase() : "";
243
- return ["b", "ib"].includes(u);
240
+ const o = e ? e.toLowerCase() : "";
241
+ return ["b", "ib"].includes(o);
244
242
  }
245
243
  },
246
244
  groupName: {
@@ -256,12 +254,12 @@ const Ce = ["id"], He = ["id", "disabled", "value", "name"], Ee = ["for"], Ne =
256
254
  validator: (e) => {
257
255
  if (!e.length)
258
256
  return !1;
259
- let u = !1;
257
+ let o = !1;
260
258
  for (const s of e) {
261
259
  const d = Object.keys(s);
262
- d.length !== 2 && (u = !0), d.every((v) => ["value", "text"].includes(v)) || (u = !0);
260
+ d.length !== 2 && (o = !0), d.every((v) => ["value", "text"].includes(v)) || (o = !0);
263
261
  }
264
- if (!u)
262
+ if (!o)
265
263
  return e;
266
264
  }
267
265
  },
@@ -273,6 +271,10 @@ const Ce = ["id"], He = ["id", "disabled", "value", "name"], Ee = ["for"], Ne =
273
271
  type: String,
274
272
  default: "black"
275
273
  },
274
+ checkColor: {
275
+ type: String,
276
+ default: "white"
277
+ },
276
278
  boxRadius: {
277
279
  type: Number,
278
280
  default: 0
@@ -312,6 +314,11 @@ const Ce = ["id"], He = ["id", "disabled", "value", "name"], Ee = ["for"], Ne =
312
314
  default: "box",
313
315
  validator: (e) => ["box", "circle"].indexOf(e) !== -1
314
316
  },
317
+ background: {
318
+ type: Boolean,
319
+ default: !1,
320
+ validator: (e) => [!0, !1].indexOf(e) !== -1
321
+ },
315
322
  disabled: {
316
323
  type: Boolean,
317
324
  default: !1,
@@ -333,140 +340,148 @@ const Ce = ["id"], He = ["id", "disabled", "value", "name"], Ee = ["for"], Ne =
333
340
  }
334
341
  },
335
342
  emits: ["current-value", "changed"],
336
- setup(e, { emit: u }) {
337
- le((t) => ({
338
- "1dbe08ee": M.value,
339
- "11ce7d5a": a.value,
340
- d0a2a0f6: K.value,
341
- "04bde97d": W.value,
342
- "6e8ece10": S(x),
343
- fc6fed38: U.value,
344
- "41d79502": Q.value,
345
- "9ff14baa": J.value,
346
- f8265cde: P.value
347
- })), oe(() => {
348
- p();
343
+ setup(e, { emit: o }) {
344
+ oe((t) => ({
345
+ "508d157b": Q.value,
346
+ "140b0932": R.value,
347
+ "0d11805e": Y.value,
348
+ d09aa2d0: ee.value,
349
+ "2f203f46": u.value,
350
+ "511bcdec": w.value,
351
+ "782e89b1": X.value,
352
+ "9c6f35e8": y.value,
353
+ f31e3904: Z.value,
354
+ "05ac49d9": a.value
355
+ })), ue(() => {
356
+ D();
349
357
  });
350
- const s = u, d = e, i = ue(null), {
358
+ const s = o, d = e, i = ne(null), {
351
359
  currentOption: v,
352
- display: E,
353
- options: _,
354
- textColor: V,
360
+ display: G,
361
+ options: h,
362
+ textColor: m,
363
+ checkColor: I,
355
364
  boxRadius: g,
356
- color: N,
357
- hoverEffect: G,
358
- activeHoverEffect: I,
359
- colorHover: x,
360
- itemGap: y,
365
+ color: z,
366
+ hoverEffect: O,
367
+ activeHoverEffect: x,
368
+ colorHover: k,
369
+ itemGap: p,
361
370
  internalGap: b,
362
- scale: h,
363
- type: $,
364
- disabled: A,
365
- fontFamily: O,
366
- fontSize: k,
367
- fontWeight: r
368
- } = ne(d), c = l(() => {
369
- const t = A.value ? "component-disabled" : "", o = E.value !== "b" ? "inline-block" : "block", m = O.value ? O.value : "'Lato', sans-serif", z = k.value ? k.value : "1.6em", R = r.value !== 0 && !r.value || r.value < 0 ? 200 : r.value, X = V.value ? V.value : "black", Y = g.value !== 0 && !g.value || g.value < 0 ? 0 : g.value, Z = N.value ? N.value : "#767676", ee = [!1, !0].includes(G.value) ? G.value : !1, te = [!1, !0].includes(I.value) ? I.value : !1, ve = x.value ? x.value : "#a6a6a6", pe = y.value !== 0 && !y.value || y.value < 0 ? 15 : y.value, ye = b.value !== 0 && !b.value || b.value < 0 ? 6 : b.value, be = ["box", "circle"].includes($.value) ? $.value : "box", me = !h.value || h.value < 0 ? 1 : h.value;
371
+ scale: _,
372
+ type: A,
373
+ background: $,
374
+ disabled: S,
375
+ fontFamily: c,
376
+ fontSize: j,
377
+ fontWeight: C
378
+ } = re(d), r = l(() => {
379
+ const t = S.value ? "component-disabled" : "", n = G.value !== "b" ? "inline-block" : "block", V = c.value ? c.value : "'Lato', sans-serif", B = j.value ? j.value : "1.6em", L = C.value !== 0 && !C.value || C.value < 0 ? 200 : C.value, pe = m.value ? m.value : "black", be = I.value ? I.value : "white", ye = g.value !== 0 && !g.value || g.value < 0 ? 0 : g.value, Ve = z.value ? z.value : "#767676", me = [!1, !0].includes(O.value) ? O.value : !1, ge = [!1, !0].includes(x.value) ? x.value : !1, he = k.value ? k.value : "#a6a6a6", xe = p.value !== 0 && !p.value || p.value < 0 ? 15 : p.value, ke = b.value !== 0 && !b.value || b.value < 0 ? 6 : b.value, _e = ["box", "circle"].includes(A.value) ? A.value : "box", Se = !_.value || _.value < 0 ? 1 : _.value, Ce = [!1, !0].includes($.value) ? $.value : !1;
370
380
  return {
371
381
  disabled: t,
372
- display: o,
373
- textColor: X,
374
- boxRadius: Y,
375
- color: Z,
376
- hoverEffect: ee,
377
- activeHoverEffect: te,
378
- colorHover: ve,
379
- itemGap: pe,
380
- internalGap: ye,
381
- scale: me,
382
- type: be,
383
- font: m,
384
- fontSize: z,
385
- fontWeight: R
386
- };
387
- }), B = l(() => c.value.disabled), q = l(() => {
388
- const t = c.value;
389
- return {
390
- display: t.display,
391
- transform: `scale(${t.scale})`
382
+ display: n,
383
+ textColor: pe,
384
+ checkColor: be,
385
+ boxRadius: ye,
386
+ color: Ve,
387
+ hoverEffect: me,
388
+ activeHoverEffect: ge,
389
+ colorHover: he,
390
+ itemGap: xe,
391
+ internalGap: ke,
392
+ scale: Se,
393
+ type: _e,
394
+ font: V,
395
+ background: Ce,
396
+ fontSize: B,
397
+ fontWeight: L
392
398
  };
393
- }), D = l(() => c.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), F = l(() => {
394
- const t = c.value;
399
+ }), M = l(() => r.value.disabled), U = l(() => ({
400
+ display: r.value.display
401
+ })), P = l(() => r.value.display === "inline-block" ? "component-checkbox__item--display-inline" : "component-checkbox__item--display-block"), J = l(() => {
402
+ const t = r.value;
395
403
  return {
396
404
  fontSize: t.fontSize,
397
405
  fontWeight: t.fontWeight
398
406
  };
399
- }), T = l(() => Array.isArray(_.value) && _.value.constructor === Array && _.value.length > 0), M = l(() => c.value.font), U = l(() => c.value.textColor), P = l(() => c.value.color), J = l(() => {
400
- const t = c.value;
407
+ }), K = l(() => Array.isArray(h.value) && h.value.constructor === Array && h.value.length > 0), Q = l(() => r.value.font), X = l(() => r.value.textColor), Y = l(() => r.value.color), Z = l(() => {
408
+ const t = r.value;
401
409
  return t.hoverEffect ? t.colorHover : t.color;
402
- }), K = l(() => {
403
- const t = c.value;
410
+ }), ee = l(() => {
411
+ const t = r.value;
404
412
  return t.activeHoverEffect ? t.colorHover : t.color;
405
- }), Q = l(() => {
406
- const o = c.value.internalGap;
407
- return !o || o < 0 ? 0 : `${o}px`;
408
- }), W = l(() => {
409
- const t = c.value;
413
+ }), q = l(() => r.value.background ? "component-checkbox__item--with-background" : "component-checkbox__item--without-background"), a = l(() => {
414
+ const t = r.value;
415
+ return t.background ? t.checkColor : t.textColor;
416
+ }), u = l(() => r.value.background ? "19px" : "auto"), y = l(() => {
417
+ const n = r.value.internalGap;
418
+ return !n || n < 0 ? 0 : `${n}px`;
419
+ }), w = l(() => {
420
+ const t = r.value;
410
421
  return `${t.boxRadius > 7 ? 7 : t.boxRadius}px`;
411
- }), a = l(() => {
412
- const o = c.value.itemGap;
413
- return !o || o < 0 ? 0 : `${o}px`;
414
- }), n = l(() => c.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), p = () => {
422
+ }), R = l(() => {
423
+ const n = r.value.itemGap;
424
+ return !n || n < 0 ? 0 : `${n}px`;
425
+ }), te = l(() => r.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), ae = l(() => ({
426
+ zoom: r.value.scale
427
+ })), D = () => {
415
428
  i.value = v.value;
416
429
  };
417
- return w(v, (t, o) => {
418
- t !== o && p();
419
- }), w(i, (t, o) => {
420
- t !== o && (s("current-value", t), s("changed", t));
421
- }), (t, o) => e.nbId && T.value ? (C(), H("div", {
430
+ return F(v, (t, n) => {
431
+ t !== n && D();
432
+ }), F(i, (t, n) => {
433
+ t !== n && (s("current-value", t), s("changed", t));
434
+ }), (t, n) => e.nbId && K.value ? (E(), N("div", {
422
435
  key: 0,
423
- class: L(["nb-wrapper", B.value]),
424
- style: j([q.value])
436
+ class: H(["nb-wrapper", M.value]),
437
+ style: T([U.value, ae.value])
425
438
  }, [
426
439
  f("div", {
427
440
  id: e.nbId,
428
- class: L(["nb-reset", "component", D.value])
441
+ class: H(["nb-reset", "component", P.value])
429
442
  }, [
430
- (C(!0), H(re, null, se(S(_), (m, z) => (C(), H("div", {
431
- key: z,
443
+ (E(!0), N(se, null, ce(W(h), (V, B) => (E(), N("div", {
444
+ key: B,
432
445
  class: "component-checkbox__item"
433
446
  }, [
434
- ce(f("input", {
435
- id: `${e.nbId}-${m.value}`,
436
- "onUpdate:modelValue": o[0] || (o[0] = (R) => i.value = R),
447
+ ie(f("input", {
448
+ id: `${e.nbId}-${V.value}`,
449
+ "onUpdate:modelValue": n[0] || (n[0] = (L) => i.value = L),
437
450
  type: "checkbox",
438
451
  class: "component-checkbox__item--input",
439
- disabled: S(A),
440
- value: m.value,
452
+ disabled: W(S),
453
+ value: V.value,
441
454
  name: e.groupName
442
- }, null, 8, He), [
443
- [ge, i.value]
455
+ }, null, 8, $e), [
456
+ [Ee, i.value]
444
457
  ]),
445
458
  f("label", {
446
- for: `${e.nbId}-${m.value}`,
447
- class: L([[n.value], "component-checkbox__item--label"])
459
+ for: `${e.nbId}-${V.value}`,
460
+ class: H([[te.value], "component-checkbox__item--label"])
448
461
  }, [
449
- o[1] || (o[1] = f("div", null, null, -1)),
462
+ f("div", {
463
+ class: H([q.value])
464
+ }, null, 2),
450
465
  f("span", {
451
- style: j([F.value])
452
- }, ie(m.text), 5)
453
- ], 10, Ee)
466
+ style: T([J.value])
467
+ }, de(V.text), 5)
468
+ ], 10, we)
454
469
  ]))), 128))
455
- ], 10, Ce)
456
- ], 6)) : de("", !0);
470
+ ], 10, Ae)
471
+ ], 6)) : fe("", !0);
457
472
  }
458
- }), Ge = /* @__PURE__ */ fe(Ne, [["__scopeId", "data-v-fa0b8ef5"]]), ae = {
459
- NbInputRadio: Se,
460
- NbInputCheckbox: Ge
461
- }, $e = {
473
+ }), Be = /* @__PURE__ */ ve(Re, [["__scopeId", "data-v-ad100a69"]]), le = {
474
+ NbInputRadio: Oe,
475
+ NbInputCheckbox: Be
476
+ }, We = {
462
477
  install(e) {
463
- for (const u in ae)
464
- if (Object.prototype.hasOwnProperty.call(ae, u)) {
465
- const s = ae[u];
478
+ for (const o in le)
479
+ if (Object.prototype.hasOwnProperty.call(le, o)) {
480
+ const s = le[o];
466
481
  e.component(s.name, s);
467
482
  }
468
483
  }
469
484
  };
470
485
  export {
471
- $e as default
486
+ We as default
472
487
  };
@@ -1 +1 @@
1
- (function(e,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("vue")):typeof define=="function"&&define.amd?define(["vue"],$):(e=typeof globalThis<"u"?globalThis:e||self,e.NbInputs=$(e.Vue))})(this,function(e){"use strict";const $="",X=(t,n)=>{const s=t.__vccOpts||t;for(const[d,i]of n)s[d]=i;return s},Y=["id"],Z=["id","disabled","value","name"],ee=["for"],te=X(Object.assign({name:"NbInputRadio",inheritAttrs:!1},{__name:"NbInputRadio",props:{nbId:{type:String,required:!0},display:{type:String,default:"b",validator:(t="b")=>{const n=t?t.toLowerCase():"";return["b","ib"].includes(n)}},groupName:{type:String,default:"",required:!0,validator:t=>t.toString().toLowerCase()},options:{type:Array,required:!0,default:()=>[],validator:t=>{if(!t.length)return!1;let n=!1;for(const s of t){const d=Object.keys(s);d.length!==2&&(n=!0),d.every(f=>["value","text"].includes(f))||(n=!0)}if(!n)return t}},currentOption:{type:[String,Number,Boolean],default:null},valueType:{type:String,default:"boolean",validator:t=>["boolean","string","number"].indexOf(t)!==-1},textColor:{type:String,default:"black"},color:{type:String,default:"#767676"},hoverEffect:{type:Boolean,default:!1,validator:t=>[!0,!1].indexOf(t)!==-1},activeHoverEffect:{type:Boolean,default:!1,validator:t=>[!0,!1].indexOf(t)!==-1},colorHover:{type:String,default:"#a6a6a6"},itemGap:{type:Number,default:15},internalGap:{type:Number,default:6},scale:{type:Number,default:1},disabled:{type:Boolean,default:!1,validator:t=>typeof t=="boolean"&&[!0,!1].includes(t)},fontFamily:{type:String,default:"'Lato', sans-serif"},fontSize:{type:String,default:"1.6em",validator:t=>t||"1.6em"},fontWeight:{type:Number,default:400,validator:t=>t||200}},emits:["current-value","changed"],setup(t,{emit:n}){e.useCssVars(l=>({"0bac77b8":W.value,"0eddad90":M.value,"74d3f1e2":F.value,"8286d8a4":e.unref(g),e9788dcc:j.value,"64045ab5":T.value,"53fcbd96":q.value,"79f0cc47":D.value})),e.onMounted(()=>{B()});const s=n,d=t,i=e.ref(null),{currentOption:f,valueType:_,display:x,options:b,textColor:V,color:S,hoverEffect:C,activeHoverEffect:E,colorHover:g,itemGap:v,internalGap:m,scale:h,disabled:N,fontFamily:H,fontSize:G,fontWeight:k}=e.toRefs(d),u=e.computed(()=>{const l=N.value?"component-disabled":"",r=x.value!=="b"?"inline-block":"block",p=H.value?H.value:"'Lato', sans-serif",a=G.value?G.value:"1.6em",o=!k.value||k.value<0?200:k.value,y=V.value?V.value:"black",I=S.value?S.value:"#767676",z=[!1,!0].includes(C.value)?C.value:!1,U=[!1,!0].includes(E.value)?E.value:!1,P=g.value?g.value:"#a6a6a6",J=!v.value||v.value<0?15:v.value,K=!m.value||m.value<0?6:m.value,Q=!h.value||h.value<0?1:h.value;return{disabled:l,display:r,textColor:y,color:I,hoverEffect:z,activeHoverEffect:U,colorHover:P,itemGap:J,internalGap:K,scale:Q,font:p,fontSize:a,fontWeight:o}}),c=e.computed(()=>u.value.disabled),O=e.computed(()=>{const l=u.value;return{display:l.display,transform:`scale(${l.scale})`}}),w=e.computed(()=>u.value.display==="inline-block"?"component-radio__item--display-inline":"component-radio__item--display-block"),R=e.computed(()=>{const l=u.value;return{fontSize:l.fontSize,fontWeight:l.fontWeight}}),L=e.computed(()=>Array.isArray(b.value)&&b.value.constructor===Array&&b.value.length>0),W=e.computed(()=>u.value.font),j=e.computed(()=>u.value.textColor),D=e.computed(()=>u.value.color),q=e.computed(()=>{const l=u.value;return l.hoverEffect?l.colorHover:l.color}),F=e.computed(()=>{const l=u.value;return l.activeHoverEffect?l.colorHover:l.color}),T=e.computed(()=>{const r=u.value.internalGap;return!r||r<0?0:`${r}px`}),M=e.computed(()=>{const r=u.value.itemGap;return!r||r<0?0:`${r}px`}),B=()=>{const l=f.value;l&&(["string"].includes(_.value)?i.value=l.toString().toLowerCase():i.value=l)};return e.watch(f,(l,r)=>{l!==r&&B()}),e.watch(i,(l,r)=>{l!==r&&(s("current-value",l),s("changed",l))}),(l,r)=>t.nbId&&L.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["nb-wrapper",c.value]),style:e.normalizeStyle([O.value])},[e.createElementVNode("div",{id:t.nbId,class:e.normalizeClass(["nb-reset","component",w.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(b),(p,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"component-radio__item"},[e.withDirectives(e.createElementVNode("input",{id:`${t.nbId}-${p.value}`,"onUpdate:modelValue":r[0]||(r[0]=o=>i.value=o),type:"radio",class:"component-radio__item--input",disabled:e.unref(N),value:p.value,name:t.groupName},null,8,Z),[[e.vModelRadio,i.value]]),e.createElementVNode("label",{for:`${t.nbId}-${p.value}`,class:"component-radio__item--label"},[r[1]||(r[1]=e.createElementVNode("div",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle([R.value])},e.toDisplayString(p.text),5)],8,ee)]))),128))],10,Y)],6)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-76b4799e"]]),de="",ae=["id"],le=["id","disabled","value","name"],oe=["for"],A={NbInputRadio:te,NbInputCheckbox:X(Object.assign({name:"NbInputCheckbox",inheritAttrs:!1},{__name:"NbInputCheckbox",props:{nbId:{type:String,required:!0},display:{type:String,default:"b",validator:(t="b")=>{const n=t?t.toLowerCase():"";return["b","ib"].includes(n)}},groupName:{type:String,default:"",required:!0,validator:t=>t.toString().toLowerCase()},options:{type:Array,required:!0,default:()=>[],validator:t=>{if(!t.length)return!1;let n=!1;for(const s of t){const d=Object.keys(s);d.length!==2&&(n=!0),d.every(f=>["value","text"].includes(f))||(n=!0)}if(!n)return t}},currentOption:{type:Array,default:()=>[]},textColor:{type:String,default:"black"},boxRadius:{type:Number,default:0},color:{type:String,default:"#767676"},hoverEffect:{type:Boolean,default:!1,validator:t=>[!0,!1].indexOf(t)!==-1},activeHoverEffect:{type:Boolean,default:!1,validator:t=>[!0,!1].indexOf(t)!==-1},colorHover:{type:String,default:"#a6a6a6"},itemGap:{type:Number,default:15},internalGap:{type:Number,default:6},scale:{type:Number,default:1},type:{type:String,default:"box",validator:t=>["box","circle"].indexOf(t)!==-1},disabled:{type:Boolean,default:!1,validator:t=>typeof t=="boolean"&&[!0,!1].includes(t)},fontFamily:{type:String,default:"'Lato', sans-serif"},fontSize:{type:String,default:"1.6em",validator:t=>t||"1.6em"},fontWeight:{type:Number,default:400,validator:t=>t||200}},emits:["current-value","changed"],setup(t,{emit:n}){e.useCssVars(a=>({"1dbe08ee":j.value,"11ce7d5a":l.value,d0a2a0f6:T.value,"04bde97d":B.value,"6e8ece10":e.unref(g),fc6fed38:D.value,"41d79502":M.value,"9ff14baa":F.value,f8265cde:q.value})),e.onMounted(()=>{p()});const s=n,d=t,i=e.ref(null),{currentOption:f,display:_,options:x,textColor:b,boxRadius:V,color:S,hoverEffect:C,activeHoverEffect:E,colorHover:g,itemGap:v,internalGap:m,scale:h,type:N,disabled:H,fontFamily:G,fontSize:k,fontWeight:u}=e.toRefs(d),c=e.computed(()=>{const a=H.value?"component-disabled":"",o=_.value!=="b"?"inline-block":"block",y=G.value?G.value:"'Lato', sans-serif",I=k.value?k.value:"1.6em",z=u.value!==0&&!u.value||u.value<0?200:u.value,U=b.value?b.value:"black",P=V.value!==0&&!V.value||V.value<0?0:V.value,J=S.value?S.value:"#767676",K=[!1,!0].includes(C.value)?C.value:!1,Q=[!1,!0].includes(E.value)?E.value:!1,ne=g.value?g.value:"#a6a6a6",re=v.value!==0&&!v.value||v.value<0?15:v.value,ue=m.value!==0&&!m.value||m.value<0?6:m.value,se=["box","circle"].includes(N.value)?N.value:"box",ce=!h.value||h.value<0?1:h.value;return{disabled:a,display:o,textColor:U,boxRadius:P,color:J,hoverEffect:K,activeHoverEffect:Q,colorHover:ne,itemGap:re,internalGap:ue,scale:ce,type:se,font:y,fontSize:I,fontWeight:z}}),O=e.computed(()=>c.value.disabled),w=e.computed(()=>{const a=c.value;return{display:a.display,transform:`scale(${a.scale})`}}),R=e.computed(()=>c.value.display==="inline-block"?"component-checkbox__item--display-inline":"component-checkbox__item--display-block"),L=e.computed(()=>{const a=c.value;return{fontSize:a.fontSize,fontWeight:a.fontWeight}}),W=e.computed(()=>Array.isArray(x.value)&&x.value.constructor===Array&&x.value.length>0),j=e.computed(()=>c.value.font),D=e.computed(()=>c.value.textColor),q=e.computed(()=>c.value.color),F=e.computed(()=>{const a=c.value;return a.hoverEffect?a.colorHover:a.color}),T=e.computed(()=>{const a=c.value;return a.activeHoverEffect?a.colorHover:a.color}),M=e.computed(()=>{const o=c.value.internalGap;return!o||o<0?0:`${o}px`}),B=e.computed(()=>{const a=c.value;return`${a.boxRadius>7?7:a.boxRadius}px`}),l=e.computed(()=>{const o=c.value.itemGap;return!o||o<0?0:`${o}px`}),r=e.computed(()=>c.value.type==="circle"?"custom-checkbox__input--type-circle":""),p=()=>{i.value=f.value};return e.watch(f,(a,o)=>{a!==o&&p()}),e.watch(i,(a,o)=>{a!==o&&(s("current-value",a),s("changed",a))}),(a,o)=>t.nbId&&W.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["nb-wrapper",O.value]),style:e.normalizeStyle([w.value])},[e.createElementVNode("div",{id:t.nbId,class:e.normalizeClass(["nb-reset","component",R.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(x),(y,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:"component-checkbox__item"},[e.withDirectives(e.createElementVNode("input",{id:`${t.nbId}-${y.value}`,"onUpdate:modelValue":o[0]||(o[0]=z=>i.value=z),type:"checkbox",class:"component-checkbox__item--input",disabled:e.unref(H),value:y.value,name:t.groupName},null,8,le),[[e.vModelCheckbox,i.value]]),e.createElementVNode("label",{for:`${t.nbId}-${y.value}`,class:e.normalizeClass([[r.value],"component-checkbox__item--label"])},[o[1]||(o[1]=e.createElementVNode("div",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle([L.value])},e.toDisplayString(y.text),5)],10,oe)]))),128))],10,ae)],6)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-fa0b8ef5"]])};return{install(t){for(const n in A)if(Object.prototype.hasOwnProperty.call(A,n)){const s=A[n];t.component(s.name,s)}}}});
1
+ (function(e,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("vue")):typeof define=="function"&&define.amd?define(["vue"],$):(e=typeof globalThis<"u"?globalThis:e||self,e.NbInputs=$(e.Vue))})(this,function(e){"use strict";const $="",Y=(t,o)=>{const s=t.__vccOpts||t;for(const[i,d]of o)s[i]=d;return s},Z=["id"],ee=["id","disabled","value","name"],te=["for"],ae=Y(Object.assign({name:"NbInputRadio",inheritAttrs:!1},{__name:"NbInputRadio",props:{nbId:{type:String,required:!0},display:{type:String,default:"b",validator:(t="b")=>{const o=t?t.toLowerCase():"";return["b","ib"].includes(o)}},groupName:{type:String,default:"",required:!0,validator:t=>t.toString().toLowerCase()},options:{type:Array,required:!0,default:()=>[],validator:t=>{if(!t.length)return!1;let o=!1;for(const s of t){const i=Object.keys(s);i.length!==2&&(o=!0),i.every(f=>["value","text"].includes(f))||(o=!0)}if(!o)return t}},currentOption:{type:[String,Number,Boolean],default:null},valueType:{type:String,default:"boolean",validator:t=>["boolean","string","number"].indexOf(t)!==-1},textColor:{type:String,default:"black"},color:{type:String,default:"#767676"},hoverEffect:{type:Boolean,default:!1,validator:t=>[!0,!1].indexOf(t)!==-1},activeHoverEffect:{type:Boolean,default:!1,validator:t=>[!0,!1].indexOf(t)!==-1},colorHover:{type:String,default:"#a6a6a6"},itemGap:{type:Number,default:15},internalGap:{type:Number,default:6},scale:{type:Number,default:1},disabled:{type:Boolean,default:!1,validator:t=>typeof t=="boolean"&&[!0,!1].includes(t)},fontFamily:{type:String,default:"'Lato', sans-serif"},fontSize:{type:String,default:"1.6em",validator:t=>t||"1.6em"},fontWeight:{type:Number,default:400,validator:t=>t||200}},emits:["current-value","changed"],setup(t,{emit:o}){e.useCssVars(l=>({"332021a8":q.value,"72f1d6d0":J.value,"58cb65f2":U.value,"31a858b6":e.unref(h),"6935ba22":F.value,"69da0486":P.value,"93607da6":M.value,"2646dd62":T.value})),e.onMounted(()=>{R()});const s=o,i=t,d=e.ref(null),{currentOption:f,valueType:S,display:g,options:y,textColor:E,color:V,hoverEffect:N,activeHoverEffect:z,colorHover:h,itemGap:k,internalGap:p,scale:v,disabled:x,fontFamily:H,fontSize:B,fontWeight:_}=e.toRefs(i),c=e.computed(()=>{const l=x.value?"component-disabled":"",n=g.value!=="b"?"inline-block":"block",m=H.value?H.value:"'Lato', sans-serif",G=B.value?B.value:"1.6em",I=!_.value||_.value<0?200:_.value,Q=E.value?E.value:"black",X=V.value?V.value:"#767676",L=[!1,!0].includes(N.value)?N.value:!1,a=[!1,!0].includes(z.value)?z.value:!1,r=h.value?h.value:"#a6a6a6",b=!k.value||k.value<0?15:k.value,w=!p.value||p.value<0?6:p.value,O=!v.value||v.value<0?1:v.value;return{disabled:l,display:n,textColor:Q,color:X,hoverEffect:L,activeHoverEffect:a,colorHover:r,itemGap:b,internalGap:w,scale:O,font:m,fontSize:G,fontWeight:I}}),A=e.computed(()=>c.value.disabled),C=e.computed(()=>({display:c.value.display})),u=e.computed(()=>c.value.display==="inline-block"?"component-radio__item--display-inline":"component-radio__item--display-block"),j=e.computed(()=>{const l=c.value;return{fontSize:l.fontSize,fontWeight:l.fontWeight}}),D=e.computed(()=>Array.isArray(y.value)&&y.value.constructor===Array&&y.value.length>0),q=e.computed(()=>c.value.font),F=e.computed(()=>c.value.textColor),T=e.computed(()=>c.value.color),M=e.computed(()=>{const l=c.value;return l.hoverEffect?l.colorHover:l.color}),U=e.computed(()=>{const l=c.value;return l.activeHoverEffect?l.colorHover:l.color}),P=e.computed(()=>{const n=c.value.internalGap;return!n||n<0?0:`${n}px`}),J=e.computed(()=>{const n=c.value.itemGap;return!n||n<0?0:`${n}px`}),K=e.computed(()=>({zoom:c.value.scale})),R=()=>{const l=f.value;l&&(["string"].includes(S.value)?d.value=l.toString().toLowerCase():d.value=l)};return e.watch(f,(l,n)=>{l!==n&&R()}),e.watch(d,(l,n)=>{l!==n&&(s("current-value",l),s("changed",l))}),(l,n)=>t.nbId&&D.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["nb-wrapper",A.value]),style:e.normalizeStyle([C.value,K.value])},[e.createElementVNode("div",{id:t.nbId,class:e.normalizeClass(["nb-reset","component",u.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(m,G)=>(e.openBlock(),e.createElementBlock("div",{key:G,class:"component-radio__item"},[e.withDirectives(e.createElementVNode("input",{id:`${t.nbId}-${m.value}`,"onUpdate:modelValue":n[0]||(n[0]=I=>d.value=I),type:"radio",class:"component-radio__item--input",disabled:e.unref(x),value:m.value,name:t.groupName},null,8,ee),[[e.vModelRadio,d.value]]),e.createElementVNode("label",{for:`${t.nbId}-${m.value}`,class:"component-radio__item--label"},[n[1]||(n[1]=e.createElementVNode("div",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle([j.value])},e.toDisplayString(m.text),5)],8,te)]))),128))],10,Z)],6)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-b27520fa"]]),ge="",le=["id"],oe=["id","disabled","value","name"],ne=["for"],W={NbInputRadio:ae,NbInputCheckbox:Y(Object.assign({name:"NbInputCheckbox",inheritAttrs:!1},{__name:"NbInputCheckbox",props:{nbId:{type:String,required:!0},display:{type:String,default:"b",validator:(t="b")=>{const o=t?t.toLowerCase():"";return["b","ib"].includes(o)}},groupName:{type:String,default:"",required:!0,validator:t=>t.toString().toLowerCase()},options:{type:Array,required:!0,default:()=>[],validator:t=>{if(!t.length)return!1;let o=!1;for(const s of t){const i=Object.keys(s);i.length!==2&&(o=!0),i.every(f=>["value","text"].includes(f))||(o=!0)}if(!o)return t}},currentOption:{type:Array,default:()=>[]},textColor:{type:String,default:"black"},checkColor:{type:String,default:"white"},boxRadius:{type:Number,default:0},color:{type:String,default:"#767676"},hoverEffect:{type:Boolean,default:!1,validator:t=>[!0,!1].indexOf(t)!==-1},activeHoverEffect:{type:Boolean,default:!1,validator:t=>[!0,!1].indexOf(t)!==-1},colorHover:{type:String,default:"#a6a6a6"},itemGap:{type:Number,default:15},internalGap:{type:Number,default:6},scale:{type:Number,default:1},type:{type:String,default:"box",validator:t=>["box","circle"].indexOf(t)!==-1},background:{type:Boolean,default:!1,validator:t=>[!0,!1].indexOf(t)!==-1},disabled:{type:Boolean,default:!1,validator:t=>typeof t=="boolean"&&[!0,!1].includes(t)},fontFamily:{type:String,default:"'Lato', sans-serif"},fontSize:{type:String,default:"1.6em",validator:t=>t||"1.6em"},fontWeight:{type:Number,default:400,validator:t=>t||200}},emits:["current-value","changed"],setup(t,{emit:o}){e.useCssVars(a=>({"508d157b":M.value,"140b0932":I.value,"0d11805e":P.value,d09aa2d0:K.value,"2f203f46":n.value,"511bcdec":G.value,"782e89b1":U.value,"9c6f35e8":m.value,f31e3904:J.value,"05ac49d9":l.value})),e.onMounted(()=>{L()});const s=o,i=t,d=e.ref(null),{currentOption:f,display:S,options:g,textColor:y,checkColor:E,boxRadius:V,color:N,hoverEffect:z,activeHoverEffect:h,colorHover:k,itemGap:p,internalGap:v,scale:x,type:H,background:B,disabled:_,fontFamily:c,fontSize:A,fontWeight:C}=e.toRefs(i),u=e.computed(()=>{const a=_.value?"component-disabled":"",r=S.value!=="b"?"inline-block":"block",b=c.value?c.value:"'Lato', sans-serif",w=A.value?A.value:"1.6em",O=C.value!==0&&!C.value||C.value<0?200:C.value,re=y.value?y.value:"black",ue=E.value?E.value:"white",se=V.value!==0&&!V.value||V.value<0?0:V.value,ce=N.value?N.value:"#767676",de=[!1,!0].includes(z.value)?z.value:!1,ie=[!1,!0].includes(h.value)?h.value:!1,fe=k.value?k.value:"#a6a6a6",pe=p.value!==0&&!p.value||p.value<0?15:p.value,ve=v.value!==0&&!v.value||v.value<0?6:v.value,me=["box","circle"].includes(H.value)?H.value:"box",be=!x.value||x.value<0?1:x.value,ye=[!1,!0].includes(B.value)?B.value:!1;return{disabled:a,display:r,textColor:re,checkColor:ue,boxRadius:se,color:ce,hoverEffect:de,activeHoverEffect:ie,colorHover:fe,itemGap:pe,internalGap:ve,scale:be,type:me,font:b,background:ye,fontSize:w,fontWeight:O}}),j=e.computed(()=>u.value.disabled),D=e.computed(()=>({display:u.value.display})),q=e.computed(()=>u.value.display==="inline-block"?"component-checkbox__item--display-inline":"component-checkbox__item--display-block"),F=e.computed(()=>{const a=u.value;return{fontSize:a.fontSize,fontWeight:a.fontWeight}}),T=e.computed(()=>Array.isArray(g.value)&&g.value.constructor===Array&&g.value.length>0),M=e.computed(()=>u.value.font),U=e.computed(()=>u.value.textColor),P=e.computed(()=>u.value.color),J=e.computed(()=>{const a=u.value;return a.hoverEffect?a.colorHover:a.color}),K=e.computed(()=>{const a=u.value;return a.activeHoverEffect?a.colorHover:a.color}),R=e.computed(()=>u.value.background?"component-checkbox__item--with-background":"component-checkbox__item--without-background"),l=e.computed(()=>{const a=u.value;return a.background?a.checkColor:a.textColor}),n=e.computed(()=>u.value.background?"19px":"auto"),m=e.computed(()=>{const r=u.value.internalGap;return!r||r<0?0:`${r}px`}),G=e.computed(()=>{const a=u.value;return`${a.boxRadius>7?7:a.boxRadius}px`}),I=e.computed(()=>{const r=u.value.itemGap;return!r||r<0?0:`${r}px`}),Q=e.computed(()=>u.value.type==="circle"?"custom-checkbox__input--type-circle":""),X=e.computed(()=>({zoom:u.value.scale})),L=()=>{d.value=f.value};return e.watch(f,(a,r)=>{a!==r&&L()}),e.watch(d,(a,r)=>{a!==r&&(s("current-value",a),s("changed",a))}),(a,r)=>t.nbId&&T.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["nb-wrapper",j.value]),style:e.normalizeStyle([D.value,X.value])},[e.createElementVNode("div",{id:t.nbId,class:e.normalizeClass(["nb-reset","component",q.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(b,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"component-checkbox__item"},[e.withDirectives(e.createElementVNode("input",{id:`${t.nbId}-${b.value}`,"onUpdate:modelValue":r[0]||(r[0]=O=>d.value=O),type:"checkbox",class:"component-checkbox__item--input",disabled:e.unref(_),value:b.value,name:t.groupName},null,8,oe),[[e.vModelCheckbox,d.value]]),e.createElementVNode("label",{for:`${t.nbId}-${b.value}`,class:e.normalizeClass([[Q.value],"component-checkbox__item--label"])},[e.createElementVNode("div",{class:e.normalizeClass([R.value])},null,2),e.createElementVNode("span",{style:e.normalizeStyle([F.value])},e.toDisplayString(b.text),5)],10,ne)]))),128))],10,le)],6)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-ad100a69"]])};return{install(t){for(const o in W)if(Object.prototype.hasOwnProperty.call(W,o)){const s=W[o];t.component(s.name,s)}}}});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";@import"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap";.nb-wrapper[data-v-76b4799e]{margin:0;padding:0;font-size:62.5%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;vertical-align:bottom;transform-origin:top left}.nb-reset[data-v-76b4799e]{font-family:Lato,sans-serif;font-style:normal;font-weight:light;line-height:1.42857143}.nb-reset[data-v-76b4799e] *{margin:0;padding:0}.nb-reset[data-v-76b4799e] *,.nb-reset[data-v-76b4799e] *:before,.nb-reset[data-v-76b4799e] *:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.component[data-v-76b4799e]{margin:0;box-sizing:border-box;line-height:16px;font-family:Lato,sans-serif;font-family:var(--0bac77b8);-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:left;-webkit-text-decoration-line:none;text-decoration-line:none;white-space:nowrap;outline:0;position:relative}.component.component-radio__item--display-block[data-v-76b4799e],.component.component-radio__item--display-inline[data-v-76b4799e]{display:flex;flex-wrap:wrap;gap:var(--0eddad90);width:auto;word-break:break-word;overflow-wrap:break-word;white-space:normal}.component.component-radio__item--display-block[data-v-76b4799e]{flex-direction:column}.component.component-radio__item--display-inline[data-v-76b4799e]{flex-direction:row}.component .component-radio__item[data-v-76b4799e]{position:relative}.component .component-radio__item .component-radio__item--input[data-v-76b4799e]{display:none}.component .component-radio__item .component-radio__item--input:checked+.component-radio__item--label:hover div[data-v-76b4799e]{border:2px solid var(--74d3f1e2);color:var(--74d3f1e2)}.component .component-radio__item .component-radio__item--input:checked+.component-radio__item--label div[data-v-76b4799e]:before{content:"⏺";font-size:1.3em;text-shadow:0;display:flex;align-items:center;text-align:center;justify-content:center;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;color:var(--8286d8a4);line-height:1.1em;border-radius:50%}.component .component-radio__item .component-radio__item--label[data-v-76b4799e]{--disabled-color: var(--e9788dcc);color:var(--disabled-color)!important;display:flex;flex-direction:row;gap:var(--64045ab5);align-items:center}.component .component-radio__item .component-radio__item--label[data-v-76b4799e]:hover{cursor:pointer}.component .component-radio__item .component-radio__item--label:hover div[data-v-76b4799e]{border:2px solid var(--53fcbd96)}.component .component-radio__item .component-radio__item--label div[data-v-76b4799e]{width:19px;height:19px;flex-shrink:0;border-radius:50%;text-shadow:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border:2px solid var(--79f0cc47);font-family:Lato,sans-serif!important}.component-disabled[data-v-76b4799e]{cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}.component-disabled .component[data-v-76b4799e]{--disabled-color: var(--e9788dcc);color:var(--disabled-color)!important;opacity:.7;border-radius:inherit}.nb-wrapper[data-v-fa0b8ef5]{margin:0;padding:0;font-size:62.5%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;vertical-align:bottom;transform-origin:top left}.nb-reset[data-v-fa0b8ef5]{font-family:Lato,sans-serif;font-style:normal;font-weight:light;line-height:1.42857143}.nb-reset[data-v-fa0b8ef5] *{margin:0;padding:0}.nb-reset[data-v-fa0b8ef5] *,.nb-reset[data-v-fa0b8ef5] *:before,.nb-reset[data-v-fa0b8ef5] *:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.component[data-v-fa0b8ef5]{margin:0;box-sizing:border-box;line-height:16px;font-family:Lato,sans-serif;font-family:var(--1dbe08ee);-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:left;-webkit-text-decoration-line:none;text-decoration-line:none;white-space:nowrap;outline:0;position:relative}.component.component-checkbox__item--display-block[data-v-fa0b8ef5],.component.component-checkbox__item--display-inline[data-v-fa0b8ef5]{display:flex;flex-wrap:wrap;gap:var(--11ce7d5a);width:auto;word-break:break-word;overflow-wrap:break-word;white-space:normal}.component.component-checkbox__item--display-block[data-v-fa0b8ef5]{flex-direction:column}.component.component-checkbox__item--display-inline[data-v-fa0b8ef5]{flex-direction:row}.component .component-checkbox__item[data-v-fa0b8ef5]{position:relative}.component .component-checkbox__item .component-checkbox__item--input[data-v-fa0b8ef5]{display:none}.component .component-checkbox__item .component-checkbox__item--input:checked+.component-checkbox__item--label:hover div[data-v-fa0b8ef5]{border:2px solid var(--d0a2a0f6)}.component .component-checkbox__item .component-checkbox__item--input:checked+.component-checkbox__item--label div[data-v-fa0b8ef5]:before{content:"✓";font-size:1.3em;text-shadow:0;display:flex;align-items:center;text-align:center;justify-content:center;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-radius:var(--04bde97d);border:0;color:var(--6e8ece10)}.component .component-checkbox__item .component-checkbox__item--label[data-v-fa0b8ef5]{--disabled-color: var(--fc6fed38);color:var(--disabled-color)!important;display:flex;flex-direction:row;gap:var(--41d79502);align-items:center}.component .component-checkbox__item .component-checkbox__item--label[data-v-fa0b8ef5]:hover{cursor:pointer}.component .component-checkbox__item .component-checkbox__item--label:hover div[data-v-fa0b8ef5]{border:2px solid var(--9ff14baa)}.component .component-checkbox__item .component-checkbox__item--label div[data-v-fa0b8ef5]{width:19px;height:19px;flex-shrink:0;text-shadow:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-radius:var(--04bde97d);border:2px solid var(--f8265cde);color:var(--f8265cde);font-family:Lato,sans-serif!important}.component .component-checkbox__item .component-checkbox__item--label.custom-checkbox__input--type-circle div[data-v-fa0b8ef5]{border-radius:50%!important}.component-disabled[data-v-fa0b8ef5]{cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}.component-disabled .component[data-v-fa0b8ef5]{--disabled-color: var(--fc6fed38);color:var(--disabled-color)!important;opacity:.7;border-radius:inherit}
1
+ @charset "UTF-8";@import"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap";.nb-wrapper[data-v-b27520fa]{margin:0;padding:0;font-size:62.5%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;vertical-align:baseline}.nb-reset[data-v-b27520fa]{font-family:Lato,sans-serif;font-style:normal;font-weight:light;line-height:1.42857143}.nb-reset[data-v-b27520fa] *{margin:0;padding:0}.nb-reset[data-v-b27520fa] *,.nb-reset[data-v-b27520fa] *:before,.nb-reset[data-v-b27520fa] *:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.component[data-v-b27520fa]{margin:0;box-sizing:border-box;line-height:16px;font-family:Lato,sans-serif;font-family:var(--332021a8);-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:left;-webkit-text-decoration-line:none;text-decoration-line:none;white-space:nowrap;outline:0;position:relative}.component.component-radio__item--display-block[data-v-b27520fa],.component.component-radio__item--display-inline[data-v-b27520fa]{display:flex;flex-wrap:wrap;gap:var(--72f1d6d0);width:auto;word-break:break-word;overflow-wrap:break-word;white-space:normal}.component.component-radio__item--display-block[data-v-b27520fa]{flex-direction:column}.component.component-radio__item--display-inline[data-v-b27520fa]{flex-direction:row}.component .component-radio__item[data-v-b27520fa]{position:relative}.component .component-radio__item .component-radio__item--input[data-v-b27520fa]{display:none}.component .component-radio__item .component-radio__item--input:checked+.component-radio__item--label:hover div[data-v-b27520fa]{border:2px solid var(--58cb65f2);color:var(--58cb65f2)}.component .component-radio__item .component-radio__item--input:checked+.component-radio__item--label div[data-v-b27520fa]:before{content:"⏺";font-size:1.3em;text-shadow:0;display:flex;align-items:center;text-align:center;justify-content:center;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;color:var(--31a858b6);line-height:1.1em;border-radius:50%}.component .component-radio__item .component-radio__item--label[data-v-b27520fa]{--disabled-color: var(--6935ba22);color:var(--disabled-color)!important;display:flex;flex-direction:row;gap:var(--69da0486);align-items:center}.component .component-radio__item .component-radio__item--label[data-v-b27520fa]:hover{cursor:pointer}.component .component-radio__item .component-radio__item--label:hover div[data-v-b27520fa]{border:2px solid var(--93607da6)}.component .component-radio__item .component-radio__item--label div[data-v-b27520fa]{width:19px;height:19px;flex-shrink:0;border-radius:50%;text-shadow:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border:2px solid var(--2646dd62);font-family:Lato,sans-serif!important}.component-disabled[data-v-b27520fa]{cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}.component-disabled .component[data-v-b27520fa]{--disabled-color: var(--6935ba22);color:var(--disabled-color)!important;opacity:.7;border-radius:inherit}.nb-wrapper[data-v-ad100a69]{margin:0;padding:0;font-size:62.5%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;vertical-align:baseline}.nb-reset[data-v-ad100a69]{font-family:Lato,sans-serif;font-style:normal;font-weight:light;line-height:1.42857143}.nb-reset[data-v-ad100a69] *{margin:0;padding:0}.nb-reset[data-v-ad100a69] *,.nb-reset[data-v-ad100a69] *:before,.nb-reset[data-v-ad100a69] *:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.component[data-v-ad100a69]{margin:0;box-sizing:border-box;line-height:16px;font-family:Lato,sans-serif;font-family:var(--508d157b);-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:left;-webkit-text-decoration-line:none;text-decoration-line:none;white-space:nowrap;outline:0;position:relative}.component.component-checkbox__item--display-block[data-v-ad100a69],.component.component-checkbox__item--display-inline[data-v-ad100a69]{display:flex;flex-wrap:wrap;gap:var(--140b0932);width:auto;word-break:break-word;overflow-wrap:break-word;white-space:normal}.component.component-checkbox__item--display-block[data-v-ad100a69]{flex-direction:column}.component.component-checkbox__item--display-inline[data-v-ad100a69]{flex-direction:row}.component .component-checkbox__item[data-v-ad100a69]{position:relative}.component .component-checkbox__item .component-checkbox__item--input[data-v-ad100a69]{display:none}.component .component-checkbox__item .component-checkbox__item--input:checked+.component-checkbox__item--label:hover div.component-checkbox__item--without-background[data-v-ad100a69]{border:2px solid var(--0d11805e);color:var(--d09aa2d0)}.component .component-checkbox__item .component-checkbox__item--input:checked+.component-checkbox__item--label:hover div.component-checkbox__item--with-background[data-v-ad100a69]{background:var(--d09aa2d0)}.component .component-checkbox__item .component-checkbox__item--input:checked+.component-checkbox__item--label div[data-v-ad100a69]{font-size:1.2em}.component .component-checkbox__item .component-checkbox__item--input:checked+.component-checkbox__item--label div[data-v-ad100a69]:before{content:"✓";width:var(--2f203f46);height:var(--2f203f46);text-shadow:0;display:flex;align-items:center;text-align:center;justify-content:center;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-radius:var(--511bcdec);border:0}.component .component-checkbox__item .component-checkbox__item--label[data-v-ad100a69]{--disabled-color: var(--782e89b1);color:var(--disabled-color)!important;display:flex;flex-direction:row;gap:var(--9c6f35e8);align-items:center}.component .component-checkbox__item .component-checkbox__item--label[data-v-ad100a69]:hover{cursor:pointer}.component .component-checkbox__item .component-checkbox__item--label:hover div.component-checkbox__item--without-background[data-v-ad100a69]{border:2px solid var(--f31e3904)}.component .component-checkbox__item .component-checkbox__item--label:hover div.component-checkbox__item--with-background[data-v-ad100a69]{background:var(--f31e3904)}.component .component-checkbox__item .component-checkbox__item--label div[data-v-ad100a69]{width:19px;height:19px;flex-shrink:0;text-shadow:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-radius:var(--511bcdec);font-family:Lato,sans-serif!important;font-weight:700}.component .component-checkbox__item .component-checkbox__item--label div.component-checkbox__item--without-background[data-v-ad100a69]{border:2px solid var(--0d11805e);color:var(--0d11805e)}.component .component-checkbox__item .component-checkbox__item--label div.component-checkbox__item--with-background[data-v-ad100a69]{background:var(--0d11805e);color:var(--05ac49d9)}.component .component-checkbox__item .component-checkbox__item--label.custom-checkbox__input--type-circle div[data-v-ad100a69]{border-radius:50%!important}.component-disabled[data-v-ad100a69]{cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}.component-disabled .component[data-v-ad100a69]{--disabled-color: var(--782e89b1);color:var(--disabled-color)!important;opacity:.7;border-radius:inherit}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vlalg-nimbus/nb-inputs",
3
3
  "description": "Input components for Vuejs 3",
4
- "version": "5.0.0",
4
+ "version": "6.0.1",
5
5
  "type": "module",
6
6
  "main": "./dist/nb-inputs.umd.js",
7
7
  "module": "./dist/nb-inputs.js",