@robuust-digital/vue-components 2.0.0-rc.4 → 2.0.0-rc.6

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