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