readytech-ui-library-v2 0.0.17 → 0.0.18
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,8 +1,8 @@
|
|
1
|
-
import { resolveComponent as
|
2
|
-
const
|
1
|
+
import { resolveComponent as l, createBlock as u, openBlock as d, normalizeClass as V, withCtx as i, createCommentVNode as N, createElementVNode as k, createTextVNode as g, toDisplayString as b, renderSlot as R, createElementBlock as h, createVNode as _, computed as z, Fragment as A, renderList as P, mergeProps as w, withDirectives as L, withKeys as B, withModifiers as x, vShow as E } from "vue";
|
2
|
+
const p = (t, a) => {
|
3
3
|
const e = t.__vccOpts || t;
|
4
|
-
for (const [s,
|
5
|
-
e[s] =
|
4
|
+
for (const [s, r] of a)
|
5
|
+
e[s] = r;
|
6
6
|
return e;
|
7
7
|
}, M = {
|
8
8
|
name: "RtIcon",
|
@@ -29,8 +29,8 @@ const _ = (t, a) => {
|
|
29
29
|
}
|
30
30
|
}
|
31
31
|
};
|
32
|
-
function U(t, a, e, s,
|
33
|
-
const o =
|
32
|
+
function U(t, a, e, s, r, n) {
|
33
|
+
const o = l("v-icon");
|
34
34
|
return d(), u(o, {
|
35
35
|
size: e.size,
|
36
36
|
color: e.color,
|
@@ -38,10 +38,10 @@ function U(t, a, e, s, i, n) {
|
|
38
38
|
icon: e.icon
|
39
39
|
}, null, 8, ["size", "color", "class", "icon"]);
|
40
40
|
}
|
41
|
-
const
|
41
|
+
const T = /* @__PURE__ */ p(M, [["render", U], ["__scopeId", "data-v-d688a9cc"]]), q = {
|
42
42
|
name: "RtAlert",
|
43
43
|
components: {
|
44
|
-
RtIcon:
|
44
|
+
RtIcon: T
|
45
45
|
},
|
46
46
|
props: {
|
47
47
|
density: {
|
@@ -101,9 +101,9 @@ const P = /* @__PURE__ */ _(M, [["render", U], ["__scopeId", "data-v-d688a9cc"]]
|
|
101
101
|
return this.type === "error" || this.type === "warning" ? "assertive" : "polite";
|
102
102
|
}
|
103
103
|
}
|
104
|
-
},
|
105
|
-
function
|
106
|
-
const o =
|
104
|
+
}, j = { class: "alert-content" };
|
105
|
+
function F(t, a, e, s, r, n) {
|
106
|
+
const o = l("RtIcon"), c = l("v-alert");
|
107
107
|
return d(), u(c, {
|
108
108
|
text: e.text,
|
109
109
|
type: e.icon,
|
@@ -117,25 +117,25 @@ function O(t, a, e, s, i, n) {
|
|
117
117
|
"aria-live": n.getAriaLive(),
|
118
118
|
"aria-atomic": !0
|
119
119
|
}, {
|
120
|
-
default:
|
120
|
+
default: i(() => [
|
121
121
|
e.icon ? (d(), u(o, {
|
122
122
|
key: 0,
|
123
123
|
left: "",
|
124
124
|
"aria-hidden": "true"
|
125
125
|
}, {
|
126
|
-
default:
|
126
|
+
default: i(() => [
|
127
127
|
g(b(e.icon), 1)
|
128
128
|
]),
|
129
129
|
_: 1
|
130
|
-
})) :
|
131
|
-
|
130
|
+
})) : N("", !0),
|
131
|
+
k("span", j, [
|
132
132
|
R(t.$slots, "default", {}, void 0, !0)
|
133
133
|
])
|
134
134
|
]),
|
135
135
|
_: 3
|
136
136
|
}, 8, ["text", "type", "border-color", "color", "border", "variant", "closable", "density", "aria-live"]);
|
137
137
|
}
|
138
|
-
const
|
138
|
+
const O = /* @__PURE__ */ p(q, [["render", F], ["__scopeId", "data-v-bae3eb1c"]]), D = {
|
139
139
|
name: "RtImage",
|
140
140
|
props: {
|
141
141
|
src: {
|
@@ -174,8 +174,8 @@ const q = /* @__PURE__ */ _(j, [["render", O], ["__scopeId", "data-v-bae3eb1c"]]
|
|
174
174
|
}
|
175
175
|
}
|
176
176
|
};
|
177
|
-
function K(t, a, e, s,
|
178
|
-
const o =
|
177
|
+
function K(t, a, e, s, r, n) {
|
178
|
+
const o = l("v-img");
|
179
179
|
return d(), u(o, {
|
180
180
|
src: e.src,
|
181
181
|
alt: e.alt,
|
@@ -186,18 +186,18 @@ function K(t, a, e, s, i, n) {
|
|
186
186
|
transition: e.transition,
|
187
187
|
class: V(e.classes)
|
188
188
|
}, {
|
189
|
-
placeholder:
|
189
|
+
placeholder: i(() => [
|
190
190
|
R(t.$slots, "placeholder", {}, () => [
|
191
191
|
a[0] || (a[0] = g("Loading..."))
|
192
192
|
], !0)
|
193
193
|
]),
|
194
|
-
default:
|
194
|
+
default: i(() => [
|
195
195
|
R(t.$slots, "default", {}, void 0, !0)
|
196
196
|
]),
|
197
197
|
_: 3
|
198
198
|
}, 8, ["src", "alt", "lazy-src", "aspect-ratio", "gradient", "loading", "transition", "class"]);
|
199
199
|
}
|
200
|
-
const H = /* @__PURE__ */
|
200
|
+
const H = /* @__PURE__ */ p(D, [["render", K], ["__scopeId", "data-v-f3ff4550"]]), G = {
|
201
201
|
name: "RtAvatar",
|
202
202
|
components: {
|
203
203
|
RtImage: H
|
@@ -237,10 +237,10 @@ const H = /* @__PURE__ */ _(D, [["render", K], ["__scopeId", "data-v-f3ff4550"]]
|
|
237
237
|
key: 1,
|
238
238
|
class: "initials"
|
239
239
|
};
|
240
|
-
function W(t, a, e, s,
|
241
|
-
const o =
|
240
|
+
function W(t, a, e, s, r, n) {
|
241
|
+
const o = l("RtImage"), c = l("v-avatar");
|
242
242
|
return d(), h("div", J, [
|
243
|
-
|
243
|
+
_(c, {
|
244
244
|
size: e.size,
|
245
245
|
class: "avatar",
|
246
246
|
rounded: e.rounded,
|
@@ -248,7 +248,7 @@ function W(t, a, e, s, i, n) {
|
|
248
248
|
role: "img",
|
249
249
|
"aria-label": e.ariaLabel
|
250
250
|
}, {
|
251
|
-
default:
|
251
|
+
default: i(() => [
|
252
252
|
e.avatarImage ? (d(), u(o, {
|
253
253
|
key: 0,
|
254
254
|
src: e.avatarImage,
|
@@ -259,7 +259,7 @@ function W(t, a, e, s, i, n) {
|
|
259
259
|
}, 8, ["size", "rounded", "aria-label"])
|
260
260
|
]);
|
261
261
|
}
|
262
|
-
const X = /* @__PURE__ */
|
262
|
+
const X = /* @__PURE__ */ p(G, [["render", W], ["__scopeId", "data-v-0d49dde0"]]), Y = {
|
263
263
|
name: "RtBadge",
|
264
264
|
props: {
|
265
265
|
value: {
|
@@ -301,8 +301,8 @@ const X = /* @__PURE__ */ _(G, [["render", W], ["__scopeId", "data-v-0d49dde0"]]
|
|
301
301
|
}
|
302
302
|
}
|
303
303
|
};
|
304
|
-
function Z(t, a, e, s,
|
305
|
-
const o =
|
304
|
+
function Z(t, a, e, s, r, n) {
|
305
|
+
const o = l("v-badge");
|
306
306
|
return d(), u(o, {
|
307
307
|
value: e.value,
|
308
308
|
color: e.color,
|
@@ -317,13 +317,13 @@ function Z(t, a, e, s, i, n) {
|
|
317
317
|
"aria-live": e.dot ? "polite" : "off",
|
318
318
|
tabindex: "0"
|
319
319
|
}, {
|
320
|
-
default:
|
320
|
+
default: i(() => [
|
321
321
|
R(t.$slots, "default", {}, void 0, !0)
|
322
322
|
]),
|
323
323
|
_: 3
|
324
324
|
}, 8, ["value", "color", "dot", "overlap", "content", "size", "bottom", "top", "aria-label", "aria-live"]);
|
325
325
|
}
|
326
|
-
const $ = /* @__PURE__ */
|
326
|
+
const $ = /* @__PURE__ */ p(Y, [["render", Z], ["__scopeId", "data-v-02392152"]]), ee = {
|
327
327
|
name: "RtButton",
|
328
328
|
props: {
|
329
329
|
// Button text label
|
@@ -431,7 +431,7 @@ const $ = /* @__PURE__ */ _(Y, [["render", Z], ["__scopeId", "data-v-02392152"]]
|
|
431
431
|
setup(t, { emit: a }) {
|
432
432
|
const e = () => {
|
433
433
|
a("click");
|
434
|
-
}, s = z(() => t.primary ? "flat" : "outlined"),
|
434
|
+
}, s = z(() => t.primary ? "flat" : "outlined"), r = z(() => t.label || "Button"), n = z(() => ({
|
435
435
|
"btn-primary": t.primary,
|
436
436
|
"btn-icon": t.icon,
|
437
437
|
"btn-disabled": t.disabled
|
@@ -439,13 +439,13 @@ const $ = /* @__PURE__ */ _(Y, [["render", Z], ["__scopeId", "data-v-02392152"]]
|
|
439
439
|
return {
|
440
440
|
onClick: e,
|
441
441
|
variant: s,
|
442
|
-
ariaLabel:
|
442
|
+
ariaLabel: r,
|
443
443
|
buttonClasses: n
|
444
444
|
};
|
445
445
|
}
|
446
446
|
};
|
447
|
-
function te(t, a, e, s,
|
448
|
-
const o =
|
447
|
+
function te(t, a, e, s, r, n) {
|
448
|
+
const o = l("v-btn");
|
449
449
|
return d(), u(o, {
|
450
450
|
type: "button",
|
451
451
|
variant: s.variant,
|
@@ -472,7 +472,7 @@ function te(t, a, e, s, i, n) {
|
|
472
472
|
onClick: s.onClick,
|
473
473
|
"aria-label": s.ariaLabel
|
474
474
|
}, {
|
475
|
-
default:
|
475
|
+
default: i(() => [
|
476
476
|
R(t.$slots, "default", {}, () => [
|
477
477
|
g(b(e.label), 1)
|
478
478
|
], !0)
|
@@ -480,10 +480,10 @@ function te(t, a, e, s, i, n) {
|
|
480
480
|
_: 3
|
481
481
|
}, 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"]);
|
482
482
|
}
|
483
|
-
const C = /* @__PURE__ */
|
483
|
+
const C = /* @__PURE__ */ p(ee, [["render", te], ["__scopeId", "data-v-ce0d0f31"]]), ae = {
|
484
484
|
name: "RtBottomNavigation",
|
485
485
|
components: {
|
486
|
-
RtIcon:
|
486
|
+
RtIcon: T,
|
487
487
|
RtButton: C
|
488
488
|
},
|
489
489
|
props: {
|
@@ -523,11 +523,11 @@ const C = /* @__PURE__ */ _(ee, [["render", te], ["__scopeId", "data-v-ce0d0f31"
|
|
523
523
|
}
|
524
524
|
}
|
525
525
|
};
|
526
|
-
function ne(t, a, e, s,
|
527
|
-
const o =
|
526
|
+
function ne(t, a, e, s, r, n) {
|
527
|
+
const o = l("RtIcon"), c = l("RtButton"), f = l("v-bottom-navigation");
|
528
528
|
return d(), u(f, {
|
529
|
-
modelValue:
|
530
|
-
"onUpdate:modelValue": a[0] || (a[0] = (v) =>
|
529
|
+
modelValue: r.currentTab,
|
530
|
+
"onUpdate:modelValue": a[0] || (a[0] = (v) => r.currentTab = v),
|
531
531
|
"background-color": e.backgroundColor,
|
532
532
|
color: e.textColor,
|
533
533
|
app: "",
|
@@ -535,19 +535,19 @@ function ne(t, a, e, s, i, n) {
|
|
535
535
|
role: "navigation",
|
536
536
|
"aria-label": e.ariaLabel
|
537
537
|
}, {
|
538
|
-
default:
|
539
|
-
(d(!0), h(
|
538
|
+
default: i(() => [
|
539
|
+
(d(!0), h(A, null, P(e.tabs, (v, y) => (d(), u(c, {
|
540
540
|
key: y,
|
541
541
|
value: v.value,
|
542
542
|
"aria-label": v.value + " tab",
|
543
543
|
icon: !0,
|
544
544
|
onClick: (I) => n.onTabClick(v),
|
545
|
-
"aria-selected":
|
545
|
+
"aria-selected": r.currentTab === v.value ? "true" : "false",
|
546
546
|
role: "tab",
|
547
547
|
class: "v-btn-item"
|
548
548
|
}, {
|
549
|
-
default:
|
550
|
-
|
549
|
+
default: i(() => [
|
550
|
+
_(o, {
|
551
551
|
icon: v.icon,
|
552
552
|
size: 24
|
553
553
|
}, null, 8, ["icon"])
|
@@ -558,7 +558,7 @@ function ne(t, a, e, s, i, n) {
|
|
558
558
|
_: 1
|
559
559
|
}, 8, ["modelValue", "background-color", "color", "aria-label"]);
|
560
560
|
}
|
561
|
-
const oe = /* @__PURE__ */
|
561
|
+
const oe = /* @__PURE__ */ p(ae, [["render", ne], ["__scopeId", "data-v-d56f72f0"]]), le = {
|
562
562
|
name: "RtBottomSheet",
|
563
563
|
components: {
|
564
564
|
RtButton: C
|
@@ -567,40 +567,40 @@ const oe = /* @__PURE__ */ _(ae, [["render", ne], ["__scopeId", "data-v-d56f72f0
|
|
567
567
|
sheet: !1
|
568
568
|
})
|
569
569
|
}, re = { class: "text-center" };
|
570
|
-
function ie(t, a, e, s,
|
571
|
-
const o =
|
570
|
+
function ie(t, a, e, s, r, n) {
|
571
|
+
const o = l("RtButton"), c = l("v-card-text"), f = l("v-card"), v = l("v-bottom-sheet");
|
572
572
|
return d(), h("div", re, [
|
573
|
-
|
573
|
+
_(o, {
|
574
574
|
class: "open-button",
|
575
575
|
size: "x-large",
|
576
576
|
text: "Click Me",
|
577
577
|
onClick: a[0] || (a[0] = (y) => t.sheet = !t.sheet)
|
578
578
|
}),
|
579
|
-
|
579
|
+
_(v, {
|
580
580
|
modelValue: t.sheet,
|
581
581
|
"onUpdate:modelValue": a[2] || (a[2] = (y) => t.sheet = y)
|
582
582
|
}, {
|
583
|
-
default:
|
584
|
-
|
583
|
+
default: i(() => [
|
584
|
+
_(f, {
|
585
585
|
class: "text-center",
|
586
586
|
height: "200"
|
587
587
|
}, {
|
588
|
-
default:
|
589
|
-
|
590
|
-
default:
|
591
|
-
|
588
|
+
default: i(() => [
|
589
|
+
_(c, null, {
|
590
|
+
default: i(() => [
|
591
|
+
_(o, {
|
592
592
|
class: "close-button",
|
593
593
|
variant: "text",
|
594
594
|
onClick: a[1] || (a[1] = (y) => t.sheet = !t.sheet)
|
595
595
|
}, {
|
596
|
-
default:
|
596
|
+
default: i(() => a[3] || (a[3] = [
|
597
597
|
g(" close ")
|
598
598
|
])),
|
599
599
|
_: 1
|
600
600
|
}),
|
601
|
-
a[4] || (a[4] =
|
602
|
-
a[5] || (a[5] =
|
603
|
-
a[6] || (a[6] =
|
601
|
+
a[4] || (a[4] = k("br", null, null, -1)),
|
602
|
+
a[5] || (a[5] = k("br", null, null, -1)),
|
603
|
+
a[6] || (a[6] = k("div", null, " This is a bottom sheet using the controlled by v-model instead of activator ", -1))
|
604
604
|
]),
|
605
605
|
_: 1
|
606
606
|
})
|
@@ -612,7 +612,7 @@ function ie(t, a, e, s, i, n) {
|
|
612
612
|
}, 8, ["modelValue"])
|
613
613
|
]);
|
614
614
|
}
|
615
|
-
const de = /* @__PURE__ */
|
615
|
+
const de = /* @__PURE__ */ p(le, [["render", ie]]), se = {
|
616
616
|
name: "RtText",
|
617
617
|
props: {
|
618
618
|
label: {
|
@@ -678,9 +678,9 @@ const de = /* @__PURE__ */ _(le, [["render", ie]]), se = {
|
|
678
678
|
}
|
679
679
|
}
|
680
680
|
};
|
681
|
-
function ce(t, a, e, s,
|
682
|
-
const o =
|
683
|
-
return d(), u(o,
|
681
|
+
function ce(t, a, e, s, r, n) {
|
682
|
+
const o = l("v-text-field");
|
683
|
+
return d(), u(o, w(n.inputProps, {
|
684
684
|
modelValue: n.inputValue,
|
685
685
|
"onUpdate:modelValue": a[0] || (a[0] = (c) => n.inputValue = c),
|
686
686
|
label: e.label,
|
@@ -695,7 +695,7 @@ function ce(t, a, e, s, i, n) {
|
|
695
695
|
"onClick:clear": n.handleClear
|
696
696
|
}), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "error-messages", "prepend-icon", "hint", "autocomplete", "onClick:clear"]);
|
697
697
|
}
|
698
|
-
const ue = /* @__PURE__ */
|
698
|
+
const ue = /* @__PURE__ */ p(se, [["render", ce], ["__scopeId", "data-v-33b97f38"]]), fe = {
|
699
699
|
name: "RtExpansionComponent",
|
700
700
|
props: {
|
701
701
|
disabled: {
|
@@ -757,22 +757,22 @@ const ue = /* @__PURE__ */ _(se, [["render", ce], ["__scopeId", "data-v-33b97f38
|
|
757
757
|
}
|
758
758
|
}
|
759
759
|
};
|
760
|
-
function me(t, a, e, s,
|
761
|
-
const o =
|
762
|
-
return d(), u(y,
|
760
|
+
function me(t, a, e, s, r, n) {
|
761
|
+
const o = l("v-icon"), c = l("v-expansion-panel-title"), f = l("v-expansion-panel-text"), v = l("v-expansion-panel"), y = l("v-expansion-panels");
|
762
|
+
return d(), u(y, w(t.$attrs, {
|
763
763
|
multiple: e.multiple,
|
764
764
|
variant: e.variant,
|
765
765
|
disabled: e.disabled,
|
766
766
|
role: "region",
|
767
767
|
"aria-multiselectable": "multiple"
|
768
768
|
}), {
|
769
|
-
default:
|
770
|
-
(d(!0), h(
|
769
|
+
default: i(() => [
|
770
|
+
(d(!0), h(A, null, P(e.items, (I, m) => (d(), u(v, {
|
771
771
|
key: m,
|
772
772
|
role: "group"
|
773
773
|
}, {
|
774
|
-
default:
|
775
|
-
|
774
|
+
default: i(() => [
|
775
|
+
_(c, {
|
776
776
|
role: "button",
|
777
777
|
"aria-expanded": n.isExpanded(m),
|
778
778
|
id: "panel-header-" + m,
|
@@ -780,23 +780,23 @@ function me(t, a, e, s, i, n) {
|
|
780
780
|
onClick: (S) => n.togglePanel(m),
|
781
781
|
tabindex: "0",
|
782
782
|
onKeydown: [
|
783
|
-
x(
|
784
|
-
x(
|
785
|
-
x(
|
786
|
-
x(
|
787
|
-
a[0] || (a[0] = x(
|
788
|
-
a[1] || (a[1] = x(
|
783
|
+
B(x((S) => n.togglePanel(m), ["stop", "prevent"]), ["space"]),
|
784
|
+
B(x((S) => n.togglePanel(m), ["stop", "prevent"]), ["enter"]),
|
785
|
+
B(x((S) => n.focusPrevious(m), ["stop", "prevent"]), ["arrow-up"]),
|
786
|
+
B(x((S) => n.focusNext(m), ["stop", "prevent"]), ["arrow-down"]),
|
787
|
+
a[0] || (a[0] = B(x((S) => n.focusFirst(), ["stop", "prevent"]), ["home"])),
|
788
|
+
a[1] || (a[1] = B(x((S) => n.focusLast(), ["stop", "prevent"]), ["end"]))
|
789
789
|
]
|
790
790
|
}, {
|
791
|
-
default:
|
792
|
-
|
791
|
+
default: i(() => [
|
792
|
+
k("span", null, b(I.title), 1)
|
793
793
|
]),
|
794
|
-
actions:
|
795
|
-
e.disabled ?
|
794
|
+
actions: i(() => [
|
795
|
+
e.disabled ? N("", !0) : (d(), u(o, {
|
796
796
|
key: 0,
|
797
797
|
"aria-hidden": !0
|
798
798
|
}, {
|
799
|
-
default:
|
799
|
+
default: i(() => [
|
800
800
|
g(b(n.isExpanded(m) ? e.collapseIcon : e.expandIcon), 1)
|
801
801
|
]),
|
802
802
|
_: 2
|
@@ -804,12 +804,12 @@ function me(t, a, e, s, i, n) {
|
|
804
804
|
]),
|
805
805
|
_: 2
|
806
806
|
}, 1032, ["aria-expanded", "id", "aria-controls", "onClick", "onKeydown"]),
|
807
|
-
L(
|
807
|
+
L(_(f, {
|
808
808
|
id: "panel-content-" + m,
|
809
809
|
"aria-labelledby": "panel-header-" + m,
|
810
810
|
role: "region"
|
811
811
|
}, {
|
812
|
-
default:
|
812
|
+
default: i(() => [
|
813
813
|
g(b(I.content), 1)
|
814
814
|
]),
|
815
815
|
_: 2
|
@@ -823,7 +823,64 @@ function me(t, a, e, s, i, n) {
|
|
823
823
|
_: 1
|
824
824
|
}, 16, ["multiple", "variant", "disabled"]);
|
825
825
|
}
|
826
|
-
const pe = /* @__PURE__ */
|
826
|
+
const pe = /* @__PURE__ */ p(fe, [["render", me], ["__scopeId", "data-v-2c20523a"]]), _e = {
|
827
|
+
name: "RtSelect",
|
828
|
+
props: {
|
829
|
+
items: {
|
830
|
+
type: Array,
|
831
|
+
required: !0
|
832
|
+
},
|
833
|
+
label: {
|
834
|
+
type: String,
|
835
|
+
required: !0
|
836
|
+
},
|
837
|
+
outlined: {
|
838
|
+
type: Boolean,
|
839
|
+
default: !1
|
840
|
+
},
|
841
|
+
density: {
|
842
|
+
type: String,
|
843
|
+
default: "compact",
|
844
|
+
// Default density
|
845
|
+
validator(t) {
|
846
|
+
return ["comfortable", "compact", "default"].includes(t);
|
847
|
+
}
|
848
|
+
},
|
849
|
+
chips: {
|
850
|
+
type: Boolean,
|
851
|
+
default: !1
|
852
|
+
// Default is no chips
|
853
|
+
},
|
854
|
+
multiple: {
|
855
|
+
type: Boolean,
|
856
|
+
default: !1
|
857
|
+
}
|
858
|
+
},
|
859
|
+
data() {
|
860
|
+
return {
|
861
|
+
selectedItem: []
|
862
|
+
};
|
863
|
+
}
|
864
|
+
};
|
865
|
+
function ve(t, a, e, s, r, n) {
|
866
|
+
const o = l("v-select");
|
867
|
+
return d(), u(o, w(t.$attrs, {
|
868
|
+
items: e.items,
|
869
|
+
modelValue: r.selectedItem,
|
870
|
+
"onUpdate:modelValue": a[0] || (a[0] = (c) => r.selectedItem = c),
|
871
|
+
label: e.label,
|
872
|
+
density: e.density,
|
873
|
+
outlined: e.outlined,
|
874
|
+
chips: e.chips,
|
875
|
+
multiple: e.multiple,
|
876
|
+
placeholder: t.placeholder,
|
877
|
+
disabled: t.disabled,
|
878
|
+
error: t.error,
|
879
|
+
"error-messages": t.errorMessages,
|
880
|
+
"menu-props": t.menuProps
|
881
|
+
}), null, 16, ["items", "modelValue", "label", "density", "outlined", "chips", "multiple", "placeholder", "disabled", "error", "error-messages", "menu-props"]);
|
882
|
+
}
|
883
|
+
const be = /* @__PURE__ */ p(_e, [["render", ve], ["__scopeId", "data-v-e51a19b9"]]), ge = {
|
827
884
|
name: "RtSnackbar",
|
828
885
|
props: {
|
829
886
|
message: {
|
@@ -860,45 +917,45 @@ const pe = /* @__PURE__ */ _(fe, [["render", me], ["__scopeId", "data-v-2c20523a
|
|
860
917
|
snackbar: !1
|
861
918
|
};
|
862
919
|
}
|
863
|
-
},
|
864
|
-
function
|
865
|
-
const o =
|
866
|
-
return d(), h("div",
|
867
|
-
|
920
|
+
}, ye = { class: "text-center ma-2" };
|
921
|
+
function he(t, a, e, s, r, n) {
|
922
|
+
const o = l("v-btn"), c = l("v-snackbar");
|
923
|
+
return d(), h("div", ye, [
|
924
|
+
_(o, {
|
868
925
|
color: e.buttonColor,
|
869
|
-
onClick: a[0] || (a[0] = (f) =>
|
926
|
+
onClick: a[0] || (a[0] = (f) => r.snackbar = !0)
|
870
927
|
}, {
|
871
|
-
default:
|
928
|
+
default: i(() => [
|
872
929
|
g(b(e.buttonText), 1)
|
873
930
|
]),
|
874
931
|
_: 1
|
875
932
|
}, 8, ["color"]),
|
876
|
-
|
877
|
-
modelValue:
|
878
|
-
"onUpdate:modelValue": a[2] || (a[2] = (f) =>
|
933
|
+
_(c, {
|
934
|
+
modelValue: r.snackbar,
|
935
|
+
"onUpdate:modelValue": a[2] || (a[2] = (f) => r.snackbar = f),
|
879
936
|
timeout: e.timeout,
|
880
937
|
color: e.snackbarColor
|
881
938
|
}, {
|
882
|
-
actions:
|
883
|
-
|
939
|
+
actions: i(() => [
|
940
|
+
_(o, {
|
884
941
|
color: e.actionButtonColor,
|
885
942
|
variant: "text",
|
886
|
-
onClick: a[1] || (a[1] = (f) =>
|
943
|
+
onClick: a[1] || (a[1] = (f) => r.snackbar = !1)
|
887
944
|
}, {
|
888
|
-
default:
|
945
|
+
default: i(() => [
|
889
946
|
g(b(e.actionButtonText), 1)
|
890
947
|
]),
|
891
948
|
_: 1
|
892
949
|
}, 8, ["color"])
|
893
950
|
]),
|
894
|
-
default:
|
951
|
+
default: i(() => [
|
895
952
|
g(b(e.message) + " ", 1)
|
896
953
|
]),
|
897
954
|
_: 1
|
898
955
|
}, 8, ["modelValue", "timeout", "color"])
|
899
956
|
]);
|
900
957
|
}
|
901
|
-
const
|
958
|
+
const Se = /* @__PURE__ */ p(ge, [["render", he], ["__scopeId", "data-v-75ce5462"]]), Be = {
|
902
959
|
name: "RtBreadcrumbs",
|
903
960
|
components: {
|
904
961
|
RtButton: C
|
@@ -917,34 +974,34 @@ const ge = /* @__PURE__ */ _(_e, [["render", be], ["__scopeId", "data-v-75ce5462
|
|
917
974
|
default: "/"
|
918
975
|
}
|
919
976
|
}
|
920
|
-
},
|
921
|
-
function
|
922
|
-
const o =
|
977
|
+
}, xe = { key: 1 };
|
978
|
+
function ke(t, a, e, s, r, n) {
|
979
|
+
const o = l("RtButton"), c = l("v-breadcrumbs");
|
923
980
|
return d(), u(c, {
|
924
981
|
class: "v-breadcrumbs-wrapper",
|
925
982
|
divider: e.divider,
|
926
983
|
items: e.items
|
927
984
|
}, {
|
928
|
-
item:
|
985
|
+
item: i(({ item: f }) => [
|
929
986
|
f.to ? (d(), u(o, {
|
930
987
|
key: 0,
|
931
988
|
to: f.to,
|
932
989
|
text: ""
|
933
990
|
}, {
|
934
|
-
default:
|
991
|
+
default: i(() => [
|
935
992
|
g(b(f.text), 1)
|
936
993
|
]),
|
937
994
|
_: 2
|
938
|
-
}, 1032, ["to"])) : (d(), h("span",
|
995
|
+
}, 1032, ["to"])) : (d(), h("span", xe, b(f.text), 1))
|
939
996
|
]),
|
940
997
|
_: 1
|
941
998
|
}, 8, ["divider", "items"]);
|
942
999
|
}
|
943
|
-
const
|
1000
|
+
const Re = /* @__PURE__ */ p(Be, [["render", ke], ["__scopeId", "data-v-5ccff043"]]), Ie = {
|
944
1001
|
install: (t, a) => {
|
945
|
-
t.component("RtText", ue), t.component("RtButton", C), t.component("RtBadge", $), t.component("RtSnackbar",
|
1002
|
+
t.component("RtText", ue), t.component("RtButton", C), t.component("RtBadge", $), t.component("RtSnackbar", Se), t.component("RtAvatar", X), t.component("RtBreadcrumbs", Re), t.component("RtAlert", O), t.component("RtBottomNavigation", oe), t.component("RtBottomSheet", de), t.component("RtExpansionComponent", pe), t.component("RtSelect", be);
|
946
1003
|
}
|
947
1004
|
};
|
948
1005
|
export {
|
949
|
-
|
1006
|
+
Ie as default
|
950
1007
|
};
|
@@ -1 +1 @@
|
|
1
|
-
(function(e,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("vue")):typeof define=="function"&&define.amd?define(["vue"],d):(e=typeof globalThis<"u"?globalThis:e||self,e["readytech-ui-library-v2"]=d(e.Vue))})(this,function(e){"use strict";const d=(n,o)=>{const t=n.__vccOpts||n;for(const[i,r]of o)t[i]=r;return t},y={name:"RtIcon",props:{icon:{type:String,required:!0},size:{type:String,default:"24"},color:{type:String,default:""},customClass:{type:String,default:""}}};function h(n,o,t,i,r,a){const l=e.resolveComponent("v-icon");return e.openBlock(),e.createBlock(l,{size:t.size,color:t.color,class:e.normalizeClass(t.customClass),icon:t.icon},null,8,["size","color","class","icon"])}const b=d(y,[["render",h],["__scopeId","data-v-d688a9cc"]]),k={name:"RtAlert",components:{RtIcon:b},props:{density:{type:String,default:"default",validator(n){return["default","comfortable","compact"].includes(n)}},closable:{type:Boolean,default:!1},variant:{type:String,default:"flat",validator(n){return["plain","outlined","tonal","flat","elevated","text"].includes(n)}},text:{type:String,default:""},border:{type:String,default:"Start",validator(n){return["start","top","end","bottom","none"].includes(n)}},icon:{type:String,default:"info",validator(n){return["info","success","error","warning","hidden"].includes(n)}},borderColor:{type:String,default:"info",validator(n){return["info","success","error","warning","deep-purple accent-4"].includes(n)}},color:{type:String,default:"info",validator(n){return["info","success","error","warning","hidden"].includes(n)}}},methods:{getAriaLive(){return this.type==="error"||this.type==="warning"?"assertive":"polite"}}},x={class:"alert-content"};function B(n,o,t,i,r,a){const l=e.resolveComponent("RtIcon"),c=e.resolveComponent("v-alert");return e.openBlock(),e.createBlock(c,{text:t.text,type:t.icon,"border-color":t.borderColor,color:t.color,border:t.border,variant:t.variant,closable:t.closable,density:t.density,role:"alert","aria-live":a.getAriaLive(),"aria-atomic":!0},{default:e.withCtx(()=>[t.icon?(e.openBlock(),e.createBlock(l,{key:0,left:"","aria-hidden":"true"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.icon),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("span",x,[e.renderSlot(n.$slots,"default",{},void 0,!0)])]),_:3},8,["text","type","border-color","color","border","variant","closable","density","aria-live"])}const C=d(k,[["render",B],["__scopeId","data-v-bae3eb1c"]]),S={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:n=>["lazy","eager"].includes(n)},transition:{type:String,default:"fade-transition"},classes:{type:[String,Array,Object],default:()=>""}}};function w(n,o,t,i,r,a){const l=e.resolveComponent("v-img");return e.openBlock(),e.createBlock(l,{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(n.$slots,"placeholder",{},()=>[o[0]||(o[0]=e.createTextVNode("Loading..."))],!0)]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["src","alt","lazy-src","aspect-ratio","gradient","loading","transition","class"])}const R={name:"RtAvatar",components:{RtImage:d(S,[["render",w],["__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(n=>n[0]).join("").toUpperCase():""}}},V={class:"avatar-wrapper"},N={key:1,class:"initials"};function I(n,o,t,i,r,a){const l=e.resolveComponent("RtImage"),c=e.resolveComponent("v-avatar");return e.openBlock(),e.createElementBlock("div",V,[e.createVNode(c,{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(l,{key:0,src:t.avatarImage,alt:t.alt},null,8,["src","alt"])):(e.openBlock(),e.createElementBlock("span",N,e.toDisplayString(a.initials),1))]),_:1},8,["size","rounded","aria-label"])])}const T=d(R,[["render",I],["__scopeId","data-v-0d49dde0"]]),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 z(n,o,t,i,r,a){const l=e.resolveComponent("v-badge");return e.openBlock(),e.createBlock(l,{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":a.getAriaLabel,"aria-live":t.dot?"polite":"off",tabindex:"0"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["value","color","dot","overlap","content","size","bottom","top","aria-label","aria-live"])}const E=d(v,[["render",z],["__scopeId","data-v-02392152"]]),P={name:"RtButton",props:{label:{type:String,default:"Click Me"},primary:{type:Boolean,default:!1},size:{type:String,default:"default",validator:n=>["x-small","small","default","large","x-large"].includes(n)},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(n,{emit:o}){const t=()=>{o("click")},i=e.computed(()=>n.primary?"flat":"outlined"),r=e.computed(()=>n.label||"Button"),a=e.computed(()=>({"btn-primary":n.primary,"btn-icon":n.icon,"btn-disabled":n.disabled}));return{onClick:t,variant:i,ariaLabel:r,buttonClasses:a}}};function A(n,o,t,i,r,a){const l=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(l,{type:"button",variant:i.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(i.buttonClasses),onClick:i.onClick,"aria-label":i.ariaLabel},{default:e.withCtx(()=>[e.renderSlot(n.$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 _=d(P,[["render",A],["__scopeId","data-v-ce0d0f31"]]),L={name:"RtBottomNavigation",components:{RtIcon:b,RtButton:_},props:{ariaLabel:{type:String,default:"Bottom Navigation"},tabs:{type:Array,default:()=>[{value:"home",icon:"mdi-home"},{value:"favorites",icon:"mdi-heart"},{value:"settings",icon:"mdi-cog"}]},backgroundColor:{type:String,default:"primary"},textColor:{type:String,default:"white"},initialTab:{type:String,default:"home"}},data(){return{currentTab:this.initialTab}},methods:{onTabClick(n){this.$emit("tabSelected",n.value),this.currentTab=n.value}}};function D(n,o,t,i,r,a){const l=e.resolveComponent("RtIcon"),c=e.resolveComponent("RtButton"),s=e.resolveComponent("v-bottom-navigation");return e.openBlock(),e.createBlock(s,{modelValue:r.currentTab,"onUpdate:modelValue":o[0]||(o[0]=f=>r.currentTab=f),"background-color":t.backgroundColor,color:t.textColor,app:"",class:"v-bottom-navigation-wrapper",role:"navigation","aria-label":t.ariaLabel},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,(f,p)=>(e.openBlock(),e.createBlock(c,{key:p,value:f.value,"aria-label":f.value+" tab",icon:!0,onClick:g=>a.onTabClick(f),"aria-selected":r.currentTab===f.value?"true":"false",role:"tab",class:"v-btn-item"},{default:e.withCtx(()=>[e.createVNode(l,{icon:f.icon,size:24},null,8,["icon"])]),_:2},1032,["value","aria-label","onClick","aria-selected"]))),128))]),_:1},8,["modelValue","background-color","color","aria-label"])}const M=d(L,[["render",D],["__scopeId","data-v-d56f72f0"]]),K={name:"RtBottomSheet",components:{RtButton:_},data:()=>({sheet:!1})},j={class:"text-center"};function F(n,o,t,i,r,a){const l=e.resolveComponent("RtButton"),c=e.resolveComponent("v-card-text"),s=e.resolveComponent("v-card"),f=e.resolveComponent("v-bottom-sheet");return e.openBlock(),e.createElementBlock("div",j,[e.createVNode(l,{class:"open-button",size:"x-large",text:"Click Me",onClick:o[0]||(o[0]=p=>n.sheet=!n.sheet)}),e.createVNode(f,{modelValue:n.sheet,"onUpdate:modelValue":o[2]||(o[2]=p=>n.sheet=p)},{default:e.withCtx(()=>[e.createVNode(s,{class:"text-center",height:"200"},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(l,{class:"close-button",variant:"text",onClick:o[1]||(o[1]=p=>n.sheet=!n.sheet)},{default:e.withCtx(()=>o[3]||(o[3]=[e.createTextVNode(" close ")])),_:1}),o[4]||(o[4]=e.createElementVNode("br",null,null,-1)),o[5]||(o[5]=e.createElementVNode("br",null,null,-1)),o[6]||(o[6]=e.createElementVNode("div",null," This is a bottom sheet using the controlled by v-model instead of activator ",-1))]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const U=d(K,[["render",F]]),q={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(n){this.$emit("update:modelValue",n)}},inputProps(){return{...this.$props}}},methods:{handleClear(){this.$emit("clear")}}};function O(n,o,t,i,r,a){const l=e.resolveComponent("v-text-field");return e.openBlock(),e.createBlock(l,e.mergeProps(a.inputProps,{modelValue:a.inputValue,"onUpdate:modelValue":o[0]||(o[0]=c=>a.inputValue=c),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":a.handleClear}),null,16,["modelValue","label","placeholder","disabled","error","error-messages","prepend-icon","hint","autocomplete","onClick:clear"])}const H=d(q,[["render",O],["__scopeId","data-v-33b97f38"]]),G={name:"RtExpansionComponent",props:{disabled:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},variant:{type:String,default:"default",validator(n){return["default","accordion","inset","popout"].includes(n)}},multiple:{type:Boolean,default:!1},expandIcon:{type:String,default:"mdi-chevron-down"},collapseIcon:{type:String,default:"mdi-chevron-up"}},data(){return{expandedPanels:new Set}},methods:{isExpanded(n){return this.expandedPanels.has(n)},togglePanel(n){this.multiple?this.expandedPanels.has(n)?this.expandedPanels.delete(n):this.expandedPanels.add(n):this.expandedPanels=new Set(this.expandedPanels.has(n)?[]:[n])},focusPrevious(n){const o=n>0?n-1:this.items.length-1;document.getElementById(`panel-header-${o}`).focus()},focusNext(n){const o=n<this.items.length-1?n+1:0;document.getElementById(`panel-header-${o}`).focus()},focusFirst(){document.getElementById("panel-header-0").focus()},focusLast(){const n=this.items.length-1;document.getElementById(`panel-header-${n}`).focus()}}};function J(n,o,t,i,r,a){const l=e.resolveComponent("v-icon"),c=e.resolveComponent("v-expansion-panel-title"),s=e.resolveComponent("v-expansion-panel-text"),f=e.resolveComponent("v-expansion-panel"),p=e.resolveComponent("v-expansion-panels");return e.openBlock(),e.createBlock(p,e.mergeProps(n.$attrs,{multiple:t.multiple,variant:t.variant,disabled:t.disabled,role:"region","aria-multiselectable":"multiple"}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(g,m)=>(e.openBlock(),e.createBlock(f,{key:m,role:"group"},{default:e.withCtx(()=>[e.createVNode(c,{role:"button","aria-expanded":a.isExpanded(m),id:"panel-header-"+m,"aria-controls":"panel-content-"+m,onClick:u=>a.togglePanel(m),tabindex:"0",onKeydown:[e.withKeys(e.withModifiers(u=>a.togglePanel(m),["stop","prevent"]),["space"]),e.withKeys(e.withModifiers(u=>a.togglePanel(m),["stop","prevent"]),["enter"]),e.withKeys(e.withModifiers(u=>a.focusPrevious(m),["stop","prevent"]),["arrow-up"]),e.withKeys(e.withModifiers(u=>a.focusNext(m),["stop","prevent"]),["arrow-down"]),o[0]||(o[0]=e.withKeys(e.withModifiers(u=>a.focusFirst(),["stop","prevent"]),["home"])),o[1]||(o[1]=e.withKeys(e.withModifiers(u=>a.focusLast(),["stop","prevent"]),["end"]))]},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(g.title),1)]),actions:e.withCtx(()=>[t.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:0,"aria-hidden":!0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.isExpanded(m)?t.collapseIcon:t.expandIcon),1)]),_:2},1024))]),_:2},1032,["aria-expanded","id","aria-controls","onClick","onKeydown"]),e.withDirectives(e.createVNode(s,{id:"panel-content-"+m,"aria-labelledby":"panel-header-"+m,role:"region"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.content),1)]),_:2},1032,["id","aria-labelledby"]),[[e.vShow,a.isExpanded(m)]])]),_:2},1024))),128))]),_:1},16,["multiple","variant","disabled"])}const Q=d(G,[["render",J],["__scopeId","data-v-2c20523a"]]),W={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}}},X={class:"text-center ma-2"};function Y(n,o,t,i,r,a){const l=e.resolveComponent("v-btn"),c=e.resolveComponent("v-snackbar");return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(l,{color:t.buttonColor,onClick:o[0]||(o[0]=s=>r.snackbar=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonText),1)]),_:1},8,["color"]),e.createVNode(c,{modelValue:r.snackbar,"onUpdate:modelValue":o[2]||(o[2]=s=>r.snackbar=s),timeout:t.timeout,color:t.snackbarColor},{actions:e.withCtx(()=>[e.createVNode(l,{color:t.actionButtonColor,variant:"text",onClick:o[1]||(o[1]=s=>r.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 Z=d(W,[["render",Y],["__scopeId","data-v-75ce5462"]]),$={name:"RtBreadcrumbs",components:{RtButton:_},props:{items:{type:Array,default:()=>[{text:"Home",to:"/"},{text:"Products",to:"/products"},{text:"Details",to:null}]},divider:{type:String,default:"/"}}},ee={key:1};function te(n,o,t,i,r,a){const l=e.resolveComponent("RtButton"),c=e.resolveComponent("v-breadcrumbs");return e.openBlock(),e.createBlock(c,{class:"v-breadcrumbs-wrapper",divider:t.divider,items:t.items},{item:e.withCtx(({item:s})=>[s.to?(e.openBlock(),e.createBlock(l,{key:0,to:s.to,text:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.text),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",ee,e.toDisplayString(s.text),1))]),_:1},8,["divider","items"])}const ne=d($,[["render",te],["__scopeId","data-v-5ccff043"]]);return{install:(n,o)=>{n.component("RtText",H),n.component("RtButton",_),n.component("RtBadge",E),n.component("RtSnackbar",Z),n.component("RtAvatar",T),n.component("RtBreadcrumbs",ne),n.component("RtAlert",C),n.component("RtBottomNavigation",M),n.component("RtBottomSheet",U),n.component("RtExpansionComponent",Q)}}});
|
1
|
+
(function(e,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("vue")):typeof define=="function"&&define.amd?define(["vue"],d):(e=typeof globalThis<"u"?globalThis:e||self,e["readytech-ui-library-v2"]=d(e.Vue))})(this,function(e){"use strict";const d=(n,o)=>{const t=n.__vccOpts||n;for(const[i,r]of o)t[i]=r;return t},y={name:"RtIcon",props:{icon:{type:String,required:!0},size:{type:String,default:"24"},color:{type:String,default:""},customClass:{type:String,default:""}}};function h(n,o,t,i,r,a){const l=e.resolveComponent("v-icon");return e.openBlock(),e.createBlock(l,{size:t.size,color:t.color,class:e.normalizeClass(t.customClass),icon:t.icon},null,8,["size","color","class","icon"])}const b=d(y,[["render",h],["__scopeId","data-v-d688a9cc"]]),B={name:"RtAlert",components:{RtIcon:b},props:{density:{type:String,default:"default",validator(n){return["default","comfortable","compact"].includes(n)}},closable:{type:Boolean,default:!1},variant:{type:String,default:"flat",validator(n){return["plain","outlined","tonal","flat","elevated","text"].includes(n)}},text:{type:String,default:""},border:{type:String,default:"Start",validator(n){return["start","top","end","bottom","none"].includes(n)}},icon:{type:String,default:"info",validator(n){return["info","success","error","warning","hidden"].includes(n)}},borderColor:{type:String,default:"info",validator(n){return["info","success","error","warning","deep-purple accent-4"].includes(n)}},color:{type:String,default:"info",validator(n){return["info","success","error","warning","hidden"].includes(n)}}},methods:{getAriaLive(){return this.type==="error"||this.type==="warning"?"assertive":"polite"}}},k={class:"alert-content"};function C(n,o,t,i,r,a){const l=e.resolveComponent("RtIcon"),c=e.resolveComponent("v-alert");return e.openBlock(),e.createBlock(c,{text:t.text,type:t.icon,"border-color":t.borderColor,color:t.color,border:t.border,variant:t.variant,closable:t.closable,density:t.density,role:"alert","aria-live":a.getAriaLive(),"aria-atomic":!0},{default:e.withCtx(()=>[t.icon?(e.openBlock(),e.createBlock(l,{key:0,left:"","aria-hidden":"true"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.icon),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("span",k,[e.renderSlot(n.$slots,"default",{},void 0,!0)])]),_:3},8,["text","type","border-color","color","border","variant","closable","density","aria-live"])}const x=d(B,[["render",C],["__scopeId","data-v-bae3eb1c"]]),S={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:n=>["lazy","eager"].includes(n)},transition:{type:String,default:"fade-transition"},classes:{type:[String,Array,Object],default:()=>""}}};function w(n,o,t,i,r,a){const l=e.resolveComponent("v-img");return e.openBlock(),e.createBlock(l,{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(n.$slots,"placeholder",{},()=>[o[0]||(o[0]=e.createTextVNode("Loading..."))],!0)]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["src","alt","lazy-src","aspect-ratio","gradient","loading","transition","class"])}const R={name:"RtAvatar",components:{RtImage:d(S,[["render",w],["__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(n=>n[0]).join("").toUpperCase():""}}},V={class:"avatar-wrapper"},N={key:1,class:"initials"};function I(n,o,t,i,r,a){const l=e.resolveComponent("RtImage"),c=e.resolveComponent("v-avatar");return e.openBlock(),e.createElementBlock("div",V,[e.createVNode(c,{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(l,{key:0,src:t.avatarImage,alt:t.alt},null,8,["src","alt"])):(e.openBlock(),e.createElementBlock("span",N,e.toDisplayString(a.initials),1))]),_:1},8,["size","rounded","aria-label"])])}const v=d(R,[["render",I],["__scopeId","data-v-0d49dde0"]]),T={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 z(n,o,t,i,r,a){const l=e.resolveComponent("v-badge");return e.openBlock(),e.createBlock(l,{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":a.getAriaLabel,"aria-live":t.dot?"polite":"off",tabindex:"0"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["value","color","dot","overlap","content","size","bottom","top","aria-label","aria-live"])}const E=d(T,[["render",z],["__scopeId","data-v-02392152"]]),P={name:"RtButton",props:{label:{type:String,default:"Click Me"},primary:{type:Boolean,default:!1},size:{type:String,default:"default",validator:n=>["x-small","small","default","large","x-large"].includes(n)},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(n,{emit:o}){const t=()=>{o("click")},i=e.computed(()=>n.primary?"flat":"outlined"),r=e.computed(()=>n.label||"Button"),a=e.computed(()=>({"btn-primary":n.primary,"btn-icon":n.icon,"btn-disabled":n.disabled}));return{onClick:t,variant:i,ariaLabel:r,buttonClasses:a}}};function A(n,o,t,i,r,a){const l=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(l,{type:"button",variant:i.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(i.buttonClasses),onClick:i.onClick,"aria-label":i.ariaLabel},{default:e.withCtx(()=>[e.renderSlot(n.$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 _=d(P,[["render",A],["__scopeId","data-v-ce0d0f31"]]),L={name:"RtBottomNavigation",components:{RtIcon:b,RtButton:_},props:{ariaLabel:{type:String,default:"Bottom Navigation"},tabs:{type:Array,default:()=>[{value:"home",icon:"mdi-home"},{value:"favorites",icon:"mdi-heart"},{value:"settings",icon:"mdi-cog"}]},backgroundColor:{type:String,default:"primary"},textColor:{type:String,default:"white"},initialTab:{type:String,default:"home"}},data(){return{currentTab:this.initialTab}},methods:{onTabClick(n){this.$emit("tabSelected",n.value),this.currentTab=n.value}}};function D(n,o,t,i,r,a){const l=e.resolveComponent("RtIcon"),c=e.resolveComponent("RtButton"),s=e.resolveComponent("v-bottom-navigation");return e.openBlock(),e.createBlock(s,{modelValue:r.currentTab,"onUpdate:modelValue":o[0]||(o[0]=p=>r.currentTab=p),"background-color":t.backgroundColor,color:t.textColor,app:"",class:"v-bottom-navigation-wrapper",role:"navigation","aria-label":t.ariaLabel},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,(p,f)=>(e.openBlock(),e.createBlock(c,{key:f,value:p.value,"aria-label":p.value+" tab",icon:!0,onClick:g=>a.onTabClick(p),"aria-selected":r.currentTab===p.value?"true":"false",role:"tab",class:"v-btn-item"},{default:e.withCtx(()=>[e.createVNode(l,{icon:p.icon,size:24},null,8,["icon"])]),_:2},1032,["value","aria-label","onClick","aria-selected"]))),128))]),_:1},8,["modelValue","background-color","color","aria-label"])}const M=d(L,[["render",D],["__scopeId","data-v-d56f72f0"]]),K={name:"RtBottomSheet",components:{RtButton:_},data:()=>({sheet:!1})},q={class:"text-center"};function U(n,o,t,i,r,a){const l=e.resolveComponent("RtButton"),c=e.resolveComponent("v-card-text"),s=e.resolveComponent("v-card"),p=e.resolveComponent("v-bottom-sheet");return e.openBlock(),e.createElementBlock("div",q,[e.createVNode(l,{class:"open-button",size:"x-large",text:"Click Me",onClick:o[0]||(o[0]=f=>n.sheet=!n.sheet)}),e.createVNode(p,{modelValue:n.sheet,"onUpdate:modelValue":o[2]||(o[2]=f=>n.sheet=f)},{default:e.withCtx(()=>[e.createVNode(s,{class:"text-center",height:"200"},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(l,{class:"close-button",variant:"text",onClick:o[1]||(o[1]=f=>n.sheet=!n.sheet)},{default:e.withCtx(()=>o[3]||(o[3]=[e.createTextVNode(" close ")])),_:1}),o[4]||(o[4]=e.createElementVNode("br",null,null,-1)),o[5]||(o[5]=e.createElementVNode("br",null,null,-1)),o[6]||(o[6]=e.createElementVNode("div",null," This is a bottom sheet using the controlled by v-model instead of activator ",-1))]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const j=d(K,[["render",U]]),F={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(n){this.$emit("update:modelValue",n)}},inputProps(){return{...this.$props}}},methods:{handleClear(){this.$emit("clear")}}};function O(n,o,t,i,r,a){const l=e.resolveComponent("v-text-field");return e.openBlock(),e.createBlock(l,e.mergeProps(a.inputProps,{modelValue:a.inputValue,"onUpdate:modelValue":o[0]||(o[0]=c=>a.inputValue=c),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":a.handleClear}),null,16,["modelValue","label","placeholder","disabled","error","error-messages","prepend-icon","hint","autocomplete","onClick:clear"])}const H=d(F,[["render",O],["__scopeId","data-v-33b97f38"]]),G={name:"RtExpansionComponent",props:{disabled:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},variant:{type:String,default:"default",validator(n){return["default","accordion","inset","popout"].includes(n)}},multiple:{type:Boolean,default:!1},expandIcon:{type:String,default:"mdi-chevron-down"},collapseIcon:{type:String,default:"mdi-chevron-up"}},data(){return{expandedPanels:new Set}},methods:{isExpanded(n){return this.expandedPanels.has(n)},togglePanel(n){this.multiple?this.expandedPanels.has(n)?this.expandedPanels.delete(n):this.expandedPanels.add(n):this.expandedPanels=new Set(this.expandedPanels.has(n)?[]:[n])},focusPrevious(n){const o=n>0?n-1:this.items.length-1;document.getElementById(`panel-header-${o}`).focus()},focusNext(n){const o=n<this.items.length-1?n+1:0;document.getElementById(`panel-header-${o}`).focus()},focusFirst(){document.getElementById("panel-header-0").focus()},focusLast(){const n=this.items.length-1;document.getElementById(`panel-header-${n}`).focus()}}};function J(n,o,t,i,r,a){const l=e.resolveComponent("v-icon"),c=e.resolveComponent("v-expansion-panel-title"),s=e.resolveComponent("v-expansion-panel-text"),p=e.resolveComponent("v-expansion-panel"),f=e.resolveComponent("v-expansion-panels");return e.openBlock(),e.createBlock(f,e.mergeProps(n.$attrs,{multiple:t.multiple,variant:t.variant,disabled:t.disabled,role:"region","aria-multiselectable":"multiple"}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(g,m)=>(e.openBlock(),e.createBlock(p,{key:m,role:"group"},{default:e.withCtx(()=>[e.createVNode(c,{role:"button","aria-expanded":a.isExpanded(m),id:"panel-header-"+m,"aria-controls":"panel-content-"+m,onClick:u=>a.togglePanel(m),tabindex:"0",onKeydown:[e.withKeys(e.withModifiers(u=>a.togglePanel(m),["stop","prevent"]),["space"]),e.withKeys(e.withModifiers(u=>a.togglePanel(m),["stop","prevent"]),["enter"]),e.withKeys(e.withModifiers(u=>a.focusPrevious(m),["stop","prevent"]),["arrow-up"]),e.withKeys(e.withModifiers(u=>a.focusNext(m),["stop","prevent"]),["arrow-down"]),o[0]||(o[0]=e.withKeys(e.withModifiers(u=>a.focusFirst(),["stop","prevent"]),["home"])),o[1]||(o[1]=e.withKeys(e.withModifiers(u=>a.focusLast(),["stop","prevent"]),["end"]))]},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(g.title),1)]),actions:e.withCtx(()=>[t.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:0,"aria-hidden":!0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.isExpanded(m)?t.collapseIcon:t.expandIcon),1)]),_:2},1024))]),_:2},1032,["aria-expanded","id","aria-controls","onClick","onKeydown"]),e.withDirectives(e.createVNode(s,{id:"panel-content-"+m,"aria-labelledby":"panel-header-"+m,role:"region"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.content),1)]),_:2},1032,["id","aria-labelledby"]),[[e.vShow,a.isExpanded(m)]])]),_:2},1024))),128))]),_:1},16,["multiple","variant","disabled"])}const Q=d(G,[["render",J],["__scopeId","data-v-2c20523a"]]),W={name:"RtSelect",props:{items:{type:Array,required:!0},label:{type:String,required:!0},outlined:{type:Boolean,default:!1},density:{type:String,default:"compact",validator(n){return["comfortable","compact","default"].includes(n)}},chips:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1}},data(){return{selectedItem:[]}}};function X(n,o,t,i,r,a){const l=e.resolveComponent("v-select");return e.openBlock(),e.createBlock(l,e.mergeProps(n.$attrs,{items:t.items,modelValue:r.selectedItem,"onUpdate:modelValue":o[0]||(o[0]=c=>r.selectedItem=c),label:t.label,density:t.density,outlined:t.outlined,chips:t.chips,multiple:t.multiple,placeholder:n.placeholder,disabled:n.disabled,error:n.error,"error-messages":n.errorMessages,"menu-props":n.menuProps}),null,16,["items","modelValue","label","density","outlined","chips","multiple","placeholder","disabled","error","error-messages","menu-props"])}const Y=d(W,[["render",X],["__scopeId","data-v-e51a19b9"]]),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}}},$={class:"text-center ma-2"};function ee(n,o,t,i,r,a){const l=e.resolveComponent("v-btn"),c=e.resolveComponent("v-snackbar");return e.openBlock(),e.createElementBlock("div",$,[e.createVNode(l,{color:t.buttonColor,onClick:o[0]||(o[0]=s=>r.snackbar=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonText),1)]),_:1},8,["color"]),e.createVNode(c,{modelValue:r.snackbar,"onUpdate:modelValue":o[2]||(o[2]=s=>r.snackbar=s),timeout:t.timeout,color:t.snackbarColor},{actions:e.withCtx(()=>[e.createVNode(l,{color:t.actionButtonColor,variant:"text",onClick:o[1]||(o[1]=s=>r.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 te=d(Z,[["render",ee],["__scopeId","data-v-75ce5462"]]),ne={name:"RtBreadcrumbs",components:{RtButton:_},props:{items:{type:Array,default:()=>[{text:"Home",to:"/"},{text:"Products",to:"/products"},{text:"Details",to:null}]},divider:{type:String,default:"/"}}},oe={key:1};function ae(n,o,t,i,r,a){const l=e.resolveComponent("RtButton"),c=e.resolveComponent("v-breadcrumbs");return e.openBlock(),e.createBlock(c,{class:"v-breadcrumbs-wrapper",divider:t.divider,items:t.items},{item:e.withCtx(({item:s})=>[s.to?(e.openBlock(),e.createBlock(l,{key:0,to:s.to,text:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.text),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(s.text),1))]),_:1},8,["divider","items"])}const le=d(ne,[["render",ae],["__scopeId","data-v-5ccff043"]]);return{install:(n,o)=>{n.component("RtText",H),n.component("RtButton",_),n.component("RtBadge",E),n.component("RtSnackbar",te),n.component("RtAvatar",v),n.component("RtBreadcrumbs",le),n.component("RtAlert",x),n.component("RtBottomNavigation",M),n.component("RtBottomSheet",j),n.component("RtExpansionComponent",Q),n.component("RtSelect",Y)}}});
|