@robuust-digital/vue-components 2.7.1 → 3.0.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/_shared/ButtonBase-DyeIkb-l.js +76 -0
  3. package/dist/_shared/ChevronDownIcon-Y_yqpwON.js +39 -0
  4. package/dist/_shared/FormInput-k0vAk3VU.js +69 -0
  5. package/dist/_shared/Modal-D0x_VHiB.js +188 -0
  6. package/dist/_shared/Tooltip-B5w_Ojie.js +85 -0
  7. package/dist/_shared/XMarkIcon-CBoWSM1l.js +17 -0
  8. package/dist/_shared/combobox-yh0YQ8_d.js +265 -0
  9. package/dist/_shared/core-D8wjjKnI.js +857 -0
  10. package/dist/_shared/dialogs-SvdPsILD.js +179 -0
  11. package/dist/_shared/dropdown-BPUpLokN.js +134 -0
  12. package/dist/_shared/icon-spinner-D3Dhustt.js +23 -0
  13. package/dist/_shared/lightswitch-CpyX1iA_.js +38 -0
  14. package/dist/_shared/rich-text-editor-DkHKNS2n.js +226 -0
  15. package/dist/_shared/toast-DNxJDQWN.js +84 -0
  16. package/dist/combobox/index.js +2 -5
  17. package/dist/core/file-upload.css +28 -1
  18. package/dist/core/index.js +5 -20
  19. package/dist/dialogs/index.js +3 -6
  20. package/dist/dropdown/index.js +2 -5
  21. package/dist/index/index.js +14 -36
  22. package/dist/lightswitch/index.js +2 -5
  23. package/dist/rich-text-editor/index.js +2 -5
  24. package/dist/toast/index.js +2 -5
  25. package/dist/tooltip/index.js +5 -5
  26. package/package.json +31 -31
  27. package/dist/_shared/ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js +0 -60
  28. package/dist/_shared/ChevronDownIcon-BYWciGnh.js +0 -41
  29. package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-BwTRzqr6.js +0 -256
  30. package/dist/_shared/Drawer.vue_vue_type_script_setup_true_lang-DeAu2U_2.js +0 -197
  31. package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-Cv3HwIyF.js +0 -150
  32. package/dist/_shared/FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js +0 -74
  33. package/dist/_shared/Lightswitch.vue_vue_type_script_setup_true_lang-hiuDVfo5.js +0 -43
  34. package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-CdMsCCBi.js +0 -203
  35. package/dist/_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-t8nRuJ6k.js +0 -247
  36. package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-C4NAAuLp.js +0 -931
  37. package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-DS6keeu7.js +0 -78
  38. package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-B3MHy48T.js +0 -95
  39. package/dist/_shared/XMarkIcon-CPr_Rd8y.js +0 -19
  40. package/dist/_shared/icon-spinner-BYCMrTdL.js +0 -26
