@robuust-digital/vue-components 2.5.0 → 2.6.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 2.6.0 (14-04-2026)
2
+
3
+ ### Added
4
+
5
+ * `DataTable`: Added optional `tbody` slot (`#tbody="{ items }"`) for full loaded-state tbody customization
6
+
7
+ ### Updated
8
+
9
+ * `DataTable` docs: Documented `tbody` slot and clarified that consumers own row markup when using it
10
+
1
11
  ## 2.5.0 (14-04-2026)
2
12
 
3
13
  ### Added
@@ -1,4 +1,4 @@
1
- import { openBlock as l, createElementBlock as n, createElementVNode as u, defineComponent as w, Fragment as k, renderList as V, renderSlot as c, createTextVNode as x, toDisplayString as g, createVNode as I, unref as h, normalizeClass as p, createBlock as C, resolveDynamicComponent as P, withCtx as O, createCommentVNode as $, computed as B, useAttrs as A, ref as S, withDirectives as M, mergeProps as y, vModelDynamic as F, normalizeProps as j, guardReactiveProps as E, vModelSelect as H, vModelText as D } from "vue";
1
+ import { openBlock as l, createElementBlock as n, createElementVNode as u, defineComponent as w, Fragment as k, renderList as V, renderSlot as c, createTextVNode as S, toDisplayString as g, createVNode as I, unref as h, normalizeClass as p, createBlock as C, resolveDynamicComponent as P, withCtx as O, createCommentVNode as $, computed as B, useAttrs as A, ref as x, withDirectives as M, mergeProps as y, vModelDynamic as F, normalizeProps as j, guardReactiveProps as E, vModelSelect as H, vModelText as D } from "vue";
2
2
  import { r as R } from "./XMarkIcon-CPr_Rd8y.js";
3
3
  import { u as T } from "./FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js";
4
4
  import { S as U } from "./icon-spinner-BYCMrTdL.js";
@@ -53,7 +53,7 @@ const G = { class: "rvc-accordion" }, J = ["open", "name"], Q = ["innerHTML"], M
53
53
  item: f,
54
54
  index: s
