@robuust-digital/vue-components 2.1.0 → 2.2.0

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