readytech-ui-library-v2 0.0.14 → 0.0.16

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}.v-alert__close[data-v-bae3eb1c]{height:28px;width:28px}.v-alert[data-v-bae3eb1c]:focus{outline:2px solid var(--alert-focus-color, #005fcc);outline-offset:4px}[v-alert][type=error][data-v-bae3eb1c]{background-color:#ffe6e6;border-color:#c00;color:#c00}[v-alert][type=success][data-v-bae3eb1c]{background-color:#e6ffe6;border-color:green;color:green}[v-alert][dense] .alert-content[data-v-bae3eb1c]{line-height:1.4;font-size:.875rem}
@@ -1,27 +1,27 @@
1
- import { createElementBlock as u, openBlock as r, renderSlot as s, toDisplayString as f, resolveComponent as p, createBlock as m, mergeProps as _, normalizeClass as y, withCtx as g, createTextVNode as h, computed as i } from "vue";
2
- const d = (t, a) => {
1
+ import { createElementBlock as g, openBlock as i, renderSlot as y, toDisplayString as m, resolveComponent as c, createBlock as u, mergeProps as x, normalizeClass as S, withCtx as d, createTextVNode as b, computed as v, createVNode as p, createCommentVNode as B, createElementVNode as k } from "vue";
2
+ const s = (t, a) => {
3
3
  const e = t.__vccOpts || t;
4
- for (const [l, o] of a)
5
- e[l] = o;
4
+ for (const [l, r] of a)
5
+ e[l] = r;
6
6
  return e;
7
- }, B = {}, x = { class: "lv-button" };
8
- function k(t, a) {
9
- return r(), u("button", x, [
10
- s(t.$slots, "default", {}, void 0, !0)
7
+ }, R = {}, C = { class: "lv-button" };
8
+ function I(t, a) {
9
+ return i(), g("button", C, [
10
+ y(t.$slots, "default", {}, void 0, !0)
11
11
  ]);
12
12
  }
13
- const v = /* @__PURE__ */ d(B, [["render", k], ["__scopeId", "data-v-ac3af47a"]]), S = {
13
+ const z = /* @__PURE__ */ s(R, [["render", I], ["__scopeId", "data-v-ac3af47a"]]), V = {
14
14
  name: "InputTaras",
15
15
  props: {
16
16
  prop: {
17
17
  required: !0
18
18
  }
19
19
  }
20
- }, C = { class: "class-input" };
21
- function V(t, a, e, l, o, n) {
22
- return r(), u("h1", C, f(e.prop) + " taras", 1);
20
+ }, A = { class: "class-input" };
21
+ function N(t, a, e, l, r, n) {
22
+ return i(), g("h1", A, m(e.prop) + " taras", 1);
23
23
  }
24
- const I = /* @__PURE__ */ d(S, [["render", V], ["__scopeId", "data-v-f440ad26"]]), T = {
24
+ const L = /* @__PURE__ */ s(V, [["render", N], ["__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 R(t, a, e, l, o, n) {
91
- const c = p("v-text-field");
92
- return r(), m(c, _(n.inputProps, {
90
+ function w(t, a, e, l, r, n) {
91
+ const o = c("v-text-field");
92
+ return i(), u(o, x(n.inputProps, {
93
93
  modelValue: n.inputValue,
94
- "onUpdate:modelValue": a[0] || (a[0] = (b) => n.inputValue = b),
94
+ "onUpdate:modelValue": a[0] || (a[0] = (f) => n.inputValue = f),
95
95
  label: e.label,
96
96
  placeholder: e.placeholder,
97
97
  disabled: e.disabled,
@@ -104,7 +104,7 @@ function R(t, a, e, l, o, n) {
104
104
  "onClick:clear": n.handleClear
105
105
  }), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "error-messages", "prepend-icon", "hint", "autocomplete", "onClick:clear"]);
106
106
  }
107
- const z = /* @__PURE__ */ d(T, [["render", R], ["__scopeId", "data-v-33b97f38"]]), L = {
107
+ const j = /* @__PURE__ */ s(T, [["render", w], ["__scopeId", "data-v-33b97f38"]]), q = {
108
108
  name: "RtButton",
109
109
  props: {
110
110
  // Button text label
@@ -212,7 +212,7 @@ 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
- }, l = i(() => t.primary ? "flat" : "outlined"), o = i(() => t.label || "Button"), n = i(() => ({
215
+ }, l = v(() => t.primary ? "flat" : "outlined"), r = v(() => t.label || "Button"), n = v(() => ({
216
216
  "btn-primary": t.primary,
217
217
  "btn-icon": t.icon,
218
218
  "btn-disabled": t.disabled
@@ -220,14 +220,14 @@ const z = /* @__PURE__ */ d(T, [["render", R], ["__scopeId", "data-v-33b97f38"]]
220
220
  return {
221
221
  onClick: e,
222
222
  variant: l,
223
- ariaLabel: o,
223
+ ariaLabel: r,
224
224
  buttonClasses: n
225
225
  };
226
226
  }
227
227
  };
228
- function M(t, a, e, l, o, n) {
229
- const c = p("v-btn");
230
- return r(), m(c, {
228
+ function O(t, a, e, l, r, n) {
229
+ const o = c("v-btn");
230
+ return i(), u(o, {
231
231
  type: "button",
232
232
  variant: l.variant,
233
233
  size: e.size,
@@ -249,23 +249,459 @@ 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: y(l.buttonClasses),
252
+ class: S(l.buttonClasses),
253
253
  onClick: l.onClick,
254
254
  "aria-label": l.ariaLabel
255
255
  }, {
256
- default: g(() => [
257
- s(t.$slots, "default", {}, () => [
258
- h(f(e.label), 1)
256
+ default: d(() => [
257
+ y(t.$slots, "default", {}, () => [
258
+ b(m(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 N = /* @__PURE__ */ d(L, [["render", M], ["__scopeId", "data-v-ce0d0f31"]]), O = {
264
+ const h = /* @__PURE__ */ s(q, [["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 M(t, a, e, l, r, n) {
307
+ const o = c("v-badge");
308
+ return i(), u(o, {
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": n.getAriaLabel,
319
+ "aria-live": e.dot ? "polite" : "off",
320
+ tabindex: "0"
321
+ }, {
322
+ default: d(() => [
323
+ y(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 U = /* @__PURE__ */ s(P, [["render", M], ["__scopeId", "data-v-02392152"]]), D = {
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
+ }, E = { class: "text-center ma-2" };
366
+ function H(t, a, e, l, r, n) {
367
+ const o = c("v-btn"), f = c("v-snackbar");
368
+ return i(), g("div", E, [
369
+ p(o, {
370
+ color: e.buttonColor,
371
+ onClick: a[0] || (a[0] = (_) => r.snackbar = !0)
372
+ }, {
373
+ default: d(() => [
374
+ b(m(e.buttonText), 1)
375
+ ]),
376
+ _: 1
377
+ }, 8, ["color"]),
378
+ p(f, {
379
+ modelValue: r.snackbar,
380
+ "onUpdate:modelValue": a[2] || (a[2] = (_) => r.snackbar = _),
381
+ timeout: e.timeout,
382
+ color: e.snackbarColor
383
+ }, {
384
+ actions: d(() => [
385
+ p(o, {
386
+ color: e.actionButtonColor,
387
+ variant: "text",
388
+ onClick: a[1] || (a[1] = (_) => r.snackbar = !1)
389
+ }, {
390
+ default: d(() => [
391
+ b(m(e.actionButtonText), 1)
392
+ ]),
393
+ _: 1
394
+ }, 8, ["color"])
395
+ ]),
396
+ default: d(() => [
397
+ b(m(e.message) + " ", 1)
398
+ ]),
399
+ _: 1
400
+ }, 8, ["modelValue", "timeout", "color"])
401
+ ]);
402
+ }
403
+ const F = /* @__PURE__ */ s(D, [["render", H], ["__scopeId", "data-v-75ce5462"]]), G = {
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 J(t, a, e, l, r, n) {
443
+ const o = c("v-img");
444
+ return i(), u(o, {
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: d(() => [
455
+ y(t.$slots, "placeholder", {}, () => [
456
+ a[0] || (a[0] = b("Loading..."))
457
+ ], !0)
458
+ ]),
459
+ default: d(() => [
460
+ y(t.$slots, "default", {}, void 0, !0)
461
+ ]),
462
+ _: 3
463
+ }, 8, ["src", "alt", "lazy-src", "aspect-ratio", "gradient", "loading", "transition", "class"]);
464
+ }
465
+ const K = /* @__PURE__ */ s(G, [["render", J], ["__scopeId", "data-v-f3ff4550"]]), Q = {
466
+ name: "RtAvatar",
467
+ components: {
468
+ RtImage: K
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
+ }, W = { class: "avatar-wrapper" }, X = {
502
+ key: 1,
503
+ class: "initials"
504
+ };
505
+ function Y(t, a, e, l, r, n) {
506
+ const o = c("RtImage"), f = c("v-avatar");
507
+ return i(), g("div", W, [
508
+ p(f, {
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: d(() => [
517
+ e.avatarImage ? (i(), u(o, {
518
+ key: 0,
519
+ src: e.avatarImage,
520
+ alt: e.alt
521
+ }, null, 8, ["src", "alt"])) : (i(), g("span", X, m(n.initials), 1))
522
+ ]),
523
+ _: 1
524
+ }, 8, ["size", "rounded", "aria-label"])
525
+ ]);
526
+ }
527
+ const Z = /* @__PURE__ */ s(Q, [["render", Y], ["__scopeId", "data-v-0d49dde0"]]), $ = {
528
+ name: "RtBreadcrumbs",
529
+ components: {
530
+ RtButton: h
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
+ }, ee = { key: 1 };
547
+ function te(t, a, e, l, r, n) {
548
+ const o = c("RtButton"), f = c("v-breadcrumbs");
549
+ return i(), u(f, {
550
+ class: "v-breadcrumbs-wrapper",
551
+ divider: e.divider,
552
+ items: e.items
553
+ }, {
554
+ item: d(({ item: _ }) => [
555
+ _.to ? (i(), u(o, {
556
+ key: 0,
557
+ to: _.to,
558
+ text: ""
559
+ }, {
560
+ default: d(() => [
561
+ b(m(_.text), 1)
562
+ ]),
563
+ _: 2
564
+ }, 1032, ["to"])) : (i(), g("span", ee, m(_.text), 1))
565
+ ]),
566
+ _: 1
567
+ }, 8, ["divider", "items"]);
568
+ }
569
+ const ae = /* @__PURE__ */ s($, [["render", te], ["__scopeId", "data-v-5ccff043"]]), ne = {
570
+ name: "RtIcon",
571
+ props: {
572
+ // Icon name to display (e.g., 'mdi-home')
573
+ icon: {
574
+ type: String,
575
+ required: !0
576
+ },
577
+ // Optional size for the icon (e.g., '24', '36', '48', etc.)
578
+ size: {
579
+ type: String,
580
+ default: "24"
581
+ },
582
+ // Optional color for the icon (e.g., 'red', 'blue', 'primary', etc.)
583
+ color: {
584
+ type: String,
585
+ default: ""
586
+ },
587
+ // Optional custom class to apply extra styles
588
+ customClass: {
589
+ type: String,
590
+ default: ""
591
+ }
592
+ }
593
+ };
594
+ function oe(t, a, e, l, r, n) {
595
+ const o = c("v-icon");
596
+ return i(), u(o, {
597
+ size: e.size,
598
+ color: e.color,
599
+ class: S(e.customClass),
600
+ icon: e.icon
601
+ }, null, 8, ["size", "color", "class", "icon"]);
602
+ }
603
+ const le = /* @__PURE__ */ s(ne, [["render", oe], ["__scopeId", "data-v-d688a9cc"]]), re = {
604
+ name: "RtAlert",
605
+ components: {
606
+ RtIcon: le
607
+ },
608
+ props: {
609
+ density: {
610
+ type: String,
611
+ default: "default",
612
+ validator(t) {
613
+ return ["default", "comfortable", "compact"].includes(t);
614
+ }
615
+ },
616
+ closable: {
617
+ type: Boolean,
618
+ default: !1
619
+ },
620
+ variant: {
621
+ type: String,
622
+ default: "flat",
623
+ validator(t) {
624
+ return ["plain", "outlined", "tonal", "flat", "elevated", "text"].includes(t);
625
+ }
626
+ },
627
+ text: {
628
+ type: String,
629
+ default: ""
630
+ },
631
+ border: {
632
+ type: String,
633
+ default: "Start",
634
+ validator(t) {
635
+ return ["start", "top", "end", "bottom", "none"].includes(t);
636
+ }
637
+ },
638
+ icon: {
639
+ type: String,
640
+ default: "info",
641
+ validator(t) {
642
+ return ["info", "success", "error", "warning", "hidden"].includes(t);
643
+ }
644
+ },
645
+ borderColor: {
646
+ type: String,
647
+ default: "info",
648
+ validator(t) {
649
+ return ["info", "success", "error", "warning", "deep-purple accent-4"].includes(t);
650
+ }
651
+ },
652
+ color: {
653
+ type: String,
654
+ default: "info",
655
+ validator(t) {
656
+ return ["info", "success", "error", "warning", "hidden"].includes(t);
657
+ }
658
+ }
659
+ },
660
+ methods: {
661
+ // Dynamically determine aria-live based on type
662
+ getAriaLive() {
663
+ return this.type === "error" || this.type === "warning" ? "assertive" : "polite";
664
+ }
665
+ }
666
+ }, ie = { class: "alert-content" };
667
+ function de(t, a, e, l, r, n) {
668
+ const o = c("RtIcon"), f = c("v-alert");
669
+ return i(), u(f, {
670
+ text: e.text,
671
+ type: e.icon,
672
+ "border-color": e.borderColor,
673
+ color: e.color,
674
+ border: e.border,
675
+ variant: e.variant,
676
+ closable: e.closable,
677
+ density: e.density,
678
+ role: "alert",
679
+ "aria-live": n.getAriaLive(),
680
+ "aria-atomic": !0
681
+ }, {
682
+ default: d(() => [
683
+ e.icon ? (i(), u(o, {
684
+ key: 0,
685
+ left: "",
686
+ "aria-hidden": "true"
687
+ }, {
688
+ default: d(() => [
689
+ b(m(e.icon), 1)
690
+ ]),
691
+ _: 1
692
+ })) : B("", !0),
693
+ k("span", ie, [
694
+ y(t.$slots, "default", {}, void 0, !0)
695
+ ])
696
+ ]),
697
+ _: 3
698
+ }, 8, ["text", "type", "border-color", "color", "border", "variant", "closable", "density", "aria-live"]);
699
+ }
700
+ const ce = /* @__PURE__ */ s(re, [["render", de], ["__scopeId", "data-v-bae3eb1c"]]), ue = {
265
701
  install: (t, a) => {
266
- t.component("LearnVueButton", v), t.component("InputTaras", I), t.component("RtText", z), t.component("RtButton", N);
702
+ t.component("LearnVueButton", z), t.component("InputTaras", L), t.component("RtText", j), t.component("RtButton", h), t.component("RtBadge", U), t.component("RtSnackbar", F), t.component("RtAvatar", Z), t.component("RtBreadcrumbs", ae), t.component("RtAlert", ce);
267
703
  }
268
704
  };
269
705
  export {
270
- O as default
706
+ ue as default
271
707
  };
@@ -1 +1 @@
1
- (function(t,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("vue")):typeof define=="function"&&define.amd?define(["vue"],o):(t=typeof globalThis<"u"?globalThis:t||self,t["readytech-ui-library-v2"]=o(t.Vue))})(this,function(t){"use strict";const o=(a,l)=>{const e=a.__vccOpts||a;for(const[n,d]of l)e[n]=d;return e},i={},s={class:"lv-button"};function u(a,l){return t.openBlock(),t.createElementBlock("button",s,[t.renderSlot(a.$slots,"default",{},void 0,!0)])}const f=o(i,[["render",u],["__scopeId","data-v-ac3af47a"]]),p={name:"InputTaras",props:{prop:{required:!0}}},m={class:"class-input"};function b(a,l,e,n,d,r){return t.openBlock(),t.createElementBlock("h1",m,t.toDisplayString(e.prop)+" taras",1)}const y=o(p,[["render",b],["__scopeId","data-v-f440ad26"]]),_={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 g(a,l,e,n,d,r){const c=t.resolveComponent("v-text-field");return t.openBlock(),t.createBlock(c,t.mergeProps(r.inputProps,{modelValue:r.inputValue,"onUpdate:modelValue":l[0]||(l[0]=S=>r.inputValue=S),label:e.label,placeholder:e.placeholder,disabled:e.disabled,error:e.error,"error-messages":e.errorMessages,"prepend-icon":e.prependIcon,clearable:"",hint:e.hint,autocomplete:e.autocomplete,"onClick:clear":r.handleClear}),null,16,["modelValue","label","placeholder","disabled","error","error-messages","prepend-icon","hint","autocomplete","onClick:clear"])}const h=o(_,[["render",g],["__scopeId","data-v-33b97f38"]]),B={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:l}){const e=()=>{l("click")},n=t.computed(()=>a.primary?"flat":"outlined"),d=t.computed(()=>a.label||"Button"),r=t.computed(()=>({"btn-primary":a.primary,"btn-icon":a.icon,"btn-disabled":a.disabled}));return{onClick:e,variant:n,ariaLabel:d,buttonClasses:r}}};function k(a,l,e,n,d,r){const c=t.resolveComponent("v-btn");return t.openBlock(),t.createBlock(c,{type:"button",variant:n.variant,size:e.size,color:e.color,icon:e.icon,disabled:e.disabled,loading:e.loading,outlined:e.outlined,text:e.text,tile:e.tile,depressed:e.depressed,rounded:e.rounded,block:e.block,href:e.href,target:e.target,elevation:e.elevation,to:e.to,replace:e.replace,exact:e.exact,append:e.append,"background-color":e.backgroundColor,class:t.normalizeClass(n.buttonClasses),onClick:n.onClick,"aria-label":n.ariaLabel},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.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 x=o(B,[["render",k],["__scopeId","data-v-ce0d0f31"]]);return{install:(a,l)=>{a.component("LearnVueButton",f),a.component("InputTaras",y),a.component("RtText",h),a.component("RtButton",x)}}});
1
+ (function(t,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("vue")):typeof define=="function"&&define.amd?define(["vue"],i):(t=typeof globalThis<"u"?globalThis:t||self,t["readytech-ui-library-v2"]=i(t.Vue))})(this,function(t){"use strict";const i=(a,n)=>{const e=a.__vccOpts||a;for(const[r,c]of n)e[r]=c;return e},f={},m={class:"lv-button"};function p(a,n){return t.openBlock(),t.createElementBlock("button",m,[t.renderSlot(a.$slots,"default",{},void 0,!0)])}const _=i(f,[["render",p],["__scopeId","data-v-ac3af47a"]]),g={name:"InputTaras",props:{prop:{required:!0}}},y={class:"class-input"};function b(a,n,e,r,c,o){return t.openBlock(),t.createElementBlock("h1",y,t.toDisplayString(e.prop)+" taras",1)}const B=i(g,[["render",b],["__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,e,r,c,o){const l=t.resolveComponent("v-text-field");return t.openBlock(),t.createBlock(l,t.mergeProps(o.inputProps,{modelValue:o.inputValue,"onUpdate:modelValue":n[0]||(n[0]=d=>o.inputValue=d),label:e.label,placeholder:e.placeholder,disabled:e.disabled,error:e.error,"error-messages":e.errorMessages,"prepend-icon":e.prependIcon,clearable:"",hint:e.hint,autocomplete:e.autocomplete,"onClick:clear":o.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 e=()=>{n("click")},r=t.computed(()=>a.primary?"flat":"outlined"),c=t.computed(()=>a.label||"Button"),o=t.computed(()=>({"btn-primary":a.primary,"btn-icon":a.icon,"btn-disabled":a.disabled}));return{onClick:e,variant:r,ariaLabel:c,buttonClasses:o}}};function C(a,n,e,r,c,o){const l=t.resolveComponent("v-btn");return t.openBlock(),t.createBlock(l,{type:"button",variant:r.variant,size:e.size,color:e.color,icon:e.icon,disabled:e.disabled,loading:e.loading,outlined:e.outlined,text:e.text,tile:e.tile,depressed:e.depressed,rounded:e.rounded,block:e.block,href:e.href,target:e.target,elevation:e.elevation,to:e.to,replace:e.replace,exact:e.exact,append:e.append,"background-color":e.backgroundColor,class:t.normalizeClass(r.buttonClasses),onClick:r.onClick,"aria-label":r.ariaLabel},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.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 I(a,n,e,r,c,o){const l=t.resolveComponent("v-badge");return t.openBlock(),t.createBlock(l,{value:e.value,color:e.color,dot:e.dot,overlap:e.overlap,content:e.content,size:e.size,bottom:e.bottom,top:e.top,role:"status","aria-label":o.getAriaLabel,"aria-live":e.dot?"polite":"off",tabindex:"0"},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},void 0,!0)]),_:3},8,["value","color","dot","overlap","content","size","bottom","top","aria-label","aria-live"])}const V=i(R,[["render",I],["__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 w(a,n,e,r,c,o){const l=t.resolveComponent("v-btn"),d=t.resolveComponent("v-snackbar");return t.openBlock(),t.createElementBlock("div",N,[t.createVNode(l,{color:e.buttonColor,onClick:n[0]||(n[0]=s=>c.snackbar=!0)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.buttonText),1)]),_:1},8,["color"]),t.createVNode(d,{modelValue:c.snackbar,"onUpdate:modelValue":n[2]||(n[2]=s=>c.snackbar=s),timeout:e.timeout,color:e.snackbarColor},{actions:t.withCtx(()=>[t.createVNode(l,{color:e.actionButtonColor,variant:"text",onClick:n[1]||(n[1]=s=>c.snackbar=!1)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.actionButtonText),1)]),_:1},8,["color"])]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.message)+" ",1)]),_:1},8,["modelValue","timeout","color"])])}const T=i(z,[["render",w],["__scopeId","data-v-75ce5462"]]),v={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 A(a,n,e,r,c,o){const l=t.resolveComponent("v-img");return t.openBlock(),t.createBlock(l,{src:e.src,alt:e.alt,"lazy-src":e.lazySrc,"aspect-ratio":e.aspectRatio,gradient:e.gradient,loading:e.loading,transition:e.transition,class:t.normalizeClass(e.classes)},{placeholder:t.withCtx(()=>[t.renderSlot(a.$slots,"placeholder",{},()=>[n[0]||(n[0]=t.createTextVNode("Loading..."))],!0)]),default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},void 0,!0)]),_:3},8,["src","alt","lazy-src","aspect-ratio","gradient","loading","transition","class"])}const L={name:"RtAvatar",components:{RtImage:i(v,[["render",A],["__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,e,r,c,o){const l=t.resolveComponent("RtImage"),d=t.resolveComponent("v-avatar");return t.openBlock(),t.createElementBlock("div",D,[t.createVNode(d,{size:e.size,class:"avatar",rounded:e.rounded,tabindex:"0",role:"img","aria-label":e.ariaLabel},{default:t.withCtx(()=>[e.avatarImage?(t.openBlock(),t.createBlock(l,{key:0,src:e.avatarImage,alt:e.alt},null,8,["src","alt"])):(t.openBlock(),t.createElementBlock("span",E,t.toDisplayString(o.initials),1))]),_:1},8,["size","rounded","aria-label"])])}const q=i(L,[["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,e,r,c,o){const l=t.resolveComponent("RtButton"),d=t.resolveComponent("v-breadcrumbs");return t.openBlock(),t.createBlock(d,{class:"v-breadcrumbs-wrapper",divider:e.divider,items:e.items},{item:t.withCtx(({item:s})=>[s.to?(t.openBlock(),t.createBlock(l,{key:0,to:s.to,text:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(s.text),1)]),_:2},1032,["to"])):(t.openBlock(),t.createElementBlock("span",P,t.toDisplayString(s.text),1))]),_:1},8,["divider","items"])}const U=i(O,[["render",M],["__scopeId","data-v-5ccff043"]]),H={name:"RtIcon",props:{icon:{type:String,required:!0},size:{type:String,default:"24"},color:{type:String,default:""},customClass:{type:String,default:""}}};function F(a,n,e,r,c,o){const l=t.resolveComponent("v-icon");return t.openBlock(),t.createBlock(l,{size:e.size,color:e.color,class:t.normalizeClass(e.customClass),icon:e.icon},null,8,["size","color","class","icon"])}const G={name:"RtAlert",components:{RtIcon:i(H,[["render",F],["__scopeId","data-v-d688a9cc"]])},props:{density:{type:String,default:"default",validator(a){return["default","comfortable","compact"].includes(a)}},closable:{type:Boolean,default:!1},variant:{type:String,default:"flat",validator(a){return["plain","outlined","tonal","flat","elevated","text"].includes(a)}},text:{type:String,default:""},border:{type:String,default:"Start",validator(a){return["start","top","end","bottom","none"].includes(a)}},icon:{type:String,default:"info",validator(a){return["info","success","error","warning","hidden"].includes(a)}},borderColor:{type:String,default:"info",validator(a){return["info","success","error","warning","deep-purple accent-4"].includes(a)}},color:{type:String,default:"info",validator(a){return["info","success","error","warning","hidden"].includes(a)}}},methods:{getAriaLive(){return this.type==="error"||this.type==="warning"?"assertive":"polite"}}},J={class:"alert-content"};function K(a,n,e,r,c,o){const l=t.resolveComponent("RtIcon"),d=t.resolveComponent("v-alert");return t.openBlock(),t.createBlock(d,{text:e.text,type:e.icon,"border-color":e.borderColor,color:e.color,border:e.border,variant:e.variant,closable:e.closable,density:e.density,role:"alert","aria-live":o.getAriaLive(),"aria-atomic":!0},{default:t.withCtx(()=>[e.icon?(t.openBlock(),t.createBlock(l,{key:0,left:"","aria-hidden":"true"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("span",J,[t.renderSlot(a.$slots,"default",{},void 0,!0)])]),_:3},8,["text","type","border-color","color","border","variant","closable","density","aria-live"])}const Q=i(G,[["render",K],["__scopeId","data-v-bae3eb1c"]]);return{install:(a,n)=>{a.component("LearnVueButton",_),a.component("InputTaras",B),a.component("RtText",x),a.component("RtButton",u),a.component("RtBadge",V),a.component("RtSnackbar",T),a.component("RtAvatar",q),a.component("RtBreadcrumbs",U),a.component("RtAlert",Q)}}});
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "readytech-ui-library-v2",
3
3
  "description": "ui library",
4
4
  "private": false,
5
- "version": "0.0.14",
5
+ "version": "0.0.16",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": "./dist/readytech-ui-library-v2.es.js",