@vlalg-nimbus/nb-inputs 1.0.0
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 +44 -0
- package/dist/favicon.ico +0 -0
- package/dist/nb-inputs.js +452 -0
- package/dist/nb-inputs.umd.cjs +1 -0
- package/dist/style.css +1 -0
- package/package.json +84 -0
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# nb-inputs
|
|
2
|
+
> This component is only for [Vue.js 3+](https://vuejs.org/)
|
|
3
|
+
|
|
4
|
+
<br />
|
|
5
|
+
|
|
6
|
+
This lib contains input components.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @vlalg-nimbus/nb-inputs
|
|
12
|
+
|
|
13
|
+
# or
|
|
14
|
+
|
|
15
|
+
yarn add @vlalg-nimbus/nb-inputs
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
// main.js
|
|
22
|
+
import { createApp } from 'vue'
|
|
23
|
+
import App from './App.vue'
|
|
24
|
+
|
|
25
|
+
import NbInputsComponents from '@vlalg-nimbus/nb-inputs'
|
|
26
|
+
import "@vlalg-nimbus/nb-inputs/dist/style.css";
|
|
27
|
+
|
|
28
|
+
const app = createApp(App)
|
|
29
|
+
app.use(NbInputsComponents)
|
|
30
|
+
app.mount('#app')
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Components list
|
|
34
|
+
|
|
35
|
+
The components that are part of this lib are:
|
|
36
|
+
|
|
37
|
+
- <a href="http://nimbus.tec.br/vue-components/nb-inputs/nb-input-radio" target="_blank">nb-input-radio</a>
|
|
38
|
+
- <a href="http://nimbus.tec.br/vue-components/nb-inputs/nb-checkbox" target="_blank">nb-input-checkbox</a>
|
|
39
|
+
|
|
40
|
+
Click on each one above to find out how to use it, properties, events, etc.
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
[MIT](http://opensource.org/licenses/MIT)
|
package/dist/favicon.ico
ADDED
|
Binary file
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
import { useCssVars as ne, onMounted as re, ref as se, toRefs as ce, computed as a, watch as B, openBlock as S, createElementBlock as C, normalizeClass as g, normalizeStyle as D, createElementVNode as H, Fragment as ie, renderList as de, unref as q, withDirectives as fe, vModelRadio as xe, toDisplayString as ve, createCommentVNode as pe, vModelCheckbox as _e } from "vue";
|
|
2
|
+
const ye = (e, o) => {
|
|
3
|
+
const u = e.__vccOpts || e;
|
|
4
|
+
for (const [d, i] of o)
|
|
5
|
+
u[d] = i;
|
|
6
|
+
return u;
|
|
7
|
+
}, ke = ["id"], Se = ["id", "disabled", "value", "name"], Ce = ["for"], He = /* @__PURE__ */ Object.assign({
|
|
8
|
+
name: "NbInputRadio",
|
|
9
|
+
inheritAttrs: !1
|
|
10
|
+
}, {
|
|
11
|
+
__name: "NbInputRadio",
|
|
12
|
+
props: {
|
|
13
|
+
nbId: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: !0
|
|
16
|
+
},
|
|
17
|
+
display: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "b",
|
|
20
|
+
validator: (e = "b") => {
|
|
21
|
+
const o = e ? e.toLowerCase() : "";
|
|
22
|
+
return ["b", "ib"].includes(o);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
groupName: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "",
|
|
28
|
+
required: !0,
|
|
29
|
+
validator: (e) => e.toString().toLowerCase()
|
|
30
|
+
},
|
|
31
|
+
options: {
|
|
32
|
+
type: Array,
|
|
33
|
+
required: !0,
|
|
34
|
+
default: () => [],
|
|
35
|
+
validator: (e) => {
|
|
36
|
+
if (!e.length)
|
|
37
|
+
return !1;
|
|
38
|
+
let o = !1;
|
|
39
|
+
for (const u of e) {
|
|
40
|
+
const d = Object.keys(u);
|
|
41
|
+
d.length !== 2 && (o = !0), d.every((f) => ["value", "text"].includes(f)) || (o = !0);
|
|
42
|
+
}
|
|
43
|
+
if (!o)
|
|
44
|
+
return e;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
currentOptiton: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: null
|
|
50
|
+
},
|
|
51
|
+
direction: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: "left",
|
|
54
|
+
validator: (e) => ["left", "right"].indexOf(e) !== -1
|
|
55
|
+
},
|
|
56
|
+
textColor: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: "black"
|
|
59
|
+
},
|
|
60
|
+
color: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "#767676"
|
|
63
|
+
},
|
|
64
|
+
hoverEffect: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !1,
|
|
67
|
+
validator: (e) => [!0, !1].indexOf(e) !== -1
|
|
68
|
+
},
|
|
69
|
+
activeHoverEffect: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: !1,
|
|
72
|
+
validator: (e) => [!0, !1].indexOf(e) !== -1
|
|
73
|
+
},
|
|
74
|
+
colorHover: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: "#a6a6a6"
|
|
77
|
+
},
|
|
78
|
+
itemGap: {
|
|
79
|
+
type: Number,
|
|
80
|
+
default: 15
|
|
81
|
+
},
|
|
82
|
+
internalGap: {
|
|
83
|
+
type: Number,
|
|
84
|
+
default: 6
|
|
85
|
+
},
|
|
86
|
+
disabled: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: !1,
|
|
89
|
+
validator: (e) => typeof e == "boolean" && [!0, !1].includes(e)
|
|
90
|
+
},
|
|
91
|
+
fontFamily: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: "'Lato', sans-serif"
|
|
94
|
+
},
|
|
95
|
+
fontSize: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: "1.6em",
|
|
98
|
+
validator: (e) => e || "1.6em"
|
|
99
|
+
},
|
|
100
|
+
fontWeight: {
|
|
101
|
+
type: Number,
|
|
102
|
+
default: 400,
|
|
103
|
+
validator: (e) => e || 200
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
emits: ["current-value", "changed"],
|
|
107
|
+
setup(e, { emit: o }) {
|
|
108
|
+
ne((l) => ({
|
|
109
|
+
"30804cd8": P.value,
|
|
110
|
+
"23c100c2": Q.value,
|
|
111
|
+
"669d0db7": K.value,
|
|
112
|
+
"47dc7aec": J.value,
|
|
113
|
+
c2167476: X.value,
|
|
114
|
+
"6f8b8b00": Z.value,
|
|
115
|
+
"40b68ad3": Y.value,
|
|
116
|
+
"531d9e60": W.value
|
|
117
|
+
})), re(() => {
|
|
118
|
+
j();
|
|
119
|
+
});
|
|
120
|
+
const u = o, d = e, i = se(null), {
|
|
121
|
+
currentOptiton: f,
|
|
122
|
+
display: E,
|
|
123
|
+
options: v,
|
|
124
|
+
direction: G,
|
|
125
|
+
textColor: N,
|
|
126
|
+
color: V,
|
|
127
|
+
hoverEffect: I,
|
|
128
|
+
activeHoverEffect: $,
|
|
129
|
+
colorHover: O,
|
|
130
|
+
itemGap: h,
|
|
131
|
+
internalGap: p,
|
|
132
|
+
disabled: m,
|
|
133
|
+
fontFamily: A,
|
|
134
|
+
fontSize: R,
|
|
135
|
+
fontWeight: x
|
|
136
|
+
} = ce(d), s = a(() => {
|
|
137
|
+
const l = m.value ? "component-disabled" : "", c = E.value !== "b" ? "inline-block" : "block", y = A.value ? A.value : "'Lato', sans-serif", k = R.value ? R.value : "1.6em", t = !x.value || x.value < 0 ? 200 : x.value, r = G.value ? G.value : "left", b = N.value ? N.value : "black", w = V.value ? V.value : "#767676", z = [!1, !0].includes(I.value) ? I.value : !1, ee = [!1, !0].includes($.value) ? $.value : !1, te = O.value ? O.value : "#a6a6a6", ae = !h.value || h.value < 0 ? 15 : h.value, le = !p.value || p.value < 0 ? 6 : p.value;
|
|
138
|
+
return {
|
|
139
|
+
disabled: l,
|
|
140
|
+
display: c,
|
|
141
|
+
direction: r,
|
|
142
|
+
textColor: b,
|
|
143
|
+
color: w,
|
|
144
|
+
hoverEffect: z,
|
|
145
|
+
activeHoverEffect: ee,
|
|
146
|
+
colorHover: te,
|
|
147
|
+
itemGap: ae,
|
|
148
|
+
internalGap: le,
|
|
149
|
+
font: y,
|
|
150
|
+
fontSize: k,
|
|
151
|
+
fontWeight: t
|
|
152
|
+
};
|
|
153
|
+
}), _ = a(() => s.value.disabled), n = a(() => ({
|
|
154
|
+
display: s.value.display
|
|
155
|
+
})), F = a(() => s.value.display === "inline-block" ? "custom-radio__item--display-inline" : "custom-radio__item--display-block"), M = a(() => {
|
|
156
|
+
const l = s.value;
|
|
157
|
+
return {
|
|
158
|
+
fontSize: l.fontSize,
|
|
159
|
+
fontWeight: l.fontWeight
|
|
160
|
+
};
|
|
161
|
+
}), T = a(() => Array.isArray(v.value) && v.value.constructor === Array && v.value.length > 0), U = a(() => s.value.direction === "right" ? "custom-radio__item--direction-right" : "custom-radio__item--direction-left"), P = a(() => s.value.font), J = a(() => s.value.textColor), K = a(() => s.value.color), Q = a(() => {
|
|
162
|
+
const l = s.value;
|
|
163
|
+
return l.activeHoverEffect ? l.colorHover : l.color;
|
|
164
|
+
}), X = a(() => {
|
|
165
|
+
const l = s.value;
|
|
166
|
+
return l.hoverEffect ? l.colorHover : l.color;
|
|
167
|
+
}), L = a(() => {
|
|
168
|
+
const c = s.value.internalGap;
|
|
169
|
+
return !c || c < 0 ? 0 : c;
|
|
170
|
+
}), Y = a(() => `0 0 0 2${L.value}px`), W = a(() => `0 2${L.value}px 0 0`), Z = a(() => {
|
|
171
|
+
const c = s.value.itemGap;
|
|
172
|
+
return !c || c < 0 ? 0 : `${c}px`;
|
|
173
|
+
}), j = () => {
|
|
174
|
+
const l = f.value;
|
|
175
|
+
l && (i.value = l.toString().toLowerCase()), u("current-value", l);
|
|
176
|
+
};
|
|
177
|
+
return B(f, () => {
|
|
178
|
+
j();
|
|
179
|
+
}), B(i, (l) => {
|
|
180
|
+
u("current-value", l), u("changed", l);
|
|
181
|
+
}), (l, c) => e.nbId && T.value ? (S(), C("div", {
|
|
182
|
+
key: 0,
|
|
183
|
+
class: g(["nb-wrapper", _.value]),
|
|
184
|
+
style: D([n.value])
|
|
185
|
+
}, [
|
|
186
|
+
H("div", {
|
|
187
|
+
id: e.nbId,
|
|
188
|
+
class: g(["nb-reset", "component"]),
|
|
189
|
+
style: D([M.value])
|
|
190
|
+
}, [
|
|
191
|
+
(S(!0), C(ie, null, de(q(v), (y, k) => (S(), C("div", {
|
|
192
|
+
key: k,
|
|
193
|
+
class: g(["custom-radio__item", [F.value, U.value]])
|
|
194
|
+
}, [
|
|
195
|
+
fe(H("input", {
|
|
196
|
+
id: `${e.nbId}-${y.value}`,
|
|
197
|
+
"onUpdate:modelValue": c[0] || (c[0] = (t) => i.value = t),
|
|
198
|
+
type: "radio",
|
|
199
|
+
class: "custom-radio__item--input",
|
|
200
|
+
disabled: q(m),
|
|
201
|
+
value: y.value,
|
|
202
|
+
name: e.groupName
|
|
203
|
+
}, null, 8, Se), [
|
|
204
|
+
[xe, i.value]
|
|
205
|
+
]),
|
|
206
|
+
H("label", {
|
|
207
|
+
for: `${e.nbId}-${y.value}`,
|
|
208
|
+
class: "custom-radio__item--label"
|
|
209
|
+
}, ve(y.text), 9, Ce)
|
|
210
|
+
], 2))), 128))
|
|
211
|
+
], 12, ke)
|
|
212
|
+
], 6)) : pe("", !0);
|
|
213
|
+
}
|
|
214
|
+
}), Ee = /* @__PURE__ */ ye(He, [["__scopeId", "data-v-a238193d"]]);
|
|
215
|
+
const Ge = ["id"], Ne = ["id", "disabled", "value", "name"], Ie = ["for"], $e = /* @__PURE__ */ Object.assign({
|
|
216
|
+
name: "NbInputRadio",
|
|
217
|
+
inheritAttrs: !1
|
|
218
|
+
}, {
|
|
219
|
+
__name: "NbInputCheckbox",
|
|
220
|
+
props: {
|
|
221
|
+
nbId: {
|
|
222
|
+
type: String,
|
|
223
|
+
required: !0
|
|
224
|
+
},
|
|
225
|
+
display: {
|
|
226
|
+
type: String,
|
|
227
|
+
default: "b",
|
|
228
|
+
validator: (e = "b") => {
|
|
229
|
+
const o = e ? e.toLowerCase() : "";
|
|
230
|
+
return ["b", "ib"].includes(o);
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
groupName: {
|
|
234
|
+
type: String,
|
|
235
|
+
default: "",
|
|
236
|
+
required: !0,
|
|
237
|
+
validator: (e) => e.toString().toLowerCase()
|
|
238
|
+
},
|
|
239
|
+
options: {
|
|
240
|
+
type: Array,
|
|
241
|
+
required: !0,
|
|
242
|
+
default: () => [],
|
|
243
|
+
validator: (e) => {
|
|
244
|
+
if (!e.length)
|
|
245
|
+
return !1;
|
|
246
|
+
let o = !1;
|
|
247
|
+
for (const u of e) {
|
|
248
|
+
const d = Object.keys(u);
|
|
249
|
+
d.length !== 2 && (o = !0), d.every((f) => ["value", "text"].includes(f)) || (o = !0);
|
|
250
|
+
}
|
|
251
|
+
if (!o)
|
|
252
|
+
return e;
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
currentOptiton: {
|
|
256
|
+
type: Array,
|
|
257
|
+
default: () => []
|
|
258
|
+
},
|
|
259
|
+
direction: {
|
|
260
|
+
type: String,
|
|
261
|
+
default: "left",
|
|
262
|
+
validator: (e) => ["left", "right"].indexOf(e) !== -1
|
|
263
|
+
},
|
|
264
|
+
textColor: {
|
|
265
|
+
type: String,
|
|
266
|
+
default: "black"
|
|
267
|
+
},
|
|
268
|
+
boxRadius: {
|
|
269
|
+
type: Number,
|
|
270
|
+
default: 0
|
|
271
|
+
},
|
|
272
|
+
color: {
|
|
273
|
+
type: String,
|
|
274
|
+
default: "#767676"
|
|
275
|
+
},
|
|
276
|
+
hoverEffect: {
|
|
277
|
+
type: Boolean,
|
|
278
|
+
default: !1,
|
|
279
|
+
validator: (e) => [!0, !1].indexOf(e) !== -1
|
|
280
|
+
},
|
|
281
|
+
activeHoverEffect: {
|
|
282
|
+
type: Boolean,
|
|
283
|
+
default: !1,
|
|
284
|
+
validator: (e) => [!0, !1].indexOf(e) !== -1
|
|
285
|
+
},
|
|
286
|
+
colorHover: {
|
|
287
|
+
type: String,
|
|
288
|
+
default: "#a6a6a6"
|
|
289
|
+
},
|
|
290
|
+
itemGap: {
|
|
291
|
+
type: Number,
|
|
292
|
+
default: 15
|
|
293
|
+
},
|
|
294
|
+
internalGap: {
|
|
295
|
+
type: Number,
|
|
296
|
+
default: 6
|
|
297
|
+
},
|
|
298
|
+
type: {
|
|
299
|
+
type: String,
|
|
300
|
+
default: "box",
|
|
301
|
+
validator: (e) => ["box", "circle"].indexOf(e) !== -1
|
|
302
|
+
},
|
|
303
|
+
disabled: {
|
|
304
|
+
type: Boolean,
|
|
305
|
+
default: !1,
|
|
306
|
+
validator: (e) => typeof e == "boolean" && [!0, !1].includes(e)
|
|
307
|
+
},
|
|
308
|
+
fontFamily: {
|
|
309
|
+
type: String,
|
|
310
|
+
default: "'Lato', sans-serif"
|
|
311
|
+
},
|
|
312
|
+
fontSize: {
|
|
313
|
+
type: String,
|
|
314
|
+
default: "1.6em",
|
|
315
|
+
validator: (e) => e || "1.6em"
|
|
316
|
+
},
|
|
317
|
+
fontWeight: {
|
|
318
|
+
type: Number,
|
|
319
|
+
default: 400,
|
|
320
|
+
validator: (e) => e || 200
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
emits: ["current-value", "changed"],
|
|
324
|
+
setup(e, { emit: o }) {
|
|
325
|
+
ne((t) => ({
|
|
326
|
+
"3736c944": K.value,
|
|
327
|
+
"64914b15": L.value,
|
|
328
|
+
aab9e826: l.value,
|
|
329
|
+
aed05ffe: X.value,
|
|
330
|
+
"42ee4fd4": Q.value,
|
|
331
|
+
"13a9e1bb": Y.value,
|
|
332
|
+
"250657ca": c.value,
|
|
333
|
+
"3e1411c9": Z.value,
|
|
334
|
+
f676eecc: j.value
|
|
335
|
+
})), re(() => {
|
|
336
|
+
k();
|
|
337
|
+
});
|
|
338
|
+
const u = o, d = e, i = se(null), {
|
|
339
|
+
currentOptiton: f,
|
|
340
|
+
display: E,
|
|
341
|
+
options: v,
|
|
342
|
+
direction: G,
|
|
343
|
+
textColor: N,
|
|
344
|
+
boxRadius: V,
|
|
345
|
+
color: I,
|
|
346
|
+
hoverEffect: $,
|
|
347
|
+
activeHoverEffect: O,
|
|
348
|
+
colorHover: h,
|
|
349
|
+
itemGap: p,
|
|
350
|
+
internalGap: m,
|
|
351
|
+
type: A,
|
|
352
|
+
disabled: R,
|
|
353
|
+
fontFamily: x,
|
|
354
|
+
fontSize: s,
|
|
355
|
+
fontWeight: _
|
|
356
|
+
} = ce(d), n = a(() => {
|
|
357
|
+
const t = R.value ? "component-disabled" : "", r = E.value !== "b" ? "inline-block" : "block", b = x.value ? x.value : "'Lato', sans-serif", w = s.value ? s.value : "1.6em", z = _.value !== 0 && !_.value || _.value < 0 ? 200 : _.value, ee = G.value ? G.value : "left", te = N.value ? N.value : "black", ae = V.value !== 0 && !V.value || V.value < 0 ? 0 : V.value, le = I.value ? I.value : "#767676", be = [!1, !0].includes($.value) ? $.value : !1, Ve = [!1, !0].includes(O.value) ? O.value : !1, me = h.value ? h.value : "#a6a6a6", ge = p.value !== 0 && !p.value || p.value < 0 ? 15 : p.value, he = m.value !== 0 && !m.value || m.value < 0 ? 6 : m.value, ue = ["box", "circle"].includes(A.value) ? A.value : "box";
|
|
358
|
+
return console.log(ue), {
|
|
359
|
+
disabled: t,
|
|
360
|
+
display: r,
|
|
361
|
+
direction: ee,
|
|
362
|
+
textColor: te,
|
|
363
|
+
boxRadius: ae,
|
|
364
|
+
color: le,
|
|
365
|
+
hoverEffect: be,
|
|
366
|
+
activeHoverEffect: Ve,
|
|
367
|
+
colorHover: me,
|
|
368
|
+
itemGap: ge,
|
|
369
|
+
internalGap: he,
|
|
370
|
+
type: ue,
|
|
371
|
+
font: b,
|
|
372
|
+
fontSize: w,
|
|
373
|
+
fontWeight: z
|
|
374
|
+
};
|
|
375
|
+
}), F = a(() => n.value.disabled), M = a(() => ({
|
|
376
|
+
display: n.value.display
|
|
377
|
+
})), T = a(() => n.value.display === "inline-block" ? "custom-checkbox__item--display-inline" : "custom-checkbox__item--display-block"), U = a(() => {
|
|
378
|
+
const t = n.value;
|
|
379
|
+
return {
|
|
380
|
+
fontSize: t.fontSize,
|
|
381
|
+
fontWeight: t.fontWeight
|
|
382
|
+
};
|
|
383
|
+
}), P = a(() => Array.isArray(v.value) && v.value.constructor === Array && v.value.length > 0), J = a(() => n.value.direction === "right" ? "custom-checkbox__item--direction-right" : "custom-checkbox__item--direction-left"), K = a(() => n.value.font), Q = a(() => n.value.textColor), X = a(() => n.value.color), L = a(() => {
|
|
384
|
+
const t = n.value;
|
|
385
|
+
return t.activeHoverEffect ? t.colorHover : t.color;
|
|
386
|
+
}), Y = a(() => {
|
|
387
|
+
const t = n.value;
|
|
388
|
+
return t.hoverEffect ? t.colorHover : t.color;
|
|
389
|
+
}), W = a(() => {
|
|
390
|
+
const r = n.value.internalGap;
|
|
391
|
+
return !r || r < 0 ? 0 : r;
|
|
392
|
+
}), Z = a(() => `0 0 0 2${W.value}px`), j = a(() => `0 2${W.value}px 0 0`), l = a(() => {
|
|
393
|
+
const t = n.value;
|
|
394
|
+
return `${t.borderRadius > 7 ? 7 : t.borderRadius}px`;
|
|
395
|
+
}), c = a(() => {
|
|
396
|
+
const r = n.value.itemGap;
|
|
397
|
+
return !r || r < 0 ? 0 : `${r}px`;
|
|
398
|
+
}), y = a(() => n.value.type === "circle" ? "custom-checkbox__input--type-circle" : ""), k = () => {
|
|
399
|
+
i.value = f.value;
|
|
400
|
+
};
|
|
401
|
+
return B(f, () => {
|
|
402
|
+
k();
|
|
403
|
+
}), B(i, (t) => {
|
|
404
|
+
u("current-value", t), u("changed", t);
|
|
405
|
+
}), (t, r) => e.nbId && P.value ? (S(), C("div", {
|
|
406
|
+
key: 0,
|
|
407
|
+
class: g(["nb-wrapper", F.value]),
|
|
408
|
+
style: D([M.value])
|
|
409
|
+
}, [
|
|
410
|
+
H("div", {
|
|
411
|
+
id: e.nbId,
|
|
412
|
+
class: g(["nb-reset", "component"]),
|
|
413
|
+
style: D([U.value])
|
|
414
|
+
}, [
|
|
415
|
+
(S(!0), C(ie, null, de(q(v), (b, w) => (S(), C("div", {
|
|
416
|
+
key: w,
|
|
417
|
+
class: g(["custom-checkbox__item", [T.value, J.value]])
|
|
418
|
+
}, [
|
|
419
|
+
fe(H("input", {
|
|
420
|
+
id: `${e.nbId}-${b.value}`,
|
|
421
|
+
"onUpdate:modelValue": r[0] || (r[0] = (z) => i.value = z),
|
|
422
|
+
type: "checkbox",
|
|
423
|
+
class: "custom-checkbox__item--input",
|
|
424
|
+
disabled: q(R),
|
|
425
|
+
value: b.value,
|
|
426
|
+
name: e.groupName
|
|
427
|
+
}, null, 8, Ne), [
|
|
428
|
+
[_e, i.value]
|
|
429
|
+
]),
|
|
430
|
+
H("label", {
|
|
431
|
+
for: `${e.nbId}-${b.value}`,
|
|
432
|
+
class: g([[y.value], "custom-checkbox__item--label"])
|
|
433
|
+
}, ve(b.text), 11, Ie)
|
|
434
|
+
], 2))), 128))
|
|
435
|
+
], 12, Ge)
|
|
436
|
+
], 6)) : pe("", !0);
|
|
437
|
+
}
|
|
438
|
+
}), Oe = /* @__PURE__ */ ye($e, [["__scopeId", "data-v-9c4e11db"]]), oe = {
|
|
439
|
+
NbInputRadio: Ee,
|
|
440
|
+
NbInputCheckbox: Oe
|
|
441
|
+
}, Re = {
|
|
442
|
+
install(e) {
|
|
443
|
+
for (const o in oe)
|
|
444
|
+
if (Object.prototype.hasOwnProperty.call(oe, o)) {
|
|
445
|
+
const u = oe[o];
|
|
446
|
+
e.component(u.name, u);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
export {
|
|
451
|
+
Re as default
|
|
452
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,w){typeof exports=="object"&&typeof module<"u"?module.exports=w(require("vue")):typeof define=="function"&&define.amd?define(["vue"],w):(e=typeof globalThis<"u"?globalThis:e||self,e.NbInputs=w(e.Vue))})(this,function(e){"use strict";const w="",Z=(t,o)=>{const n=t.__vccOpts||t;for(const[d,i]of o)n[d]=i;return n},te=["id"],ae=["id","disabled","value","name"],le=["for"],oe=Z(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 n of t){const d=Object.keys(n);d.length!==2&&(o=!0),d.every(f=>["value","text"].includes(f))||(o=!0)}if(!o)return t}},currentOptiton:{type:String,default:null},direction:{type:String,default:"left",validator:t=>["left","right"].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},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=>({"30804cd8":q.value,"23c100c2":T.value,"669d0db7":M.value,"47dc7aec":F.value,c2167476:U.value,"6f8b8b00":J.value,"40b68ad3":P.value,"531d9e60":O.value})),e.onMounted(()=>{A()});const n=o,d=t,i=e.ref(null),{currentOptiton:f,display:k,options:p,direction:S,textColor:C,color:b,hoverEffect:E,activeHoverEffect:N,colorHover:H,itemGap:g,internalGap:m,disabled:V,fontFamily:z,fontSize:G,fontWeight:h}=e.toRefs(d),s=e.computed(()=>{const l=V.value?"component-disabled":"",c=k.value!=="b"?"inline-block":"block",v=z.value?z.value:"'Lato', sans-serif",_=G.value?G.value:"1.6em",a=!h.value||h.value<0?200:h.value,u=S.value?S.value:"left",y=C.value?C.value:"black",I=b.value?b.value:"#767676",$=[!1,!0].includes(E.value)?E.value:!1,K=[!1,!0].includes(N.value)?N.value:!1,Q=H.value?H.value:"#a6a6a6",X=!g.value||g.value<0?15:g.value,Y=!m.value||m.value<0?6:m.value;return{disabled:l,display:c,direction:u,textColor:y,color:I,hoverEffect:$,activeHoverEffect:K,colorHover:Q,itemGap:X,internalGap:Y,font:v,fontSize:_,fontWeight:a}}),x=e.computed(()=>s.value.disabled),r=e.computed(()=>({display:s.value.display})),L=e.computed(()=>s.value.display==="inline-block"?"custom-radio__item--display-inline":"custom-radio__item--display-block"),W=e.computed(()=>{const l=s.value;return{fontSize:l.fontSize,fontWeight:l.fontWeight}}),j=e.computed(()=>Array.isArray(p.value)&&p.value.constructor===Array&&p.value.length>0),D=e.computed(()=>s.value.direction==="right"?"custom-radio__item--direction-right":"custom-radio__item--direction-left"),q=e.computed(()=>s.value.font),F=e.computed(()=>s.value.textColor),M=e.computed(()=>s.value.color),T=e.computed(()=>{const l=s.value;return l.activeHoverEffect?l.colorHover:l.color}),U=e.computed(()=>{const l=s.value;return l.hoverEffect?l.colorHover:l.color}),B=e.computed(()=>{const c=s.value.internalGap;return!c||c<0?0:c}),P=e.computed(()=>`0 0 0 2${B.value}px`),O=e.computed(()=>`0 2${B.value}px 0 0`),J=e.computed(()=>{const c=s.value.itemGap;return!c||c<0?0:`${c}px`}),A=()=>{const l=f.value;l&&(i.value=l.toString().toLowerCase()),n("current-value",l)};return e.watch(f,()=>{A()}),e.watch(i,l=>{n("current-value",l),n("changed",l)}),(l,c)=>t.nbId&&j.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["nb-wrapper",x.value]),style:e.normalizeStyle([r.value])},[e.createElementVNode("div",{id:t.nbId,class:e.normalizeClass(["nb-reset","component"]),style:e.normalizeStyle([W.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(v,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,class:e.normalizeClass(["custom-radio__item",[L.value,D.value]])},[e.withDirectives(e.createElementVNode("input",{id:`${t.nbId}-${v.value}`,"onUpdate:modelValue":c[0]||(c[0]=a=>i.value=a),type:"radio",class:"custom-radio__item--input",disabled:e.unref(V),value:v.value,name:t.groupName},null,8,ae),[[e.vModelRadio,i.value]]),e.createElementVNode("label",{for:`${t.nbId}-${v.value}`,class:"custom-radio__item--label"},e.toDisplayString(v.text),9,le)],2))),128))],12,te)],6)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-a238193d"]]),me="",ne=["id"],re=["id","disabled","value","name"],ue=["for"],R={NbInputRadio:oe,NbInputCheckbox:Z(Object.assign({name:"NbInputRadio",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 n of t){const d=Object.keys(n);d.length!==2&&(o=!0),d.every(f=>["value","text"].includes(f))||(o=!0)}if(!o)return t}},currentOptiton:{type:Array,default:()=>[]},direction:{type:String,default:"left",validator:t=>["left","right"].indexOf(t)!==-1},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},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:o}){e.useCssVars(a=>({"3736c944":M.value,"64914b15":B.value,aab9e826:l.value,aed05ffe:U.value,"42ee4fd4":T.value,"13a9e1bb":P.value,"250657ca":c.value,"3e1411c9":J.value,f676eecc:A.value})),e.onMounted(()=>{_()});const n=o,d=t,i=e.ref(null),{currentOptiton:f,display:k,options:p,direction:S,textColor:C,boxRadius:b,color:E,hoverEffect:N,activeHoverEffect:H,colorHover:g,itemGap:m,internalGap:V,type:z,disabled:G,fontFamily:h,fontSize:s,fontWeight:x}=e.toRefs(d),r=e.computed(()=>{const a=G.value?"component-disabled":"",u=k.value!=="b"?"inline-block":"block",y=h.value?h.value:"'Lato', sans-serif",I=s.value?s.value:"1.6em",$=x.value!==0&&!x.value||x.value<0?200:x.value,K=S.value?S.value:"left",Q=C.value?C.value:"black",X=b.value!==0&&!b.value||b.value<0?0:b.value,Y=E.value?E.value:"#767676",se=[!1,!0].includes(N.value)?N.value:!1,ce=[!1,!0].includes(H.value)?H.value:!1,ie=g.value?g.value:"#a6a6a6",de=m.value!==0&&!m.value||m.value<0?15:m.value,fe=V.value!==0&&!V.value||V.value<0?6:V.value,ee=["box","circle"].includes(z.value)?z.value:"box";return console.log(ee),{disabled:a,display:u,direction:K,textColor:Q,boxRadius:X,color:Y,hoverEffect:se,activeHoverEffect:ce,colorHover:ie,itemGap:de,internalGap:fe,type:ee,font:y,fontSize:I,fontWeight:$}}),L=e.computed(()=>r.value.disabled),W=e.computed(()=>({display:r.value.display})),j=e.computed(()=>r.value.display==="inline-block"?"custom-checkbox__item--display-inline":"custom-checkbox__item--display-block"),D=e.computed(()=>{const a=r.value;return{fontSize:a.fontSize,fontWeight:a.fontWeight}}),q=e.computed(()=>Array.isArray(p.value)&&p.value.constructor===Array&&p.value.length>0),F=e.computed(()=>r.value.direction==="right"?"custom-checkbox__item--direction-right":"custom-checkbox__item--direction-left"),M=e.computed(()=>r.value.font),T=e.computed(()=>r.value.textColor),U=e.computed(()=>r.value.color),B=e.computed(()=>{const a=r.value;return a.activeHoverEffect?a.colorHover:a.color}),P=e.computed(()=>{const a=r.value;return a.hoverEffect?a.colorHover:a.color}),O=e.computed(()=>{const u=r.value.internalGap;return!u||u<0?0:u}),J=e.computed(()=>`0 0 0 2${O.value}px`),A=e.computed(()=>`0 2${O.value}px 0 0`),l=e.computed(()=>{const a=r.value;return`${a.borderRadius>7?7:a.borderRadius}px`}),c=e.computed(()=>{const u=r.value.itemGap;return!u||u<0?0:`${u}px`}),v=e.computed(()=>r.value.type==="circle"?"custom-checkbox__input--type-circle":""),_=()=>{i.value=f.value};return e.watch(f,()=>{_()}),e.watch(i,a=>{n("current-value",a),n("changed",a)}),(a,u)=>t.nbId&&q.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["nb-wrapper",L.value]),style:e.normalizeStyle([W.value])},[e.createElementVNode("div",{id:t.nbId,class:e.normalizeClass(["nb-reset","component"]),style:e.normalizeStyle([D.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(y,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:e.normalizeClass(["custom-checkbox__item",[j.value,F.value]])},[e.withDirectives(e.createElementVNode("input",{id:`${t.nbId}-${y.value}`,"onUpdate:modelValue":u[0]||(u[0]=$=>i.value=$),type:"checkbox",class:"custom-checkbox__item--input",disabled:e.unref(G),value:y.value,name:t.groupName},null,8,re),[[e.vModelCheckbox,i.value]]),e.createElementVNode("label",{for:`${t.nbId}-${y.value}`,class:e.normalizeClass([[v.value],"custom-checkbox__item--label"])},e.toDisplayString(y.text),11,ue)],2))),128))],12,ne)],6)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-9c4e11db"]])};return{install(t){for(const o in R)if(Object.prototype.hasOwnProperty.call(R,o)){const n=R[o];t.component(n.name,n)}}}});
|
package/dist/style.css
ADDED
|
@@ -0,0 +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-a238193d]{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}.nb-reset[data-v-a238193d]{font-family:Lato,sans-serif;font-style:normal;font-weight:light;line-height:1.42857143}.nb-reset[data-v-a238193d] *{margin:0;padding:0}.nb-reset[data-v-a238193d] *,.nb-reset[data-v-a238193d] *:before,.nb-reset[data-v-a238193d] *:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.component[data-v-a238193d]{margin:0;box-sizing:border-box;line-height:16px;font-family:Lato,sans-serif;font-family:var(--30804cd8);-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;overflow:hidden}.component .custom-radio__item .custom-radio__item--input[data-v-a238193d]{display:none}.component .custom-radio__item .custom-radio__item--input:checked+.custom-radio__item--label[data-v-a238193d]:hover:before{border:2px solid var(--23c100c2);color:var(--23c100c2)}.component .custom-radio__item .custom-radio__item--input:checked+.custom-radio__item--label[data-v-a238193d]:before{content:"●";font-size:1.3em;text-shadow:0;display:flex;align-items:self-end;text-align:center;justify-content:space-around;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border:2px solid var(--669d0db7);color:var(--669d0db7)}.component .custom-radio__item .custom-radio__item--label[data-v-a238193d]{--disabled-color: var(--47dc7aec);color:var(--disabled-color)!important}.component .custom-radio__item .custom-radio__item--label[data-v-a238193d]:before{border:2px solid var(--669d0db7)}.component .custom-radio__item .custom-radio__item--label[data-v-a238193d]:hover{cursor:pointer}.component .custom-radio__item .custom-radio__item--label[data-v-a238193d]:hover:before{border:2px solid var(--c2167476)}.component .custom-radio__item .custom-radio__item--label[data-v-a238193d]:before{content:"";width:19px;height:19px;position:absolute;bottom:0;border:0;border-radius:50%;text-shadow:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border:2px solid var(--669d0db7)}.component .custom-radio__item.custom-radio__item--display-block[data-v-a238193d]{display:block}.component .custom-radio__item.custom-radio__item--display-block[data-v-a238193d]:not(:first-child){margin-top:var(--6f8b8b00)}.component .custom-radio__item.custom-radio__item--display-block .custom-radio__item--label[data-v-a238193d]{display:inline;font-family:inherit;font-size:inherit;font-style:normal;line-height:20px;position:relative}.component .custom-radio__item.custom-radio__item--display-inline[data-v-a238193d]{display:inline-block}.component .custom-radio__item.custom-radio__item--display-inline[data-v-a238193d]:not(:first-child){margin-left:var(--6f8b8b00)}.component .custom-radio__item.custom-radio__item--display-inline .custom-radio__item--label[data-v-a238193d]{display:inline;font-family:inherit;font-size:inherit;font-style:normal;line-height:20px;position:relative}.component .custom-radio__item.custom-radio__item--display-block.custom-radio__item--direction-left .custom-radio__item--label[data-v-a238193d]{display:inline-block;padding:var(--40b68ad3)}.component .custom-radio__item.custom-radio__item--display-block.custom-radio__item--direction-left .custom-radio__item--label[data-v-a238193d]:before{left:0}.component .custom-radio__item.custom-radio__item--display-block.custom-radio__item--direction-right .custom-radio__item--label[data-v-a238193d]{padding:var(--531d9e60)}.component .custom-radio__item.custom-radio__item--display-block.custom-radio__item--direction-right .custom-radio__item--label[data-v-a238193d]:before{right:0}.component .custom-radio__item.custom-radio__item--display-inline.custom-radio__item--direction-left .custom-radio__item--label[data-v-a238193d]{display:inline-block;padding:var(--40b68ad3)}.component .custom-radio__item.custom-radio__item--display-inline.custom-radio__item--direction-left .custom-radio__item--label[data-v-a238193d]:before{left:0}.component .custom-radio__item.custom-radio__item--display-inline.custom-radio__item--direction-right .custom-radio__item--label[data-v-a238193d]{padding:var(--531d9e60)}.component .custom-radio__item.custom-radio__item--display-inline.custom-radio__item--direction-right .custom-radio__item--label[data-v-a238193d]:before{right:0}.component-disabled[data-v-a238193d]{cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}.component-disabled .component[data-v-a238193d]{--disabled-color: var(--47dc7aec);color:var(--disabled-color)!important;opacity:.7;border-radius:inherit}.nb-wrapper[data-v-9c4e11db]{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}.nb-reset[data-v-9c4e11db]{font-family:Lato,sans-serif;font-style:normal;font-weight:light;line-height:1.42857143}.nb-reset[data-v-9c4e11db] *{margin:0;padding:0}.nb-reset[data-v-9c4e11db] *,.nb-reset[data-v-9c4e11db] *:before,.nb-reset[data-v-9c4e11db] *:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.component[data-v-9c4e11db]{margin:0;box-sizing:border-box;line-height:16px;font-family:Lato,sans-serif;font-family:var(--3736c944);-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;overflow:hidden}.component .custom-checkbox__item .custom-checkbox__item--input[data-v-9c4e11db]{display:none}.component .custom-checkbox__item .custom-checkbox__item--input:checked+.custom-checkbox__item--label[data-v-9c4e11db]:hover:before{border:2px solid var(--64914b15);color:var(--64914b15)}.component .custom-checkbox__item .custom-checkbox__item--input:checked+.custom-checkbox__item--label[data-v-9c4e11db]:before{content:"✓";font-size:.7em;font-weight:900;line-height:17px;text-shadow:0;display:flex;align-items:self-end;text-align:center;justify-content:space-around;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-radius:var(--aab9e826);border:2px solid var(--aed05ffe);color:var(--aed05ffe)}.component .custom-checkbox__item .custom-checkbox__item--label[data-v-9c4e11db]{--disabled-color: var(--42ee4fd4);color:var(--disabled-color)!important}.component .custom-checkbox__item .custom-checkbox__item--label[data-v-9c4e11db]:before{border:2px solid var(--aed05ffe)}.component .custom-checkbox__item .custom-checkbox__item--label[data-v-9c4e11db]:hover{cursor:pointer}.component .custom-checkbox__item .custom-checkbox__item--label[data-v-9c4e11db]:hover:before{border:2px solid var(--13a9e1bb)}.component .custom-checkbox__item .custom-checkbox__item--label[data-v-9c4e11db]:before{content:"";width:19px;height:19px;position:absolute;bottom:0;border:0;text-shadow:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-radius:var(--aab9e826);border:2px solid var(--aed05ffe);color:var(--aed05ffe)}.component .custom-checkbox__item .custom-checkbox__item--label.custom-checkbox__input--type-circle[data-v-9c4e11db]:before{border-radius:50%!important}.component .custom-checkbox__item.custom-checkbox__item--display-block[data-v-9c4e11db]{display:block}.component .custom-checkbox__item.custom-checkbox__item--display-block[data-v-9c4e11db]:not(:first-child){margin-top:var(--250657ca)}.component .custom-checkbox__item.custom-checkbox__item--display-block .custom-checkbox__item--label[data-v-9c4e11db]{display:inline;font-family:inherit;font-size:inherit;font-style:normal;line-height:20px;position:relative}.component .custom-checkbox__item.custom-checkbox__item--display-inline[data-v-9c4e11db]{display:inline-block}.component .custom-checkbox__item.custom-checkbox__item--display-inline[data-v-9c4e11db]:not(:first-child){margin-left:var(--250657ca)}.component .custom-checkbox__item.custom-checkbox__item--display-inline .custom-checkbox__item--label[data-v-9c4e11db]{display:inline;font-family:inherit;font-size:inherit;font-style:normal;line-height:20px;position:relative}.component .custom-checkbox__item.custom-checkbox__item--display-block.custom-checkbox__item--direction-left .custom-checkbox__item--label[data-v-9c4e11db]{display:inline-block;padding:var(--3e1411c9)}.component .custom-checkbox__item.custom-checkbox__item--display-block.custom-checkbox__item--direction-left .custom-checkbox__item--label[data-v-9c4e11db]:before{left:0}.component .custom-checkbox__item.custom-checkbox__item--display-block.custom-checkbox__item--direction-right .custom-checkbox__item--label[data-v-9c4e11db]{padding:var(--f676eecc)}.component .custom-checkbox__item.custom-checkbox__item--display-block.custom-checkbox__item--direction-right .custom-checkbox__item--label[data-v-9c4e11db]:before{right:0}.component .custom-checkbox__item.custom-checkbox__item--display-inline.custom-checkbox__item--direction-left .custom-checkbox__item--label[data-v-9c4e11db]{display:inline-block;padding:var(--3e1411c9)}.component .custom-checkbox__item.custom-checkbox__item--display-inline.custom-checkbox__item--direction-left .custom-checkbox__item--label[data-v-9c4e11db]:before{left:0}.component .custom-checkbox__item.custom-checkbox__item--display-inline.custom-checkbox__item--direction-right .custom-checkbox__item--label[data-v-9c4e11db]{padding:var(--f676eecc)}.component .custom-checkbox__item.custom-checkbox__item--display-inline.custom-checkbox__item--direction-right .custom-checkbox__item--label[data-v-9c4e11db]:before{right:0}.component-disabled[data-v-9c4e11db]{cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}.component-disabled .component[data-v-9c4e11db]{--disabled-color: var(--42ee4fd4);color:var(--disabled-color)!important;opacity:.7;border-radius:inherit}
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vlalg-nimbus/nb-inputs",
|
|
3
|
+
"description": "Input components for Vuejs 3",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/nb-inputs.umd.js",
|
|
7
|
+
"module": "./dist/nb-inputs.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/nb-inputs.js",
|
|
11
|
+
"require": "./dist/nb-inputs.umd.js"
|
|
12
|
+
},
|
|
13
|
+
"./dist/style.css": "./dist/style.css",
|
|
14
|
+
"./dist/images": "./dist/images"
|
|
15
|
+
},
|
|
16
|
+
"browser": {
|
|
17
|
+
"./dist/images": "./dist/images",
|
|
18
|
+
"./style.css": "./dist/style.css"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"build": "vite build",
|
|
27
|
+
"preview": "vite preview --port 4173",
|
|
28
|
+
"test:unit": "vitest --environment jsdom",
|
|
29
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
|
|
30
|
+
"format:prettier": "prettier --write . '!**/*.{js,vue}'",
|
|
31
|
+
"npm:publish": "vite build && npm login && npm publish --access=public"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@vlalg-nimbus/bee-css-reset": "^2.0.2",
|
|
35
|
+
"@vlalg-nimbus/chameleon-grid-layout": "^1.0.2",
|
|
36
|
+
"vue": "^3.3.4"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@rollup/plugin-commonjs": "^25.0.5",
|
|
40
|
+
"@rollup/plugin-image": "^3.0.3",
|
|
41
|
+
"@rollup/plugin-node-resolve": "^15.2.2",
|
|
42
|
+
"@rushstack/eslint-patch": "^1.3.3",
|
|
43
|
+
"@vitejs/plugin-vue": "^4.3.4",
|
|
44
|
+
"@vue/eslint-config-prettier": "^8.0.0",
|
|
45
|
+
"@vue/test-utils": "^2.4.1",
|
|
46
|
+
"eslint": "^8.51.0",
|
|
47
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
48
|
+
"jsdom": "^22.1.0",
|
|
49
|
+
"prettier": "^3.0.3",
|
|
50
|
+
"sass": "^1.69.0",
|
|
51
|
+
"unplugin-vue-components": "^0.25.2",
|
|
52
|
+
"vite": "^4.5.2",
|
|
53
|
+
"vitest": "^0.34.4"
|
|
54
|
+
},
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "git",
|
|
57
|
+
"url": "https://github.com/VemLavarALoucaGamers/vlalg-nimbus"
|
|
58
|
+
},
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://github.com/VemLavarALoucaGamers/vlalg-nimbus/issues"
|
|
61
|
+
},
|
|
62
|
+
"homepage": "https://nimbus.tec.br",
|
|
63
|
+
"keywords": [
|
|
64
|
+
"vuejs",
|
|
65
|
+
"vue js",
|
|
66
|
+
"vue plugin",
|
|
67
|
+
"input radio",
|
|
68
|
+
"input checkbox",
|
|
69
|
+
"radio",
|
|
70
|
+
"checkbox",
|
|
71
|
+
"inputs",
|
|
72
|
+
"input",
|
|
73
|
+
"components",
|
|
74
|
+
"component",
|
|
75
|
+
"vue components",
|
|
76
|
+
"vuejs components",
|
|
77
|
+
"vue js components"
|
|
78
|
+
],
|
|
79
|
+
"author": "Antonio and Felipe <Vem Lavar a Louca Gamers> (https://vemlavaralouca.com.br)",
|
|
80
|
+
"contributors": [
|
|
81
|
+
"TonhaoSantos (https://github.com/TonhaoSantos)",
|
|
82
|
+
"Felipecss (https://github.com/lipecss)"
|
|
83
|
+
]
|
|
84
|
+
}
|