readytech-ui-library-v2 0.0.14 → 0.0.15
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.
@@ -1 +1 @@
|
|
1
|
-
.lv-button[data-v-ac3af47a]{border:one;background:red;padding:1rem}.class-input[data-v-f440ad26]{border:none;background:green;padding:1rem}.btn-primary[data-v-ce0d0f31]{background-color:#1976d2;color:#fff}.btn-primary[data-v-ce0d0f31]:hover{background-color:#1565c0}.btn-icon[data-v-ce0d0f31]{padding:0;width:48px;height:48px}.btn-disabled[data-v-ce0d0f31]{opacity:.6;pointer-events:none}
|
1
|
+
.lv-button[data-v-ac3af47a]{border:one;background:red;padding:1rem}.class-input[data-v-f440ad26]{border:none;background:green;padding:1rem}.btn-primary[data-v-ce0d0f31]{background-color:#1976d2;color:#fff}.btn-primary[data-v-ce0d0f31]:hover{background-color:#1565c0}.btn-icon[data-v-ce0d0f31]{padding:0;width:48px;height:48px}.btn-disabled[data-v-ce0d0f31]{opacity:.6;pointer-events:none}.v-badge[aria-label][data-v-02392152]:focus{outline:2px solid #005fcc;outline-offset:4px}.avatar-wrapper[data-v-0d49dde0]{display:flex;gap:16px;justify-content:space-around}.avatar[data-v-0d49dde0]{transition:transform .3s ease;outline:none}.avatar[data-v-0d49dde0]:focus{outline:2px solid #005fcc;outline-offset:4px}.avatar[data-v-0d49dde0]:hover{transform:scale(1.1)}.avatar img[data-v-0d49dde0]{border-radius:50%;object-fit:cover}.v-breadcrumbs-wrapper[data-v-5ccff043]{padding:8px}.v-breadcrumbs-wrapper .v-btn[data-v-5ccff043]{text-transform:none;font-size:14px}.v-breadcrumbs-wrapper span[data-v-5ccff043]{color:#0009;font-size:14px}
|
@@ -1,27 +1,27 @@
|
|
1
|
-
import { createElementBlock as
|
2
|
-
const
|
1
|
+
import { createElementBlock as g, openBlock as d, renderSlot as p, toDisplayString as f, resolveComponent as c, createBlock as _, mergeProps as k, normalizeClass as S, withCtx as i, createTextVNode as b, computed as v, createVNode as y } from "vue";
|
2
|
+
const s = (t, a) => {
|
3
3
|
const e = t.__vccOpts || t;
|
4
|
-
for (const [
|
5
|
-
e[
|
4
|
+
for (const [n, l] of a)
|
5
|
+
e[n] = l;
|
6
6
|
return e;
|
7
|
-
},
|
8
|
-
function
|
9
|
-
return
|
10
|
-
|
7
|
+
}, x = {}, h = { class: "lv-button" };
|
8
|
+
function C(t, a) {
|
9
|
+
return d(), g("button", h, [
|
10
|
+
p(t.$slots, "default", {}, void 0, !0)
|
11
11
|
]);
|
12
12
|
}
|
13
|
-
const
|
13
|
+
const R = /* @__PURE__ */ s(x, [["render", C], ["__scopeId", "data-v-ac3af47a"]]), I = {
|
14
14
|
name: "InputTaras",
|
15
15
|
props: {
|
16
16
|
prop: {
|
17
17
|
required: !0
|
18
18
|
}
|
19
19
|
}
|
20
|
-
},
|
21
|
-
function V(t, a, e, l, o
|
22
|
-
return
|
20
|
+
}, z = { class: "class-input" };
|
21
|
+
function V(t, a, e, n, l, o) {
|
22
|
+
return d(), g("h1", z, f(e.prop) + " taras", 1);
|
23
23
|
}
|
24
|
-
const
|
24
|
+
const N = /* @__PURE__ */ s(I, [["render", V], ["__scopeId", "data-v-f440ad26"]]), T = {
|
25
25
|
name: "RtText",
|
26
26
|
props: {
|
27
27
|
label: {
|
@@ -87,11 +87,11 @@ const I = /* @__PURE__ */ d(S, [["render", V], ["__scopeId", "data-v-f440ad26"]]
|
|
87
87
|
}
|
88
88
|
}
|
89
89
|
};
|
90
|
-
function
|
91
|
-
const
|
92
|
-
return
|
93
|
-
modelValue:
|
94
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
90
|
+
function A(t, a, e, n, l, o) {
|
91
|
+
const r = c("v-text-field");
|
92
|
+
return d(), _(r, k(o.inputProps, {
|
93
|
+
modelValue: o.inputValue,
|
94
|
+
"onUpdate:modelValue": a[0] || (a[0] = (m) => o.inputValue = m),
|
95
95
|
label: e.label,
|
96
96
|
placeholder: e.placeholder,
|
97
97
|
disabled: e.disabled,
|
@@ -101,10 +101,10 @@ function R(t, a, e, l, o, n) {
|
|
101
101
|
clearable: "",
|
102
102
|
hint: e.hint,
|
103
103
|
autocomplete: e.autocomplete,
|
104
|
-
"onClick:clear":
|
104
|
+
"onClick:clear": o.handleClear
|
105
105
|
}), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "error-messages", "prepend-icon", "hint", "autocomplete", "onClick:clear"]);
|
106
106
|
}
|
107
|
-
const
|
107
|
+
const L = /* @__PURE__ */ s(T, [["render", A], ["__scopeId", "data-v-33b97f38"]]), j = {
|
108
108
|
name: "RtButton",
|
109
109
|
props: {
|
110
110
|
// Button text label
|
@@ -212,24 +212,24 @@ const z = /* @__PURE__ */ d(T, [["render", R], ["__scopeId", "data-v-33b97f38"]]
|
|
212
212
|
setup(t, { emit: a }) {
|
213
213
|
const e = () => {
|
214
214
|
a("click");
|
215
|
-
},
|
215
|
+
}, n = v(() => t.primary ? "flat" : "outlined"), l = v(() => t.label || "Button"), o = v(() => ({
|
216
216
|
"btn-primary": t.primary,
|
217
217
|
"btn-icon": t.icon,
|
218
218
|
"btn-disabled": t.disabled
|
219
219
|
}));
|
220
220
|
return {
|
221
221
|
onClick: e,
|
222
|
-
variant:
|
223
|
-
ariaLabel:
|
224
|
-
buttonClasses:
|
222
|
+
variant: n,
|
223
|
+
ariaLabel: l,
|
224
|
+
buttonClasses: o
|
225
225
|
};
|
226
226
|
}
|
227
227
|
};
|
228
|
-
function
|
229
|
-
const
|
230
|
-
return
|
228
|
+
function O(t, a, e, n, l, o) {
|
229
|
+
const r = c("v-btn");
|
230
|
+
return d(), _(r, {
|
231
231
|
type: "button",
|
232
|
-
variant:
|
232
|
+
variant: n.variant,
|
233
233
|
size: e.size,
|
234
234
|
color: e.color,
|
235
235
|
icon: e.icon,
|
@@ -249,23 +249,328 @@ function M(t, a, e, l, o, n) {
|
|
249
249
|
exact: e.exact,
|
250
250
|
append: e.append,
|
251
251
|
"background-color": e.backgroundColor,
|
252
|
-
class:
|
253
|
-
onClick:
|
254
|
-
"aria-label":
|
252
|
+
class: S(n.buttonClasses),
|
253
|
+
onClick: n.onClick,
|
254
|
+
"aria-label": n.ariaLabel
|
255
255
|
}, {
|
256
|
-
default:
|
257
|
-
|
258
|
-
|
256
|
+
default: i(() => [
|
257
|
+
p(t.$slots, "default", {}, () => [
|
258
|
+
b(f(e.label), 1)
|
259
259
|
], !0)
|
260
260
|
]),
|
261
261
|
_: 3
|
262
262
|
}, 8, ["variant", "size", "color", "icon", "disabled", "loading", "outlined", "text", "tile", "depressed", "rounded", "block", "href", "target", "elevation", "to", "replace", "exact", "append", "background-color", "class", "onClick", "aria-label"]);
|
263
263
|
}
|
264
|
-
const
|
264
|
+
const B = /* @__PURE__ */ s(j, [["render", O], ["__scopeId", "data-v-ce0d0f31"]]), P = {
|
265
|
+
name: "RtBadge",
|
266
|
+
props: {
|
267
|
+
value: {
|
268
|
+
type: [String, Number],
|
269
|
+
default: 0
|
270
|
+
},
|
271
|
+
color: {
|
272
|
+
type: String,
|
273
|
+
default: "red"
|
274
|
+
},
|
275
|
+
dot: {
|
276
|
+
type: Boolean,
|
277
|
+
default: !1
|
278
|
+
},
|
279
|
+
overlap: {
|
280
|
+
type: Boolean,
|
281
|
+
default: !1
|
282
|
+
},
|
283
|
+
content: {
|
284
|
+
type: String,
|
285
|
+
default: ""
|
286
|
+
},
|
287
|
+
size: {
|
288
|
+
type: [String, Number],
|
289
|
+
default: "20"
|
290
|
+
},
|
291
|
+
bottom: {
|
292
|
+
type: Boolean,
|
293
|
+
default: !1
|
294
|
+
},
|
295
|
+
top: {
|
296
|
+
type: Boolean,
|
297
|
+
default: !1
|
298
|
+
}
|
299
|
+
},
|
300
|
+
computed: {
|
301
|
+
getAriaLabel() {
|
302
|
+
return this.dot ? "Notification dot" : this.content ? `Badge content: ${this.content}` : this.value ? `Badge value: ${this.value}` : "Badge";
|
303
|
+
}
|
304
|
+
}
|
305
|
+
};
|
306
|
+
function q(t, a, e, n, l, o) {
|
307
|
+
const r = c("v-badge");
|
308
|
+
return d(), _(r, {
|
309
|
+
value: e.value,
|
310
|
+
color: e.color,
|
311
|
+
dot: e.dot,
|
312
|
+
overlap: e.overlap,
|
313
|
+
content: e.content,
|
314
|
+
size: e.size,
|
315
|
+
bottom: e.bottom,
|
316
|
+
top: e.top,
|
317
|
+
role: "status",
|
318
|
+
"aria-label": o.getAriaLabel,
|
319
|
+
"aria-live": e.dot ? "polite" : "off",
|
320
|
+
tabindex: "0"
|
321
|
+
}, {
|
322
|
+
default: i(() => [
|
323
|
+
p(t.$slots, "default", {}, void 0, !0)
|
324
|
+
]),
|
325
|
+
_: 3
|
326
|
+
}, 8, ["value", "color", "dot", "overlap", "content", "size", "bottom", "top", "aria-label", "aria-live"]);
|
327
|
+
}
|
328
|
+
const w = /* @__PURE__ */ s(P, [["render", q], ["__scopeId", "data-v-02392152"]]), M = {
|
329
|
+
name: "RtSnackbar",
|
330
|
+
props: {
|
331
|
+
message: {
|
332
|
+
type: String,
|
333
|
+
default: "Hello, I'm a snackbar!"
|
334
|
+
},
|
335
|
+
timeout: {
|
336
|
+
type: Number,
|
337
|
+
default: 6e3
|
338
|
+
},
|
339
|
+
buttonText: {
|
340
|
+
type: String,
|
341
|
+
default: "Open Snackbar"
|
342
|
+
},
|
343
|
+
buttonColor: {
|
344
|
+
type: String,
|
345
|
+
default: "primary"
|
346
|
+
},
|
347
|
+
snackbarColor: {
|
348
|
+
type: String,
|
349
|
+
default: ""
|
350
|
+
},
|
351
|
+
actionButtonText: {
|
352
|
+
type: String,
|
353
|
+
default: "Close"
|
354
|
+
},
|
355
|
+
actionButtonColor: {
|
356
|
+
type: String,
|
357
|
+
default: "pink"
|
358
|
+
}
|
359
|
+
},
|
360
|
+
data() {
|
361
|
+
return {
|
362
|
+
snackbar: !1
|
363
|
+
};
|
364
|
+
}
|
365
|
+
}, U = { class: "text-center ma-2" };
|
366
|
+
function D(t, a, e, n, l, o) {
|
367
|
+
const r = c("v-btn"), m = c("v-snackbar");
|
368
|
+
return d(), g("div", U, [
|
369
|
+
y(r, {
|
370
|
+
color: e.buttonColor,
|
371
|
+
onClick: a[0] || (a[0] = (u) => l.snackbar = !0)
|
372
|
+
}, {
|
373
|
+
default: i(() => [
|
374
|
+
b(f(e.buttonText), 1)
|
375
|
+
]),
|
376
|
+
_: 1
|
377
|
+
}, 8, ["color"]),
|
378
|
+
y(m, {
|
379
|
+
modelValue: l.snackbar,
|
380
|
+
"onUpdate:modelValue": a[2] || (a[2] = (u) => l.snackbar = u),
|
381
|
+
timeout: e.timeout,
|
382
|
+
color: e.snackbarColor
|
383
|
+
}, {
|
384
|
+
actions: i(() => [
|
385
|
+
y(r, {
|
386
|
+
color: e.actionButtonColor,
|
387
|
+
variant: "text",
|
388
|
+
onClick: a[1] || (a[1] = (u) => l.snackbar = !1)
|
389
|
+
}, {
|
390
|
+
default: i(() => [
|
391
|
+
b(f(e.actionButtonText), 1)
|
392
|
+
]),
|
393
|
+
_: 1
|
394
|
+
}, 8, ["color"])
|
395
|
+
]),
|
396
|
+
default: i(() => [
|
397
|
+
b(f(e.message) + " ", 1)
|
398
|
+
]),
|
399
|
+
_: 1
|
400
|
+
}, 8, ["modelValue", "timeout", "color"])
|
401
|
+
]);
|
402
|
+
}
|
403
|
+
const H = /* @__PURE__ */ s(M, [["render", D], ["__scopeId", "data-v-75ce5462"]]), E = {
|
404
|
+
name: "RtImage",
|
405
|
+
props: {
|
406
|
+
src: {
|
407
|
+
type: String,
|
408
|
+
required: !0
|
409
|
+
},
|
410
|
+
alt: {
|
411
|
+
type: String,
|
412
|
+
required: !0
|
413
|
+
},
|
414
|
+
lazySrc: {
|
415
|
+
type: String,
|
416
|
+
default: ""
|
417
|
+
},
|
418
|
+
aspectRatio: {
|
419
|
+
type: [Number, String],
|
420
|
+
default: null
|
421
|
+
},
|
422
|
+
gradient: {
|
423
|
+
type: String,
|
424
|
+
default: ""
|
425
|
+
},
|
426
|
+
loading: {
|
427
|
+
type: String,
|
428
|
+
default: "lazy",
|
429
|
+
// Options: 'lazy', 'eager'
|
430
|
+
validator: (t) => ["lazy", "eager"].includes(t)
|
431
|
+
},
|
432
|
+
transition: {
|
433
|
+
type: String,
|
434
|
+
default: "fade-transition"
|
435
|
+
},
|
436
|
+
classes: {
|
437
|
+
type: [String, Array, Object],
|
438
|
+
default: () => ""
|
439
|
+
}
|
440
|
+
}
|
441
|
+
};
|
442
|
+
function F(t, a, e, n, l, o) {
|
443
|
+
const r = c("v-img");
|
444
|
+
return d(), _(r, {
|
445
|
+
src: e.src,
|
446
|
+
alt: e.alt,
|
447
|
+
"lazy-src": e.lazySrc,
|
448
|
+
"aspect-ratio": e.aspectRatio,
|
449
|
+
gradient: e.gradient,
|
450
|
+
loading: e.loading,
|
451
|
+
transition: e.transition,
|
452
|
+
class: S(e.classes)
|
453
|
+
}, {
|
454
|
+
placeholder: i(() => [
|
455
|
+
p(t.$slots, "placeholder", {}, () => [
|
456
|
+
a[0] || (a[0] = b("Loading..."))
|
457
|
+
], !0)
|
458
|
+
]),
|
459
|
+
default: i(() => [
|
460
|
+
p(t.$slots, "default", {}, void 0, !0)
|
461
|
+
]),
|
462
|
+
_: 3
|
463
|
+
}, 8, ["src", "alt", "lazy-src", "aspect-ratio", "gradient", "loading", "transition", "class"]);
|
464
|
+
}
|
465
|
+
const G = /* @__PURE__ */ s(E, [["render", F], ["__scopeId", "data-v-f3ff4550"]]), J = {
|
466
|
+
name: "RtAvatar",
|
467
|
+
components: {
|
468
|
+
RtImage: G
|
469
|
+
},
|
470
|
+
props: {
|
471
|
+
avatarImage: {
|
472
|
+
type: String,
|
473
|
+
default: "https://randomuser.me/api/portraits/men/32.jpg"
|
474
|
+
},
|
475
|
+
alt: {
|
476
|
+
type: String,
|
477
|
+
default: "Alt"
|
478
|
+
},
|
479
|
+
ariaLabel: {
|
480
|
+
type: String,
|
481
|
+
default: "Aria Label"
|
482
|
+
},
|
483
|
+
name: {
|
484
|
+
type: String,
|
485
|
+
default: "Name"
|
486
|
+
},
|
487
|
+
size: {
|
488
|
+
type: Number,
|
489
|
+
default: 50
|
490
|
+
},
|
491
|
+
rounded: {
|
492
|
+
type: Number,
|
493
|
+
default: 1
|
494
|
+
}
|
495
|
+
},
|
496
|
+
computed: {
|
497
|
+
initials() {
|
498
|
+
return this.name ? this.name.split(" ").map((t) => t[0]).join("").toUpperCase() : "";
|
499
|
+
}
|
500
|
+
}
|
501
|
+
}, K = { class: "avatar-wrapper" }, Q = {
|
502
|
+
key: 1,
|
503
|
+
class: "initials"
|
504
|
+
};
|
505
|
+
function W(t, a, e, n, l, o) {
|
506
|
+
const r = c("RtImage"), m = c("v-avatar");
|
507
|
+
return d(), g("div", K, [
|
508
|
+
y(m, {
|
509
|
+
size: e.size,
|
510
|
+
class: "avatar",
|
511
|
+
rounded: e.rounded,
|
512
|
+
tabindex: "0",
|
513
|
+
role: "img",
|
514
|
+
"aria-label": e.ariaLabel
|
515
|
+
}, {
|
516
|
+
default: i(() => [
|
517
|
+
e.avatarImage ? (d(), _(r, {
|
518
|
+
key: 0,
|
519
|
+
src: e.avatarImage,
|
520
|
+
alt: e.alt
|
521
|
+
}, null, 8, ["src", "alt"])) : (d(), g("span", Q, f(o.initials), 1))
|
522
|
+
]),
|
523
|
+
_: 1
|
524
|
+
}, 8, ["size", "rounded", "aria-label"])
|
525
|
+
]);
|
526
|
+
}
|
527
|
+
const X = /* @__PURE__ */ s(J, [["render", W], ["__scopeId", "data-v-0d49dde0"]]), Y = {
|
528
|
+
name: "RtBreadcrumbs",
|
529
|
+
components: {
|
530
|
+
RtButton: B
|
531
|
+
},
|
532
|
+
props: {
|
533
|
+
items: {
|
534
|
+
type: Array,
|
535
|
+
default: () => [
|
536
|
+
{ text: "Home", to: "/" },
|
537
|
+
{ text: "Products", to: "/products" },
|
538
|
+
{ text: "Details", to: null }
|
539
|
+
]
|
540
|
+
},
|
541
|
+
divider: {
|
542
|
+
type: String,
|
543
|
+
default: "/"
|
544
|
+
}
|
545
|
+
}
|
546
|
+
}, Z = { key: 1 };
|
547
|
+
function $(t, a, e, n, l, o) {
|
548
|
+
const r = c("RtButton"), m = c("v-breadcrumbs");
|
549
|
+
return d(), _(m, {
|
550
|
+
class: "v-breadcrumbs-wrapper",
|
551
|
+
divider: e.divider,
|
552
|
+
items: e.items
|
553
|
+
}, {
|
554
|
+
item: i(({ item: u }) => [
|
555
|
+
u.to ? (d(), _(r, {
|
556
|
+
key: 0,
|
557
|
+
to: u.to,
|
558
|
+
text: ""
|
559
|
+
}, {
|
560
|
+
default: i(() => [
|
561
|
+
b(f(u.text), 1)
|
562
|
+
]),
|
563
|
+
_: 2
|
564
|
+
}, 1032, ["to"])) : (d(), g("span", Z, f(u.text), 1))
|
565
|
+
]),
|
566
|
+
_: 1
|
567
|
+
}, 8, ["divider", "items"]);
|
568
|
+
}
|
569
|
+
const ee = /* @__PURE__ */ s(Y, [["render", $], ["__scopeId", "data-v-5ccff043"]]), ae = {
|
265
570
|
install: (t, a) => {
|
266
|
-
t.component("LearnVueButton",
|
571
|
+
t.component("LearnVueButton", R), t.component("InputTaras", N), t.component("RtText", L), t.component("RtButton", B), t.component("RtBadge", w), t.component("RtSnackbar", H), t.component("RtAvatar", X), t.component("RtBreadcrumbs", ee);
|
267
572
|
}
|
268
573
|
};
|
269
574
|
export {
|
270
|
-
|
575
|
+
ae as default
|
271
576
|
};
|
@@ -1 +1 @@
|
|
1
|
-
(function(
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("vue")):typeof define=="function"&&define.amd?define(["vue"],i):(e=typeof globalThis<"u"?globalThis:e||self,e["readytech-ui-library-v2"]=i(e.Vue))})(this,function(e){"use strict";const i=(a,n)=>{const t=a.__vccOpts||a;for(const[o,l]of n)t[o]=l;return t},f={},m={class:"lv-button"};function p(a,n){return e.openBlock(),e.createElementBlock("button",m,[e.renderSlot(a.$slots,"default",{},void 0,!0)])}const _=i(f,[["render",p],["__scopeId","data-v-ac3af47a"]]),g={name:"InputTaras",props:{prop:{required:!0}}},b={class:"class-input"};function y(a,n,t,o,l,r){return e.openBlock(),e.createElementBlock("h1",b,e.toDisplayString(t.prop)+" taras",1)}const B=i(g,[["render",y],["__scopeId","data-v-f440ad26"]]),k={name:"RtText",props:{label:{type:String,default:"Input Field"},hint:{type:String,default:""},placeholder:{type:String,default:""},modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessages:{type:[String,Array],default:()=>[]},prependIcon:{type:String,default:""},clearable:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"}},computed:{inputValue:{get(){return this.modelValue},set(a){this.$emit("update:modelValue",a)}},inputProps(){return{...this.$props}}},methods:{handleClear(){this.$emit("clear")}}};function S(a,n,t,o,l,r){const d=e.resolveComponent("v-text-field");return e.openBlock(),e.createBlock(d,e.mergeProps(r.inputProps,{modelValue:r.inputValue,"onUpdate:modelValue":n[0]||(n[0]=s=>r.inputValue=s),label:t.label,placeholder:t.placeholder,disabled:t.disabled,error:t.error,"error-messages":t.errorMessages,"prepend-icon":t.prependIcon,clearable:"",hint:t.hint,autocomplete:t.autocomplete,"onClick:clear":r.handleClear}),null,16,["modelValue","label","placeholder","disabled","error","error-messages","prepend-icon","hint","autocomplete","onClick:clear"])}const x=i(k,[["render",S],["__scopeId","data-v-33b97f38"]]),h={name:"RtButton",props:{label:{type:String,default:"Click Me"},primary:{type:Boolean,default:!1},size:{type:String,default:"default",validator:a=>["x-small","small","default","large","x-large"].includes(a)},color:{type:String,default:"primary"},backgroundColor:{type:String},icon:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},text:{type:String,default:""},tile:{type:Boolean,default:!1},depressed:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},block:{type:Boolean,default:!1},href:{type:String,default:""},target:{type:String,default:"_self"},to:{type:[String,Object],default:null},replace:{type:Boolean,default:!1},exact:{type:Boolean,default:!1},append:{type:Boolean,default:!1},elevation:{type:[Number,String],default:2}},emits:["click"],setup(a,{emit:n}){const t=()=>{n("click")},o=e.computed(()=>a.primary?"flat":"outlined"),l=e.computed(()=>a.label||"Button"),r=e.computed(()=>({"btn-primary":a.primary,"btn-icon":a.icon,"btn-disabled":a.disabled}));return{onClick:t,variant:o,ariaLabel:l,buttonClasses:r}}};function C(a,n,t,o,l,r){const d=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(d,{type:"button",variant:o.variant,size:t.size,color:t.color,icon:t.icon,disabled:t.disabled,loading:t.loading,outlined:t.outlined,text:t.text,tile:t.tile,depressed:t.depressed,rounded:t.rounded,block:t.block,href:t.href,target:t.target,elevation:t.elevation,to:t.to,replace:t.replace,exact:t.exact,append:t.append,"background-color":t.backgroundColor,class:e.normalizeClass(o.buttonClasses),onClick:o.onClick,"aria-label":o.ariaLabel},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)]),_:3},8,["variant","size","color","icon","disabled","loading","outlined","text","tile","depressed","rounded","block","href","target","elevation","to","replace","exact","append","background-color","class","onClick","aria-label"])}const u=i(h,[["render",C],["__scopeId","data-v-ce0d0f31"]]),R={name:"RtBadge",props:{value:{type:[String,Number],default:0},color:{type:String,default:"red"},dot:{type:Boolean,default:!1},overlap:{type:Boolean,default:!1},content:{type:String,default:""},size:{type:[String,Number],default:"20"},bottom:{type:Boolean,default:!1},top:{type:Boolean,default:!1}},computed:{getAriaLabel(){return this.dot?"Notification dot":this.content?`Badge content: ${this.content}`:this.value?`Badge value: ${this.value}`:"Badge"}}};function V(a,n,t,o,l,r){const d=e.resolveComponent("v-badge");return e.openBlock(),e.createBlock(d,{value:t.value,color:t.color,dot:t.dot,overlap:t.overlap,content:t.content,size:t.size,bottom:t.bottom,top:t.top,role:"status","aria-label":r.getAriaLabel,"aria-live":t.dot?"polite":"off",tabindex:"0"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},void 0,!0)]),_:3},8,["value","color","dot","overlap","content","size","bottom","top","aria-label","aria-live"])}const I=i(R,[["render",V],["__scopeId","data-v-02392152"]]),z={name:"RtSnackbar",props:{message:{type:String,default:"Hello, I'm a snackbar!"},timeout:{type:Number,default:6e3},buttonText:{type:String,default:"Open Snackbar"},buttonColor:{type:String,default:"primary"},snackbarColor:{type:String,default:""},actionButtonText:{type:String,default:"Close"},actionButtonColor:{type:String,default:"pink"}},data(){return{snackbar:!1}}},N={class:"text-center ma-2"};function T(a,n,t,o,l,r){const d=e.resolveComponent("v-btn"),s=e.resolveComponent("v-snackbar");return e.openBlock(),e.createElementBlock("div",N,[e.createVNode(d,{color:t.buttonColor,onClick:n[0]||(n[0]=c=>l.snackbar=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonText),1)]),_:1},8,["color"]),e.createVNode(s,{modelValue:l.snackbar,"onUpdate:modelValue":n[2]||(n[2]=c=>l.snackbar=c),timeout:t.timeout,color:t.snackbarColor},{actions:e.withCtx(()=>[e.createVNode(d,{color:t.actionButtonColor,variant:"text",onClick:n[1]||(n[1]=c=>l.snackbar=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.actionButtonText),1)]),_:1},8,["color"])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message)+" ",1)]),_:1},8,["modelValue","timeout","color"])])}const w=i(z,[["render",T],["__scopeId","data-v-75ce5462"]]),A={name:"RtImage",props:{src:{type:String,required:!0},alt:{type:String,required:!0},lazySrc:{type:String,default:""},aspectRatio:{type:[Number,String],default:null},gradient:{type:String,default:""},loading:{type:String,default:"lazy",validator:a=>["lazy","eager"].includes(a)},transition:{type:String,default:"fade-transition"},classes:{type:[String,Array,Object],default:()=>""}}};function L(a,n,t,o,l,r){const d=e.resolveComponent("v-img");return e.openBlock(),e.createBlock(d,{src:t.src,alt:t.alt,"lazy-src":t.lazySrc,"aspect-ratio":t.aspectRatio,gradient:t.gradient,loading:t.loading,transition:t.transition,class:e.normalizeClass(t.classes)},{placeholder:e.withCtx(()=>[e.renderSlot(a.$slots,"placeholder",{},()=>[n[0]||(n[0]=e.createTextVNode("Loading..."))],!0)]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},void 0,!0)]),_:3},8,["src","alt","lazy-src","aspect-ratio","gradient","loading","transition","class"])}const v={name:"RtAvatar",components:{RtImage:i(A,[["render",L],["__scopeId","data-v-f3ff4550"]])},props:{avatarImage:{type:String,default:"https://randomuser.me/api/portraits/men/32.jpg"},alt:{type:String,default:"Alt"},ariaLabel:{type:String,default:"Aria Label"},name:{type:String,default:"Name"},size:{type:Number,default:50},rounded:{type:Number,default:1}},computed:{initials(){return this.name?this.name.split(" ").map(a=>a[0]).join("").toUpperCase():""}}},D={class:"avatar-wrapper"},E={key:1,class:"initials"};function j(a,n,t,o,l,r){const d=e.resolveComponent("RtImage"),s=e.resolveComponent("v-avatar");return e.openBlock(),e.createElementBlock("div",D,[e.createVNode(s,{size:t.size,class:"avatar",rounded:t.rounded,tabindex:"0",role:"img","aria-label":t.ariaLabel},{default:e.withCtx(()=>[t.avatarImage?(e.openBlock(),e.createBlock(d,{key:0,src:t.avatarImage,alt:t.alt},null,8,["src","alt"])):(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(r.initials),1))]),_:1},8,["size","rounded","aria-label"])])}const q=i(v,[["render",j],["__scopeId","data-v-0d49dde0"]]),O={name:"RtBreadcrumbs",components:{RtButton:u},props:{items:{type:Array,default:()=>[{text:"Home",to:"/"},{text:"Products",to:"/products"},{text:"Details",to:null}]},divider:{type:String,default:"/"}}},P={key:1};function M(a,n,t,o,l,r){const d=e.resolveComponent("RtButton"),s=e.resolveComponent("v-breadcrumbs");return e.openBlock(),e.createBlock(s,{class:"v-breadcrumbs-wrapper",divider:t.divider,items:t.items},{item:e.withCtx(({item:c})=>[c.to?(e.openBlock(),e.createBlock(d,{key:0,to:c.to,text:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.text),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(c.text),1))]),_:1},8,["divider","items"])}const U=i(O,[["render",M],["__scopeId","data-v-5ccff043"]]);return{install:(a,n)=>{a.component("LearnVueButton",_),a.component("InputTaras",B),a.component("RtText",x),a.component("RtButton",u),a.component("RtBadge",I),a.component("RtSnackbar",w),a.component("RtAvatar",q),a.component("RtBreadcrumbs",U)}}});
|