readytech-ui-library-v2 0.0.11 → 0.0.13

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}.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}
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 _, openBlock as d, renderSlot as g, toDisplayString as s, resolveComponent as c, createBlock as b, mergeProps as k, normalizeClass as S, withCtx as i, createTextVNode as m, computed as v, createVNode as p } from "vue";
2
- const u = (t, a) => {
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
4
  for (const [n, l] of a)
5
5
  e[n] = l;
6
6
  return e;
7
- }, B = {}, h = { class: "lv-button" };
8
- function x(t, a) {
9
- return d(), _("button", h, [
10
- g(t.$slots, "default", {}, void 0, !0)
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 C = /* @__PURE__ */ u(B, [["render", x], ["__scopeId", "data-v-ac3af47a"]]), I = {
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
- }, R = { class: "class-input" };
21
- function z(t, a, e, n, l, o) {
22
- return d(), _("h1", R, s(e.prop) + " taras", 1);
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 V = /* @__PURE__ */ u(I, [["render", z], ["__scopeId", "data-v-f440ad26"]]), N = {
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 V = /* @__PURE__ */ u(I, [["render", z], ["__scopeId", "data-v-f440ad26"]]
87
87
  }
88
88
  }
89
89
  };
90
- function T(t, a, e, n, l, o) {
90
+ function A(t, a, e, n, l, o) {
91
91
  const r = c("v-text-field");
92
- return d(), b(r, k(o.inputProps, {
92
+ return d(), _(r, k(o.inputProps, {
93
93
  modelValue: o.inputValue,
94
- "onUpdate:modelValue": a[0] || (a[0] = (f) => o.inputValue = f),
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,
@@ -104,7 +104,7 @@ function T(t, a, e, n, l, o) {
104
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 L = /* @__PURE__ */ u(N, [["render", T], ["__scopeId", "data-v-33b97f38"]]), A = {
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
@@ -225,9 +225,9 @@ const L = /* @__PURE__ */ u(N, [["render", T], ["__scopeId", "data-v-33b97f38"]]
225
225
  };
226
226
  }
227
227
  };
228
- function j(t, a, e, n, l, o) {
228
+ function O(t, a, e, n, l, o) {
229
229
  const r = c("v-btn");
230
- return d(), b(r, {
230
+ return d(), _(r, {
231
231
  type: "button",
232
232
  variant: n.variant,
233
233
  size: e.size,
@@ -254,14 +254,14 @@ function j(t, a, e, n, l, o) {
254
254
  "aria-label": n.ariaLabel
255
255
  }, {
256
256
  default: i(() => [
257
- g(t.$slots, "default", {}, () => [
258
- m(s(e.label), 1)
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 O = /* @__PURE__ */ u(A, [["render", j], ["__scopeId", "data-v-ce0d0f31"]]), q = {
264
+ const B = /* @__PURE__ */ s(j, [["render", O], ["__scopeId", "data-v-ce0d0f31"]]), P = {
265
265
  name: "RtBadge",
266
266
  props: {
267
267
  value: {
@@ -303,9 +303,9 @@ const O = /* @__PURE__ */ u(A, [["render", j], ["__scopeId", "data-v-ce0d0f31"]]
303
303
  }
304
304
  }
305
305
  };
306
- function M(t, a, e, n, l, o) {
306
+ function q(t, a, e, n, l, o) {
307
307
  const r = c("v-badge");
308
- return d(), b(r, {
308
+ return d(), _(r, {
309
309
  value: e.value,
310
310
  color: e.color,
311
311
  dot: e.dot,
@@ -320,12 +320,12 @@ function M(t, a, e, n, l, o) {
320
320
  tabindex: "0"
321
321
  }, {
322
322
  default: i(() => [
323
- g(t.$slots, "default", {}, void 0, !0)
323
+ p(t.$slots, "default", {}, void 0, !0)
324
324
  ]),
325
325
  _: 3
326
326
  }, 8, ["value", "color", "dot", "overlap", "content", "size", "bottom", "top", "aria-label", "aria-live"]);
327
327
  }
328
- const P = /* @__PURE__ */ u(q, [["render", M], ["__scopeId", "data-v-02392152"]]), U = {
328
+ const w = /* @__PURE__ */ s(P, [["render", q], ["__scopeId", "data-v-02392152"]]), M = {
329
329
  name: "RtSnackbar",
330
330
  props: {
331
331
  message: {
@@ -362,45 +362,45 @@ const P = /* @__PURE__ */ u(q, [["render", M], ["__scopeId", "data-v-02392152"]]
362
362
  snackbar: !1
363
363
  };
364
364
  }
365
- }, w = { class: "text-center ma-2" };
365
+ }, U = { class: "text-center ma-2" };
366
366
  function D(t, a, e, n, l, o) {
367
- const r = c("v-btn"), f = c("v-snackbar");
368
- return d(), _("div", w, [
369
- p(r, {
367
+ const r = c("v-btn"), m = c("v-snackbar");
368
+ return d(), g("div", U, [
369
+ y(r, {
370
370
  color: e.buttonColor,
371
- onClick: a[0] || (a[0] = (y) => l.snackbar = !0)
371
+ onClick: a[0] || (a[0] = (u) => l.snackbar = !0)
372
372
  }, {
373
373
  default: i(() => [
374
- m(s(e.buttonText), 1)
374
+ b(f(e.buttonText), 1)
375
375
  ]),
376
376
  _: 1
377
377
  }, 8, ["color"]),
378
- p(f, {
378
+ y(m, {
379
379
  modelValue: l.snackbar,
380
- "onUpdate:modelValue": a[2] || (a[2] = (y) => l.snackbar = y),
380
+ "onUpdate:modelValue": a[2] || (a[2] = (u) => l.snackbar = u),
381
381
  timeout: e.timeout,
382
382
  color: e.snackbarColor
383
383
  }, {
384
384
  actions: i(() => [
385
- p(r, {
385
+ y(r, {
386
386
  color: e.actionButtonColor,
387
387
  variant: "text",
388
- onClick: a[1] || (a[1] = (y) => l.snackbar = !1)
388
+ onClick: a[1] || (a[1] = (u) => l.snackbar = !1)
389
389
  }, {
390
390
  default: i(() => [
391
- m(s(e.actionButtonText), 1)
391
+ b(f(e.actionButtonText), 1)
392
392
  ]),
393
393
  _: 1
394
394
  }, 8, ["color"])
395
395
  ]),
396
396
  default: i(() => [
397
- m(s(e.message) + " ", 1)
397
+ b(f(e.message) + " ", 1)
398
398
  ]),
399
399
  _: 1
400
400
  }, 8, ["modelValue", "timeout", "color"])
401
401
  ]);
402
402
  }
403
- const E = /* @__PURE__ */ u(U, [["render", D], ["__scopeId", "data-v-75ce5462"]]), F = {
403
+ const H = /* @__PURE__ */ s(M, [["render", D], ["__scopeId", "data-v-75ce5462"]]), E = {
404
404
  name: "RtImage",
405
405
  props: {
406
406
  src: {
@@ -439,9 +439,9 @@ const E = /* @__PURE__ */ u(U, [["render", D], ["__scopeId", "data-v-75ce5462"]]
439
439
  }
440
440
  }
441
441
  };
442
- function H(t, a, e, n, l, o) {
442
+ function F(t, a, e, n, l, o) {
443
443
  const r = c("v-img");
444
- return d(), b(r, {
444
+ return d(), _(r, {
445
445
  src: e.src,
446
446
  alt: e.alt,
447
447
  "lazy-src": e.lazySrc,
@@ -452,17 +452,17 @@ function H(t, a, e, n, l, o) {
452
452
  class: S(e.classes)
453
453
  }, {
454
454
  placeholder: i(() => [
455
- g(t.$slots, "placeholder", {}, () => [
456
- a[0] || (a[0] = m("Loading..."))
455
+ p(t.$slots, "placeholder", {}, () => [
456
+ a[0] || (a[0] = b("Loading..."))
457
457
  ], !0)
458
458
  ]),
459
459
  default: i(() => [
460
- g(t.$slots, "default", {}, void 0, !0)
460
+ p(t.$slots, "default", {}, void 0, !0)
461
461
  ]),
462
462
  _: 3
463
463
  }, 8, ["src", "alt", "lazy-src", "aspect-ratio", "gradient", "loading", "transition", "class"]);
464
464
  }
465
- const G = /* @__PURE__ */ u(F, [["render", H], ["__scopeId", "data-v-f3ff4550"]]), J = {
465
+ const G = /* @__PURE__ */ s(E, [["render", F], ["__scopeId", "data-v-f3ff4550"]]), J = {
466
466
  name: "RtAvatar",
467
467
  components: {
468
468
  RtImage: G
@@ -503,9 +503,9 @@ const G = /* @__PURE__ */ u(F, [["render", H], ["__scopeId", "data-v-f3ff4550"]]
503
503
  class: "initials"
504
504
  };
505
505
  function W(t, a, e, n, l, o) {
506
- const r = c("RtImage"), f = c("v-avatar");
507
- return d(), _("div", K, [
508
- p(f, {
506
+ const r = c("RtImage"), m = c("v-avatar");
507
+ return d(), g("div", K, [
508
+ y(m, {
509
509
  size: e.size,
510
510
  class: "avatar",
511
511
  rounded: e.rounded,
@@ -514,21 +514,63 @@ function W(t, a, e, n, l, o) {
514
514
  "aria-label": e.ariaLabel
515
515
  }, {
516
516
  default: i(() => [
517
- e.avatarImage ? (d(), b(r, {
517
+ e.avatarImage ? (d(), _(r, {
518
518
  key: 0,
519
519
  src: e.avatarImage,
520
520
  alt: e.alt
521
- }, null, 8, ["src", "alt"])) : (d(), _("span", Q, s(o.initials), 1))
521
+ }, null, 8, ["src", "alt"])) : (d(), g("span", Q, f(o.initials), 1))
522
522
  ]),
523
523
  _: 1
524
524
  }, 8, ["size", "rounded", "aria-label"])
525
525
  ]);
526
526
  }
527
- const X = /* @__PURE__ */ u(J, [["render", W], ["__scopeId", "data-v-0d49dde0"]]), Z = {
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 = {
528
570
  install: (t, a) => {
529
- t.component("LearnVueButton", C), t.component("InputTaras", V), t.component("RtText", L), t.component("RtButton", O), t.component("RtBadge", P), t.component("RtSnackbar", E), t.component("RtAvatar", X);
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);
530
572
  }
531
573
  };
532
574
  export {
533
- Z as default
575
+ ae as default
534
576
  };
@@ -1 +1 @@
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[o,l]of n)e[o]=l;return e},u={},f={class:"lv-button"};function m(a,n){return t.openBlock(),t.createElementBlock("button",f,[t.renderSlot(a.$slots,"default",{},void 0,!0)])}const p=i(u,[["render",m],["__scopeId","data-v-ac3af47a"]]),g={name:"InputTaras",props:{prop:{required:!0}}},_={class:"class-input"};function b(a,n,e,o,l,r){return t.openBlock(),t.createElementBlock("h1",_,t.toDisplayString(e.prop)+" taras",1)}const y=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 B(a,n,e,o,l,r){const d=t.resolveComponent("v-text-field");return t.openBlock(),t.createBlock(d,t.mergeProps(r.inputProps,{modelValue:r.inputValue,"onUpdate:modelValue":n[0]||(n[0]=c=>r.inputValue=c),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 S=i(k,[["render",B],["__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")},o=t.computed(()=>a.primary?"flat":"outlined"),l=t.computed(()=>a.label||"Button"),r=t.computed(()=>({"btn-primary":a.primary,"btn-icon":a.icon,"btn-disabled":a.disabled}));return{onClick:e,variant:o,ariaLabel:l,buttonClasses:r}}};function x(a,n,e,o,l,r){const d=t.resolveComponent("v-btn");return t.openBlock(),t.createBlock(d,{type:"button",variant:o.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(o.buttonClasses),onClick:o.onClick,"aria-label":o.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 C=i(h,[["render",x],["__scopeId","data-v-ce0d0f31"]]),V={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,o,l,r){const d=t.resolveComponent("v-badge");return t.openBlock(),t.createBlock(d,{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":r.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 R=i(V,[["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 T(a,n,e,o,l,r){const d=t.resolveComponent("v-btn"),c=t.resolveComponent("v-snackbar");return t.openBlock(),t.createElementBlock("div",N,[t.createVNode(d,{color:e.buttonColor,onClick:n[0]||(n[0]=s=>l.snackbar=!0)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.buttonText),1)]),_:1},8,["color"]),t.createVNode(c,{modelValue:l.snackbar,"onUpdate:modelValue":n[2]||(n[2]=s=>l.snackbar=s),timeout:e.timeout,color:e.snackbarColor},{actions:t.withCtx(()=>[t.createVNode(d,{color:e.actionButtonColor,variant:"text",onClick:n[1]||(n[1]=s=>l.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 v=i(z,[["render",T],["__scopeId","data-v-75ce5462"]]),w={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,e,o,l,r){const d=t.resolveComponent("v-img");return t.openBlock(),t.createBlock(d,{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 A={name:"RtAvatar",components:{RtImage:i(w,[["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"},j={key:1,class:"initials"};function E(a,n,e,o,l,r){const d=t.resolveComponent("RtImage"),c=t.resolveComponent("v-avatar");return t.openBlock(),t.createElementBlock("div",D,[t.createVNode(c,{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(d,{key:0,src:e.avatarImage,alt:e.alt},null,8,["src","alt"])):(t.openBlock(),t.createElementBlock("span",j,t.toDisplayString(r.initials),1))]),_:1},8,["size","rounded","aria-label"])])}const q=i(A,[["render",E],["__scopeId","data-v-0d49dde0"]]);return{install:(a,n)=>{a.component("LearnVueButton",p),a.component("InputTaras",y),a.component("RtText",S),a.component("RtButton",C),a.component("RtBadge",R),a.component("RtSnackbar",v),a.component("RtAvatar",q)}}});
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)}}});
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.11",
5
+ "version": "0.0.13",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": "./dist/readytech-ui-library-v2.es.js",