@vlalg-nimbus/nb-buttons 3.0.0 → 3.2.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/dist/nb-buttons.js +945 -582
- package/dist/nb-buttons.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/nb-buttons.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useCssVars as j, toRefs as q, computed as t, openBlock as O, createElementBlock as
|
|
2
|
-
const G = (e,
|
|
3
|
-
const
|
|
4
|
-
for (const [Y,
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
},
|
|
1
|
+
import { useCssVars as j, toRefs as q, computed as t, openBlock as O, createElementBlock as E, normalizeClass as R, normalizeStyle as w, unref as V, withKeys as W, withModifiers as F, createElementVNode as z, renderSlot as K, createTextVNode as M, createCommentVNode as P, onMounted as ne, ref as fe, watch as ce, toDisplayString as be } from "vue";
|
|
2
|
+
const G = (e, c) => {
|
|
3
|
+
const H = e.__vccOpts || e;
|
|
4
|
+
for (const [Y, N] of c)
|
|
5
|
+
H[Y] = N;
|
|
6
|
+
return H;
|
|
7
|
+
}, ve = ["tabIndex", "aria-label", "aria-disabled"], pe = ["id"], ye = { class: "component-content__text" }, ge = /* @__PURE__ */ Object.assign({
|
|
8
8
|
name: "NbButtonVavaGame",
|
|
9
9
|
inheritAttrs: !1
|
|
10
10
|
}, {
|
|
@@ -18,10 +18,26 @@ const G = (e, s) => {
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: "ib",
|
|
20
20
|
validator: (e = "") => {
|
|
21
|
-
const
|
|
22
|
-
return ["b", "ib"].includes(
|
|
21
|
+
const c = e.toLowerCase();
|
|
22
|
+
return ["b", "ib"].includes(c);
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
+
tabIndex: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 0
|
|
28
|
+
},
|
|
29
|
+
hasTabIndexEnter: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !0
|
|
32
|
+
},
|
|
33
|
+
hasTabIndexSpace: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
ariaLabel: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "Alternate Text Button"
|
|
40
|
+
},
|
|
25
41
|
textColor: {
|
|
26
42
|
type: String,
|
|
27
43
|
default: "#ece8e1"
|
|
@@ -92,102 +108,110 @@ const G = (e, s) => {
|
|
|
92
108
|
}
|
|
93
109
|
},
|
|
94
110
|
emits: ["clicked"],
|
|
95
|
-
setup(e, { emit:
|
|
96
|
-
j((
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
111
|
+
setup(e, { emit: c }) {
|
|
112
|
+
j((C) => ({
|
|
113
|
+
"3b94cba3": o.value,
|
|
114
|
+
"6146add9": T.value,
|
|
115
|
+
"2753eae3": L.value,
|
|
116
|
+
"4edfa97a": $.value,
|
|
117
|
+
dd0b6f3c: s.value
|
|
102
118
|
}));
|
|
103
|
-
const
|
|
104
|
-
display:
|
|
105
|
-
textColor:
|
|
106
|
-
textColorHover:
|
|
107
|
-
buttonColor:
|
|
108
|
-
buttonColorHover:
|
|
109
|
-
uppercase:
|
|
110
|
-
paddingXContent:
|
|
111
|
-
paddingYContent:
|
|
112
|
-
paddingXBorder:
|
|
113
|
-
paddingYBorder:
|
|
114
|
-
borderColor:
|
|
115
|
-
borderOpacity:
|
|
116
|
-
disabled:
|
|
119
|
+
const H = c, Y = e, {
|
|
120
|
+
display: N,
|
|
121
|
+
textColor: B,
|
|
122
|
+
textColorHover: x,
|
|
123
|
+
buttonColor: S,
|
|
124
|
+
buttonColorHover: i,
|
|
125
|
+
uppercase: b,
|
|
126
|
+
paddingXContent: v,
|
|
127
|
+
paddingYContent: p,
|
|
128
|
+
paddingXBorder: h,
|
|
129
|
+
paddingYBorder: m,
|
|
130
|
+
borderColor: y,
|
|
131
|
+
borderOpacity: r,
|
|
132
|
+
disabled: f,
|
|
117
133
|
fontFamily: X,
|
|
118
|
-
fontSize:
|
|
119
|
-
fontWeight:
|
|
120
|
-
} = q(Y),
|
|
121
|
-
const
|
|
134
|
+
fontSize: k,
|
|
135
|
+
fontWeight: g
|
|
136
|
+
} = q(Y), d = t(() => {
|
|
137
|
+
const C = f.value ? "component-disabled" : "", A = N.value !== "b" ? "inline-block" : "block", _ = B.value ? B.value : "#ece8e1", J = S.value ? S.value : "green", Q = x.value ? x.value : "#ece8e1", U = i.value ? i.value : "cyan", Z = y.value ? y.value : "#ffffff", ee = !r.value || !(r.value >= 0 && r.value <= 1) ? "0.5" : r.value, te = !h.value || h.value < 0 ? 0.3 : h.value, ae = !m.value || m.value < 0 ? 0.3 : m.value, le = !v.value || v.value < 0 ? 0.5 : v.value, ue = !p.value || p.value < 0 ? 0.5 : p.value, re = b.value ? "uppercase" : "none", de = X.value ? X.value : "'Lato', sans-serif", se = k.value ? k.value : "1.6em", ie = !g.value || g.value < 0 ? 100 : g.value;
|
|
122
138
|
return {
|
|
123
|
-
disabled:
|
|
124
|
-
display:
|
|
125
|
-
textColor:
|
|
126
|
-
buttonColor:
|
|
127
|
-
textColorHover:
|
|
128
|
-
buttonColorHover:
|
|
129
|
-
borderColor:
|
|
130
|
-
borderOpacity:
|
|
131
|
-
paddingXBorder:
|
|
132
|
-
paddingYBorder:
|
|
133
|
-
paddingXContent:
|
|
134
|
-
paddingYContent:
|
|
135
|
-
uppercase:
|
|
136
|
-
font:
|
|
137
|
-
fontSize:
|
|
138
|
-
fontWeight:
|
|
139
|
+
disabled: C,
|
|
140
|
+
display: A,
|
|
141
|
+
textColor: _,
|
|
142
|
+
buttonColor: J,
|
|
143
|
+
textColorHover: Q,
|
|
144
|
+
buttonColorHover: U,
|
|
145
|
+
borderColor: Z,
|
|
146
|
+
borderOpacity: ee,
|
|
147
|
+
paddingXBorder: te,
|
|
148
|
+
paddingYBorder: ae,
|
|
149
|
+
paddingXContent: le,
|
|
150
|
+
paddingYContent: ue,
|
|
151
|
+
uppercase: re,
|
|
152
|
+
font: de,
|
|
153
|
+
fontSize: se,
|
|
154
|
+
fontWeight: ie
|
|
139
155
|
};
|
|
140
|
-
}),
|
|
141
|
-
display:
|
|
142
|
-
})),
|
|
143
|
-
const
|
|
156
|
+
}), n = t(() => d.value.disabled), I = t(() => ({
|
|
157
|
+
display: d.value.display
|
|
158
|
+
})), u = t(() => {
|
|
159
|
+
const C = d.value;
|
|
144
160
|
return {
|
|
145
|
-
padding: `${
|
|
146
|
-
fontSize:
|
|
147
|
-
fontWeight:
|
|
161
|
+
padding: `${C.paddingYBorder}rem ${C.paddingXBorder}rem`,
|
|
162
|
+
fontSize: C.fontSize,
|
|
163
|
+
fontWeight: C.fontWeight
|
|
148
164
|
};
|
|
149
165
|
}), l = t(() => {
|
|
150
|
-
const
|
|
166
|
+
const C = d.value;
|
|
151
167
|
return {
|
|
152
|
-
textTransform:
|
|
153
|
-
padding: `${
|
|
154
|
-
backgroundColor:
|
|
168
|
+
textTransform: C.uppercase,
|
|
169
|
+
padding: `${C.paddingYContent}rem ${C.paddingXContent}rem`,
|
|
170
|
+
backgroundColor: C.buttonColor
|
|
155
171
|
};
|
|
156
|
-
}),
|
|
157
|
-
backgroundColor:
|
|
158
|
-
})),
|
|
159
|
-
|
|
172
|
+
}), a = t(() => ({
|
|
173
|
+
backgroundColor: d.value.buttonColorHover
|
|
174
|
+
})), o = t(() => d.value.font), $ = t(() => d.value.borderColor), s = t(() => d.value.borderOpacity), T = t(() => d.value.textColor), L = t(() => d.value.textColorHover), D = () => {
|
|
175
|
+
H("clicked");
|
|
160
176
|
};
|
|
161
|
-
return (
|
|
177
|
+
return (C, A) => e.nbId ? (O(), E("div", {
|
|
162
178
|
key: 0,
|
|
163
|
-
class:
|
|
164
|
-
style:
|
|
165
|
-
|
|
179
|
+
class: R(["nb-wrapper", n.value]),
|
|
180
|
+
style: w([I.value]),
|
|
181
|
+
tabIndex: e.tabIndex,
|
|
182
|
+
role: "button",
|
|
183
|
+
"aria-label": e.ariaLabel,
|
|
184
|
+
"aria-disabled": V(f),
|
|
185
|
+
onClick: D,
|
|
186
|
+
onKeydown: [
|
|
187
|
+
A[0] || (A[0] = W((_) => !V(f) && e.hasTabIndexEnter && D(), ["enter"])),
|
|
188
|
+
A[1] || (A[1] = W(F((_) => !V(f) && e.hasTabIndexSpace && D(), ["prevent"]), ["space"]))
|
|
189
|
+
]
|
|
166
190
|
}, [
|
|
167
|
-
|
|
191
|
+
z("div", {
|
|
168
192
|
id: e.nbId,
|
|
169
|
-
class:
|
|
170
|
-
style:
|
|
193
|
+
class: R(["nb-reset", "component"]),
|
|
194
|
+
style: w([u.value])
|
|
171
195
|
}, [
|
|
172
|
-
|
|
196
|
+
z("div", {
|
|
173
197
|
class: "component-content",
|
|
174
|
-
style:
|
|
198
|
+
style: w([l.value])
|
|
175
199
|
}, [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
200
|
+
z("span", ye, [
|
|
201
|
+
K(C.$slots, "content", {}, () => [
|
|
202
|
+
A[2] || (A[2] = M("Default Text"))
|
|
179
203
|
], !0)
|
|
180
204
|
]),
|
|
181
|
-
|
|
205
|
+
z("span", {
|
|
182
206
|
class: "component-content__mask",
|
|
183
|
-
style:
|
|
207
|
+
style: w([a.value])
|
|
184
208
|
}, null, 4)
|
|
185
209
|
], 4)
|
|
186
|
-
], 12,
|
|
187
|
-
],
|
|
210
|
+
], 12, pe)
|
|
211
|
+
], 46, ve)) : P("", !0);
|
|
188
212
|
}
|
|
189
|
-
}),
|
|
190
|
-
const
|
|
213
|
+
}), me = /* @__PURE__ */ G(ge, [["__scopeId", "data-v-c8141ce9"]]);
|
|
214
|
+
const Ve = ["tabIndex", "aria-label", "aria-disabled"], xe = ["id"], Ce = /* @__PURE__ */ Object.assign({
|
|
191
215
|
name: "NbButtonShowHover",
|
|
192
216
|
inheritAttrs: !1
|
|
193
217
|
}, {
|
|
@@ -197,6 +221,22 @@ const ye = ["id"], ge = /* @__PURE__ */ Object.assign({
|
|
|
197
221
|
type: String,
|
|
198
222
|
required: !0
|
|
199
223
|
},
|
|
224
|
+
tabIndex: {
|
|
225
|
+
type: Number,
|
|
226
|
+
default: 0
|
|
227
|
+
},
|
|
228
|
+
hasTabIndexEnter: {
|
|
229
|
+
type: Boolean,
|
|
230
|
+
default: !0
|
|
231
|
+
},
|
|
232
|
+
hasTabIndexSpace: {
|
|
233
|
+
type: Boolean,
|
|
234
|
+
default: !0
|
|
235
|
+
},
|
|
236
|
+
ariaLabel: {
|
|
237
|
+
type: String,
|
|
238
|
+
default: "Alternate Text Button"
|
|
239
|
+
},
|
|
200
240
|
textColor: {
|
|
201
241
|
type: String,
|
|
202
242
|
default: "#145deb"
|
|
@@ -253,82 +293,90 @@ const ye = ["id"], ge = /* @__PURE__ */ Object.assign({
|
|
|
253
293
|
}
|
|
254
294
|
},
|
|
255
295
|
emits: ["clicked"],
|
|
256
|
-
setup(e, { emit:
|
|
257
|
-
j((
|
|
258
|
-
|
|
259
|
-
"
|
|
260
|
-
"
|
|
261
|
-
|
|
262
|
-
"
|
|
296
|
+
setup(e, { emit: c }) {
|
|
297
|
+
j((u) => ({
|
|
298
|
+
"630b5d13": n.value,
|
|
299
|
+
"6584a110": g.value,
|
|
300
|
+
"3cc5d20d": d.value,
|
|
301
|
+
e8db6f2c: e.textColorHover,
|
|
302
|
+
"7e70901c": V(N)
|
|
263
303
|
}));
|
|
264
|
-
const
|
|
265
|
-
textColor:
|
|
266
|
-
buttonColorHover:
|
|
267
|
-
buttonColorOpacityHover:
|
|
268
|
-
paddingX:
|
|
269
|
-
paddingY:
|
|
270
|
-
disabled:
|
|
271
|
-
borderRadius:
|
|
272
|
-
verticalAlign:
|
|
273
|
-
fontFamily:
|
|
274
|
-
fontSize:
|
|
275
|
-
fontWeight:
|
|
276
|
-
} = q(Y),
|
|
277
|
-
const
|
|
304
|
+
const H = c, Y = e, {
|
|
305
|
+
textColor: N,
|
|
306
|
+
buttonColorHover: B,
|
|
307
|
+
buttonColorOpacityHover: x,
|
|
308
|
+
paddingX: S,
|
|
309
|
+
paddingY: i,
|
|
310
|
+
disabled: b,
|
|
311
|
+
borderRadius: v,
|
|
312
|
+
verticalAlign: p,
|
|
313
|
+
fontFamily: h,
|
|
314
|
+
fontSize: m,
|
|
315
|
+
fontWeight: y
|
|
316
|
+
} = q(Y), r = t(() => {
|
|
317
|
+
const u = b.value ? "component-disabled" : "", l = p.value ? p.value : "middle", a = N ? N.value : "ffffff", o = !S.value || S.value < 0 ? 1 : S.value, $ = !i.value || i.value < 0 ? 0.2 : i.value, s = !v.value || v.value < 0 ? 0 : v.value, T = B.value ? B.value : "10, 38, 184", L = !x.value || x.value < 0 ? 0.1 : x.value, D = h.value ? h.value : "'Lato', sans-serif", C = m.value ? m.value : "1.6rem", A = !y.value || y.value < 0 ? 100 : y.value;
|
|
278
318
|
return {
|
|
279
|
-
disabled:
|
|
280
|
-
borderRadius:
|
|
281
|
-
textColor:
|
|
282
|
-
paddingX:
|
|
283
|
-
paddingY:
|
|
284
|
-
buttonColorHover:
|
|
285
|
-
buttonColorOpacityHover:
|
|
286
|
-
font:
|
|
287
|
-
fontSize:
|
|
288
|
-
fontWeight:
|
|
319
|
+
disabled: u,
|
|
320
|
+
borderRadius: s,
|
|
321
|
+
textColor: a,
|
|
322
|
+
paddingX: o,
|
|
323
|
+
paddingY: $,
|
|
324
|
+
buttonColorHover: T,
|
|
325
|
+
buttonColorOpacityHover: L,
|
|
326
|
+
font: D,
|
|
327
|
+
fontSize: C,
|
|
328
|
+
fontWeight: A,
|
|
289
329
|
verticalAlign: l
|
|
290
330
|
};
|
|
291
|
-
}),
|
|
292
|
-
verticalAlign:
|
|
293
|
-
})),
|
|
294
|
-
const
|
|
331
|
+
}), f = t(() => r.value.disabled), X = t(() => ({
|
|
332
|
+
verticalAlign: r.value.verticalAlign
|
|
333
|
+
})), k = t(() => {
|
|
334
|
+
const u = r.value;
|
|
295
335
|
return {
|
|
296
|
-
color:
|
|
297
|
-
padding: `${
|
|
298
|
-
borderRadius: `${
|
|
299
|
-
fontSize:
|
|
300
|
-
fontWeight:
|
|
336
|
+
color: u.textColor,
|
|
337
|
+
padding: `${u.paddingY}rem 0`,
|
|
338
|
+
borderRadius: `${u.borderRadius}rem`,
|
|
339
|
+
fontSize: u.fontSize,
|
|
340
|
+
fontWeight: u.fontWeight
|
|
301
341
|
};
|
|
302
|
-
}),
|
|
303
|
-
const
|
|
304
|
-
return `${
|
|
305
|
-
}),
|
|
306
|
-
const
|
|
307
|
-
return `rgba(${
|
|
308
|
-
}),
|
|
309
|
-
|
|
342
|
+
}), g = t(() => {
|
|
343
|
+
const u = r.value;
|
|
344
|
+
return `${u.paddingY}rem ${u.paddingX}rem`;
|
|
345
|
+
}), d = t(() => {
|
|
346
|
+
const u = r.value;
|
|
347
|
+
return `rgba(${u.buttonColorHover}, ${u.buttonColorOpacityHover})`;
|
|
348
|
+
}), n = t(() => r.value.font), I = () => {
|
|
349
|
+
H("clicked");
|
|
310
350
|
};
|
|
311
|
-
return (
|
|
351
|
+
return (u, l) => e.nbId ? (O(), E("div", {
|
|
312
352
|
key: 0,
|
|
313
|
-
class:
|
|
314
|
-
style:
|
|
315
|
-
|
|
353
|
+
class: R(["nb-wrapper", f.value]),
|
|
354
|
+
style: w([X.value]),
|
|
355
|
+
tabIndex: e.tabIndex,
|
|
356
|
+
role: "button",
|
|
357
|
+
"aria-label": e.ariaLabel,
|
|
358
|
+
"aria-disabled": V(b),
|
|
359
|
+
onClick: I,
|
|
360
|
+
onKeydown: [
|
|
361
|
+
l[1] || (l[1] = W((a) => !V(b) && e.hasTabIndexEnter && I(), ["enter"])),
|
|
362
|
+
l[2] || (l[2] = W(F((a) => !V(b) && e.hasTabIndexSpace && I(), ["prevent"]), ["space"]))
|
|
363
|
+
]
|
|
316
364
|
}, [
|
|
317
|
-
|
|
365
|
+
z("a", {
|
|
318
366
|
id: e.nbId,
|
|
319
367
|
class: "nb-reset component tertiary",
|
|
320
|
-
style:
|
|
321
|
-
onClick: l[0] || (l[0] =
|
|
368
|
+
style: w([k.value]),
|
|
369
|
+
onClick: l[0] || (l[0] = F(() => {
|
|
322
370
|
}, ["prevent"]))
|
|
323
371
|
}, [
|
|
324
|
-
|
|
325
|
-
l[
|
|
372
|
+
K(u.$slots, "content", {}, () => [
|
|
373
|
+
l[3] || (l[3] = M("Default Text"))
|
|
326
374
|
], !0)
|
|
327
|
-
], 12,
|
|
328
|
-
],
|
|
375
|
+
], 12, xe)
|
|
376
|
+
], 46, Ve)) : P("", !0);
|
|
329
377
|
}
|
|
330
|
-
}),
|
|
331
|
-
const
|
|
378
|
+
}), Se = /* @__PURE__ */ G(Ce, [["__scopeId", "data-v-f844cd94"]]);
|
|
379
|
+
const Ie = ["id"], Be = ["tabIndex", "aria-label", "aria-disabled"], he = ["tabIndex", "aria-label", "aria-disabled"], Ne = /* @__PURE__ */ Object.assign({
|
|
332
380
|
name: "NbButtonPrevNext",
|
|
333
381
|
inheritAttrs: !1
|
|
334
382
|
}, {
|
|
@@ -338,6 +386,30 @@ const Ve = ["id"], Ce = /* @__PURE__ */ Object.assign({
|
|
|
338
386
|
type: String,
|
|
339
387
|
required: !0
|
|
340
388
|
},
|
|
389
|
+
tabIndexPrev: {
|
|
390
|
+
type: Number,
|
|
391
|
+
default: 0
|
|
392
|
+
},
|
|
393
|
+
tabIndexNext: {
|
|
394
|
+
type: Number,
|
|
395
|
+
default: 0
|
|
396
|
+
},
|
|
397
|
+
hasTabIndexEnter: {
|
|
398
|
+
type: Boolean,
|
|
399
|
+
default: !0
|
|
400
|
+
},
|
|
401
|
+
hasTabIndexSpace: {
|
|
402
|
+
type: Boolean,
|
|
403
|
+
default: !0
|
|
404
|
+
},
|
|
405
|
+
ariaLabelPrev: {
|
|
406
|
+
type: String,
|
|
407
|
+
default: "Alternate Text Button"
|
|
408
|
+
},
|
|
409
|
+
ariaLabelNext: {
|
|
410
|
+
type: String,
|
|
411
|
+
default: "Alternate Text Button"
|
|
412
|
+
},
|
|
341
413
|
colorPrimary: {
|
|
342
414
|
type: String,
|
|
343
415
|
default: "tomato"
|
|
@@ -415,98 +487,114 @@ const Ve = ["id"], Ce = /* @__PURE__ */ Object.assign({
|
|
|
415
487
|
}
|
|
416
488
|
},
|
|
417
489
|
emits: ["clicked"],
|
|
418
|
-
setup(e, { emit:
|
|
490
|
+
setup(e, { emit: c }) {
|
|
419
491
|
j((l) => ({
|
|
420
|
-
|
|
421
|
-
"
|
|
422
|
-
|
|
423
|
-
"
|
|
424
|
-
"
|
|
492
|
+
"16c88917": I.value,
|
|
493
|
+
"6e1325e7": e.colorPrimary,
|
|
494
|
+
"118d2324": e.textColor,
|
|
495
|
+
"72f42419": e.colorSecondary,
|
|
496
|
+
"195b3f6e": e.textColorHover
|
|
425
497
|
}));
|
|
426
|
-
const
|
|
427
|
-
paddingX:
|
|
428
|
-
paddingY:
|
|
429
|
-
marginBetween:
|
|
430
|
-
borderRadius:
|
|
431
|
-
disabled:
|
|
432
|
-
disabledPreview:
|
|
433
|
-
disabledNext:
|
|
434
|
-
fontFamily:
|
|
435
|
-
fontSize:
|
|
436
|
-
fontWeight:
|
|
437
|
-
} = q(Y),
|
|
438
|
-
const l =
|
|
498
|
+
const H = c, Y = e, {
|
|
499
|
+
paddingX: N,
|
|
500
|
+
paddingY: B,
|
|
501
|
+
marginBetween: x,
|
|
502
|
+
borderRadius: S,
|
|
503
|
+
disabled: i,
|
|
504
|
+
disabledPreview: b,
|
|
505
|
+
disabledNext: v,
|
|
506
|
+
fontFamily: p,
|
|
507
|
+
fontSize: h,
|
|
508
|
+
fontWeight: m
|
|
509
|
+
} = q(Y), y = t(() => {
|
|
510
|
+
const l = i.value ? "component-disabled" : "", a = b.value ? "component-disabled" : "", o = v.value ? "component-disabled" : "", $ = !x.value || x.value < 0 ? 0 : x.value, s = !S.value || S.value < 0 ? 0 : S.value, T = !N.value || N.value < 0 ? 1 : N.value, L = !B.value || B.value < 0 ? 10 : B.value, D = h.value ? h.value : "1.6em", C = !m.value || m.value < 0 ? 100 : m.value;
|
|
439
511
|
return {
|
|
440
512
|
disabled: l,
|
|
441
|
-
disabledPreview:
|
|
442
|
-
disabledNext:
|
|
443
|
-
marginBetween: `${
|
|
444
|
-
borderRadius: `${
|
|
445
|
-
paddingX: `${
|
|
446
|
-
paddingY: `${
|
|
447
|
-
fontSize:
|
|
448
|
-
fontWeight:
|
|
513
|
+
disabledPreview: a,
|
|
514
|
+
disabledNext: o,
|
|
515
|
+
marginBetween: `${$}px`,
|
|
516
|
+
borderRadius: `${s}px`,
|
|
517
|
+
paddingX: `${T}px`,
|
|
518
|
+
paddingY: `${L}px`,
|
|
519
|
+
fontSize: D,
|
|
520
|
+
fontWeight: C
|
|
449
521
|
};
|
|
450
|
-
}),
|
|
451
|
-
display:
|
|
452
|
-
})),
|
|
453
|
-
const l =
|
|
522
|
+
}), r = t(() => y.value.disabled), f = t(() => y.value.disabledPreview), X = t(() => y.value.disabledNext), k = t(() => ({
|
|
523
|
+
display: y.value.display
|
|
524
|
+
})), g = t(() => {
|
|
525
|
+
const l = y.value;
|
|
454
526
|
return {
|
|
455
527
|
fontSize: l.fontSize,
|
|
456
528
|
fontWeight: l.fontWeight
|
|
457
529
|
};
|
|
458
|
-
}),
|
|
459
|
-
const l =
|
|
530
|
+
}), d = t(() => {
|
|
531
|
+
const l = y.value;
|
|
460
532
|
return {
|
|
461
533
|
borderRadius: `${l.borderRadius} 0px 0px ${l.borderRadius}`,
|
|
462
534
|
marginRight: l.marginBetween,
|
|
463
535
|
padding: `${l.paddingX} ${l.paddingY}`
|
|
464
536
|
};
|
|
465
|
-
}),
|
|
466
|
-
const l =
|
|
537
|
+
}), n = t(() => {
|
|
538
|
+
const l = y.value;
|
|
467
539
|
return {
|
|
468
540
|
borderRadius: `0px ${l.borderRadius} ${l.borderRadius} 0px`,
|
|
469
541
|
marginLeft: l.marginBetween,
|
|
470
542
|
padding: `${l.paddingX} ${l.paddingY}`
|
|
471
543
|
};
|
|
472
|
-
}),
|
|
473
|
-
|
|
544
|
+
}), I = t(() => `'${p.value ? p.value : "'Lato', sans-serif"}'`), u = (l) => {
|
|
545
|
+
H("clicked", l);
|
|
474
546
|
};
|
|
475
|
-
return (l,
|
|
547
|
+
return (l, a) => e.nbId ? (O(), E("div", {
|
|
476
548
|
key: 0,
|
|
477
|
-
class:
|
|
478
|
-
style:
|
|
549
|
+
class: R(["nb-wrapper", r.value]),
|
|
550
|
+
style: w([k.value])
|
|
479
551
|
}, [
|
|
480
|
-
|
|
552
|
+
z("div", {
|
|
481
553
|
id: e.nbId,
|
|
482
|
-
class:
|
|
483
|
-
style:
|
|
554
|
+
class: R(["nb-reset", "component"]),
|
|
555
|
+
style: w(g.value)
|
|
484
556
|
}, [
|
|
485
|
-
e.showPreview ? (O(),
|
|
557
|
+
e.showPreview ? (O(), E("div", {
|
|
486
558
|
key: 0,
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
559
|
+
class: R(["buttonNextPreview buttonPreview", f.value]),
|
|
560
|
+
style: w(d.value),
|
|
561
|
+
tabIndex: e.tabIndexPrev,
|
|
562
|
+
role: "button",
|
|
563
|
+
"aria-label": e.ariaLabelPrev,
|
|
564
|
+
"aria-disabled": V(i),
|
|
565
|
+
onClick: a[0] || (a[0] = (o) => u("preview")),
|
|
566
|
+
onKeydown: [
|
|
567
|
+
a[1] || (a[1] = W((o) => !V(i) && e.hasTabIndexEnter && u("preview"), ["enter"])),
|
|
568
|
+
a[2] || (a[2] = W(F((o) => !V(i) && e.hasTabIndexSpace && u("preview"), ["prevent"]), ["space"]))
|
|
569
|
+
]
|
|
490
570
|
}, [
|
|
491
|
-
|
|
492
|
-
|
|
571
|
+
K(l.$slots, "prev", {}, () => [
|
|
572
|
+
a[6] || (a[6] = M("← Preview"))
|
|
493
573
|
], !0)
|
|
494
|
-
],
|
|
495
|
-
e.showNext ? (O(),
|
|
574
|
+
], 46, Be)) : P("", !0),
|
|
575
|
+
e.showNext ? (O(), E("div", {
|
|
496
576
|
key: 1,
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
577
|
+
class: R(["buttonNextPreview buttonNext", X.value]),
|
|
578
|
+
style: w(n.value),
|
|
579
|
+
tabIndex: e.tabIndexNext,
|
|
580
|
+
role: "button",
|
|
581
|
+
"aria-label": e.ariaLabelNext,
|
|
582
|
+
"aria-disabled": V(i),
|
|
583
|
+
onClick: a[3] || (a[3] = (o) => u("next")),
|
|
584
|
+
onKeydown: [
|
|
585
|
+
a[4] || (a[4] = W((o) => !V(i) && e.hasTabIndexEnter && u("next"), ["enter"])),
|
|
586
|
+
a[5] || (a[5] = W(F((o) => !V(i) && e.hasTabIndexSpace && u("next"), ["prevent"]), ["space"]))
|
|
587
|
+
]
|
|
500
588
|
}, [
|
|
501
|
-
|
|
502
|
-
|
|
589
|
+
K(l.$slots, "next", {}, () => [
|
|
590
|
+
a[7] || (a[7] = M("Next →"))
|
|
503
591
|
], !0)
|
|
504
|
-
],
|
|
505
|
-
], 12,
|
|
506
|
-
], 6)) :
|
|
592
|
+
], 46, he)) : P("", !0)
|
|
593
|
+
], 12, Ie)
|
|
594
|
+
], 6)) : P("", !0);
|
|
507
595
|
}
|
|
508
|
-
}),
|
|
509
|
-
const
|
|
596
|
+
}), $e = /* @__PURE__ */ G(Ne, [["__scopeId", "data-v-235db30a"]]);
|
|
597
|
+
const we = ["tabIndex", "aria-label", "aria-disabled"], Te = ["id"], He = /* @__PURE__ */ Object.assign({
|
|
510
598
|
name: "NbButtonMechanical",
|
|
511
599
|
inheritAttrs: !1
|
|
512
600
|
}, {
|
|
@@ -520,10 +608,26 @@ const xe = ["id"], _e = /* @__PURE__ */ Object.assign({
|
|
|
520
608
|
type: String,
|
|
521
609
|
default: "b",
|
|
522
610
|
validator: (e = "b") => {
|
|
523
|
-
const
|
|
524
|
-
return ["b", "ib"].includes(
|
|
611
|
+
const c = e ? e.toLowerCase() : "";
|
|
612
|
+
return ["b", "ib"].includes(c);
|
|
525
613
|
}
|
|
526
614
|
},
|
|
615
|
+
tabIndex: {
|
|
616
|
+
type: Number,
|
|
617
|
+
default: 0
|
|
618
|
+
},
|
|
619
|
+
hasTabIndexEnter: {
|
|
620
|
+
type: Boolean,
|
|
621
|
+
default: !0
|
|
622
|
+
},
|
|
623
|
+
hasTabIndexSpace: {
|
|
624
|
+
type: Boolean,
|
|
625
|
+
default: !0
|
|
626
|
+
},
|
|
627
|
+
ariaLabel: {
|
|
628
|
+
type: String,
|
|
629
|
+
default: "Alternate Text Button"
|
|
630
|
+
},
|
|
527
631
|
textColor: {
|
|
528
632
|
type: String,
|
|
529
633
|
default: "#ffffff"
|
|
@@ -575,77 +679,85 @@ const xe = ["id"], _e = /* @__PURE__ */ Object.assign({
|
|
|
575
679
|
}
|
|
576
680
|
},
|
|
577
681
|
emits: ["clicked"],
|
|
578
|
-
setup(e, { emit:
|
|
579
|
-
j((
|
|
580
|
-
"
|
|
581
|
-
"
|
|
582
|
-
"
|
|
583
|
-
|
|
682
|
+
setup(e, { emit: c }) {
|
|
683
|
+
j((a) => ({
|
|
684
|
+
"75e08b28": n.value,
|
|
685
|
+
"38d76e94": V(B),
|
|
686
|
+
"1e761906": u.value,
|
|
687
|
+
60007562: I.value
|
|
584
688
|
}));
|
|
585
|
-
const
|
|
586
|
-
display:
|
|
587
|
-
buttonColor:
|
|
588
|
-
textColor:
|
|
589
|
-
containerColor:
|
|
590
|
-
paddingX:
|
|
591
|
-
paddingY:
|
|
592
|
-
borderRadius:
|
|
593
|
-
disabled:
|
|
594
|
-
animationSlow:
|
|
595
|
-
fontFamily:
|
|
596
|
-
fontSize:
|
|
597
|
-
fontWeight:
|
|
598
|
-
} = q(Y),
|
|
599
|
-
const
|
|
689
|
+
const H = c, Y = e, {
|
|
690
|
+
display: N,
|
|
691
|
+
buttonColor: B,
|
|
692
|
+
textColor: x,
|
|
693
|
+
containerColor: S,
|
|
694
|
+
paddingX: i,
|
|
695
|
+
paddingY: b,
|
|
696
|
+
borderRadius: v,
|
|
697
|
+
disabled: p,
|
|
698
|
+
animationSlow: h,
|
|
699
|
+
fontFamily: m,
|
|
700
|
+
fontSize: y,
|
|
701
|
+
fontWeight: r
|
|
702
|
+
} = q(Y), f = t(() => {
|
|
703
|
+
const a = p.value ? "component-disabled" : "", o = N.value !== "b" ? "inline-block" : "block", $ = S.value ? S.value : "#ffffff", s = B.value ? B.value : "#bbbbbb", T = x.value ? x.value : "#ffffff", L = !i.value || i.value < 0 ? 1 : i.value, D = !b.value || b.value < 0 ? 0.2 : b.value, C = !v.value || v.value < 0 ? 0 : v.value, A = h.value ? "" : "component-transition__no-slow", _ = m.value ? m.value : "'Lato', sans-serif", J = y.value ? y.value : "1.6em", Q = !r.value || r.value < 0 ? 100 : r.value;
|
|
600
704
|
return {
|
|
601
|
-
disabled:
|
|
602
|
-
display:
|
|
603
|
-
containerColor:
|
|
604
|
-
buttonColor:
|
|
605
|
-
textColor:
|
|
606
|
-
paddingX:
|
|
607
|
-
paddingY:
|
|
608
|
-
borderRadius:
|
|
609
|
-
animationSlow:
|
|
610
|
-
font:
|
|
611
|
-
fontSize:
|
|
612
|
-
fontWeight:
|
|
705
|
+
disabled: a,
|
|
706
|
+
display: o,
|
|
707
|
+
containerColor: $,
|
|
708
|
+
buttonColor: s,
|
|
709
|
+
textColor: T,
|
|
710
|
+
paddingX: L,
|
|
711
|
+
paddingY: D,
|
|
712
|
+
borderRadius: C,
|
|
713
|
+
animationSlow: A,
|
|
714
|
+
font: _,
|
|
715
|
+
fontSize: J,
|
|
716
|
+
fontWeight: Q
|
|
613
717
|
};
|
|
614
|
-
}), X = t(() =>
|
|
615
|
-
display:
|
|
616
|
-
})),
|
|
617
|
-
const
|
|
718
|
+
}), X = t(() => f.value.disabled), k = t(() => ({
|
|
719
|
+
display: f.value.display
|
|
720
|
+
})), g = t(() => {
|
|
721
|
+
const a = f.value;
|
|
618
722
|
return {
|
|
619
|
-
border: `2px solid ${
|
|
620
|
-
color:
|
|
621
|
-
backgroundColor:
|
|
622
|
-
padding: `${
|
|
623
|
-
borderRadius: `${
|
|
624
|
-
fontSize:
|
|
625
|
-
fontWeight:
|
|
723
|
+
border: `2px solid ${a.containerColor}`,
|
|
724
|
+
color: a.textColor,
|
|
725
|
+
backgroundColor: a.buttonColor,
|
|
726
|
+
padding: `${a.paddingY}rem ${a.paddingX}rem`,
|
|
727
|
+
borderRadius: `${a.borderRadius}rem`,
|
|
728
|
+
fontSize: a.fontSize,
|
|
729
|
+
fontWeight: a.fontWeight
|
|
626
730
|
};
|
|
627
|
-
}),
|
|
628
|
-
|
|
731
|
+
}), d = t(() => f.value.animationSlow), n = t(() => f.value.font), I = t(() => f.value.textColor), u = t(() => f.value.buttonColor), l = () => {
|
|
732
|
+
H("clicked");
|
|
629
733
|
};
|
|
630
|
-
return (
|
|
734
|
+
return (a, o) => e.nbId ? (O(), E("div", {
|
|
631
735
|
key: 0,
|
|
632
|
-
class:
|
|
633
|
-
style:
|
|
634
|
-
|
|
736
|
+
class: R(["nb-wrapper", X.value]),
|
|
737
|
+
style: w([k.value]),
|
|
738
|
+
tabIndex: e.tabIndex,
|
|
739
|
+
role: "button",
|
|
740
|
+
"aria-label": e.ariaLabel,
|
|
741
|
+
"aria-disabled": V(p),
|
|
742
|
+
onClick: l,
|
|
743
|
+
onKeydown: [
|
|
744
|
+
o[0] || (o[0] = W(($) => !V(p) && e.hasTabIndexEnter && l(), ["enter"])),
|
|
745
|
+
o[1] || (o[1] = W(F(($) => !V(p) && e.hasTabIndexSpace && l(), ["prevent"]), ["space"]))
|
|
746
|
+
]
|
|
635
747
|
}, [
|
|
636
|
-
|
|
748
|
+
z("div", {
|
|
637
749
|
id: e.nbId,
|
|
638
|
-
class:
|
|
639
|
-
style:
|
|
750
|
+
class: R(["nb-reset", "component", "component-transition", d.value]),
|
|
751
|
+
style: w([g.value])
|
|
640
752
|
}, [
|
|
641
|
-
|
|
642
|
-
|
|
753
|
+
K(a.$slots, "content", {}, () => [
|
|
754
|
+
o[2] || (o[2] = M("Default Text"))
|
|
643
755
|
], !0)
|
|
644
|
-
], 14,
|
|
645
|
-
],
|
|
756
|
+
], 14, Te)
|
|
757
|
+
], 46, we)) : P("", !0);
|
|
646
758
|
}
|
|
647
|
-
}),
|
|
648
|
-
const
|
|
759
|
+
}), ke = /* @__PURE__ */ G(He, [["__scopeId", "data-v-cd185961"]]);
|
|
760
|
+
const ze = ["tabIndex", "aria-label", "aria-disabled"], We = ["id"], Ye = /* @__PURE__ */ Object.assign({
|
|
649
761
|
name: "NbButtonMechanical2",
|
|
650
762
|
inheritAttrs: !1
|
|
651
763
|
}, {
|
|
@@ -659,10 +771,26 @@ const Ne = ["id"], we = /* @__PURE__ */ Object.assign({
|
|
|
659
771
|
type: String,
|
|
660
772
|
default: "b",
|
|
661
773
|
validator: (e = "b") => {
|
|
662
|
-
const
|
|
663
|
-
return ["b", "ib"].includes(
|
|
774
|
+
const c = e ? e.toLowerCase() : "";
|
|
775
|
+
return ["b", "ib"].includes(c);
|
|
664
776
|
}
|
|
665
777
|
},
|
|
778
|
+
tabIndex: {
|
|
779
|
+
type: Number,
|
|
780
|
+
default: 0
|
|
781
|
+
},
|
|
782
|
+
hasTabIndexEnter: {
|
|
783
|
+
type: Boolean,
|
|
784
|
+
default: !0
|
|
785
|
+
},
|
|
786
|
+
hasTabIndexSpace: {
|
|
787
|
+
type: Boolean,
|
|
788
|
+
default: !0
|
|
789
|
+
},
|
|
790
|
+
ariaLabel: {
|
|
791
|
+
type: String,
|
|
792
|
+
default: "Alternate Text Button"
|
|
793
|
+
},
|
|
666
794
|
textColor: {
|
|
667
795
|
type: String,
|
|
668
796
|
default: "#ffffff"
|
|
@@ -710,73 +838,81 @@ const Ne = ["id"], we = /* @__PURE__ */ Object.assign({
|
|
|
710
838
|
}
|
|
711
839
|
},
|
|
712
840
|
emits: ["clicked"],
|
|
713
|
-
setup(e, { emit:
|
|
714
|
-
j((
|
|
715
|
-
"
|
|
841
|
+
setup(e, { emit: c }) {
|
|
842
|
+
j((n) => ({
|
|
843
|
+
"41c9f13c": g.value
|
|
716
844
|
}));
|
|
717
|
-
const
|
|
718
|
-
display:
|
|
719
|
-
buttonColor:
|
|
720
|
-
textColor:
|
|
721
|
-
paddingX:
|
|
722
|
-
paddingY:
|
|
723
|
-
borderRadius:
|
|
724
|
-
shadowColor:
|
|
725
|
-
disabled:
|
|
726
|
-
fontFamily:
|
|
727
|
-
fontSize:
|
|
728
|
-
fontWeight:
|
|
729
|
-
} = q(Y),
|
|
730
|
-
const
|
|
845
|
+
const H = c, Y = e, {
|
|
846
|
+
display: N,
|
|
847
|
+
buttonColor: B,
|
|
848
|
+
textColor: x,
|
|
849
|
+
paddingX: S,
|
|
850
|
+
paddingY: i,
|
|
851
|
+
borderRadius: b,
|
|
852
|
+
shadowColor: v,
|
|
853
|
+
disabled: p,
|
|
854
|
+
fontFamily: h,
|
|
855
|
+
fontSize: m,
|
|
856
|
+
fontWeight: y
|
|
857
|
+
} = q(Y), r = t(() => {
|
|
858
|
+
const n = p.value ? "component-disabled" : "", I = N.value !== "b" ? "inline-block" : "block", u = B.value ? B.value : "#bbbbbb", l = v.value ? v.value : "#002f3c", a = x.value ? x.value : "#ffffff", o = !S.value || S.value < 0 ? 1 : S.value, $ = !i.value || i.value < 0 ? 1 : i.value, s = !b.value || b.value < 0 ? 0 : b.value, T = h.value ? h.value : "'Lato', sans-serif", L = m.value ? m.value : "1.6em", D = !y.value || y.value < 0 ? 100 : y.value;
|
|
731
859
|
return {
|
|
732
|
-
disabled:
|
|
733
|
-
display:
|
|
734
|
-
buttonColor:
|
|
860
|
+
disabled: n,
|
|
861
|
+
display: I,
|
|
862
|
+
buttonColor: u,
|
|
735
863
|
shadowColor: l,
|
|
736
|
-
textColor:
|
|
737
|
-
paddingX:
|
|
738
|
-
paddingY:
|
|
739
|
-
borderRadius:
|
|
740
|
-
font:
|
|
741
|
-
fontSize:
|
|
742
|
-
fontWeight:
|
|
864
|
+
textColor: a,
|
|
865
|
+
paddingX: o,
|
|
866
|
+
paddingY: $,
|
|
867
|
+
borderRadius: s,
|
|
868
|
+
font: T,
|
|
869
|
+
fontSize: L,
|
|
870
|
+
fontWeight: D
|
|
743
871
|
};
|
|
744
|
-
}),
|
|
745
|
-
display:
|
|
746
|
-
})),
|
|
747
|
-
const
|
|
872
|
+
}), f = t(() => r.value.disabled), X = t(() => ({
|
|
873
|
+
display: r.value.display
|
|
874
|
+
})), k = t(() => {
|
|
875
|
+
const n = r.value;
|
|
748
876
|
return {
|
|
749
|
-
color:
|
|
750
|
-
backgroundColor:
|
|
751
|
-
boxShadow: `0 0 #0000, 0 0 #0000, 3px 3px 0 ${
|
|
752
|
-
padding: `${
|
|
753
|
-
padding: `${
|
|
754
|
-
borderRadius: `${
|
|
755
|
-
fontSize:
|
|
756
|
-
fontWeight:
|
|
877
|
+
color: n.textColor,
|
|
878
|
+
backgroundColor: n.buttonColor,
|
|
879
|
+
boxShadow: `0 0 #0000, 0 0 #0000, 3px 3px 0 ${n.shadowColor}`,
|
|
880
|
+
padding: `${n.paddingY}rem ${n.paddingX}rem`,
|
|
881
|
+
padding: `${n.paddingY}rem ${n.paddingX}rem`,
|
|
882
|
+
borderRadius: `${n.borderRadius}rem`,
|
|
883
|
+
fontSize: n.fontSize,
|
|
884
|
+
fontWeight: n.fontWeight
|
|
757
885
|
};
|
|
758
|
-
}),
|
|
759
|
-
|
|
886
|
+
}), g = t(() => r.value.font), d = () => {
|
|
887
|
+
H("clicked");
|
|
760
888
|
};
|
|
761
|
-
return (
|
|
889
|
+
return (n, I) => e.nbId ? (O(), E("div", {
|
|
762
890
|
key: 0,
|
|
763
|
-
class:
|
|
764
|
-
style:
|
|
765
|
-
|
|
891
|
+
class: R(["nb-wrapper", f.value]),
|
|
892
|
+
style: w([X.value]),
|
|
893
|
+
tabIndex: e.tabIndex,
|
|
894
|
+
role: "button",
|
|
895
|
+
"aria-label": e.ariaLabel,
|
|
896
|
+
"aria-disabled": V(p),
|
|
897
|
+
onClick: d,
|
|
898
|
+
onKeydown: [
|
|
899
|
+
I[0] || (I[0] = W((u) => !V(p) && e.hasTabIndexEnter && d(), ["enter"])),
|
|
900
|
+
I[1] || (I[1] = W(F((u) => !V(p) && e.hasTabIndexSpace && d(), ["prevent"]), ["space"]))
|
|
901
|
+
]
|
|
766
902
|
}, [
|
|
767
|
-
|
|
903
|
+
z("div", {
|
|
768
904
|
id: e.nbId,
|
|
769
|
-
class:
|
|
770
|
-
style:
|
|
905
|
+
class: R(["nb-reset", "component", "component-transition"]),
|
|
906
|
+
style: w([k.value])
|
|
771
907
|
}, [
|
|
772
|
-
|
|
773
|
-
|
|
908
|
+
K(n.$slots, "content", {}, () => [
|
|
909
|
+
I[2] || (I[2] = M("Default Text"))
|
|
774
910
|
], !0)
|
|
775
|
-
], 12,
|
|
776
|
-
],
|
|
911
|
+
], 12, We)
|
|
912
|
+
], 46, ze)) : P("", !0);
|
|
777
913
|
}
|
|
778
|
-
}),
|
|
779
|
-
const
|
|
914
|
+
}), Xe = /* @__PURE__ */ G(Ye, [["__scopeId", "data-v-d1239e03"]]);
|
|
915
|
+
const Re = ["tabIndex", "aria-label", "aria-disabled"], Le = ["id"], Ae = /* @__PURE__ */ Object.assign({
|
|
780
916
|
name: "NbButtonHamburger",
|
|
781
917
|
inheritAttrs: !1
|
|
782
918
|
}, {
|
|
@@ -786,6 +922,22 @@ const $e = ["id"], He = /* @__PURE__ */ Object.assign({
|
|
|
786
922
|
type: String,
|
|
787
923
|
required: !0
|
|
788
924
|
},
|
|
925
|
+
tabIndex: {
|
|
926
|
+
type: Number,
|
|
927
|
+
default: 0
|
|
928
|
+
},
|
|
929
|
+
hasTabIndexEnter: {
|
|
930
|
+
type: Boolean,
|
|
931
|
+
default: !0
|
|
932
|
+
},
|
|
933
|
+
hasTabIndexSpace: {
|
|
934
|
+
type: Boolean,
|
|
935
|
+
default: !0
|
|
936
|
+
},
|
|
937
|
+
ariaLabel: {
|
|
938
|
+
type: String,
|
|
939
|
+
default: "Alternate Text Button"
|
|
940
|
+
},
|
|
789
941
|
status: {
|
|
790
942
|
type: Boolean,
|
|
791
943
|
default: !1,
|
|
@@ -824,77 +976,85 @@ const $e = ["id"], He = /* @__PURE__ */ Object.assign({
|
|
|
824
976
|
}
|
|
825
977
|
},
|
|
826
978
|
emits: ["clicked"],
|
|
827
|
-
setup(e, { emit:
|
|
828
|
-
j((
|
|
829
|
-
|
|
830
|
-
|
|
979
|
+
setup(e, { emit: c }) {
|
|
980
|
+
j((n) => ({
|
|
981
|
+
"05489a45": k.value,
|
|
982
|
+
b1646024: g.value
|
|
831
983
|
}));
|
|
832
|
-
const
|
|
833
|
-
|
|
834
|
-
|
|
984
|
+
const H = c, Y = e;
|
|
985
|
+
ne(() => {
|
|
986
|
+
N.value = B.value;
|
|
835
987
|
});
|
|
836
|
-
const
|
|
837
|
-
status:
|
|
838
|
-
color:
|
|
839
|
-
containerColor:
|
|
840
|
-
containerColorHover:
|
|
841
|
-
colorHover:
|
|
842
|
-
paddingX:
|
|
843
|
-
paddingY:
|
|
844
|
-
disabled:
|
|
845
|
-
} = q(Y),
|
|
846
|
-
const
|
|
988
|
+
const N = fe(!1), {
|
|
989
|
+
status: B,
|
|
990
|
+
color: x,
|
|
991
|
+
containerColor: S,
|
|
992
|
+
containerColorHover: i,
|
|
993
|
+
colorHover: b,
|
|
994
|
+
paddingX: v,
|
|
995
|
+
paddingY: p,
|
|
996
|
+
disabled: h
|
|
997
|
+
} = q(Y), m = t(() => {
|
|
998
|
+
const n = h.value ? "component-disabled" : "", I = N.value ? "change" : "", u = S.value ? S.value : "#333333", l = x.value ? x.value : "#ffffff", a = !v.value || v.value < 0 ? 3 : v.value, o = !p.value || p.value < 0 ? 3 : p.value, $ = i.value ? i.value : "yellow", s = b.value ? b.value : "red";
|
|
847
999
|
return {
|
|
848
|
-
disabled:
|
|
849
|
-
buttonStatus:
|
|
850
|
-
containerColor:
|
|
851
|
-
paddingX:
|
|
852
|
-
paddingY:
|
|
1000
|
+
disabled: n,
|
|
1001
|
+
buttonStatus: I,
|
|
1002
|
+
containerColor: u,
|
|
1003
|
+
paddingX: a,
|
|
1004
|
+
paddingY: o,
|
|
853
1005
|
color: l,
|
|
854
|
-
containerColorHover:
|
|
855
|
-
colorHover:
|
|
1006
|
+
containerColorHover: $,
|
|
1007
|
+
colorHover: s
|
|
856
1008
|
};
|
|
857
|
-
}),
|
|
858
|
-
const
|
|
1009
|
+
}), y = t(() => m.value.disabled), r = t(() => {
|
|
1010
|
+
const n = m.value;
|
|
859
1011
|
return {
|
|
860
|
-
padding: `${
|
|
861
|
-
backgroundColor:
|
|
1012
|
+
padding: `${n.paddingY}px ${n.paddingX}px`,
|
|
1013
|
+
backgroundColor: n.containerColor
|
|
862
1014
|
};
|
|
863
|
-
}),
|
|
864
|
-
backgroundColor:
|
|
865
|
-
})), X = t(() =>
|
|
866
|
-
const
|
|
867
|
-
|
|
1015
|
+
}), f = t(() => ({
|
|
1016
|
+
backgroundColor: m.value.color
|
|
1017
|
+
})), X = t(() => m.value.buttonStatus), k = t(() => m.value.containerColorHover), g = t(() => m.value.colorHover), d = () => {
|
|
1018
|
+
const n = !N.value;
|
|
1019
|
+
N.value = n, H("clicked", n);
|
|
868
1020
|
};
|
|
869
|
-
return ce(
|
|
870
|
-
|
|
871
|
-
}), (
|
|
1021
|
+
return ce(B, () => {
|
|
1022
|
+
N.value = B.value;
|
|
1023
|
+
}), (n, I) => e.nbId ? (O(), E("div", {
|
|
872
1024
|
key: 0,
|
|
873
|
-
class:
|
|
874
|
-
style:
|
|
875
|
-
|
|
1025
|
+
class: R(["nb-wrapper", y.value]),
|
|
1026
|
+
style: w([r.value]),
|
|
1027
|
+
tabIndex: e.tabIndex,
|
|
1028
|
+
role: "button",
|
|
1029
|
+
"aria-label": e.ariaLabel,
|
|
1030
|
+
"aria-disabled": V(h),
|
|
1031
|
+
onClick: d,
|
|
1032
|
+
onKeydown: [
|
|
1033
|
+
I[0] || (I[0] = W((u) => !V(h) && e.hasTabIndexEnter && d(), ["enter"])),
|
|
1034
|
+
I[1] || (I[1] = W(F((u) => !V(h) && e.hasTabIndexSpace && d(), ["prevent"]), ["space"]))
|
|
1035
|
+
]
|
|
876
1036
|
}, [
|
|
877
|
-
|
|
1037
|
+
z("div", {
|
|
878
1038
|
id: e.nbId,
|
|
879
|
-
class:
|
|
1039
|
+
class: R(["nb-reset", "component", X.value])
|
|
880
1040
|
}, [
|
|
881
|
-
|
|
1041
|
+
z("div", {
|
|
882
1042
|
class: "component__line-one",
|
|
883
|
-
style:
|
|
1043
|
+
style: w(f.value)
|
|
884
1044
|
}, null, 4),
|
|
885
|
-
|
|
1045
|
+
z("div", {
|
|
886
1046
|
class: "component__line-two",
|
|
887
|
-
style:
|
|
1047
|
+
style: w(f.value)
|
|
888
1048
|
}, null, 4),
|
|
889
|
-
|
|
1049
|
+
z("div", {
|
|
890
1050
|
class: "component__line-three",
|
|
891
|
-
style:
|
|
1051
|
+
style: w(f.value)
|
|
892
1052
|
}, null, 4)
|
|
893
|
-
], 10,
|
|
894
|
-
],
|
|
1053
|
+
], 10, Le)
|
|
1054
|
+
], 46, Re)) : P("", !0);
|
|
895
1055
|
}
|
|
896
|
-
}),
|
|
897
|
-
const
|
|
1056
|
+
}), De = /* @__PURE__ */ G(Ae, [["__scopeId", "data-v-ee16aa34"]]);
|
|
1057
|
+
const Oe = ["tabIndex", "aria-label", "aria-disabled"], Ee = ["id"], Pe = /* @__PURE__ */ Object.assign({
|
|
898
1058
|
name: "NbButtonColorOutside",
|
|
899
1059
|
inheritAttrs: !1
|
|
900
1060
|
}, {
|
|
@@ -908,10 +1068,26 @@ const Ye = ["id"], Xe = /* @__PURE__ */ Object.assign({
|
|
|
908
1068
|
type: String,
|
|
909
1069
|
default: "b",
|
|
910
1070
|
validator: (e = "b") => {
|
|
911
|
-
const
|
|
912
|
-
return ["b", "ib"].includes(
|
|
1071
|
+
const c = e ? e.toLowerCase() : "";
|
|
1072
|
+
return ["b", "ib"].includes(c);
|
|
913
1073
|
}
|
|
914
1074
|
},
|
|
1075
|
+
tabIndex: {
|
|
1076
|
+
type: Number,
|
|
1077
|
+
default: 0
|
|
1078
|
+
},
|
|
1079
|
+
hasTabIndexEnter: {
|
|
1080
|
+
type: Boolean,
|
|
1081
|
+
default: !0
|
|
1082
|
+
},
|
|
1083
|
+
hasTabIndexSpace: {
|
|
1084
|
+
type: Boolean,
|
|
1085
|
+
default: !0
|
|
1086
|
+
},
|
|
1087
|
+
ariaLabel: {
|
|
1088
|
+
type: String,
|
|
1089
|
+
default: "Alternate Text Button"
|
|
1090
|
+
},
|
|
915
1091
|
textColor: {
|
|
916
1092
|
type: String,
|
|
917
1093
|
default: "#ffffff"
|
|
@@ -959,84 +1135,92 @@ const Ye = ["id"], Xe = /* @__PURE__ */ Object.assign({
|
|
|
959
1135
|
}
|
|
960
1136
|
},
|
|
961
1137
|
emits: ["clicked"],
|
|
962
|
-
setup(e, { emit:
|
|
963
|
-
j((
|
|
964
|
-
"
|
|
965
|
-
"
|
|
966
|
-
|
|
967
|
-
"
|
|
1138
|
+
setup(e, { emit: c }) {
|
|
1139
|
+
j((a) => ({
|
|
1140
|
+
"1be7c59c": n.value,
|
|
1141
|
+
"25955d43": u.value,
|
|
1142
|
+
bccb6a10: d.value,
|
|
1143
|
+
"374c98a8": I.value
|
|
968
1144
|
}));
|
|
969
|
-
const
|
|
970
|
-
display:
|
|
971
|
-
buttonColor:
|
|
972
|
-
borderColor:
|
|
973
|
-
textColor:
|
|
974
|
-
paddingX:
|
|
975
|
-
paddingY:
|
|
976
|
-
borderRadius:
|
|
977
|
-
disabled:
|
|
978
|
-
fontFamily:
|
|
979
|
-
fontSize:
|
|
980
|
-
fontWeight:
|
|
981
|
-
} = q(Y),
|
|
982
|
-
const
|
|
1145
|
+
const H = c, Y = e, {
|
|
1146
|
+
display: N,
|
|
1147
|
+
buttonColor: B,
|
|
1148
|
+
borderColor: x,
|
|
1149
|
+
textColor: S,
|
|
1150
|
+
paddingX: i,
|
|
1151
|
+
paddingY: b,
|
|
1152
|
+
borderRadius: v,
|
|
1153
|
+
disabled: p,
|
|
1154
|
+
fontFamily: h,
|
|
1155
|
+
fontSize: m,
|
|
1156
|
+
fontWeight: y
|
|
1157
|
+
} = q(Y), r = t(() => {
|
|
1158
|
+
const a = p.value ? "component-disabled" : "", o = N.value !== "b" ? "inline-block" : "block", $ = B.value ? B.value : "#bbbbbb", s = x.value ? x.value : "#ffe54c", T = S.value ? S.value : "#ffffff", L = !i.value || i.value < 0 ? 1 : i.value, D = !b.value || b.value < 0 ? 0.2 : b.value, C = !v.value || v.value < 0 ? 0 : v.value, A = h.value ? h.value : "'Lato', sans-serif", _ = m.value ? m.value : "1.6em", J = !y.value || y.value < 0 ? 200 : y.value;
|
|
983
1159
|
return {
|
|
984
|
-
disabled:
|
|
985
|
-
display:
|
|
986
|
-
buttonColor:
|
|
987
|
-
borderColor:
|
|
988
|
-
textColor:
|
|
989
|
-
paddingX:
|
|
990
|
-
paddingY:
|
|
991
|
-
borderRadius:
|
|
992
|
-
font:
|
|
993
|
-
fontSize:
|
|
994
|
-
fontWeight:
|
|
1160
|
+
disabled: a,
|
|
1161
|
+
display: o,
|
|
1162
|
+
buttonColor: $,
|
|
1163
|
+
borderColor: s,
|
|
1164
|
+
textColor: T,
|
|
1165
|
+
paddingX: L,
|
|
1166
|
+
paddingY: D,
|
|
1167
|
+
borderRadius: C,
|
|
1168
|
+
font: A,
|
|
1169
|
+
fontSize: _,
|
|
1170
|
+
fontWeight: J
|
|
995
1171
|
};
|
|
996
|
-
}),
|
|
997
|
-
display:
|
|
998
|
-
})),
|
|
999
|
-
const
|
|
1172
|
+
}), f = t(() => r.value.disabled), X = t(() => ({
|
|
1173
|
+
display: r.value.display
|
|
1174
|
+
})), k = t(() => {
|
|
1175
|
+
const a = r.value;
|
|
1000
1176
|
return {
|
|
1001
|
-
color:
|
|
1002
|
-
fontSize:
|
|
1003
|
-
fontWeight:
|
|
1177
|
+
color: a.textColor,
|
|
1178
|
+
fontSize: a.fontSize,
|
|
1179
|
+
fontWeight: a.fontWeight
|
|
1004
1180
|
};
|
|
1005
|
-
}),
|
|
1006
|
-
const
|
|
1181
|
+
}), g = t(() => {
|
|
1182
|
+
const a = r.value;
|
|
1007
1183
|
return {
|
|
1008
|
-
padding: `${
|
|
1009
|
-
border: `1px solid ${
|
|
1010
|
-
borderRadius:
|
|
1184
|
+
padding: `${a.paddingY}rem ${a.paddingX}rem`,
|
|
1185
|
+
border: `1px solid ${a.borderColor}`,
|
|
1186
|
+
borderRadius: d.value
|
|
1011
1187
|
};
|
|
1012
|
-
}),
|
|
1013
|
-
|
|
1188
|
+
}), d = t(() => `${r.value.borderRadius}rem`), n = t(() => r.value.font), I = t(() => r.value.textColor), u = t(() => r.value.buttonColor), l = () => {
|
|
1189
|
+
H("clicked");
|
|
1014
1190
|
};
|
|
1015
|
-
return (
|
|
1191
|
+
return (a, o) => e.nbId ? (O(), E("div", {
|
|
1016
1192
|
key: 0,
|
|
1017
|
-
class:
|
|
1018
|
-
style:
|
|
1019
|
-
|
|
1193
|
+
class: R(["nb-wrapper", f.value]),
|
|
1194
|
+
style: w([X.value]),
|
|
1195
|
+
tabIndex: e.tabIndex,
|
|
1196
|
+
role: "button",
|
|
1197
|
+
"aria-label": e.ariaLabel,
|
|
1198
|
+
"aria-disabled": V(p),
|
|
1199
|
+
onClick: l,
|
|
1200
|
+
onKeydown: [
|
|
1201
|
+
o[0] || (o[0] = W(($) => !V(p) && e.hasTabIndexEnter && l(), ["enter"])),
|
|
1202
|
+
o[1] || (o[1] = W(F(($) => !V(p) && e.hasTabIndexSpace && l(), ["prevent"]), ["space"]))
|
|
1203
|
+
]
|
|
1020
1204
|
}, [
|
|
1021
|
-
|
|
1205
|
+
z("div", {
|
|
1022
1206
|
id: e.nbId,
|
|
1023
|
-
class:
|
|
1024
|
-
style:
|
|
1207
|
+
class: R(["nb-reset", "component"]),
|
|
1208
|
+
style: w([k.value])
|
|
1025
1209
|
}, [
|
|
1026
|
-
|
|
1210
|
+
z("div", {
|
|
1027
1211
|
class: "component-content",
|
|
1028
|
-
style:
|
|
1212
|
+
style: w([g.value])
|
|
1029
1213
|
}, [
|
|
1030
|
-
|
|
1031
|
-
|
|
1214
|
+
K(a.$slots, "content", {}, () => [
|
|
1215
|
+
o[2] || (o[2] = M("Default Text"))
|
|
1032
1216
|
], !0)
|
|
1033
1217
|
], 4),
|
|
1034
|
-
|
|
1035
|
-
], 12,
|
|
1036
|
-
],
|
|
1218
|
+
o[3] || (o[3] = z("div", { class: "component-shadow" }, null, -1))
|
|
1219
|
+
], 12, Ee)
|
|
1220
|
+
], 46, Oe)) : P("", !0);
|
|
1037
1221
|
}
|
|
1038
|
-
}),
|
|
1039
|
-
const
|
|
1222
|
+
}), Fe = /* @__PURE__ */ G(Pe, [["__scopeId", "data-v-4ae432a3"]]);
|
|
1223
|
+
const _e = ["tabIndex", "aria-label", "aria-disabled"], Ke = ["id"], Me = /* @__PURE__ */ Object.assign({
|
|
1040
1224
|
name: "NbButtonColorHover",
|
|
1041
1225
|
inheritAttrs: !1
|
|
1042
1226
|
}, {
|
|
@@ -1050,10 +1234,26 @@ const ze = ["id"], We = /* @__PURE__ */ Object.assign({
|
|
|
1050
1234
|
type: String,
|
|
1051
1235
|
default: "b",
|
|
1052
1236
|
validator: (e = "b") => {
|
|
1053
|
-
const
|
|
1054
|
-
return ["b", "ib"].includes(
|
|
1237
|
+
const c = e.toLowerCase();
|
|
1238
|
+
return ["b", "ib"].includes(c);
|
|
1055
1239
|
}
|
|
1056
1240
|
},
|
|
1241
|
+
tabIndex: {
|
|
1242
|
+
type: Number,
|
|
1243
|
+
default: 0
|
|
1244
|
+
},
|
|
1245
|
+
hasTabIndexEnter: {
|
|
1246
|
+
type: Boolean,
|
|
1247
|
+
default: !0
|
|
1248
|
+
},
|
|
1249
|
+
hasTabIndexSpace: {
|
|
1250
|
+
type: Boolean,
|
|
1251
|
+
default: !0
|
|
1252
|
+
},
|
|
1253
|
+
ariaLabel: {
|
|
1254
|
+
type: String,
|
|
1255
|
+
default: "Alternate Text Button"
|
|
1256
|
+
},
|
|
1057
1257
|
textColor: {
|
|
1058
1258
|
type: String,
|
|
1059
1259
|
default: "#ffffff"
|
|
@@ -1105,79 +1305,88 @@ const ze = ["id"], We = /* @__PURE__ */ Object.assign({
|
|
|
1105
1305
|
}
|
|
1106
1306
|
},
|
|
1107
1307
|
emits: ["clicked"],
|
|
1108
|
-
setup(e, { emit:
|
|
1109
|
-
j((
|
|
1110
|
-
"
|
|
1111
|
-
"
|
|
1112
|
-
"
|
|
1113
|
-
"
|
|
1114
|
-
|
|
1308
|
+
setup(e, { emit: c }) {
|
|
1309
|
+
j((o) => ({
|
|
1310
|
+
"37a8072e": d.value,
|
|
1311
|
+
"420521fa": u.value,
|
|
1312
|
+
"2e48555d": I.value,
|
|
1313
|
+
"37cde362": l.value,
|
|
1314
|
+
f8f7c1c2: n.value
|
|
1115
1315
|
}));
|
|
1116
|
-
const
|
|
1117
|
-
display:
|
|
1118
|
-
textColor:
|
|
1119
|
-
paddingX:
|
|
1120
|
-
paddingY:
|
|
1121
|
-
borderRadius:
|
|
1122
|
-
disabled:
|
|
1123
|
-
fontFamily:
|
|
1124
|
-
fontSize:
|
|
1125
|
-
fontWeight:
|
|
1126
|
-
textColorHover:
|
|
1127
|
-
buttonColor:
|
|
1128
|
-
buttonColorHover:
|
|
1129
|
-
} = q(Y),
|
|
1130
|
-
const
|
|
1316
|
+
const H = c, Y = e, {
|
|
1317
|
+
display: N,
|
|
1318
|
+
textColor: B,
|
|
1319
|
+
paddingX: x,
|
|
1320
|
+
paddingY: S,
|
|
1321
|
+
borderRadius: i,
|
|
1322
|
+
disabled: b,
|
|
1323
|
+
fontFamily: v,
|
|
1324
|
+
fontSize: p,
|
|
1325
|
+
fontWeight: h,
|
|
1326
|
+
textColorHover: m,
|
|
1327
|
+
buttonColor: y,
|
|
1328
|
+
buttonColorHover: r
|
|
1329
|
+
} = q(Y), f = t(() => {
|
|
1330
|
+
const o = b.value ? "component-disabled" : "", $ = N.value !== "b" ? "inline-block" : "block", s = B ? B.value : "ffffff", T = !x.value || x.value < 0 ? 1 : x.value, L = !S.value || S.value < 0 ? 0.2 : S.value, D = !i.value || i.value < 0 ? 0 : i.value, C = v.value ? v.value : "'Lato', sans-serif", A = p.value ? p.value : "1.6rem", _ = !h.value || h.value < 0 ? 100 : h.value, J = m.value ? m.value : "#cccccc", Q = y.value ? y.value : "#bbbbbb", U = r.value ? r.value : "#959595";
|
|
1131
1331
|
return {
|
|
1132
|
-
disabled:
|
|
1133
|
-
display:
|
|
1134
|
-
font:
|
|
1135
|
-
fontSize:
|
|
1136
|
-
fontWeight:
|
|
1137
|
-
textColor:
|
|
1138
|
-
paddingX:
|
|
1139
|
-
paddingY:
|
|
1140
|
-
borderRadius:
|
|
1141
|
-
textColorHover:
|
|
1142
|
-
buttonColor:
|
|
1143
|
-
buttonColorHover:
|
|
1332
|
+
disabled: o,
|
|
1333
|
+
display: $,
|
|
1334
|
+
font: C,
|
|
1335
|
+
fontSize: A,
|
|
1336
|
+
fontWeight: _,
|
|
1337
|
+
textColor: s,
|
|
1338
|
+
paddingX: T,
|
|
1339
|
+
paddingY: L,
|
|
1340
|
+
borderRadius: D,
|
|
1341
|
+
textColorHover: J,
|
|
1342
|
+
buttonColor: Q,
|
|
1343
|
+
buttonColorHover: U
|
|
1144
1344
|
};
|
|
1145
|
-
}), X = t(() =>
|
|
1146
|
-
const
|
|
1345
|
+
}), X = t(() => f.value.disabled), k = t(() => {
|
|
1346
|
+
const o = f.value;
|
|
1147
1347
|
return {
|
|
1148
|
-
display:
|
|
1149
|
-
borderRadius: `${
|
|
1348
|
+
display: o.display,
|
|
1349
|
+
borderRadius: `${o.borderRadius}rem`
|
|
1150
1350
|
};
|
|
1151
|
-
}),
|
|
1152
|
-
const
|
|
1351
|
+
}), g = t(() => {
|
|
1352
|
+
const o = f.value;
|
|
1153
1353
|
return {
|
|
1154
|
-
color:
|
|
1155
|
-
padding: `${
|
|
1156
|
-
borderRadius: `${
|
|
1157
|
-
fontSize:
|
|
1158
|
-
fontWeight:
|
|
1354
|
+
color: o.textColor,
|
|
1355
|
+
padding: `${o.paddingY}rem ${o.paddingX}rem`,
|
|
1356
|
+
borderRadius: `${o.borderRadius}rem`,
|
|
1357
|
+
fontSize: o.fontSize,
|
|
1358
|
+
fontWeight: o.fontWeight
|
|
1159
1359
|
};
|
|
1160
|
-
}),
|
|
1161
|
-
|
|
1360
|
+
}), d = t(() => f.value.font), n = t(() => f.value.textColor), I = t(() => f.value.textColorHover), u = t(() => f.value.buttonColor), l = t(() => f.value.buttonColorHover), a = () => {
|
|
1361
|
+
H("clicked");
|
|
1162
1362
|
};
|
|
1163
|
-
return (
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1363
|
+
return (o, $) => e.nbId ? (O(), E("div", {
|
|
1364
|
+
key: 0,
|
|
1365
|
+
class: R(["nb-wrapper", X.value]),
|
|
1366
|
+
style: w([k.value]),
|
|
1367
|
+
tabIndex: e.tabIndex,
|
|
1368
|
+
role: "button",
|
|
1369
|
+
"aria-label": e.ariaLabel,
|
|
1370
|
+
"aria-disabled": V(b),
|
|
1371
|
+
onClick: a,
|
|
1372
|
+
onKeydown: [
|
|
1373
|
+
$[0] || ($[0] = W((s) => !V(b) && e.hasTabIndexEnter && a(), ["enter"])),
|
|
1374
|
+
$[1] || ($[1] = W(F((s) => !V(b) && e.hasTabIndexSpace && a(), ["prevent"]), ["space"]))
|
|
1375
|
+
]
|
|
1167
1376
|
}, [
|
|
1168
|
-
|
|
1377
|
+
z("div", {
|
|
1169
1378
|
id: e.nbId,
|
|
1170
1379
|
class: "nb-reset component component-transition",
|
|
1171
|
-
style:
|
|
1380
|
+
style: w([g.value])
|
|
1172
1381
|
}, [
|
|
1173
|
-
|
|
1174
|
-
|
|
1382
|
+
K(o.$slots, "content", {}, () => [
|
|
1383
|
+
$[2] || ($[2] = M("Default Text"))
|
|
1175
1384
|
], !0)
|
|
1176
|
-
], 12,
|
|
1177
|
-
],
|
|
1385
|
+
], 12, Ke)
|
|
1386
|
+
], 46, _e)) : P("", !0);
|
|
1178
1387
|
}
|
|
1179
|
-
}),
|
|
1180
|
-
const
|
|
1388
|
+
}), je = /* @__PURE__ */ G(Me, [["__scopeId", "data-v-d083f1f8"]]);
|
|
1389
|
+
const qe = ["tabIndex", "aria-label", "aria-disabled"], Ge = ["id"], Je = { class: "first-child" }, Qe = { class: "last-child" }, Ue = /* @__PURE__ */ Object.assign({
|
|
1181
1390
|
name: "NbButtonAlternateText",
|
|
1182
1391
|
inheritAttrs: !1
|
|
1183
1392
|
}, {
|
|
@@ -1191,10 +1400,26 @@ const De = ["id"], Oe = { class: "first-child" }, Le = { class: "last-child" },
|
|
|
1191
1400
|
type: String,
|
|
1192
1401
|
default: "b",
|
|
1193
1402
|
validator: (e = "b") => {
|
|
1194
|
-
const
|
|
1195
|
-
return ["b", "ib"].includes(
|
|
1403
|
+
const c = e ? e.toLowerCase() : "";
|
|
1404
|
+
return ["b", "ib"].includes(c);
|
|
1196
1405
|
}
|
|
1197
1406
|
},
|
|
1407
|
+
tabIndex: {
|
|
1408
|
+
type: Number,
|
|
1409
|
+
default: 0
|
|
1410
|
+
},
|
|
1411
|
+
hasTabIndexEnter: {
|
|
1412
|
+
type: Boolean,
|
|
1413
|
+
default: !0
|
|
1414
|
+
},
|
|
1415
|
+
hasTabIndexSpace: {
|
|
1416
|
+
type: Boolean,
|
|
1417
|
+
default: !0
|
|
1418
|
+
},
|
|
1419
|
+
ariaLabel: {
|
|
1420
|
+
type: String,
|
|
1421
|
+
default: "Alternate Text Button"
|
|
1422
|
+
},
|
|
1198
1423
|
textColor: {
|
|
1199
1424
|
type: String,
|
|
1200
1425
|
default: "#ffffff"
|
|
@@ -1260,109 +1485,247 @@ const De = ["id"], Oe = { class: "first-child" }, Le = { class: "last-child" },
|
|
|
1260
1485
|
}
|
|
1261
1486
|
},
|
|
1262
1487
|
emits: ["clicked"],
|
|
1263
|
-
setup(e, { emit:
|
|
1264
|
-
j((
|
|
1265
|
-
"
|
|
1266
|
-
"
|
|
1267
|
-
"
|
|
1268
|
-
|
|
1488
|
+
setup(e, { emit: c }) {
|
|
1489
|
+
j((s) => ({
|
|
1490
|
+
"516e8559": u.value,
|
|
1491
|
+
"48b787e2": l.value,
|
|
1492
|
+
"0e5ada5b": a.value,
|
|
1493
|
+
"1291c2ea": o.value
|
|
1269
1494
|
}));
|
|
1270
|
-
const
|
|
1271
|
-
display:
|
|
1272
|
-
buttonColor:
|
|
1273
|
-
borderColor:
|
|
1274
|
-
buttonHoverColor:
|
|
1275
|
-
showBorder:
|
|
1276
|
-
borderRadius:
|
|
1277
|
-
textColor:
|
|
1278
|
-
textHoverColor:
|
|
1279
|
-
width:
|
|
1280
|
-
paddingX:
|
|
1281
|
-
paddingY:
|
|
1282
|
-
disabled:
|
|
1283
|
-
fontFamily:
|
|
1495
|
+
const H = c, Y = e, {
|
|
1496
|
+
display: N,
|
|
1497
|
+
buttonColor: B,
|
|
1498
|
+
borderColor: x,
|
|
1499
|
+
buttonHoverColor: S,
|
|
1500
|
+
showBorder: i,
|
|
1501
|
+
borderRadius: b,
|
|
1502
|
+
textColor: v,
|
|
1503
|
+
textHoverColor: p,
|
|
1504
|
+
width: h,
|
|
1505
|
+
paddingX: m,
|
|
1506
|
+
paddingY: y,
|
|
1507
|
+
disabled: r,
|
|
1508
|
+
fontFamily: f,
|
|
1284
1509
|
fontSize: X,
|
|
1285
|
-
fontWeight:
|
|
1286
|
-
} = q(Y),
|
|
1287
|
-
const
|
|
1510
|
+
fontWeight: k
|
|
1511
|
+
} = q(Y), g = t(() => {
|
|
1512
|
+
const s = r.value ? "component-disabled" : "", T = N.value !== "b" ? "inline-block" : "block", L = B.value ? B.value : "#ffffff", D = S.value ? S.value : "#000000", C = x.value ? x.value : "#ffe54c", A = !b.value || b.value < 0 ? 0 : b.value, _ = [!1, !0].includes(i.value) ? i.value : !0, J = v.value ? v.value : "#ffffff", Q = p.value ? p.value : "#000000", U = !h.value || h.value < 86 ? 86 : h.value, Z = !m.value || m.value < 0 ? 1 : m.value, ee = !y.value || y.value < 0 ? 0.4 : y.value, te = f.value ? f.value : "'Lato', sans-serif", ae = X.value ? X.value : "1.6em", le = !k.value || k.value < 0 ? 200 : k.value;
|
|
1288
1513
|
return {
|
|
1289
|
-
disabled:
|
|
1290
|
-
display:
|
|
1291
|
-
buttonColor:
|
|
1292
|
-
buttonHoverColor:
|
|
1293
|
-
borderColor:
|
|
1294
|
-
showBorder:
|
|
1295
|
-
borderRadius:
|
|
1296
|
-
textColor:
|
|
1297
|
-
textHoverColor:
|
|
1298
|
-
width:
|
|
1299
|
-
paddingX:
|
|
1300
|
-
paddingY:
|
|
1301
|
-
font:
|
|
1302
|
-
fontSize:
|
|
1303
|
-
fontWeight:
|
|
1514
|
+
disabled: s,
|
|
1515
|
+
display: T,
|
|
1516
|
+
buttonColor: L,
|
|
1517
|
+
buttonHoverColor: D,
|
|
1518
|
+
borderColor: C,
|
|
1519
|
+
showBorder: _,
|
|
1520
|
+
borderRadius: A,
|
|
1521
|
+
textColor: J,
|
|
1522
|
+
textHoverColor: Q,
|
|
1523
|
+
width: U,
|
|
1524
|
+
paddingX: Z,
|
|
1525
|
+
paddingY: ee,
|
|
1526
|
+
font: te,
|
|
1527
|
+
fontSize: ae,
|
|
1528
|
+
fontWeight: le
|
|
1304
1529
|
};
|
|
1305
|
-
}),
|
|
1306
|
-
display:
|
|
1307
|
-
})),
|
|
1308
|
-
const
|
|
1530
|
+
}), d = t(() => g.value.disabled), n = t(() => ({
|
|
1531
|
+
display: g.value.display
|
|
1532
|
+
})), I = t(() => {
|
|
1533
|
+
const s = g.value, T = s.display === "block" ? "auto" : `${s.width}px`;
|
|
1309
1534
|
return {
|
|
1310
|
-
...
|
|
1311
|
-
borderRadius: `${
|
|
1312
|
-
background:
|
|
1535
|
+
...s.showBorder ? { border: `1px solid ${s.borderColor}` } : {},
|
|
1536
|
+
borderRadius: `${s.borderRadius}rem`,
|
|
1537
|
+
background: s.buttonColor,
|
|
1313
1538
|
minWidth: "33px",
|
|
1314
|
-
width:
|
|
1315
|
-
padding: `${
|
|
1539
|
+
width: T,
|
|
1540
|
+
padding: `${s.paddingY}rem ${s.paddingX}rem`,
|
|
1316
1541
|
lineHeight: "1.42857143",
|
|
1317
|
-
fontSize:
|
|
1318
|
-
fontWeight:
|
|
1542
|
+
fontSize: s.fontSize,
|
|
1543
|
+
fontWeight: s.fontWeight
|
|
1319
1544
|
};
|
|
1320
|
-
}),
|
|
1321
|
-
|
|
1545
|
+
}), u = t(() => g.value.font), l = t(() => g.value.textColor), a = t(() => g.value.textHoverColor), o = t(() => g.value.buttonHoverColor), $ = () => {
|
|
1546
|
+
H("clicked");
|
|
1322
1547
|
};
|
|
1323
|
-
return (
|
|
1548
|
+
return (s, T) => e.nbId ? (O(), E("div", {
|
|
1324
1549
|
key: 0,
|
|
1325
|
-
class:
|
|
1326
|
-
style:
|
|
1327
|
-
|
|
1550
|
+
class: R(["nb-wrapper", d.value]),
|
|
1551
|
+
style: w([n.value]),
|
|
1552
|
+
tabIndex: e.tabIndex,
|
|
1553
|
+
role: "button",
|
|
1554
|
+
"aria-label": e.ariaLabel,
|
|
1555
|
+
"aria-disabled": V(r),
|
|
1556
|
+
onClick: $,
|
|
1557
|
+
onKeydown: [
|
|
1558
|
+
T[0] || (T[0] = W((L) => !V(r) && e.hasTabIndexEnter && $(), ["enter"])),
|
|
1559
|
+
T[1] || (T[1] = W(F((L) => !V(r) && e.hasTabIndexSpace && $(), ["prevent"]), ["space"]))
|
|
1560
|
+
]
|
|
1328
1561
|
}, [
|
|
1329
|
-
|
|
1562
|
+
z("div", {
|
|
1330
1563
|
id: e.nbId,
|
|
1331
|
-
class:
|
|
1332
|
-
style:
|
|
1564
|
+
class: R(["nb-reset", "component"]),
|
|
1565
|
+
style: w([I.value])
|
|
1333
1566
|
}, [
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1567
|
+
z("div", Je, [
|
|
1568
|
+
K(s.$slots, "content", {}, () => [
|
|
1569
|
+
T[2] || (T[2] = M("Default Text"))
|
|
1337
1570
|
], !0)
|
|
1338
1571
|
]),
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1572
|
+
z("div", Qe, [
|
|
1573
|
+
K(s.$slots, "content", {}, () => [
|
|
1574
|
+
T[3] || (T[3] = M("Default Text"))
|
|
1342
1575
|
], !0)
|
|
1343
1576
|
])
|
|
1344
|
-
], 12,
|
|
1345
|
-
],
|
|
1577
|
+
], 12, Ge)
|
|
1578
|
+
], 46, qe)) : P("", !0);
|
|
1579
|
+
}
|
|
1580
|
+
}), Ze = /* @__PURE__ */ G(Ue, [["__scopeId", "data-v-b10ffc3e"]]);
|
|
1581
|
+
const et = ["tabIndex", "aria-label", "aria-disabled"], tt = ["id"], at = /* @__PURE__ */ Object.assign({
|
|
1582
|
+
name: "NbButtonBack",
|
|
1583
|
+
inheritAttrs: !1
|
|
1584
|
+
}, {
|
|
1585
|
+
__name: "NbButtonBack",
|
|
1586
|
+
props: {
|
|
1587
|
+
nbId: {
|
|
1588
|
+
type: String,
|
|
1589
|
+
required: !0
|
|
1590
|
+
},
|
|
1591
|
+
tabIndex: {
|
|
1592
|
+
type: Number,
|
|
1593
|
+
default: 0
|
|
1594
|
+
},
|
|
1595
|
+
hasTabIndexEnter: {
|
|
1596
|
+
type: Boolean,
|
|
1597
|
+
default: !0
|
|
1598
|
+
},
|
|
1599
|
+
hasTabIndexSpace: {
|
|
1600
|
+
type: Boolean,
|
|
1601
|
+
default: !0
|
|
1602
|
+
},
|
|
1603
|
+
ariaLabel: {
|
|
1604
|
+
type: String,
|
|
1605
|
+
default: "Alternate Text Button"
|
|
1606
|
+
},
|
|
1607
|
+
color: {
|
|
1608
|
+
type: String,
|
|
1609
|
+
default: "#477e99"
|
|
1610
|
+
},
|
|
1611
|
+
textColor: {
|
|
1612
|
+
type: String,
|
|
1613
|
+
default: "#77d2ff"
|
|
1614
|
+
},
|
|
1615
|
+
text: {
|
|
1616
|
+
type: String,
|
|
1617
|
+
default: "back"
|
|
1618
|
+
},
|
|
1619
|
+
disabled: {
|
|
1620
|
+
type: Boolean,
|
|
1621
|
+
default: !1,
|
|
1622
|
+
validator: (e) => typeof e == "boolean" && [!0, !1].includes(e)
|
|
1623
|
+
},
|
|
1624
|
+
fontFamily: {
|
|
1625
|
+
type: String,
|
|
1626
|
+
default: "'Lato', sans-serif"
|
|
1627
|
+
},
|
|
1628
|
+
fontSize: {
|
|
1629
|
+
type: String,
|
|
1630
|
+
default: "1.6em",
|
|
1631
|
+
validator: (e) => e || "1.6em"
|
|
1632
|
+
},
|
|
1633
|
+
fontWeight: {
|
|
1634
|
+
type: Number,
|
|
1635
|
+
default: 400,
|
|
1636
|
+
validator: (e) => e || 200
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1639
|
+
emits: ["clicked"],
|
|
1640
|
+
setup(e, { emit: c }) {
|
|
1641
|
+
j((g) => ({
|
|
1642
|
+
aa62e326: r.value,
|
|
1643
|
+
adaa07ba: y.value,
|
|
1644
|
+
40060860: m.value
|
|
1645
|
+
})), ne(() => {
|
|
1646
|
+
X();
|
|
1647
|
+
});
|
|
1648
|
+
const H = c, Y = e, {
|
|
1649
|
+
color: N,
|
|
1650
|
+
textColor: B,
|
|
1651
|
+
disabled: x,
|
|
1652
|
+
fontFamily: S,
|
|
1653
|
+
fontSize: i,
|
|
1654
|
+
fontWeight: b
|
|
1655
|
+
} = q(Y), v = t(() => {
|
|
1656
|
+
const g = x.value ? "component-disabled" : "", d = N.value ? N.value : "#77d2ff", n = B.value ? B.value : "#6dc1ec", I = S.value ? S.value : "'Lato', sans-serif", u = i.value ? i.value : "1.6em", l = !b.value || b.value < 0 ? 400 : b.value;
|
|
1657
|
+
return {
|
|
1658
|
+
color: d,
|
|
1659
|
+
textColor: n,
|
|
1660
|
+
font: I,
|
|
1661
|
+
fontSize: u,
|
|
1662
|
+
fontWeight: l,
|
|
1663
|
+
disabled: g
|
|
1664
|
+
};
|
|
1665
|
+
}), p = t(() => ({})), h = t(() => {
|
|
1666
|
+
const g = v.value;
|
|
1667
|
+
return {
|
|
1668
|
+
fontSize: g.fontSize,
|
|
1669
|
+
fontWeight: g.fontWeight
|
|
1670
|
+
};
|
|
1671
|
+
}), m = t(() => v.value.color), y = t(() => v.value.textColor), r = t(() => v.value.font), f = t(() => v.value.disabled), X = () => {
|
|
1672
|
+
}, k = () => {
|
|
1673
|
+
H("clicked");
|
|
1674
|
+
};
|
|
1675
|
+
return (g, d) => e.nbId ? (O(), E("div", {
|
|
1676
|
+
key: 0,
|
|
1677
|
+
class: R(["nb-wrapper", f.value]),
|
|
1678
|
+
style: w([p.value]),
|
|
1679
|
+
tabIndex: e.tabIndex,
|
|
1680
|
+
role: "button",
|
|
1681
|
+
"aria-label": e.ariaLabel,
|
|
1682
|
+
"aria-disabled": V(x),
|
|
1683
|
+
onClick: k,
|
|
1684
|
+
onKeydown: [
|
|
1685
|
+
d[0] || (d[0] = W((n) => !V(x) && e.hasTabIndexEnter && k(), ["enter"])),
|
|
1686
|
+
d[1] || (d[1] = W(F((n) => !V(x) && e.hasTabIndexSpace && k(), ["prevent"]), ["space"]))
|
|
1687
|
+
]
|
|
1688
|
+
}, [
|
|
1689
|
+
z("div", {
|
|
1690
|
+
id: e.nbId,
|
|
1691
|
+
class: R(["nb-reset", "component"]),
|
|
1692
|
+
style: w([h.value])
|
|
1693
|
+
}, [
|
|
1694
|
+
d[2] || (d[2] = z("svg", {
|
|
1695
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1696
|
+
width: "1em",
|
|
1697
|
+
height: "1em",
|
|
1698
|
+
viewBox: "0 0 16 16"
|
|
1699
|
+
}, [
|
|
1700
|
+
z("path", {
|
|
1701
|
+
d: "M14 8a.75.75 0 01-.75.75H4.56l1.22 1.22a.75.75 0 11-1.06 1.06l-2.5-2.5a.75.75 0 010-1.06l2.5-2.5a.75.75 0 111.06 1.06L4.56 7.25h8.69A.75.75 0 0114 8z",
|
|
1702
|
+
"clip-rule": "evenodd"
|
|
1703
|
+
})
|
|
1704
|
+
], -1)),
|
|
1705
|
+
z("span", null, be(e.text), 1)
|
|
1706
|
+
], 12, tt)
|
|
1707
|
+
], 46, et)) : P("", !0);
|
|
1346
1708
|
}
|
|
1347
|
-
}),
|
|
1348
|
-
NbButtonVavaGame:
|
|
1349
|
-
NbButtonShowHover:
|
|
1350
|
-
NbButtonPrevNext:
|
|
1351
|
-
NbButtonMechanical:
|
|
1352
|
-
NbButtonMechanical2:
|
|
1353
|
-
NbButtonHamburger:
|
|
1354
|
-
NbButtonColorOutside:
|
|
1355
|
-
NbButtonColorHover:
|
|
1356
|
-
NbButtonAlternateText:
|
|
1357
|
-
|
|
1709
|
+
}), lt = /* @__PURE__ */ G(at, [["__scopeId", "data-v-1df91d2a"]]), oe = {
|
|
1710
|
+
NbButtonVavaGame: me,
|
|
1711
|
+
NbButtonShowHover: Se,
|
|
1712
|
+
NbButtonPrevNext: $e,
|
|
1713
|
+
NbButtonMechanical: ke,
|
|
1714
|
+
NbButtonMechanical2: Xe,
|
|
1715
|
+
NbButtonHamburger: De,
|
|
1716
|
+
NbButtonColorOutside: Fe,
|
|
1717
|
+
NbButtonColorHover: je,
|
|
1718
|
+
NbButtonAlternateText: Ze,
|
|
1719
|
+
NbButtonBack: lt
|
|
1720
|
+
}, nt = {
|
|
1358
1721
|
install(e) {
|
|
1359
|
-
for (const
|
|
1360
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1361
|
-
const
|
|
1362
|
-
e.component(
|
|
1722
|
+
for (const c in oe)
|
|
1723
|
+
if (Object.prototype.hasOwnProperty.call(oe, c)) {
|
|
1724
|
+
const H = oe[c];
|
|
1725
|
+
e.component(H.name, H);
|
|
1363
1726
|
}
|
|
1364
1727
|
}
|
|
1365
1728
|
};
|
|
1366
1729
|
export {
|
|
1367
|
-
|
|
1730
|
+
nt as default
|
|
1368
1731
|
};
|