@robuust-digital/vue-components 2.2.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/_shared/{ButtonBase.vue_vue_type_script_setup_true_lang-DeflHqux.js → ButtonBase.vue_vue_type_script_setup_true_lang-BLm8QzEC.js} +23 -23
- package/dist/_shared/{ChevronDownIcon-DaaXfD3C.js → ChevronDownIcon-CcE_K1lg.js} +12 -12
- package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-CxRv55TC.js +256 -0
- package/dist/_shared/{Drawer.vue_vue_type_script_setup_true_lang-CD5914Fk.js → Drawer.vue_vue_type_script_setup_true_lang-XMND_Yzl.js} +62 -62
- package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-BtkiBqxy.js +115 -0
- package/dist/_shared/FormInput.vue_vue_type_script_setup_true_lang-C_1WSzbH.js +74 -0
- package/dist/_shared/{Modal.vue_vue_type_script_setup_true_lang-CoHkAJj3.js → Modal.vue_vue_type_script_setup_true_lang-2AljJgxw.js} +68 -71
- package/dist/_shared/{RichTextEditor.vue_vue_type_script_setup_true_lang-CIVhqJtE.js → RichTextEditor.vue_vue_type_script_setup_true_lang-BLs_S_-D.js} +102 -133
- package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-DMUJ5Emt.js +670 -0
- package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-BfMkJm5T.js +78 -0
- package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-CKp1wzE2.js +95 -0
- package/dist/combobox/index.js +1 -1
- package/dist/core/checkbox.css +10 -5
- package/dist/core/index.js +4 -4
- package/dist/core/radio.css +11 -6
- package/dist/core.d.ts +2 -2
- package/dist/dialogs/index.js +2 -2
- package/dist/dropdown/index.js +1 -1
- package/dist/index/index.js +11 -11
- package/dist/index.d.ts +2 -2
- package/dist/rich-text-editor/index.js +1 -1
- package/dist/toast/index.js +1 -1
- package/dist/tooltip/index.js +1 -1
- package/package.json +19 -19
- package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-CP3x2DUA.js +0 -266
- package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-CmYj-7WQ.js +0 -115
- package/dist/_shared/FormInput.vue_vue_type_script_setup_true_lang-BhJpG-Fw.js +0 -75
- package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-DnzOq9GZ.js +0 -679
- package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-Be3i_0zE.js +0 -78
- package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-CoydN9sS.js +0 -96
|
@@ -1,679 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as n, openBlock as a, createElementVNode as c, defineComponent as C, Fragment as k, renderList as w, renderSlot as u, createTextVNode as M, toDisplayString as g, createVNode as L, unref as h, normalizeClass as b, createBlock as B, resolveDynamicComponent as P, withCtx as I, createCommentVNode as $, computed as S, useAttrs as z, ref as _, withDirectives as O, mergeProps as y, vModelDynamic as E, normalizeProps as H, guardReactiveProps as R, vModelSelect as U, vModelText as Z } from "vue";
|
|
2
|
-
import { r as K } from "./XMarkIcon-90mcPzBs.js";
|
|
3
|
-
import { u as N } from "./FormInput.vue_vue_type_script_setup_true_lang-BhJpG-Fw.js";
|
|
4
|
-
import { S as q } from "./icon-spinner-CP0VP_YM.js";
|
|
5
|
-
import { r as G } from "./ChevronDownIcon-DaaXfD3C.js";
|
|
6
|
-
function J(f, s) {
|
|
7
|
-
return a(), n("svg", {
|
|
8
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
-
viewBox: "0 0 24 24",
|
|
10
|
-
fill: "currentColor",
|
|
11
|
-
"aria-hidden": "true",
|
|
12
|
-
"data-slot": "icon"
|
|
13
|
-
}, [
|
|
14
|
-
c("path", {
|
|
15
|
-
"fill-rule": "evenodd",
|
|
16
|
-
d: "M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",
|
|
17
|
-
"clip-rule": "evenodd"
|
|
18
|
-
})
|
|
19
|
-
]);
|
|
20
|
-
}
|
|
21
|
-
function Q(f, s) {
|
|
22
|
-
return a(), n("svg", {
|
|
23
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
-
viewBox: "0 0 24 24",
|
|
25
|
-
fill: "currentColor",
|
|
26
|
-
"aria-hidden": "true",
|
|
27
|
-
"data-slot": "icon"
|
|
28
|
-
}, [
|
|
29
|
-
c("path", {
|
|
30
|
-
"fill-rule": "evenodd",
|
|
31
|
-
d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",
|
|
32
|
-
"clip-rule": "evenodd"
|
|
33
|
-
})
|
|
34
|
-
]);
|
|
35
|
-
}
|
|
36
|
-
const W = { class: "rvc-accordion" }, X = ["open", "name"], Y = ["innerHTML"], Oe = /* @__PURE__ */ C({
|
|
37
|
-
__name: "Accordion",
|
|
38
|
-
props: {
|
|
39
|
-
items: {},
|
|
40
|
-
name: {},
|
|
41
|
-
defaultOpenIndex: {},
|
|
42
|
-
contentClass: {}
|
|
43
|
-
},
|
|
44
|
-
setup(f) {
|
|
45
|
-
return (s, d) => (a(), n("div", W, [
|
|
46
|
-
(a(!0), n(k, null, w(s.items, (p, o) => (a(), n("details", {
|
|
47
|
-
key: o,
|
|
48
|
-
open: s.defaultOpenIndex === o,
|
|
49
|
-
name: s.name
|
|
50
|
-
}, [
|
|
51
|
-
c("summary", null, [
|
|
52
|
-
u(s.$slots, "summary", {
|
|
53
|
-
item: p,
|
|
54
|
-
index: o
|
|
55
|
-
}, () => [
|
|
56
|
-
M(g(p.title) + " ", 1),
|
|
57
|
-
u(s.$slots, "icon", { classList: "rvc-accordion-icon" }, () => [
|
|
58
|
-
L(h(Q), { class: "rvc-accordion-icon" })
|
|
59
|
-
])
|
|
60
|
-
])
|
|
61
|
-
]),
|
|
62
|
-
c("div", {
|
|
63
|
-
class: b(["rvc-accordion-content", s.contentClass])
|
|
64
|
-
}, [
|
|
65
|
-
u(s.$slots, "content", {
|
|
66
|
-
item: p,
|
|
67
|
-
index: o
|
|
68
|
-
}, () => [
|
|
69
|
-
c("div", {
|
|
70
|
-
innerHTML: p.content
|
|
71
|
-
}, null, 8, Y)
|
|
72
|
-
])
|
|
73
|
-
], 2)
|
|
74
|
-
], 8, X))), 128))
|
|
75
|
-
]));
|
|
76
|
-
}
|
|
77
|
-
}), x = { class: "rvc-alert-title" }, Ne = /* @__PURE__ */ C({
|
|
78
|
-
__name: "Alert",
|
|
79
|
-
props: {
|
|
80
|
-
as: { default: "div" },
|
|
81
|
-
title: { default: "" },
|
|
82
|
-
icon: { type: [Function, Object, null], default: null },
|
|
83
|
-
type: { default: "info" },
|
|
84
|
-
close: { type: Boolean, default: !1 }
|
|
85
|
-
},
|
|
86
|
-
emits: ["alert:close"],
|
|
87
|
-
setup(f) {
|
|
88
|
-
return (s, d) => (a(), B(P(s.as), {
|
|
89
|
-
class: b(["rvc-alert", `rvc-alert-${s.type}`])
|
|
90
|
-
}, {
|
|
91
|
-
default: I(() => [
|
|
92
|
-
u(s.$slots, "icon", {}, () => [
|
|
93
|
-
s.icon ? (a(), B(P(s.icon), {
|
|
94
|
-
key: 0,
|
|
95
|
-
class: "rvc-alert-icon"
|
|
96
|
-
})) : $("", !0)
|
|
97
|
-
]),
|
|
98
|
-
c("div", null, [
|
|
99
|
-
u(s.$slots, "title", {}, () => [
|
|
100
|
-
c("span", x, g(s.title), 1)
|
|
101
|
-
]),
|
|
102
|
-
u(s.$slots, "default")
|
|
103
|
-
]),
|
|
104
|
-
u(s.$slots, "close", {}, () => [
|
|
105
|
-
s.close ? (a(), n("button", {
|
|
106
|
-
key: 0,
|
|
107
|
-
type: "button",
|
|
108
|
-
class: "rvc-alert-close",
|
|
109
|
-
onClick: d[0] || (d[0] = (p) => s.$emit("alert:close"))
|
|
110
|
-
}, [
|
|
111
|
-
L(h(K))
|
|
112
|
-
])) : $("", !0)
|
|
113
|
-
])
|
|
114
|
-
]),
|
|
115
|
-
_: 3
|
|
116
|
-
}, 8, ["class"]));
|
|
117
|
-
}
|
|
118
|
-
}), ee = { class: "rvc-checkbox-input" }, te = {
|
|
119
|
-
key: 0,
|
|
120
|
-
class: "rvc-checkbox-label"
|
|
121
|
-
}, Fe = /* @__PURE__ */ C({
|
|
122
|
-
inheritAttrs: !1,
|
|
123
|
-
__name: "Checkbox",
|
|
124
|
-
props: {
|
|
125
|
-
modelValue: { type: [Number, String, Object, Array, Boolean, null], default: null },
|
|
126
|
-
label: { default: "" },
|
|
127
|
-
rootClass: { default: "" }
|
|
128
|
-
},
|
|
129
|
-
emits: ["update:modelValue"],
|
|
130
|
-
setup(f, { emit: s }) {
|
|
131
|
-
const d = f, p = s, o = S({
|
|
132
|
-
get: () => d.modelValue,
|
|
133
|
-
set: (t) => p("update:modelValue", t)
|
|
134
|
-
}), { hasModelBinding: r } = N(), m = z(), e = S(() => ({
|
|
135
|
-
...m,
|
|
136
|
-
type: "checkbox"
|
|
137
|
-
})), l = _(null);
|
|
138
|
-
return (t, i) => (a(), n("label", {
|
|
139
|
-
class: b(["rvc-checkbox", t.rootClass])
|
|
140
|
-
}, [
|
|
141
|
-
h(r) ? O((a(), n("input", y({ key: 0 }, e.value, {
|
|
142
|
-
ref_key: "input",
|
|
143
|
-
ref: l,
|
|
144
|
-
"onUpdate:modelValue": i[0] || (i[0] = (v) => o.value = v)
|
|
145
|
-
}), null, 16)), [
|
|
146
|
-
[E, o.value]
|
|
147
|
-
]) : (a(), n("input", y({ key: 1 }, e.value, {
|
|
148
|
-
ref_key: "input",
|
|
149
|
-
ref: l
|
|
150
|
-
}), null, 16)),
|
|
151
|
-
u(t.$slots, "input", {}, () => [
|
|
152
|
-
c("span", ee, [
|
|
153
|
-
u(t.$slots, "icon", {}, () => [
|
|
154
|
-
L(h(J))
|
|
155
|
-
])
|
|
156
|
-
])
|
|
157
|
-
]),
|
|
158
|
-
u(t.$slots, "default", { label: t.label }, () => [
|
|
159
|
-
t.label ? (a(), n("span", te, g(t.label), 1)) : $("", !0)
|
|
160
|
-
])
|
|
161
|
-
], 2));
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
function ae(f, s) {
|
|
165
|
-
return a(), n("svg", {
|
|
166
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
167
|
-
viewBox: "0 0 16 16",
|
|
168
|
-
fill: "currentColor",
|
|
169
|
-
"aria-hidden": "true",
|
|
170
|
-
"data-slot": "icon"
|
|
171
|
-
}, [
|
|
172
|
-
c("path", {
|
|
173
|
-
"fill-rule": "evenodd",
|
|
174
|
-
d: "M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",
|
|
175
|
-
"clip-rule": "evenodd"
|
|
176
|
-
})
|
|
177
|
-
]);
|
|
178
|
-
}
|
|
179
|
-
function le(f, s) {
|
|
180
|
-
return a(), n("svg", {
|
|
181
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
182
|
-
viewBox: "0 0 20 20",
|
|
183
|
-
fill: "currentColor",
|
|
184
|
-
"aria-hidden": "true",
|
|
185
|
-
"data-slot": "icon"
|
|
186
|
-
}, [
|
|
187
|
-
c("path", {
|
|
188
|
-
"fill-rule": "evenodd",
|
|
189
|
-
d: "M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",
|
|
190
|
-
"clip-rule": "evenodd"
|
|
191
|
-
})
|
|
192
|
-
]);
|
|
193
|
-
}
|
|
194
|
-
function ne(f, s) {
|
|
195
|
-
return a(), n("svg", {
|
|
196
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
197
|
-
viewBox: "0 0 20 20",
|
|
198
|
-
fill: "currentColor",
|
|
199
|
-
"aria-hidden": "true",
|
|
200
|
-
"data-slot": "icon"
|
|
201
|
-
}, [
|
|
202
|
-
c("path", {
|
|
203
|
-
"fill-rule": "evenodd",
|
|
204
|
-
d: "M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",
|
|
205
|
-
"clip-rule": "evenodd"
|
|
206
|
-
})
|
|
207
|
-
]);
|
|
208
|
-
}
|
|
209
|
-
const se = ["value"], oe = ["value"], D = /* @__PURE__ */ C({
|
|
210
|
-
inheritAttrs: !1,
|
|
211
|
-
__name: "FormSelect",
|
|
212
|
-
props: {
|
|
213
|
-
modelValue: { type: [String, Number, Object, Boolean, null], default: null },
|
|
214
|
-
rootClass: { default: "" },
|
|
215
|
-
prefixIcon: { type: [Function, Object, null], default: null },
|
|
216
|
-
icon: { type: [Function, Object, null], default: null },
|
|
217
|
-
size: { default: "base" },
|
|
218
|
-
options: { default: () => [] },
|
|
219
|
-
optionLabel: { default: "name" },
|
|
220
|
-
optionValue: { default: "id" }
|
|
221
|
-
},
|
|
222
|
-
emits: ["update:modelValue"],
|
|
223
|
-
setup(f, { emit: s }) {
|
|
224
|
-
const d = f, p = s, o = S({
|
|
225
|
-
get: () => d.modelValue,
|
|
226
|
-
set: (e) => p("update:modelValue", e)
|
|
227
|
-
}), { hasModelBinding: r } = N(), m = _(null);
|
|
228
|
-
return (e, l) => (a(), n("div", {
|
|
229
|
-
class: b([
|
|
230
|
-
"rvc-select",
|
|
231
|
-
`rvc-select-${e.size}`,
|
|
232
|
-
e.rootClass
|
|
233
|
-
])
|
|
234
|
-
}, [
|
|
235
|
-
e.prefixIcon ? u(e.$slots, "prefixIcon", {
|
|
236
|
-
key: 0,
|
|
237
|
-
icon: e.prefixIcon
|
|
238
|
-
}, () => [
|
|
239
|
-
(a(), B(P(e.prefixIcon), { "aria-hidden": "true" }))
|
|
240
|
-
]) : $("", !0),
|
|
241
|
-
u(e.$slots, "select", H(R(e.$attrs)), () => [
|
|
242
|
-
h(r) ? O((a(), n("select", y({ key: 0 }, e.$attrs, {
|
|
243
|
-
ref_key: "select",
|
|
244
|
-
ref: m,
|
|
245
|
-
"onUpdate:modelValue": l[0] || (l[0] = (t) => o.value = t)
|
|
246
|
-
}), [
|
|
247
|
-
u(e.$slots, "default", {}, () => [
|
|
248
|
-
e.options.length > 0 ? (a(!0), n(k, { key: 0 }, w(e.options, (t, i) => (a(), n("option", {
|
|
249
|
-
key: `option-${i}-${t[e.optionValue]}`,
|
|
250
|
-
value: t[e.optionValue]
|
|
251
|
-
}, g(t[e.optionLabel]), 9, se))), 128)) : $("", !0)
|
|
252
|
-
])
|
|
253
|
-
], 16)), [
|
|
254
|
-
[U, o.value]
|
|
255
|
-
]) : (a(), n("select", y({ key: 1 }, e.$attrs, {
|
|
256
|
-
ref_key: "select",
|
|
257
|
-
ref: m
|
|
258
|
-
}), [
|
|
259
|
-
u(e.$slots, "default", {}, () => [
|
|
260
|
-
e.options.length > 0 ? (a(!0), n(k, { key: 0 }, w(e.options, (t, i) => (a(), n("option", {
|
|
261
|
-
key: `option-${i}-${t[e.optionValue]}`,
|
|
262
|
-
value: t[e.optionValue]
|
|
263
|
-
}, g(t[e.optionLabel]), 9, oe))), 128)) : $("", !0)
|
|
264
|
-
])
|
|
265
|
-
], 16))
|
|
266
|
-
]),
|
|
267
|
-
u(e.$slots, "icon", { icon: e.icon }, () => [
|
|
268
|
-
(a(), B(P(e.icon ?? h(G)), { "aria-hidden": "true" }))
|
|
269
|
-
])
|
|
270
|
-
], 2));
|
|
271
|
-
}
|
|
272
|
-
}), re = {
|
|
273
|
-
key: 0,
|
|
274
|
-
class: "rvc-pagination"
|
|
275
|
-
}, ie = ["value"], ue = { class: "rvc-pagination-info" }, ce = { class: "rvc-pagination-nav-list" }, de = ["disabled", "onClick"], pe = { key: 2 }, ve = { key: 3 }, fe = /* @__PURE__ */ C({
|
|
276
|
-
__name: "Pagination",
|
|
277
|
-
props: {
|
|
278
|
-
pagination: {},
|
|
279
|
-
perPage: { default: 10 },
|
|
280
|
-
perPageLabel: { default: "per page" },
|
|
281
|
-
perPageOptions: { default: () => [10, 20, 50] },
|
|
282
|
-
fromLabel: { default: "of" }
|
|
283
|
-
},
|
|
284
|
-
emits: ["pagination:change", "pagination:perPage"],
|
|
285
|
-
setup(f, { emit: s }) {
|
|
286
|
-
const d = f, p = s, o = _(d.perPage);
|
|
287
|
-
return (r, m) => {
|
|
288
|
-
var e;
|
|
289
|
-
return (e = r.pagination) != null && e.total ? (a(), n("div", re, [
|
|
290
|
-
u(r.$slots, "perPage", y(r.pagination, { perPage: o.value }), () => [
|
|
291
|
-
L(D, {
|
|
292
|
-
modelValue: o.value,
|
|
293
|
-
"onUpdate:modelValue": [
|
|
294
|
-
m[0] || (m[0] = (l) => o.value = l),
|
|
295
|
-
m[1] || (m[1] = (l) => p("pagination:perPage", Number(l)))
|
|
296
|
-
],
|
|
297
|
-
size: "sm",
|
|
298
|
-
"root-class": "rvc-pagination-per-page"
|
|
299
|
-
}, {
|
|
300
|
-
default: I(() => [
|
|
301
|
-
(a(!0), n(k, null, w(r.perPageOptions, (l) => (a(), n("option", {
|
|
302
|
-
key: `pagination-items-per-page-option-${l}`,
|
|
303
|
-
value: l
|
|
304
|
-
}, g(l) + " " + g(r.perPageLabel), 9, ie))), 128))
|
|
305
|
-
]),
|
|
306
|
-
_: 1
|
|
307
|
-
}, 8, ["modelValue"])
|
|
308
|
-
]),
|
|
309
|
-
u(r.$slots, "info", y(r.pagination, { fromLabel: r.fromLabel }), () => [
|
|
310
|
-
c("div", ue, g(r.pagination.from) + " - " + g(r.pagination.to) + " " + g(r.fromLabel) + " " + g(r.pagination.total), 1)
|
|
311
|
-
]),
|
|
312
|
-
c("nav", null, [
|
|
313
|
-
c("ol", ce, [
|
|
314
|
-
(a(!0), n(k, null, w(r.pagination.links, (l, t) => (a(), n("li", {
|
|
315
|
-
key: `pagination-link-${l.label}-${t}`,
|
|
316
|
-
class: "rvc-pagination-nav-list-item"
|
|
317
|
-
}, [
|
|
318
|
-
c("button", {
|
|
319
|
-
type: "button",
|
|
320
|
-
disabled: l.label === "..." || !l.url,
|
|
321
|
-
class: b([
|
|
322
|
-
"rvc-pagination-button",
|
|
323
|
-
{ "rvc-pagination-button-active": l.active }
|
|
324
|
-
]),
|
|
325
|
-
onClick: (i) => l.url && p("pagination:change", l.url)
|
|
326
|
-
}, [
|
|
327
|
-
l.url !== "..." && t === 0 ? (a(), B(h(le), {
|
|
328
|
-
key: 0,
|
|
329
|
-
"aria-hidden": "true",
|
|
330
|
-
class: b([
|
|
331
|
-
"rvc-pagination-button-icon",
|
|
332
|
-
{ "rvc-pagination-button-icon-disabled": !l.url }
|
|
333
|
-
])
|
|
334
|
-
}, null, 8, ["class"])) : l.label !== "..." && t === r.pagination.links.length - 1 ? (a(), B(h(ne), {
|
|
335
|
-
key: 1,
|
|
336
|
-
"aria-hidden": "true",
|
|
337
|
-
class: b([
|
|
338
|
-
"rvc-pagination-button-icon",
|
|
339
|
-
{ "rvc-pagination-button-icon-disabled": !l.url }
|
|
340
|
-
])
|
|
341
|
-
}, null, 8, ["class"])) : l.label === "..." ? (a(), n("span", pe, " ... ")) : (a(), n("span", ve, g(l.label), 1))
|
|
342
|
-
], 10, de)
|
|
343
|
-
]))), 128))
|
|
344
|
-
])
|
|
345
|
-
])
|
|
346
|
-
])) : $("", !0);
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
}), ge = { key: 0 }, me = ["aria-label", "onClick"], be = ["innerHTML"], ye = { key: 1 }, $e = ["colspan"], he = { key: 2 }, ke = ["colspan"], Ve = { class: "rvc-table-spinner-wrapper" }, we = { key: 1 }, je = /* @__PURE__ */ C({
|
|
350
|
-
__name: "DataTable",
|
|
351
|
-
props: {
|
|
352
|
-
headers: { default: () => [] },
|
|
353
|
-
items: {},
|
|
354
|
-
noResultsText: { default: "No results found." },
|
|
355
|
-
loadingText: { default: "Loading content..." },
|
|
356
|
-
striped: { type: Boolean, default: !1 },
|
|
357
|
-
spinning: { type: Boolean, default: !1 },
|
|
358
|
-
pagination: { default: null },
|
|
359
|
-
wrapperClass: { default: "" },
|
|
360
|
-
defaultSort: { default: null }
|
|
361
|
-
},
|
|
362
|
-
emits: ["table:sortBy", "pagination:change", "pagination:perPage"],
|
|
363
|
-
setup(f, { emit: s }) {
|
|
364
|
-
const d = f, p = s, o = _(d.defaultSort), r = (e) => d.headers.find((l) => l.key === e), m = (e) => {
|
|
365
|
-
e.key && (!o.value || o.value.key !== e.key ? o.value = {
|
|
366
|
-
key: e.key,
|
|
367
|
-
direction: "asc"
|
|
368
|
-
} : o.value.direction === "asc" ? o.value = {
|
|
369
|
-
key: e.key,
|
|
370
|
-
direction: "desc"
|
|
371
|
-
} : o.value = null, p("table:sortBy", o.value));
|
|
372
|
-
};
|
|
373
|
-
return (e, l) => (a(), n("div", null, [
|
|
374
|
-
c("div", {
|
|
375
|
-
class: b(["rvc-table-wrapper", e.wrapperClass])
|
|
376
|
-
}, [
|
|
377
|
-
c("table", {
|
|
378
|
-
class: b([{ "rvc-table-striped": e.striped }, "rvc-table"])
|
|
379
|
-
}, [
|
|
380
|
-
e.headers.length ? (a(), n("thead", ge, [
|
|
381
|
-
u(e.$slots, "headers", { headers: e.headers }, () => [
|
|
382
|
-
c("tr", null, [
|
|
383
|
-
(a(!0), n(k, null, w(e.headers, (t, i) => u(e.$slots, "header", {
|
|
384
|
-
header: t,
|
|
385
|
-
index: i
|
|
386
|
-
}, () => {
|
|
387
|
-
var v, V;
|
|
388
|
-
return [
|
|
389
|
-
(a(), n("th", y({ ref_for: !0 }, { ...t, id: String(t.id) }, {
|
|
390
|
-
key: `rvc-table-header-${t.id}`,
|
|
391
|
-
class: {
|
|
392
|
-
"rvc-table-text-left": t.align === "left" || !t.align,
|
|
393
|
-
"rvc-table-text-center": t.align === "center",
|
|
394
|
-
"rvc-table-text-right": t.align === "right"
|
|
395
|
-
}
|
|
396
|
-
}), [
|
|
397
|
-
t.sortable && t.key ? (a(), n("button", {
|
|
398
|
-
key: 0,
|
|
399
|
-
type: "button",
|
|
400
|
-
"aria-label": `Sort on ${t.label}`,
|
|
401
|
-
class: b([
|
|
402
|
-
"rvc-table-sort-button",
|
|
403
|
-
{
|
|
404
|
-
"rvc-table-sort-button-center": t.align === "center",
|
|
405
|
-
"rvc-table-sort-button-right": t.align === "right"
|
|
406
|
-
}
|
|
407
|
-
]),
|
|
408
|
-
onClick: (T) => m(t)
|
|
409
|
-
}, [
|
|
410
|
-
u(e.$slots, "header-label", {
|
|
411
|
-
sortBy: o.value,
|
|
412
|
-
header: t
|
|
413
|
-
}, () => [
|
|
414
|
-
M(g(t.label), 1)
|
|
415
|
-
]),
|
|
416
|
-
L(h(ae), {
|
|
417
|
-
class: b([
|
|
418
|
-
"rvc-table-sort-icon",
|
|
419
|
-
{
|
|
420
|
-
"rvc-table-sort-icon-visible": ((v = o.value) == null ? void 0 : v.key) === t.key,
|
|
421
|
-
"rvc-table-sort-icon-invisible": !o.value || o.value.key !== t.key,
|
|
422
|
-
"rvc-table-sort-icon-rotated": ((V = o.value) == null ? void 0 : V.key) === t.key && o.value.direction === "desc"
|
|
423
|
-
}
|
|
424
|
-
])
|
|
425
|
-
}, null, 8, ["class"])
|
|
426
|
-
], 10, me)) : u(e.$slots, "header-label", {
|
|
427
|
-
key: 1,
|
|
428
|
-
sortBy: o.value,
|
|
429
|
-
header: t
|
|
430
|
-
}, () => [
|
|
431
|
-
M(g(t.label), 1)
|
|
432
|
-
])
|
|
433
|
-
], 16))
|
|
434
|
-
];
|
|
435
|
-
})), 256))
|
|
436
|
-
])
|
|
437
|
-
])
|
|
438
|
-
])) : $("", !0),
|
|
439
|
-
c("tbody", null, [
|
|
440
|
-
e.items.length && !e.spinning ? (a(!0), n(k, { key: 0 }, w(e.items, (t, i) => u(e.$slots, "items", {
|
|
441
|
-
item: t,
|
|
442
|
-
index: i
|
|
443
|
-
}, () => [
|
|
444
|
-
(a(), n("tr", {
|
|
445
|
-
key: `rvc-table-row-${i}-${t.id}`
|
|
446
|
-
}, [
|
|
447
|
-
u(e.$slots, "item", {
|
|
448
|
-
item: t,
|
|
449
|
-
index: i
|
|
450
|
-
}, () => [
|
|
451
|
-
(a(!0), n(k, null, w(t, (v, V) => {
|
|
452
|
-
var T, A, F, j;
|
|
453
|
-
return a(), n("td", y({
|
|
454
|
-
key: `rvc-table-row-${i}-column-${V}-${t.id}`
|
|
455
|
-
}, { ref_for: !0 }, t.attrs, {
|
|
456
|
-
class: {
|
|
457
|
-
"rvc-table-text-left": ((T = r(String(V))) == null ? void 0 : T.align) === "left" || !((A = r(String(V))) != null && A.align),
|
|
458
|
-
"rvc-table-text-center": ((F = r(String(V))) == null ? void 0 : F.align) === "center",
|
|
459
|
-
"rvc-table-text-right": ((j = r(String(V))) == null ? void 0 : j.align) === "right"
|
|
460
|
-
},
|
|
461
|
-
innerHTML: v
|
|
462
|
-
}), null, 16, be);
|
|
463
|
-
}), 128))
|
|
464
|
-
])
|
|
465
|
-
]))
|
|
466
|
-
])), 256)) : !e.items.length && !e.spinning ? (a(), n("tr", ye, [
|
|
467
|
-
c("td", {
|
|
468
|
-
colspan: e.headers.length,
|
|
469
|
-
class: "rvc-table-state"
|
|
470
|
-
}, [
|
|
471
|
-
c("p", null, g(e.noResultsText), 1)
|
|
472
|
-
], 8, $e)
|
|
473
|
-
])) : (a(), n("tr", he, [
|
|
474
|
-
c("td", {
|
|
475
|
-
colspan: e.headers.length,
|
|
476
|
-
class: "rvc-table-state"
|
|
477
|
-
}, [
|
|
478
|
-
u(e.$slots, "spinner", {
|
|
479
|
-
spinning: e.spinning,
|
|
480
|
-
label: e.loadingText
|
|
481
|
-
}, () => [
|
|
482
|
-
c("div", Ve, [
|
|
483
|
-
e.spinning ? (a(), B(h(q), {
|
|
484
|
-
key: 0,
|
|
485
|
-
"aria-hidden": "true",
|
|
486
|
-
class: "rvc-table-spinner"
|
|
487
|
-
})) : $("", !0),
|
|
488
|
-
M(" " + g(e.loadingText), 1)
|
|
489
|
-
])
|
|
490
|
-
])
|
|
491
|
-
], 8, ke)
|
|
492
|
-
]))
|
|
493
|
-
]),
|
|
494
|
-
e.$slots.footer ? (a(), n("tfoot", we, [
|
|
495
|
-
u(e.$slots, "footer", {
|
|
496
|
-
headers: e.headers,
|
|
497
|
-
items: e.items
|
|
498
|
-
})
|
|
499
|
-
])) : $("", !0)
|
|
500
|
-
], 2)
|
|
501
|
-
], 2),
|
|
502
|
-
e.pagination ? u(e.$slots, "pagination", H(y({ key: 0 }, e.pagination)), () => [
|
|
503
|
-
L(fe, {
|
|
504
|
-
pagination: e.pagination,
|
|
505
|
-
"onPagination:change": l[0] || (l[0] = (t) => p("pagination:change", t)),
|
|
506
|
-
"onPagination:perPage": l[1] || (l[1] = (t) => p("pagination:perPage", t))
|
|
507
|
-
}, null, 8, ["pagination"])
|
|
508
|
-
]) : $("", !0)
|
|
509
|
-
]));
|
|
510
|
-
}
|
|
511
|
-
}), Ce = {
|
|
512
|
-
key: 1,
|
|
513
|
-
class: "rvc-empty-state-title"
|
|
514
|
-
}, ze = /* @__PURE__ */ C({
|
|
515
|
-
__name: "EmptyState",
|
|
516
|
-
props: {
|
|
517
|
-
title: {},
|
|
518
|
-
background: { type: Boolean },
|
|
519
|
-
icon: { type: [Function, Object, null] }
|
|
520
|
-
},
|
|
521
|
-
setup(f) {
|
|
522
|
-
return (s, d) => (a(), n("div", {
|
|
523
|
-
class: b(["rvc-empty-state", { "rvc-empty-state-bg": s.background }])
|
|
524
|
-
}, [
|
|
525
|
-
s.icon ? (a(), B(P(s.icon), {
|
|
526
|
-
key: 0,
|
|
527
|
-
class: "rvc-empty-state-icon"
|
|
528
|
-
})) : $("", !0),
|
|
529
|
-
s.title ? (a(), n("p", Ce, g(s.title), 1)) : $("", !0),
|
|
530
|
-
u(s.$slots, "default")
|
|
531
|
-
], 2));
|
|
532
|
-
}
|
|
533
|
-
}), Ee = /* @__PURE__ */ C({
|
|
534
|
-
__name: "FormTextarea",
|
|
535
|
-
props: {
|
|
536
|
-
modelValue: { default: void 0 },
|
|
537
|
-
size: { default: "base" }
|
|
538
|
-
},
|
|
539
|
-
emits: ["update:modelValue"],
|
|
540
|
-
setup(f, { emit: s }) {
|
|
541
|
-
const d = f, p = s, { hasModelBinding: o } = N(), r = _(null), m = S({
|
|
542
|
-
get: () => d.modelValue,
|
|
543
|
-
set: (l) => p("update:modelValue", l)
|
|
544
|
-
}), e = S(() => [
|
|
545
|
-
"rvc-textarea",
|
|
546
|
-
`rvc-textarea-${d.size}`
|
|
547
|
-
]);
|
|
548
|
-
return (l, t) => h(o) ? O((a(), n("textarea", {
|
|
549
|
-
key: 0,
|
|
550
|
-
ref_key: "textarea",
|
|
551
|
-
ref: r,
|
|
552
|
-
"onUpdate:modelValue": t[0] || (t[0] = (i) => m.value = i),
|
|
553
|
-
class: b(e.value)
|
|
554
|
-
}, null, 2)), [
|
|
555
|
-
[Z, m.value]
|
|
556
|
-
]) : (a(), n("textarea", {
|
|
557
|
-
key: 1,
|
|
558
|
-
ref_key: "textarea",
|
|
559
|
-
ref: r,
|
|
560
|
-
class: b(e.value)
|
|
561
|
-
}, null, 2));
|
|
562
|
-
}
|
|
563
|
-
}), Be = { class: "rvc-radio" }, Se = { class: "rvc-radio-label" }, He = /* @__PURE__ */ C({
|
|
564
|
-
inheritAttrs: !1,
|
|
565
|
-
__name: "Radio",
|
|
566
|
-
props: {
|
|
567
|
-
modelValue: { type: [Boolean, String, Array, Object, Number, null], default: null },
|
|
568
|
-
label: { default: "" }
|
|
569
|
-
},
|
|
570
|
-
emits: ["update:modelValue"],
|
|
571
|
-
setup(f, { emit: s }) {
|
|
572
|
-
const d = f, p = s, o = S({
|
|
573
|
-
get: () => d.modelValue,
|
|
574
|
-
set: (t) => p("update:modelValue", t)
|
|
575
|
-
}), { hasModelBinding: r } = N(), m = z(), e = S(() => ({
|
|
576
|
-
...m,
|
|
577
|
-
type: "radio"
|
|
578
|
-
})), l = _(null);
|
|
579
|
-
return (t, i) => (a(), n("label", Be, [
|
|
580
|
-
h(r) ? O((a(), n("input", y({ key: 0 }, e.value, {
|
|
581
|
-
ref_key: "input",
|
|
582
|
-
ref: l,
|
|
583
|
-
"onUpdate:modelValue": i[0] || (i[0] = (v) => o.value = v)
|
|
584
|
-
}), null, 16)), [
|
|
585
|
-
[E, o.value]
|
|
586
|
-
]) : (a(), n("input", y({ key: 1 }, e.value, {
|
|
587
|
-
ref_key: "input",
|
|
588
|
-
ref: l
|
|
589
|
-
}), null, 16)),
|
|
590
|
-
u(t.$slots, "input", {}, () => [
|
|
591
|
-
i[1] || (i[1] = c("span", { class: "rvc-radio-input" }, null, -1))
|
|
592
|
-
]),
|
|
593
|
-
u(t.$slots, "default", {}, () => [
|
|
594
|
-
c("span", Se, g(t.label), 1)
|
|
595
|
-
])
|
|
596
|
-
]));
|
|
597
|
-
}
|
|
598
|
-
}), Le = { class: "rvc-tabs-nav" }, Pe = ["value", "selected"], De = /* @__PURE__ */ C({
|
|
599
|
-
inheritAttrs: !1,
|
|
600
|
-
__name: "Tabs",
|
|
601
|
-
props: {
|
|
602
|
-
modelValue: { default: void 0 },
|
|
603
|
-
tabs: { default: () => [] },
|
|
604
|
-
tabStyle: { default: "default" }
|
|
605
|
-
},
|
|
606
|
-
emits: ["update:modelValue", "tabs:change"],
|
|
607
|
-
setup(f, { emit: s }) {
|
|
608
|
-
const d = f, p = s, o = () => {
|
|
609
|
-
const l = d.tabs.findIndex((t) => t.active);
|
|
610
|
-
return l >= 0 ? l : 0;
|
|
611
|
-
}, r = S({
|
|
612
|
-
get: () => d.modelValue ?? o(),
|
|
613
|
-
set: (l) => {
|
|
614
|
-
const t = d.tabs[l];
|
|
615
|
-
p("update:modelValue", l), t && p("tabs:change", t);
|
|
616
|
-
}
|
|
617
|
-
}), m = (l) => {
|
|
618
|
-
const i = +l.target.value;
|
|
619
|
-
r.value = i;
|
|
620
|
-
const v = d.tabs[i];
|
|
621
|
-
v != null && v.selectEvent && v.selectEvent();
|
|
622
|
-
}, e = (l) => {
|
|
623
|
-
const {
|
|
624
|
-
active: t,
|
|
625
|
-
as: i,
|
|
626
|
-
bindAs: v,
|
|
627
|
-
selectEvent: V,
|
|
628
|
-
name: T,
|
|
629
|
-
...A
|
|
630
|
-
} = l;
|
|
631
|
-
return A;
|
|
632
|
-
};
|
|
633
|
-
return (l, t) => (a(), n(k, null, [
|
|
634
|
-
c("div", y(l.$attrs, {
|
|
635
|
-
class: ["rvc-tabs", { "rvc-tabs-buttons": l.tabStyle === "buttons" }]
|
|
636
|
-
}), [
|
|
637
|
-
c("nav", Le, [
|
|
638
|
-
(a(!0), n(k, null, w(l.tabs, (i, v) => (a(), B(P(i.as ? i.as : "button"), y({ ref_for: !0 }, e(i), {
|
|
639
|
-
key: `${v}-tab-item`,
|
|
640
|
-
as: i.bindAs ? i.bindAs : void 0,
|
|
641
|
-
class: ["rvc-tab", { "rvc-tab-active": r.value === v }],
|
|
642
|
-
onClick: (V) => r.value = v
|
|
643
|
-
}), {
|
|
644
|
-
default: I(() => [
|
|
645
|
-
M(g(i.name), 1)
|
|
646
|
-
]),
|
|
647
|
-
_: 2
|
|
648
|
-
}, 1040, ["as", "class", "onClick"]))), 128))
|
|
649
|
-
])
|
|
650
|
-
], 16),
|
|
651
|
-
L(D, y(l.$attrs, {
|
|
652
|
-
"root-class": "rvc-tabs-select",
|
|
653
|
-
value: r.value,
|
|
654
|
-
onChange: m
|
|
655
|
-
}), {
|
|
656
|
-
default: I(() => [
|
|
657
|
-
(a(!0), n(k, null, w(l.tabs, (i, v) => (a(), n("option", {
|
|
658
|
-
key: `${v}-tab-item-select-option`,
|
|
659
|
-
value: v,
|
|
660
|
-
selected: r.value === v
|
|
661
|
-
}, g(i.name), 9, Pe))), 128))
|
|
662
|
-
]),
|
|
663
|
-
_: 1
|
|
664
|
-
}, 16, ["value"])
|
|
665
|
-
], 64));
|
|
666
|
-
}
|
|
667
|
-
});
|
|
668
|
-
export {
|
|
669
|
-
Oe as _,
|
|
670
|
-
Ne as a,
|
|
671
|
-
Fe as b,
|
|
672
|
-
je as c,
|
|
673
|
-
ze as d,
|
|
674
|
-
D as e,
|
|
675
|
-
Ee as f,
|
|
676
|
-
fe as g,
|
|
677
|
-
He as h,
|
|
678
|
-
De as i
|
|
679
|
-
};
|