55
55
  }, () => [
56
- x(g(f.title) + " ", 1),
56
+ S(g(f.title) + " ", 1),
57
57
  c(r.$slots, "icon", { classList: "rvc-accordion-icon" }, () => [
58
58
  I(h(q), { class: "rvc-accordion-icon" })
59
59
  ])
@@ -134,7 +134,7 @@ const G = { class: "rvc-accordion" }, J = ["open", "name"], Q = ["innerHTML"], M
134
134
  }), { hasModelBinding: d } = T(), m = A(), a = B(() => ({
135
135
  ...m,
136
136
  type: "checkbox"
137
- })), o = S(null);
137
+ })), o = x(null);
138
138
  return (t, i) => (l(), n("label", {
139
139
  class: p(["rvc-checkbox", e.rootClass])
140
140
  }, [
@@ -222,7 +222,7 @@ const ae = ["value"], le = ["value"], N = /* @__PURE__ */ w({
222
222
  const v = e, f = r, s = B({
223
223
  get: () => v.modelValue,
224
224
  set: (a) => f("update:modelValue", a)
225
- }), { hasModelBinding: d } = T(), m = S(null);
225
+ }), { hasModelBinding: d } = T(), m = x(null);
226
226
  return (a, o) => (l(), n("div", {
227
227
  class: p([
228
228
  "rvc-select",
@@ -376,7 +376,7 @@ const ae = ["value"], le = ["value"], N = /* @__PURE__ */ w({
376
376
  },
377
377
  emits: ["table:sortBy", "pagination:change", "pagination:perPage"],
378
378
  setup(e, { emit: r }) {
379
- const v = e, f = r, s = S(v.defaultSort), d = (a) => v.headers.find((o) => o.key === a), m = (a) => {
379
+ const v = e, f = r, s = x(v.defaultSort), d = (a) => v.headers.find((o) => o.key === a), m = (a) => {
380
380
  a.key && (!s.value || s.value.key !== a.key ? s.value = {
381
381
  key: a.key,
382
382
  direction: "asc"
@@ -424,7 +424,7 @@ const ae = ["value"], le = ["value"], N = /* @__PURE__ */ w({
424
424
  sortBy: s.value,
425
425
  header: t
426
426
  }, () => [
427
- x(g(t.label), 1)
427
+ S(g(t.label), 1)
428
428
  ]),
429
429
  I(h(_), {
430
430
  class: p([
@@ -441,7 +441,7 @@ const ae = ["value"], le = ["value"], N = /* @__PURE__ */ w({
441
441
  sortBy: s.value,
442
442
  header: t
443
443
  }, () => [
444
- x(g(t.label), 1)
444
+ S(g(t.label), 1)
445
445
  ])
446
446
  ], 16))
447
447
  ])), 256))
@@ -449,30 +449,35 @@ const ae = ["value"], le = ["value"], N = /* @__PURE__ */ w({
449
449
  ])
450
450
  ])) : $("", !0),
451
451
  u("tbody", null, [
452
- e.items.length && !e.spinning ? (l(!0), n(k, { key: 0 }, V(e.items, (t, i) => c(a.$slots, "items", {
453
- item: t,
454
- index: i
452
+ e.items.length && !e.spinning ? c(a.$slots, "tbody", {
453
+ key: 0,
454
+ items: e.items
455
455
  }, () => [
456
- (l(), n("tr", {
457
- key: `rvc-table-row-${i}-${t.id}`
458
- }, [
459
- c(a.$slots, "item", {
460
- item: t,
461
- index: i
462
- }, () => [
463
- (l(!0), n(k, null, V(t, (b, L) => (l(), n("td", y({
464
- key: `rvc-table-row-${i}-column-${L}-${t.id}`
465
- }, { ref_for: !0 }, t.attrs, {
466
- class: {
467
- "rvc-table-text-left": d(String(L))?.align === "left" || !d(String(L))?.align,
468
- "rvc-table-text-center": d(String(L))?.align === "center",
469
- "rvc-table-text-right": d(String(L))?.align === "right"
470
- },
471
- innerHTML: b
472
- }), null, 16, ge))), 128))
473
- ])
474
- ]))
475
- ])), 256)) : !e.items.length && !e.spinning ? (l(), n("tr", be, [
456
+ (l(!0), n(k, null, V(e.items, (t, i) => c(a.$slots, "items", {
457
+ item: t,
458
+ index: i
459
+ }, () => [
460
+ (l(), n("tr", {
461
+ key: `rvc-table-row-${i}-${t.id}`
462
+ }, [
463
+ c(a.$slots, "item", {
464
+ item: t,
465
+ index: i
466
+ }, () => [
467
+ (l(!0), n(k, null, V(t, (b, L) => (l(), n("td", y({
468
+ key: `rvc-table-row-${i}-column-${L}-${t.id}`
469
+ }, { ref_for: !0 }, t.attrs, {
470
+ class: {
471
+ "rvc-table-text-left": d(String(L))?.align === "left" || !d(String(L))?.align,
472
+ "rvc-table-text-center": d(String(L))?.align === "center",
473
+ "rvc-table-text-right": d(String(L))?.align === "right"
474
+ },
475
+ innerHTML: b
476
+ }), null, 16, ge))), 128))
477
+ ])
478
+ ]))
479
+ ])), 256))
480
+ ]) : !e.items.length && !e.spinning ? (l(), n("tr", be, [
476
481
  u("td", {
477
482
  colspan: e.headers.length,
478
483
  class: "rvc-table-state"
@@ -494,7 +499,7 @@ const ae = ["value"], le = ["value"], N = /* @__PURE__ */ w({
494
499
  "aria-hidden": "true",
495
500
  class: "rvc-table-spinner"
496
501
  })) : $("", !0),
497
- x(" " + g(e.loadingText), 1)
502
+ S(" " + g(e.loadingText), 1)
498
503
  ])
499
504
  ])
500
505
  ], 8, ye)
@@ -553,7 +558,7 @@ const ae = ["value"], le = ["value"], N = /* @__PURE__ */ w({
553
558
  },
554
559
  emits: ["update:modelValue"],
555
560
  setup(e, { emit: r }) {
556
- const v = e, f = r, { hasModelBinding: s } = T(), d = S(null), m = B({
561
+ const v = e, f = r, { hasModelBinding: s } = T(), d = x(null), m = B({
557
562
  get: () => v.modelValue,
558
563
  set: (o) => f("update:modelValue", o)
559
564
  }), a = B(() => [
@@ -591,7 +596,7 @@ const ae = ["value"], le = ["value"], N = /* @__PURE__ */ w({
591
596
  }), { hasModelBinding: d } = T(), m = A(), a = B(() => ({
592
597
  ...m,
593
598
  type: "radio"
594
- })), o = S(null);
599
+ })), o = x(null);
595
600
  return (t, i) => (l(), n("label", {
596
601
  class: p(["rvc-radio", e.rootClass])
597
602
  }, [
@@ -659,7 +664,7 @@ const ae = ["value"], le = ["value"], N = /* @__PURE__ */ w({
659
664
  onClick: (L) => d.value = b
660
665
  }), {
661
666
  default: O(() => [
662
- x(g(i.name), 1)
667
+ S(g(i.name), 1)
663
668
  ]),
664
669
  _: 2
665
670
  }, 1040, ["as", "class", "onClick"]))), 128))
@@ -1,4 +1,4 @@
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-B0RIqYLz.js";
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-ByxZ-FVI.js";
2
2
  import { _ as b } from "../_shared/ChevronDownIcon-BYWciGnh.js";
3
3
  import { _ } from "../_shared/ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
4
4
  import { _ as l } from "../_shared/FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js";
package/dist/core.d.ts CHANGED
@@ -280,6 +280,9 @@ declare function __VLS_template_6(): {
280
280
  } | null;
281
281
  header: DataTableHeader;
282
282
  }): any;
283
+ tbody?(_: {
284
+ items: DataTableItem[];
285
+ }): any;
283
286
  items?(_: {
284
287
  item: DataTableItem;
285
288
  index: number;
@@ -1,4 +1,4 @@
1
- import { _ as r, a as t, b as e, c as s, d as m, e as p, f as x, g as f, h as _, i } from "../_shared/Tabs.vue_vue_type_script_setup_true_lang-B0RIqYLz.js";
1
+ import { _ as r, a as t, b as e, c as s, d as m, e as p, f as x, g as f, h as _, i } from "../_shared/Tabs.vue_vue_type_script_setup_true_lang-ByxZ-FVI.js";
2
2
  import { _ as d } from "../_shared/ChevronDownIcon-BYWciGnh.js";
3
3
  import { _ as n } from "../_shared/ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
4
4
  import { _ as h } from "../_shared/FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js";
package/dist/index.d.ts CHANGED
@@ -814,6 +814,9 @@ declare function __VLS_template_6(): {
814
814
  } | null;
815
815
  header: DataTableHeader;
816
816
  }): any;
817
+ tbody?(_: {
818
+ items: DataTableItem[];
819
+ }): any;
817
820
  items?(_: {
818
821
  item: DataTableItem;
819
822
  index: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robuust-digital/vue-components",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"