@@ -0,0 +1,857 @@
1
+ import { t as e } from "./XMarkIcon-CBoWSM1l.js";
2
+ import { t } from "./ChevronDownIcon-Y_yqpwON.js";
3
+ import { t as n } from "./icon-spinner-D3Dhustt.js";
4
+ import { t as r } from "./ButtonBase-DyeIkb-l.js";
5
+ import { n as i } from "./FormInput-k0vAk3VU.js";
6
+ import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, guardReactiveProps as m, mergeProps as h, normalizeClass as g, normalizeProps as _, onBeforeUnmount as v, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, unref as T, useAttrs as E, vModelDynamic as D, vModelSelect as O, vModelText as k, watch as ee, withCtx as A, withDirectives as j, withModifiers as M } from "vue";
7
+ //#region node_modules/@heroicons/vue/24/solid/esm/CheckIcon.js
8
+ function N(e, t) {
9
+ return y(), l("svg", {
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ viewBox: "0 0 24 24",
12
+ fill: "currentColor",
13
+ "aria-hidden": "true",
14
+ "data-slot": "icon"
15
+ }, [u("path", {
16
+ "fill-rule": "evenodd",
17
+ 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",
18
+ "clip-rule": "evenodd"
19
+ })]);
20
+ }
21
+ //#endregion
22
+ //#region node_modules/@heroicons/vue/24/solid/esm/PlusIcon.js
23
+ function P(e, t) {
24
+ return y(), l("svg", {
25
+ xmlns: "http://www.w3.org/2000/svg",
26
+ viewBox: "0 0 24 24",
27
+ fill: "currentColor",
28
+ "aria-hidden": "true",
29
+ "data-slot": "icon"
30
+ }, [u("path", {
31
+ "fill-rule": "evenodd",
32
+ 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",
33
+ "clip-rule": "evenodd"
34
+ })]);
35
+ }
36
+ //#endregion
37
+ //#region src/components/Accordion.vue?vue&type=script&setup=true&lang.ts
38
+ var F = { class: "rvc-accordion" }, I = ["open", "name"], L = ["innerHTML"], R = /* @__PURE__ */ p({
39
+ __name: "Accordion",
40
+ props: {
41
+ items: {},
42
+ name: {},
43
+ defaultOpenIndex: {},
44
+ contentClass: {}
45
+ },
46
+ setup(e) {
47
+ return (t, n) => (y(), l("div", F, [(y(!0), l(a, null, x(e.items, (n, r) => (y(), l("details", {
48
+ key: r,
49
+ open: n.open ?? e.defaultOpenIndex === r,
50
+ name: e.name
51
+ }, [u("summary", null, [S(t.$slots, "summary", {
52
+ item: n,
53
+ index: r
54
+ }, () => [d(w(n.title) + " ", 1), S(t.$slots, "icon", { classList: "rvc-accordion-icon" }, () => [f(T(P), { class: "rvc-accordion-icon" })])])]), u("div", { class: g(["rvc-accordion-content", e.contentClass]) }, [S(t.$slots, "content", {
55
+ item: n,
56
+ index: r
57
+ }, () => [u("div", { innerHTML: n.content }, null, 8, L)])], 2)], 8, I))), 128))]));
58
+ }
59
+ }), z = { class: "rvc-alert-title" }, B = /* @__PURE__ */ p({
60
+ __name: "Alert",
61
+ props: {
62
+ as: { default: "div" },
63
+ title: { default: "" },
64
+ icon: {
65
+ type: [
66
+ Function,
67
+ Object,
68
+ null
69
+ ],
70
+ default: null
71
+ },
72
+ type: { default: "info" },
73
+ close: {
74
+ type: Boolean,
75
+ default: !1
76
+ }
77
+ },
78
+ emits: ["alert:close"],
79
+ setup(t) {
80
+ return (n, r) => (y(), s(C(t.as), { class: g(["rvc-alert", `rvc-alert-${t.type}`]) }, {
81
+ default: A(() => [
82
+ S(n.$slots, "icon", {}, () => [t.icon ? (y(), s(C(t.icon), {
83
+ key: 0,
84
+ class: "rvc-alert-icon"
85
+ })) : c("", !0)]),
86
+ u("div", null, [S(n.$slots, "title", {}, () => [u("span", z, w(t.title), 1)]), S(n.$slots, "default")]),
87
+ S(n.$slots, "close", {}, () => [t.close ? (y(), l("button", {
88
+ key: 0,
89
+ type: "button",
90
+ class: "rvc-alert-close",
91
+ onClick: r[0] ||= (e) => n.$emit("alert:close")
92
+ }, [f(T(e))])) : c("", !0)])
93
+ ]),
94
+ _: 3
95
+ }, 8, ["class"]));
96
+ }
97
+ }), V = { class: "rvc-checkbox-input" }, H = {
98
+ key: 0,
99
+ class: "rvc-checkbox-label"
100
+ }, U = /* @__PURE__ */ p({
101
+ inheritAttrs: !1,
102
+ __name: "Checkbox",
103
+ props: {
104
+ modelValue: {
105
+ type: [
106
+ Number,
107
+ String,
108
+ Object,
109
+ Array,
110
+ Boolean,
111
+ null
112
+ ],
113
+ default: null
114
+ },
115
+ label: { default: "" },
116
+ rootClass: { default: "" }
117
+ },
118
+ emits: ["update:modelValue"],
119
+ setup(e, { emit: t }) {
120
+ let n = e, r = t, a = o({
121
+ get: () => n.modelValue,
122
+ set: (e) => r("update:modelValue", e)
123
+ }), { hasModelBinding: s } = i(), d = E(), p = o(() => ({
124
+ ...d,
125
+ type: "checkbox"
126
+ })), m = b(null);
127
+ return (t, n) => (y(), l("label", { class: g(["rvc-checkbox", e.rootClass]) }, [u("div", V, [T(s) ? j((y(), l("input", h({ key: 0 }, p.value, {
128
+ ref_key: "input",
129
+ ref: m,
130
+ "onUpdate:modelValue": n[0] ||= (e) => a.value = e
131
+ }), null, 16)), [[D, a.value]]) : (y(), l("input", h({ key: 1 }, p.value, {
132
+ ref_key: "input",
133
+ ref: m
134
+ }), null, 16)), S(t.$slots, "icon", {}, () => [f(T(N))])]), S(t.$slots, "default", { label: e.label }, () => [e.label ? (y(), l("span", H, w(e.label), 1)) : c("", !0)])], 2));
135
+ }
136
+ });
137
+ //#endregion
138
+ //#region node_modules/@heroicons/vue/16/solid/esm/ArrowUpIcon.js
139
+ function W(e, t) {
140
+ return y(), l("svg", {
141
+ xmlns: "http://www.w3.org/2000/svg",
142
+ viewBox: "0 0 16 16",
143
+ fill: "currentColor",
144
+ "aria-hidden": "true",
145
+ "data-slot": "icon"
146
+ }, [u("path", {
147
+ "fill-rule": "evenodd",
148
+ 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",
149
+ "clip-rule": "evenodd"
150
+ })]);
151
+ }
152
+ //#endregion
153
+ //#region node_modules/@heroicons/vue/16/solid/esm/XMarkIcon.js
154
+ function G(e, t) {
155
+ return y(), l("svg", {
156
+ xmlns: "http://www.w3.org/2000/svg",
157
+ viewBox: "0 0 16 16",
158
+ fill: "currentColor",
159
+ "aria-hidden": "true",
160
+ "data-slot": "icon"
161
+ }, [u("path", { d: "M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z" })]);
162
+ }
163
+ //#endregion
164
+ //#region node_modules/@heroicons/vue/20/solid/esm/ArrowUpTrayIcon.js
165
+ function te(e, t) {
166
+ return y(), l("svg", {
167
+ xmlns: "http://www.w3.org/2000/svg",
168
+ viewBox: "0 0 20 20",
169
+ fill: "currentColor",
170
+ "aria-hidden": "true",
171
+ "data-slot": "icon"
172
+ }, [u("path", { d: "M9.25 13.25a.75.75 0 0 0 1.5 0V4.636l2.955 3.129a.75.75 0 0 0 1.09-1.03l-4.25-4.5a.75.75 0 0 0-1.09 0l-4.25 4.5a.75.75 0 1 0 1.09 1.03L9.25 4.636v8.614Z" }), u("path", { d: "M3.5 12.75a.75.75 0 0 0-1.5 0v2.5A2.75 2.75 0 0 0 4.75 18h10.5A2.75 2.75 0 0 0 18 15.25v-2.5a.75.75 0 0 0-1.5 0v2.5c0 .69-.56 1.25-1.25 1.25H4.75c-.69 0-1.25-.56-1.25-1.25v-2.5Z" })]);
173
+ }
174
+ //#endregion
175
+ //#region node_modules/@heroicons/vue/20/solid/esm/ChevronLeftIcon.js
176
+ function K(e, t) {
177
+ return y(), l("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
+ }, [u("path", {
184
+ "fill-rule": "evenodd",
185
+ 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",
186
+ "clip-rule": "evenodd"
187
+ })]);
188
+ }
189
+ //#endregion
190
+ //#region node_modules/@heroicons/vue/20/solid/esm/ChevronRightIcon.js
191
+ function ne(e, t) {
192
+ return y(), l("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
+ }, [u("path", {
199
+ "fill-rule": "evenodd",
200
+ 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",
201
+ "clip-rule": "evenodd"
202
+ })]);
203
+ }
204
+ //#endregion
205
+ //#region src/components/FormSelect.vue?vue&type=script&setup=true&lang.ts
206
+ var q = ["value", "disabled"], J = ["value", "disabled"], Y = /* @__PURE__ */ p({
207
+ inheritAttrs: !1,
208
+ __name: "FormSelect",
209
+ props: {
210
+ modelValue: {
211
+ type: [
212
+ String,
213
+ Number,
214
+ Object,
215
+ Boolean,
216
+ null
217
+ ],
218
+ default: null
219
+ },
220
+ rootClass: { default: "" },
221
+ prefixIcon: {
222
+ type: [
223
+ Function,
224
+ Object,
225
+ null
226
+ ],
227
+ default: null
228
+ },
229
+ icon: {
230
+ type: [
231
+ Function,
232
+ Object,
233
+ null
234
+ ],
235
+ default: null
236
+ },
237
+ size: { default: "base" },
238
+ options: { default: () => [] },
239
+ optionLabel: { default: "name" },
240
+ optionValue: { default: "id" },
241
+ optionDisabled: { default: "disabled" }
242
+ },
243
+ emits: ["update:modelValue"],
244
+ setup(e, { emit: n }) {
245
+ let r = e, u = n, d = o({
246
+ get: () => r.modelValue,
247
+ set: (e) => u("update:modelValue", e)
248
+ }), { hasModelBinding: f } = i(), p = b(null);
249
+ return (n, i) => (y(), l("div", { class: g([
250
+ "rvc-select",
251
+ `rvc-select-${e.size}`,
252
+ e.rootClass
253
+ ]) }, [
254
+ e.prefixIcon ? S(n.$slots, "prefixIcon", {
255
+ key: 0,
256
+ icon: e.prefixIcon
257
+ }, () => [(y(), s(C(e.prefixIcon), { "aria-hidden": "true" }))]) : c("", !0),
258
+ S(n.$slots, "select", _(m(n.$attrs)), () => [T(f) ? j((y(), l("select", h({ key: 0 }, n.$attrs, {
259
+ ref_key: "select",
260
+ ref: p,
261
+ "onUpdate:modelValue": i[0] ||= (e) => d.value = e
262
+ }), [S(n.$slots, "default", {}, () => [e.options.length > 0 ? (y(!0), l(a, { key: 0 }, x(e.options, (t, n) => (y(), l("option", {
263
+ key: `option-${n}-${t[e.optionValue]}`,
264
+ value: t[e.optionValue],
265
+ disabled: t[r.optionDisabled] === !0
266
+ }, w(t[e.optionLabel]), 9, q))), 128)) : c("", !0)])], 16)), [[O, d.value]]) : (y(), l("select", h({ key: 1 }, n.$attrs, {
267
+ ref_key: "select",
268
+ ref: p
269
+ }), [S(n.$slots, "default", {}, () => [e.options.length > 0 ? (y(!0), l(a, { key: 0 }, x(e.options, (t, n) => (y(), l("option", {
270
+ key: `option-${n}-${t[e.optionValue]}`,
271
+ value: t[e.optionValue],
272
+ disabled: t[r.optionDisabled] === !0
273
+ }, w(t[e.optionLabel]), 9, J))), 128)) : c("", !0)])], 16))]),
274
+ S(n.$slots, "icon", { icon: e.icon }, () => [(y(), s(C(e.icon ?? T(t)), { "aria-hidden": "true" }))])
275
+ ], 2));
276
+ }
277
+ }), X = {
278
+ key: 0,
279
+ class: "rvc-pagination"
280
+ }, Z = ["value"], re = { class: "rvc-pagination-info" }, ie = { class: "rvc-pagination-nav-list" }, ae = ["disabled", "onClick"], oe = { key: 2 }, se = { key: 3 }, Q = /* @__PURE__ */ p({
281
+ __name: "Pagination",
282
+ props: {
283
+ pagination: {},
284
+ perPage: { default: 10 },
285
+ perPageLabel: { default: "per page" },
286
+ perPageOptions: { default: () => [
287
+ 10,
288
+ 20,
289
+ 50
290
+ ] },
291
+ fromLabel: { default: "of" },
292
+ prevIcon: {
293
+ type: [
294
+ Function,
295
+ Object,
296
+ null
297
+ ],
298
+ default: null
299
+ },
300
+ nextIcon: {
301
+ type: [
302
+ Function,
303
+ Object,
304
+ null
305
+ ],
306
+ default: null
307
+ }
308
+ },
309
+ emits: ["pagination:change", "pagination:perPage"],
310
+ setup(e, { emit: t }) {
311
+ let n = e, r = t, i = o({
312
+ get: () => n.perPage,
313
+ set: (e) => r("pagination:perPage", Number(e))
314
+ });
315
+ return (t, n) => e.pagination?.total ? (y(), l("div", X, [
316
+ S(t.$slots, "perPage", h(e.pagination, { perPage: i.value }), () => [f(Y, {
317
+ modelValue: i.value,
318
+ "onUpdate:modelValue": n[0] ||= (e) => i.value = e,
319
+ size: "sm",
320
+ "root-class": "rvc-pagination-per-page"
321
+ }, {
322
+ default: A(() => [(y(!0), l(a, null, x(e.perPageOptions, (t) => (y(), l("option", {
323
+ key: `pagination-items-per-page-option-${t}`,
324
+ value: t
325
+ }, w(t) + " " + w(e.perPageLabel), 9, Z))), 128))]),
326
+ _: 1
327
+ }, 8, ["modelValue"])]),
328
+ S(t.$slots, "info", h(e.pagination, { fromLabel: e.fromLabel }), () => [u("div", re, w(e.pagination.from) + " - " + w(e.pagination.to) + " " + w(e.fromLabel) + " " + w(e.pagination.total), 1)]),
329
+ u("nav", null, [u("ol", ie, [(y(!0), l(a, null, x(e.pagination.links, (n, i) => (y(), l("li", {
330
+ key: `pagination-link-${n.label}-${i}`,
331
+ class: "rvc-pagination-nav-list-item"
332
+ }, [u("button", {
333
+ type: "button",
334
+ disabled: n.label === "..." || !n.url,
335
+ class: g(["rvc-pagination-button", { "rvc-pagination-button-active": n.active }]),
336
+ onClick: (e) => n.url && r("pagination:change", n.url)
337
+ }, [n.url !== "..." && i === 0 ? S(t.$slots, "prevIcon", {
338
+ key: 0,
339
+ icon: e.prevIcon,
340
+ link: n,
341
+ index: i
342
+ }, () => [(y(), s(C(e.prevIcon || T(K)), {
343
+ "aria-hidden": "true",
344
+ class: g(["rvc-pagination-button-icon", { "rvc-pagination-button-icon-disabled": !n.url }])
345
+ }, null, 8, ["class"]))]) : n.label !== "..." && i === e.pagination.links.length - 1 ? S(t.$slots, "nextIcon", {
346
+ key: 1,
347
+ icon: e.nextIcon,
348
+ link: n,
349
+ index: i
350
+ }, () => [(y(), s(C(e.nextIcon || T(ne)), {
351
+ "aria-hidden": "true",
352
+ class: g(["rvc-pagination-button-icon", { "rvc-pagination-button-icon-disabled": !n.url }])
353
+ }, null, 8, ["class"]))]) : n.label === "..." ? (y(), l("span", oe, " ... ")) : (y(), l("span", se, w(n.label), 1))], 10, ae)]))), 128))])])
354
+ ])) : c("", !0);
355
+ }
356
+ }), ce = { key: 0 }, le = ["aria-label", "onClick"], ue = ["innerHTML"], de = { key: 2 }, fe = ["colspan"], pe = { key: 3 }, me = ["colspan"], he = { class: "rvc-table-spinner-wrapper" }, ge = { key: 4 }, _e = /* @__PURE__ */ p({
357
+ __name: "DataTable",
358
+ props: {
359
+ headers: { default: () => [] },
360
+ items: {},
361
+ noResultsText: { default: "No results found." },
362
+ loadingText: { default: "Loading content..." },
363
+ striped: {
364
+ type: Boolean,
365
+ default: !1
366
+ },
367
+ spinning: {
368
+ type: Boolean,
369
+ default: !1
370
+ },
371
+ pagination: { default: null },
372
+ perPage: { default: 10 },
373
+ perPageLabel: { default: "per page" },
374
+ perPageOptions: { default: () => [
375
+ 10,
376
+ 20,
377
+ 50
378
+ ] },
379
+ fromLabel: { default: "of" },
380
+ prevIcon: {
381
+ type: [
382
+ Function,
383
+ Object,
384
+ null
385
+ ],
386
+ default: null
387
+ },
388
+ nextIcon: {
389
+ type: [
390
+ Function,
391
+ Object,
392
+ null
393
+ ],
394
+ default: null
395
+ },
396
+ wrapperClass: { default: "" },
397
+ defaultSort: { default: null }
398
+ },
399
+ emits: [
400
+ "table:sortBy",
401
+ "pagination:change",
402
+ "pagination:perPage"
403
+ ],
404
+ setup(e, { emit: t }) {
405
+ let r = e, i = t, o = b(r.defaultSort), p = (e) => r.headers.find((t) => t.key === e), m = (e) => {
406
+ e.key && (!o.value || o.value.key !== e.key ? o.value = {
407
+ key: e.key,
408
+ direction: "asc"
409
+ } : o.value.direction === "asc" ? o.value = {
410
+ key: e.key,
411
+ direction: "desc"
412
+ } : o.value = null, i("table:sortBy", o.value));
413
+ };
414
+ return (t, r) => (y(), l("div", null, [u("div", { class: g(["rvc-table-wrapper", e.wrapperClass]) }, [u("table", { class: g([{ "rvc-table-striped": e.striped }, "rvc-table"]) }, [
415
+ e.headers.length ? (y(), l("thead", ce, [S(t.$slots, "headers", { headers: e.headers }, () => [u("tr", null, [(y(!0), l(a, null, x(e.headers, (e, n) => S(t.$slots, "header", {
416
+ header: e,
417
+ index: n
418
+ }, () => [(y(), l("th", h({ ref_for: !0 }, {
419
+ ...e,
420
+ id: e.id === void 0 || e.id === null ? void 0 : String(e.id)
421
+ }, {
422
+ key: `rvc-table-header-${e.id ?? e.key ?? n}`,
423
+ class: {
424
+ "rvc-table-text-left": e.align === "left" || !e.align,
425
+ "rvc-table-text-center": e.align === "center",
426
+ "rvc-table-text-right": e.align === "right"
427
+ }
428
+ }), [e.sortable && e.key ? (y(), l("button", {
429
+ key: 0,
430
+ type: "button",
431
+ "aria-label": `Sort on ${e.label}`,
432
+ class: g(["rvc-table-sort-button", {
433
+ "rvc-table-sort-button-center": e.align === "center",
434
+ "rvc-table-sort-button-right": e.align === "right"
435
+ }]),
436
+ onClick: (t) => m(e)
437
+ }, [S(t.$slots, "header-label", {
438
+ sortBy: o.value,
439
+ header: e
440
+ }, () => [d(w(e.label), 1)]), f(T(W), { class: g(["rvc-table-sort-icon", {
441
+ "rvc-table-sort-icon-visible": o.value?.key === e.key,
442
+ "rvc-table-sort-icon-invisible": !o.value || o.value.key !== e.key,
443
+ "rvc-table-sort-icon-rotated": o.value?.key === e.key && o.value.direction === "desc"
444
+ }]) }, null, 8, ["class"])], 10, le)) : S(t.$slots, "header-label", {
445
+ key: 1,
446
+ sortBy: o.value,
447
+ header: e
448
+ }, () => [d(w(e.label), 1)])], 16))])), 256))])])])) : c("", !0),
449
+ e.items.length && !e.spinning ? S(t.$slots, "tbody", {
450
+ key: 1,
451
+ items: e.items
452
+ }, () => [u("tbody", null, [(y(!0), l(a, null, x(e.items, (e, n) => S(t.$slots, "items", {
453
+ item: e,
454
+ index: n
455
+ }, () => [(y(), l("tr", { key: `rvc-table-row-${n}-${e.id}` }, [S(t.$slots, "item", {
456
+ item: e,
457
+ index: n
458
+ }, () => [(y(!0), l(a, null, x(e, (t, r) => (y(), l("td", h({ key: `rvc-table-row-${n}-column-${r}-${e.id}` }, { ref_for: !0 }, e.attrs, {
459
+ class: {
460
+ "rvc-table-text-left": p(String(r))?.align === "left" || !p(String(r))?.align,
461
+ "rvc-table-text-center": p(String(r))?.align === "center",
462
+ "rvc-table-text-right": p(String(r))?.align === "right"
463
+ },
464
+ innerHTML: t
465
+ }), null, 16, ue))), 128))])]))])), 256))])]) : !e.items.length && !e.spinning ? (y(), l("tbody", de, [u("tr", null, [u("td", {
466
+ colspan: e.headers.length,
467
+ class: "rvc-table-state"
468
+ }, [u("p", null, w(e.noResultsText), 1)], 8, fe)])])) : (y(), l("tbody", pe, [u("tr", null, [u("td", {
469
+ colspan: e.headers.length,
470
+ class: "rvc-table-state"
471
+ }, [S(t.$slots, "spinner", {
472
+ spinning: e.spinning,
473
+ label: e.loadingText
474
+ }, () => [u("div", he, [e.spinning ? (y(), s(T(n), {
475
+ key: 0,
476
+ "aria-hidden": "true",
477
+ class: "rvc-table-spinner"
478
+ })) : c("", !0), d(" " + w(e.loadingText), 1)])])], 8, me)])])),
479
+ t.$slots.footer ? (y(), l("tfoot", ge, [S(t.$slots, "footer", {
480
+ headers: e.headers,
481
+ items: e.items
482
+ })])) : c("", !0)
483
+ ], 2)], 2), e.pagination ? S(t.$slots, "pagination", _(h({ key: 0 }, e.pagination)), () => [f(Q, {
484
+ pagination: e.pagination,
485
+ "per-page": e.perPage,
486
+ "per-page-label": e.perPageLabel,
487
+ "per-page-options": e.perPageOptions,
488
+ "from-label": e.fromLabel,
489
+ "prev-icon": e.prevIcon,
490
+ "next-icon": e.nextIcon,
491
+ "onPagination:change": r[0] ||= (e) => i("pagination:change", e),
492
+ "onPagination:perPage": r[1] ||= (e) => i("pagination:perPage", e)
493
+ }, null, 8, [
494
+ "pagination",
495
+ "per-page",
496
+ "per-page-label",
497
+ "per-page-options",
498
+ "from-label",
499
+ "prev-icon",
500
+ "next-icon"
501
+ ])]) : c("", !0)]));
502
+ }
503
+ }), ve = {
504
+ key: 1,
505
+ class: "rvc-empty-state-title"
506
+ }, ye = /* @__PURE__ */ p({
507
+ __name: "EmptyState",
508
+ props: {
509
+ title: {},
510
+ background: { type: Boolean },
511
+ icon: { type: [
512
+ Function,
513
+ Object,
514
+ null
515
+ ] }
516
+ },
517
+ setup(e) {
518
+ return (t, n) => (y(), l("div", { class: g(["rvc-empty-state", { "rvc-empty-state-bg": e.background }]) }, [
519
+ e.icon ? (y(), s(C(e.icon), {
520
+ key: 0,
521
+ class: "rvc-empty-state-icon"
522
+ })) : c("", !0),
523
+ e.title ? (y(), l("p", ve, w(e.title), 1)) : c("", !0),
524
+ S(t.$slots, "default")
525
+ ], 2));
526
+ }
527
+ }), be = { class: "rvc-file-upload-control" }, xe = [
528
+ "accept",
529
+ "multiple",
530
+ "disabled"
531
+ ], Se = ["disabled"], Ce = {
532
+ key: 0,
533
+ class: "rvc-file-upload-label"
534
+ }, we = {
535
+ key: 1,
536
+ class: "rvc-file-upload-description"
537
+ }, Te = { class: "rvc-file-upload-list" }, Ee = ["src", "alt"], De = ["href"], Oe = {
538
+ key: 2,
539
+ class: "rvc-file-upload-file"
540
+ }, $ = [
541
+ "disabled",
542
+ "aria-label",
543
+ "onClick"
544
+ ], ke = ["src", "alt"], Ae = { class: "rvc-file-upload-file" }, je = [
545
+ "disabled",
546
+ "aria-label",
547
+ "onClick"
548
+ ], Me = /* @__PURE__ */ p({
549
+ inheritAttrs: !1,
550
+ __name: "FileUpload",
551
+ props: {
552
+ modelValue: { default: null },
553
+ existingFiles: { default: () => [] },
554
+ variant: { default: "area" },
555
+ size: { default: "base" },
556
+ multiple: {
557
+ type: Boolean,
558
+ default: !1
559
+ },
560
+ accept: { default: void 0 },
561
+ disabled: {
562
+ type: Boolean,
563
+ default: !1
564
+ },
565
+ showThumbnails: {
566
+ type: Boolean,
567
+ default: !1
568
+ },
569
+ label: { default: "Drop your files here" },
570
+ description: { default: "" },
571
+ buttonLabel: { default: "Upload file" },
572
+ buttonColor: { default: "primary" },
573
+ icon: {
574
+ type: [
575
+ Function,
576
+ Object,
577
+ null
578
+ ],
579
+ default: null
580
+ },
581
+ rootClass: { default: "" }
582
+ },
583
+ emits: [
584
+ "update:modelValue",
585
+ "file-upload:add",
586
+ "file-upload:remove",
587
+ "file-upload:remove-existing"
588
+ ],
589
+ setup(e, { emit: t }) {
590
+ let n = e, i = t, d = b(null), p = b(!1), m = b(0), _ = b(/* @__PURE__ */ new Map()), D = E(), O = o(() => n.icon ?? te), k = o(() => n.modelValue ? Array.isArray(n.modelValue) ? n.modelValue : [n.modelValue] : []), j = (e) => e.type.startsWith("image/");
591
+ ee([k, () => n.showThumbnails], ([e, t]) => {
592
+ let n = new Set(e);
593
+ _.value.forEach((e, r) => {
594
+ t && n.has(r) && j(r) || (URL.revokeObjectURL(e), _.value.delete(r));
595
+ }), t && e.filter((e) => j(e) && !_.value.has(e)).forEach((e) => _.value.set(e, URL.createObjectURL(e)));
596
+ }, { immediate: !0 }), v(() => {
597
+ _.value.forEach((e) => URL.revokeObjectURL(e)), _.value.clear();
598
+ });
599
+ let N = () => {
600
+ n.disabled || d.value?.click();
601
+ }, P = (e) => {
602
+ if (n.disabled || !e.length) return;
603
+ let t = n.multiple ? e : e.slice(0, 1), r = n.multiple ? [...k.value, ...t] : t;
604
+ i("update:modelValue", n.multiple ? r : r[0] ?? null), i("file-upload:add", t);
605
+ }, F = (e) => {
606
+ let t = e.target;
607
+ P(Array.from(t.files ?? [])), t.value = "";
608
+ }, I = (e) => Array.from(e.dataTransfer?.types ?? []).includes("Files"), L = (e) => n.showThumbnails && _.value.has(e), R = (e) => {
609
+ if (e.thumbnailUrl) return e.thumbnailUrl;
610
+ if (e.type?.startsWith("image/") && e.url) return e.url;
611
+ }, z = (e) => n.showThumbnails && !!R(e), B = (e) => {
612
+ n.disabled || !I(e) || (m.value += 1, p.value = !0);
613
+ }, V = (e) => {
614
+ if (n.disabled || !I(e)) return;
615
+ let { dataTransfer: t } = e;
616
+ t && (t.dropEffect = "copy"), p.value = !0;
617
+ }, H = () => {
618
+ m.value = Math.max(0, m.value - 1), p.value = m.value > 0;
619
+ }, U = (e) => {
620
+ n.disabled || (m.value = 0, p.value = !1, P(Array.from(e.dataTransfer?.files ?? [])));
621
+ }, W = (e) => {
622
+ if (n.disabled) return;
623
+ let t = typeof e == "number" ? e : k.value.indexOf(e), r = k.value[t];
624
+ if (!r) return;
625
+ let a = k.value.filter((e, n) => n !== t);
626
+ i("update:modelValue", n.multiple ? a : a[0] ?? null), i("file-upload:remove", r);
627
+ }, K = (e) => {
628
+ n.disabled || i("file-upload:remove-existing", e);
629
+ };
630
+ return (t, n) => (y(), l("div", { class: g([
631
+ "rvc-file-upload",
632
+ `rvc-file-upload-variant-${e.variant}`,
633
+ `rvc-file-upload-${e.size}`,
634
+ {
635
+ "rvc-file-upload-dragging": p.value,
636
+ "rvc-file-upload-disabled": e.disabled
637
+ },
638
+ e.rootClass
639
+ ]) }, [u("div", be, [u("input", h(T(D), {
640
+ ref_key: "input",
641
+ ref: d,
642
+ class: "rvc-file-upload-input",
643
+ type: "file",
644
+ accept: e.accept || void 0,
645
+ multiple: e.multiple,
646
+ disabled: e.disabled,
647
+ onChange: F
648
+ }), null, 16, xe), e.variant === "area" ? (y(), l("button", {
649
+ key: 0,
650
+ class: "rvc-file-upload-area rvc-file-upload-trigger",
651
+ type: "button",
652
+ disabled: e.disabled,
653
+ tabindex: "-1",
654
+ "aria-hidden": "true",
655
+ onClick: N,
656
+ onDragenter: M(B, ["prevent"]),
657
+ onDragover: M(V, ["prevent"]),
658
+ onDragleave: M(H, ["prevent"]),
659
+ onDrop: M(U, ["prevent"])
660
+ }, [
661
+ S(t.$slots, "icon", { icon: O.value }, () => [(y(), s(C(O.value), {
662
+ class: "rvc-file-upload-icon",
663
+ "aria-hidden": "true"
664
+ }))]),
665
+ e.label ? (y(), l("span", Ce, w(e.label), 1)) : c("", !0),
666
+ e.description ? (y(), l("span", we, w(e.description), 1)) : c("", !0)
667
+ ], 40, Se)) : (y(), s(r, {
668
+ key: 1,
669
+ class: "rvc-file-upload-trigger",
670
+ label: e.buttonLabel,
671
+ icon: O.value,
672
+ color: e.buttonColor,
673
+ size: e.size,
674
+ "icon-left": "",
675
+ type: "button",
676
+ disabled: e.disabled,
677
+ tabindex: "-1",
678
+ "aria-hidden": "true",
679
+ onClick: N
680
+ }, {
681
+ icon: A(({ icon: e }) => [S(t.$slots, "icon", { icon: e }, () => [e ? (y(), s(C(e), {
682
+ key: 0,
683
+ class: "rvc-button-icon",
684
+ "aria-hidden": "true"
685
+ })) : c("", !0)])]),
686
+ _: 3
687
+ }, 8, [
688
+ "label",
689
+ "icon",
690
+ "color",
691
+ "size",
692
+ "disabled"
693
+ ]))]), k.value.length || e.existingFiles.length ? S(t.$slots, "preview", {
694
+ key: 0,
695
+ files: k.value,
696
+ existingFiles: e.existingFiles,
697
+ removeFile: W,
698
+ removeExistingFile: K
699
+ }, () => [u("ul", Te, [(y(!0), l(a, null, x(e.existingFiles, (t) => (y(), l("li", {
700
+ key: `existing-${t.id}`,
701
+ class: "rvc-file-upload-item"
702
+ }, [
703
+ z(t) ? (y(), l("img", {
704
+ key: 0,
705
+ class: "rvc-file-upload-thumbnail",
706
+ src: R(t),
707
+ alt: t.name
708
+ }, null, 8, Ee)) : c("", !0),
709
+ t.url ? (y(), l("a", {
710
+ key: 1,
711
+ class: "rvc-file-upload-file",
712
+ href: t.url
713
+ }, w(t.name), 9, De)) : (y(), l("span", Oe, w(t.name), 1)),
714
+ u("button", {
715
+ class: "rvc-file-upload-remove",
716
+ type: "button",
717
+ disabled: e.disabled,
718
+ "aria-label": `Remove ${t.name}`,
719
+ onClick: (e) => K(t)
720
+ }, [f(T(G), { "aria-hidden": "true" })], 8, $)
721
+ ]))), 128)), (y(!0), l(a, null, x(k.value, (t, n) => (y(), l("li", {
722
+ key: `${t.name}-${t.lastModified}-${n}`,
723
+ class: "rvc-file-upload-item"
724
+ }, [
725
+ L(t) ? (y(), l("img", {
726
+ key: 0,
727
+ class: "rvc-file-upload-thumbnail",
728
+ src: _.value.get(t),
729
+ alt: t.name
730
+ }, null, 8, ke)) : c("", !0),
731
+ u("span", Ae, w(t.name), 1),
732
+ u("button", {
733
+ class: "rvc-file-upload-remove",
734
+ type: "button",
735
+ disabled: e.disabled,
736
+ "aria-label": `Remove ${t.name}`,
737
+ onClick: (e) => W(n)
738
+ }, [f(T(G), { "aria-hidden": "true" })], 8, je)
739
+ ]))), 128))])]) : c("", !0)], 2));
740
+ }
741
+ }), Ne = /* @__PURE__ */ p({
742
+ __name: "FormTextarea",
743
+ props: {
744
+ modelValue: { default: void 0 },
745
+ size: { default: "base" }
746
+ },
747
+ emits: ["update:modelValue"],
748
+ setup(e, { emit: t }) {
749
+ let n = e, r = t, { hasModelBinding: a } = i(), s = b(null), c = o({
750
+ get: () => n.modelValue,
751
+ set: (e) => r("update:modelValue", e)
752
+ }), u = o(() => ["rvc-textarea", `rvc-textarea-${n.size}`]);
753
+ return (e, t) => T(a) ? j((y(), l("textarea", {
754
+ key: 0,
755
+ ref_key: "textarea",
756
+ ref: s,
757
+ "onUpdate:modelValue": t[0] ||= (e) => c.value = e,
758
+ class: g(u.value)
759
+ }, null, 2)), [[k, c.value]]) : (y(), l("textarea", {
760
+ key: 1,
761
+ ref_key: "textarea",
762
+ ref: s,
763
+ class: g(u.value)
764
+ }, null, 2));
765
+ }
766
+ }), Pe = { class: "rvc-radio-input" }, Fe = { class: "rvc-radio-label" }, Ie = /* @__PURE__ */ p({
767
+ inheritAttrs: !1,
768
+ __name: "Radio",
769
+ props: {
770
+ modelValue: {
771
+ type: [
772
+ Boolean,
773
+ String,
774
+ Array,
775
+ Object,
776
+ Number,
777
+ null
778
+ ],
779
+ default: null
780
+ },
781
+ label: { default: "" },
782
+ rootClass: { default: "" }
783
+ },
784
+ emits: ["update:modelValue"],
785
+ setup(e, { emit: t }) {
786
+ let n = e, r = t, a = o({
787
+ get: () => n.modelValue,
788
+ set: (e) => r("update:modelValue", e)
789
+ }), { hasModelBinding: s } = i(), c = E(), d = o(() => ({
790
+ ...c,
791
+ type: "radio"
792
+ })), f = b(null);
793
+ return (t, n) => (y(), l("label", { class: g(["rvc-radio", e.rootClass]) }, [u("div", Pe, [T(s) ? j((y(), l("input", h({ key: 0 }, d.value, {
794
+ ref_key: "input",
795
+ ref: f,
796
+ "onUpdate:modelValue": n[0] ||= (e) => a.value = e
797
+ }), null, 16)), [[D, a.value]]) : (y(), l("input", h({ key: 1 }, d.value, {
798
+ ref_key: "input",
799
+ ref: f
800
+ }), null, 16))]), S(t.$slots, "default", {}, () => [u("span", Fe, w(e.label), 1)])], 2));
801
+ }
802
+ }), Le = { class: "rvc-tabs-nav" }, Re = ["value", "selected"], ze = /* @__PURE__ */ p({
803
+ inheritAttrs: !1,
804
+ __name: "Tabs",
805
+ props: {
806
+ modelValue: { default: void 0 },
807
+ tabs: { default: () => [] },
808
+ tabStyle: { default: "default" }
809
+ },
810
+ emits: ["update:modelValue", "tabs:change"],
811
+ setup(e, { emit: t }) {
812
+ let n = e, r = t, i = () => {
813
+ let e = n.tabs.findIndex((e) => e.active);
814
+ return e >= 0 ? e : 0;
815
+ }, c = o({
816
+ get: () => n.modelValue ?? i(),
817
+ set: (e) => {
818
+ let t = n.tabs[e];
819
+ r("update:modelValue", e), t && r("tabs:change", t);
820
+ }
821
+ }), p = (e) => {
822
+ let t = +e.target.value;
823
+ c.value = t;
824
+ let r = n.tabs[t];
825
+ r?.selectEvent && r.selectEvent();
826
+ }, m = (e) => {
827
+ let { active: t, as: n, bindAs: r, selectEvent: i, name: a, ...o } = e;
828
+ return o;
829
+ };
830
+ return (t, n) => (y(), l(a, null, [u("div", h(t.$attrs, { class: ["rvc-tabs", { "rvc-tabs-buttons": e.tabStyle === "buttons" }] }), [u("nav", Le, [(y(!0), l(a, null, x(e.tabs, (e, t) => (y(), s(C(e.as ? e.as : "button"), h({ ref_for: !0 }, m(e), {
831
+ key: `${t}-tab-item`,
832
+ as: e.bindAs ? e.bindAs : void 0,
833
+ class: ["rvc-tab", { "rvc-tab-active": c.value === t }],
834
+ onClick: (e) => c.value = t
835
+ }), {
836
+ default: A(() => [d(w(e.name), 1)]),
837
+ _: 2
838
+ }, 1040, [
839
+ "as",
840
+ "class",
841
+ "onClick"
842
+ ]))), 128))])], 16), f(Y, h(t.$attrs, {
843
+ "root-class": "rvc-tabs-select",
844
+ value: c.value,
845
+ onChange: p
846
+ }), {
847
+ default: A(() => [(y(!0), l(a, null, x(e.tabs, (e, t) => (y(), l("option", {
848
+ key: `${t}-tab-item-select-option`,
849
+ value: t,
850
+ selected: c.value === t
851
+ }, w(e.name), 9, Re))), 128))]),
852
+ _: 1
853
+ }, 16, ["value"])], 64));
854
+ }
855
+ });
856
+ //#endregion
857
+ export { ye as a, Y as c, R as d, Me as i, U as l, Ie as n, _e as o, Ne as r, Q as s, ze as t, B as u };