@robuust-digital/vue-components 2.0.0-rc.5 → 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 +296 -300
  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 a, createElementVNode as o, Fragment as w, renderList as S, renderSlot as f, createTextVNode as A, toDisplayString as m, createVNode as V, unref as h, normalizeClass as p, createBlock as x, resolveDynamicComponent as B, withCtx as M, createCommentVNode as $, computed as C, useAttrs as F, withDirectives as j, 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 O } 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 a(), 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 a(), 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) => (a(), l("div", Q, [
62
- (a(!0), l(w, null, S(e.items, (c, s) => (a(), 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
- f(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
- f(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
- f(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) => (a(), 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
120
  default: M(() => [
122
- f(r.$slots, "icon", {}, () => [
123
- e.icon ? (a(), x(B(e.icon), {
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
- f(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
- f(r.$slots, "default")
131
+ g(o.$slots, "default")
133
132
  ]),
134
- f(r.$slots, "close", {}, () => [
135
- e.close ? (a(), 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: (n) => c("update:modelValue", n)
175
- }), { hasModelBinding: g } = O(), 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 (n, t) => (a(), l("div", {
180
+ return (t, a) => (n(), l("div", {
182
181
  class: p(["rvc-checkbox", e.rootClass])
183
182
  }, [
184
- h(g) ? j((a(), l("input", b({ key: 0 }, u, {
185
- "onUpdate:modelValue": t[0] || (t[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
- ]) : (a(), 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
- n.$slots.default || e.label ? f(n.$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 a(), 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 a(), 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 a(), 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: (v) => c("update:modelValue", v)
277
- }), { hasModelBinding: g } = O();
278
- return (v, u) => (a(), 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 ? f(v.$slots, "prefixIcon", {
284
+ e.prefixIcon ? g(m.$slots, "prefixIcon", {
286
285
  key: 0,
287
286
  icon: e.prefixIcon
288
287
  }, () => [
289
- (a(), x(B(e.prefixIcon), { "aria-hidden": "true" }))
290
- ]) : $("", !0),
291
- f(v.$slots, "select", P(H(v.$attrs)), () => [
292
- h(g) ? j((a(), l("select", b({ key: 0 }, v.$attrs, {
293
- "onUpdate:modelValue": u[0] || (u[0] = (n) => s.value = n)
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
- f(v.$slots, "default")
294
+ g(m.$slots, "default")
296
295
  ], 16)), [
297
296
  [E, s.value]
298
- ]) : (a(), l("select", P(b({ key: 1 }, v.$attrs)), [
299
- f(v.$slots, "default")
297
+ ]) : (n(), l("select", P(b({ key: 1 }, m.$attrs)), [
298
+ g(m.$slots, "default")
300
299
  ], 16))
301
300
  ]),
302
- f(v.$slots, "icon", { icon: e.icon }, () => [
303
- (a(), 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, v) => {
338
- var u;
339
- return (u = e.pagination) != null && u.total ? (a(), l("div", le, [
340
- f(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
- v[0] || (v[0] = (n) => s.value = n),
345
- v[1] || (v[1] = (n) => c("pagination:perPage", n))
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
349
  default: M(() => [
351
- (a(!0), l(w, null, S(e.perPageOptions, (n) => (a(), l("option", {
352
- key: `pagination-items-per-page-option-${n}`,
353
- value: n
354
- }, m(n) + " " + m(e.perPageLabel), 9, se))), 128))
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
- f(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
- (a(!0), l(w, null, S(e.pagination.links, (n, t) => (a(), l("li", {
368
- key: `pagination-link-${n.label}-${t}`,
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: n.label === "..." || !n.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": n.active }
377
- ]),
378
- onClick: (d) => n.url && c("pagination:change", n.url)
379
- }, [
380
- n.url !== "..." && t === 0 ? (a(), x(h(ae), {
381
- key: 0,
382
- "aria-hidden": "true",
383
- class: p([
384
- "size-5 text-slate-80",
385
- { "opacity-50": !n.url }
386
- ])
387
- }, null, 8, ["class"])) : n.label !== "..." && t === e.pagination.links.length - 1 ? (a(), x(h(ne), {
388
- key: 1,
389
- "aria-hidden": "true",
390
- class: p([
391
- "size-5 text-slate-80",
392
- { "opacity-50": !n.url }
393
- ])
394
- }, null, 8, ["class"])) : n.label === "..." ? (a(), l("span", de, " ... ")) : (a(), l("span", ge, m(n.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,153 +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((n) => n.key === u), v = (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, n) => (a(), 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 ? (a(), l("thead", ve, [
460
- f(u.$slots, "headers", { headers: e.headers }, () => [
461
- o("tr", null, [
462
- (a(!0), l(w, null, S(e.headers, (t, d) => f(u.$slots, "header", {
463
- header: t,
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,
464
459
  index: d
465
460
  }, () => {
466
461
  var y, k;
467
462
  return [
468
- (a(), l("th", b({ ref_for: !0 }, t, {
469
- key: `rvc-table-header-${t.id}`,
463
+ (n(), l("th", b({ ref_for: !0 }, a, {
464
+ key: `rvc-table-header-${a.id}`,
470
465
  class: {
471
- "text-left": t.align === "left" || !t.align,
472
- "text-center": t.align === "center",
473
- "text-right": t.align === "right"
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"
474
469
  }
475
470
  }), [
476
- t.sortable && t.key ? (a(), l("button", {
471
+ a.sortable && a.key ? (n(), l("button", {
477
472
  key: 0,
478
473
  type: "button",
479
- "aria-label": `Sort on ${t.label}`,
474
+ "aria-label": `Sort on ${a.label}`,
480
475
  class: p([
481
- "flex w-full gap-x-1.5 hover:underline group/table",
476
+ "rvc-table-sort-button",
482
477
  {
483
- "justify-center": t.align === "center",
484
- "justify-start flex-row-reverse": t.align === "right"
478
+ "rvc-table-sort-button-center": a.align === "center",
479
+ "rvc-table-sort-button-right": a.align === "right"
485
480
  }
486
481
  ]),
487
- onClick: (T) => v(t)
482
+ onClick: (T) => m(a)
488
483
  }, [
489
- f(u.$slots, "header-label", {
484
+ g(r.$slots, "header-label", {
490
485
  sortBy: s.value,
491
- header: t
486
+ header: a
492
487
  }, () => [
493
- A(m(t.label), 1)
488
+ A(f(a.label), 1)
494
489
  ]),
495
- V(h(te), {
490
+ B($(te), {
496
491
  class: p([
497
- "size-4 shrink-0 transition",
492
+ "rvc-table-sort-icon",
498
493
  {
499
- "opacity-100": ((y = s.value) == null ? void 0 : y.key) === t.key,
500
- "opacity-0 group-hover/table:opacity-30": !s.value || s.value.key !== t.key,
501
- "rotate-180": ((k = s.value) == null ? void 0 : k.key) === t.key && s.value.direction === "desc"
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"
502
497
  }
503
498
  ])
504
499
  }, null, 8, ["class"])
505
- ], 10, me)) : f(u.$slots, "header-label", {
500
+ ], 10, ge)) : g(r.$slots, "header-label", {
506
501
  key: 1,
507
502
  sortBy: s.value,
508
- header: t
503
+ header: a
509
504
  }, () => [
510
- A(m(t.label), 1)
505
+ A(f(a.label), 1)
511
506
  ])
512
507
  ], 16))
513
508
  ];
514
509
  })), 256))
515
510
  ])
516
511
  ])
517
- ])) : $("", !0),
518
- o("tbody", null, [
519
- e.items.length && !e.spinning ? (a(!0), l(w, { key: 0 }, S(e.items, (t, d) => f(u.$slots, "items", {
520
- item: t,
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,
521
516
  index: d
522
517
  }, () => [
523
- (a(), l("tr", {
524
- key: `rvc-table-row-${d}-${t.id}`
518
+ (n(), l("tr", {
519
+ key: `rvc-table-row-${d}-${a.id}`
525
520
  }, [
526
- f(u.$slots, "item", {
527
- item: t,
521
+ g(r.$slots, "item", {
522
+ item: a,
528
523
  index: d
529
524
  }, () => [
530
- (a(!0), l(w, null, S(t, (y, k) => {
531
- var T, L, I, z;
532
- return a(), l("td", b({
533
- key: `rvc-table-row-${d}-column-${k}-${t.id}`,
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}`,
534
529
  ref_for: !0
535
- }, t.attrs, {
530
+ }, a.attrs, {
536
531
  class: {
537
- "text-left": ((T = g(k)) == null ? void 0 : T.align) === "left" || !((L = g(k)) != null && L.align),
538
- "text-center": ((I = g(k)) == null ? void 0 : I.align) === "center",
539
- "text-right": ((z = g(k)) == null ? void 0 : z.align) === "right"
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"
540
535
  },
541
536
  innerHTML: y
542
- }), null, 16, pe);
537
+ }), null, 16, me);
543
538
  }), 128))
544
539
  ])
545
540
  ]))
546
- ])), 256)) : !e.items.length && !e.spinning ? (a(), l("tr", ye, [
547
- o("td", {
541
+ ])), 256)) : !e.items.length && !e.spinning ? (n(), l("tr", fe, [
542
+ c("td", {
548
543
  colspan: e.headers.length,
549
544
  class: "rvc-table-state"
550
545
  }, [
551
- o("p", null, m(e.noResultsText), 1)
552
- ], 8, be)
553
- ])) : (a(), l("tr", he, [
554
- o("td", {
546
+ c("p", null, f(e.noResultsText), 1)
547
+ ], 8, pe)
548
+ ])) : (n(), l("tr", be, [
549
+ c("td", {
555
550
  colspan: e.headers.length,
556
551
  class: "rvc-table-state"
557
552
  }, [
558
- f(u.$slots, "spinner", {
553
+ g(r.$slots, "spinner", {
559
554
  spinning: e.spinning,
560
555
  label: e.loadingText
561
556
  }, () => [
562
- o("div", ke, [
563
- e.spinning ? (a(), x(h(K), {
557
+ c("div", $e, [
558
+ e.spinning ? (n(), w($(K), {
564
559
  key: 0,
565
560
  "aria-hidden": "true",
566
561
  class: "rvc-table-spinner"
567
- })) : $("", !0),
568
- A(" " + m(e.loadingText), 1)
562
+ })) : h("", !0),
563
+ A(" " + f(e.loadingText), 1)
569
564
  ])
570
565
  ])
571
- ], 8, $e)
566
+ ], 8, ye)
572
567
  ]))
573
568
  ])
574
569
  ], 2)
575
570
  ], 2),
576
- e.pagination ? f(u.$slots, "pagination", P(b({ key: 0 }, e.pagination)), () => [
577
- V(fe, {
571
+ e.pagination ? g(r.$slots, "pagination", P(b({ key: 0 }, e.pagination)), () => [
572
+ B(de, {
578
573
  pagination: e.pagination,
579
- "onPagination:change": n[0] || (n[0] = (t) => c("pagination:change", t)),
580
- "onPagination:perPage": n[1] || (n[1] = (t) => c("pagination:perPage", t))
574
+ "onPagination:change": t[0] || (t[0] = (a) => u("pagination:change", a)),
575
+ "onPagination:perPage": t[1] || (t[1] = (a) => u("pagination:perPage", a))
581
576
  }, null, 8, ["pagination"])
582
- ]) : $("", !0)
577
+ ]) : h("", !0)
583
578
  ]));
584
579
  }
585
- }, we = {
580
+ }, he = {
586
581
  key: 1,
587
582
  class: "rvc-empty-state-title"
588
- }, qe = {
583
+ }, Fe = {
589
584
  __name: "EmptyState",
590
585
  props: {
591
586
  title: {
@@ -603,18 +598,18 @@ const D = /* @__PURE__ */ Object.assign({
603
598
  }
604
599
  },
605
600
  setup(e) {
606
- return (r, i) => (a(), l("div", {
601
+ return (o, i) => (n(), l("div", {
607
602
  class: p(["rvc-empty-state", { "rvc-empty-state-bg": e.background }])
608
603
  }, [
609
- e.icon ? (a(), x(B(e.icon), {
604
+ e.icon ? (n(), w(C(e.icon), {
610
605
  key: 0,
611
606
  class: "rvc-empty-state-icon"
612
- })) : $("", !0),
613
- e.title ? (a(), l("p", we, m(e.title), 1)) : $("", !0),
614
- f(r.$slots, "default")
607
+ })) : h("", !0),
608
+ e.title ? (n(), l("p", he, f(e.title), 1)) : h("", !0),
609
+ g(o.$slots, "default")
615
610
  ], 2));
616
611
  }
617
- }, De = {
612
+ }, Ne = {
618
613
  __name: "FormTextarea",
619
614
  props: {
620
615
  modelValue: {
@@ -628,26 +623,26 @@ const D = /* @__PURE__ */ Object.assign({
628
623
  }
629
624
  },
630
625
  emits: ["update:modelValue"],
631
- setup(e, { emit: r }) {
632
- const i = e, c = r, { hasModelBinding: s } = O(), g = C({
626
+ setup(e, { emit: o }) {
627
+ const i = e, u = o, { hasModelBinding: s } = I(), v = x({
633
628
  get: () => i.modelValue,
634
- set: (u) => c("update:modelValue", u)
635
- }), v = C(() => [
629
+ set: (r) => u("update:modelValue", r)
630
+ }), m = x(() => [
636
631
  "rvc-textarea",
637
632
  `rvc-textarea-${i.size}`
638
633
  ]);
639
- return (u, n) => h(s) ? j((a(), l("textarea", {
634
+ return (r, t) => $(s) ? O((n(), l("textarea", {
640
635
  key: 0,
641
- "onUpdate:modelValue": n[0] || (n[0] = (t) => g.value = t),
642
- class: p(v.value)
636
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => v.value = a),
637
+ class: p(m.value)
643
638
  }, null, 2)), [
644
- [R, g.value]
645
- ]) : (a(), l("textarea", {
639
+ [R, v.value]
640
+ ]) : (n(), l("textarea", {
646
641
  key: 1,
647
- class: p(v.value)
642
+ class: p(m.value)
648
643
  }, null, 2));
649
644
  }
650
- }, xe = { 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({
651
646
  inheritAttrs: !1
652
647
  }, {
653
648
  __name: "Radio",
@@ -666,32 +661,34 @@ const D = /* @__PURE__ */ Object.assign({
666
661
  }
667
662
  },
668
663
  emits: ["update:modelValue"],
669
- setup(e, { emit: r }) {
670
- const i = e, c = r, s = C({
664
+ setup(e, { emit: o }) {
665
+ const i = e, u = o, s = x({
671
666
  get: () => i.modelValue,
672
- set: (n) => c("update:modelValue", n)
673
- }), { hasModelBinding: g } = O(), u = {
674
- ...F(),
667
+ set: (t) => u("update:modelValue", t)
668
+ }), { hasModelBinding: v } = I(), r = {
669
+ ...N(),
675
670
  id: i.id,
676
671
  type: "radio",
677
672
  class: "absolute opacity-0 inset-0 cursor-pointer peer/radio"
678
673
  };
679
- return (n, t) => (a(), l("div", xe, [
680
- h(g) ? j((a(), l("input", b({ key: 0 }, u, {
674
+ return (t, a) => (n(), l("div", ke, [
675
+ $(v) ? O((n(), l("input", b({ key: 0 }, r, {
681
676
  id: e.id,
682
- "onUpdate:modelValue": t[0] || (t[0] = (d) => s.value = d)
677
+ "onUpdate:modelValue": a[0] || (a[0] = (d) => s.value = d)
683
678
  }), null, 16, Se)), [
684
- [N, s.value]
685
- ]) : (a(), l("input", P(b({ key: 1 }, u)), null, 16)),
686
- t[1] || (t[1] = o("span", { class: "rvc-radio-input peer-focus/radio:rvc-focus" }, null, -1)),
687
- n.$slots.default || e.label ? (a(), l("span", Ve, [
688
- f(n.$slots, "default", {}, () => [
689
- 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)
690
685
  ])
691
- ])) : $("", !0)
686
+ ])) : h("", !0)
692
687
  ]));
693
688
  }
694
- }), 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
+ }, {
695
692
  __name: "Tabs",
696
693
  props: {
697
694
  modelValue: {
@@ -710,80 +707,79 @@ const D = /* @__PURE__ */ Object.assign({
710
707
  }
711
708
  },
712
709
  emits: ["update:modelValue", "tabs:change"],
713
- setup(e, { emit: r }) {
714
- const i = e, c = r, s = () => {
715
- const n = i.tabs.findIndex((t) => t.active);
716
- return n >= 0 ? n : 0;
717
- }, 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({
718
715
  get: () => i.modelValue ?? s(),
719
- set: (n) => {
720
- const t = i.tabs[n];
721
- c("update:modelValue", n), c("tabs:change", t);
716
+ set: (t) => {
717
+ const a = i.tabs[t];
718
+ u("update:modelValue", t), u("tabs:change", a);
722
719
  }
723
- }), v = (n) => {
724
- const t = +n.target.value;
725
- g.value = t;
726
- const d = i.tabs[t];
720
+ }), m = (t) => {
721
+ const a = +t.target.value;
722
+ v.value = a;
723
+ const d = i.tabs[a];
727
724
  d != null && d.selectEvent && d.selectEvent();
728
- }, u = (n) => {
725
+ }, r = (t) => {
729
726
  const {
730
- active: t,
727
+ active: a,
731
728
  as: d,
732
729
  bindAs: y,
733
730
  selectEvent: k,
734
731
  name: T,
735
732
  ...L
736
- } = n;
733
+ } = t;
737
734
  return L;
738
735
  };
739
- return (n, t) => (a(), l(w, null, [
740
- o("div", {
741
- class: p(["rvc-tabs hidden md:flex", { "rvc-tabs-buttons": e.tabStyle === "buttons" }])
742
- }, [
743
- o("nav", Ce, [
744
- (a(!0), l(w, null, S(e.tabs, (d, y) => (a(), 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), {
745
742
  key: `${y}-tab-item`,
746
743
  as: d.bindAs ? d.bindAs : void 0,
747
- class: ["rvc-tab", { "rvc-tab-active": g.value === y }],
748
- onClick: (k) => g.value = y
744
+ class: ["rvc-tab", { "rvc-tab-active": v.value === y }],
745
+ onClick: (k) => v.value = y
749
746
  }), {
750
747
  default: M(() => [
751
- A(m(d.name), 1)
748
+ A(f(d.name), 1)
752
749
  ]),
753
750
  _: 2
754
751
  }, 1040, ["as", "class", "onClick"]))), 128))
755
752
  ])
756
- ], 2),
757
- o("div", Ae, [
758
- V(D, {
759
- value: g.value,
760
- onChange: v
761
- }, {
762
- default: M(() => [
763
- (a(!0), l(w, null, S(e.tabs, (d, y) => (a(), l("option", {
764
- key: `${y}-tab-item-select-option`,
765
- value: y,
766
- selected: g.value === y
767
- }, m(d.name), 9, Pe))), 128))
768
- ]),
769
- _: 1
770
- }, 8, ["value"])
771
- ])
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"])
772
768
  ], 64));
773
769
  }
774
- };
770
+ });
775
771
  export {
776
- Ie as Accordion,
777
- ze as Alert,
778
- Ze as Badge,
779
- Ge as ButtonBase,
780
- Fe as Checkbox,
781
- Ne as DataTable,
782
- qe as EmptyState,
783
- Qe as FormInput,
784
- D as FormSelect,
785
- De as FormTextarea,
786
- fe as Pagination,
787
- He as Radio,
788
- 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
789
785
  };