@robuust-digital/vue-components 2.5.0-beta.2 → 2.5.0-beta.4

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