bitboss-ui 3.0.0-beta.4 → 3.0.0-beta.8

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 (42) hide show
  1. package/README.md +36 -29
  2. package/dist/ai/BbBadge.md +10 -5
  3. package/dist/ai/BbSelect.md +8 -0
  4. package/dist/ai/BbTable.md +257 -51
  5. package/dist/ai/changelog.json +86 -2
  6. package/dist/ai/components.json +25 -15
  7. package/dist/ai/guides/design-language.md +14 -14
  8. package/dist/ai/guides/design-tokens.md +25 -18
  9. package/dist/ai/guides/installation-and-plugin-setup.md +1 -1
  10. package/dist/ai/guides/migration/components/bb-dialog.md +35 -29
  11. package/dist/ai/guides/migration/components/bb-table.md +406 -28
  12. package/dist/ai/guides/migration/v2-to-v3.md +175 -75
  13. package/dist/ai/index.md +1 -1
  14. package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
  15. package/dist/ai/recipes/inertia/ownership-atlas.md +41 -20
  16. package/dist/ai/recipes/inertia/records-workspace.md +26 -7
  17. package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
  18. package/dist/ai/recipes/nuxt/records-workspace.md +26 -7
  19. package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
  20. package/dist/ai/recipes/vue/records-workspace.md +26 -7
  21. package/dist/ai/source/BbBaseInputContainer.md +26 -0
  22. package/dist/ai/source/BbBreadcrumbs.md +31 -0
  23. package/dist/ai/source/BbDialog.md +15 -9
  24. package/dist/ai/source/BbOffCanvas.md +17 -11
  25. package/dist/ai/source/BbProgress.md +2 -2
  26. package/dist/ai/source/BbTable.md +837 -787
  27. package/dist/ai/source/CommonInputWrapper.md +4 -0
  28. package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
  29. package/dist/components/BbTable/BbTable.vue.d.ts +5 -2
  30. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +439 -484
  31. package/dist/components/BbTable/types.d.ts +83 -21
  32. package/dist/components/BbTable/utils.d.ts +18 -3
  33. package/dist/components/BbTable/utils.js +36 -28
  34. package/dist/index.d.ts +5 -1
  35. package/dist/index.js +68 -67
  36. package/dist/llms-full.txt +1065 -265
  37. package/dist/llms-medium.txt +15 -15
  38. package/dist/llms.txt +1 -1
  39. package/dist/styles.css +1 -1
  40. package/llms.txt +1 -1
  41. package/package.json +1 -1
  42. package/dist/assets/svgs/sort.svg_raw.js +0 -4
@@ -3,58 +3,61 @@ import { removedPropsFor as t } from "../../deprecation/removedProps.js";
3
3
  import { useLogger as n } from "../../composables/useLogger.js";
4
4
  import { warnRemovedAttrs as r } from "../../utilities/functions/warnRemovedAttrs.js";
5
5
  import i from "../BbBaseButton/BbBaseButton.vue.js";
6
- import a from "../BbIcon/BbIcon.vue.js";
7
- import { isNil as o } from "../../utilities/functions/isNil.js";
8
- import { useLocale as s } from "../../composables/useLocale.js";
9
- import { useItemsGetter as c } from "../../composables/useItemsGetter.js";
10
- import { useItemValue as l } from "../../composables/useItemValue.js";
11
- import { hash as u } from "../../utilities/functions/hash.js";
12
- import { useHashedWatcher as ee } from "../../composables/useHashedWatcher.js";
13
- import { useBbTableContextHost as te } from "../../composables/useBbTableContext.js";
14
- import { clamp as ne } from "../../utilities/functions/clamp.js";
15
- import d from "../BbBaseCheckbox/BbBaseCheckbox.vue.js";
16
- import { useIndexById as f } from "../../composables/useIndexById.js";
6
+ import { isNil as a } from "../../utilities/functions/isNil.js";
7
+ import { useLocale as o } from "../../composables/useLocale.js";
8
+ import { useItemsGetter as s } from "../../composables/useItemsGetter.js";
9
+ import { useItemValue as c } from "../../composables/useItemValue.js";
10
+ import { hash as l } from "../../utilities/functions/hash.js";
11
+ import { useHashedWatcher as u } from "../../composables/useHashedWatcher.js";
12
+ import { useBbTableContextHost as ee } from "../../composables/useBbTableContext.js";
13
+ import { clamp as d } from "../../utilities/functions/clamp.js";
14
+ import te from "../BbBaseCheckbox/BbBaseCheckbox.vue.js";
15
+ import { useIndexById as ne } from "../../composables/useIndexById.js";
17
16
  import { useBaseOptions as re } from "../../composables/useBaseOptions.js";
18
17
  import { usePrefill as ie } from "../../composables/usePrefill.js";
19
- import { parseCount as ae, parsePositiveInteger as p } from "../../utilities/functions/parsePaginationNumber.js";
20
- import oe from "../BbBaseRadio/BbBaseRadio.vue.js";
21
- import { when as se } from "../../utilities/functions/when.js";
22
- import { useTableWidthContext as ce } from "../../composables/useTableWidthContext.js";
23
- import le from "../../assets/svgs/sort.svg_raw.js";
24
- import { applyFixedTableColumns as ue, columnKeyToSlotName as de, mergeCellClasses as fe, mergeHeaderClasses as pe, mergeRowClasses as me } from "./utils.js";
25
- import { Fragment as m, computed as h, createBlock as he, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as ge, createVNode as _e, defineComponent as y, mergeModels as ve, mergeProps as ye, nextTick as be, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as xe, onMounted as Se, openBlock as S, reactive as Ce, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as we, toDisplayString as E, toRef as Te, unref as D, useModel as Ee, watch as O, withCtx as De } from "vue";
18
+ import { parseCount as ae, parsePositiveInteger as oe } from "../../utilities/functions/parsePaginationNumber.js";
19
+ import se from "../BbBaseRadio/BbBaseRadio.vue.js";
20
+ import { when as ce } from "../../utilities/functions/when.js";
21
+ import { useTableWidthContext as le } from "../../composables/useTableWidthContext.js";
22
+ import { applyFixedTableColumns as ue, columnKeyToSlotName as de, mergeCellClasses as fe, mergeHeaderClasses as pe, mergeRowClasses as me, readResolvedTracks as he } from "./utils.js";
23
+ import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as ge, createVNode as _e, defineComponent as v, mergeModels as ve, mergeProps as ye, nextTick as be, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as xe, onMounted as Se, openBlock as x, reactive as Ce, ref as we, renderList as S, renderSlot as C, resolveDynamicComponent as Te, toDisplayString as w, toRef as Ee, unref as T, useModel as E, useSlots as De, watch as D, withCtx as Oe } from "vue";
26
24
  //#region src/components/BbTable/BbTable.vue?vue&type=script&setup=true&lang.ts
27
- var Oe = {
25
+ var ke = {
28
26
  key: 0,
29
27
  class: "sr-only"
30
- }, ke = ["aria-rowcount"], Ae = ["inert"], je = ["aria-rowindex"], Me = { class: "bb-table-header__content" }, Ne = { class: "bb-table-check__label-text sr-only" }, Pe = {
28
+ }, Ae = ["id"], je = ["aria-labelledby", "aria-rowcount"], Me = ["inert"], Ne = ["aria-rowindex"], Pe = { class: "bb-table-header__content" }, Fe = { class: "bb-table-check__label-text sr-only" }, Ie = {
31
29
  key: 1,
32
30
  class: "bb-table-radio__label-text sr-only"
33
- }, Fe = ["aria-sort"], Ie = { class: "bb-table-header__content" }, Le = {
31
+ }, Le = ["aria-sort"], Re = { class: "bb-table-header__content" }, ze = {
34
32
  key: 1,
35
33
  class: "bb-table-header__content"
36
- }, Re = { class: "bb-table-header__content sr-only" }, ze = ["aria-rowindex"], Be = {
34
+ }, Be = { class: "bb-table-header__content sr-only" }, Ve = {
35
+ class: "bb-table__body",
36
+ role: "rowgroup"
37
+ }, He = ["aria-rowindex"], Ue = {
37
38
  key: 0,
38
- class: "bb-table-skeleton__cell bb-table-skeleton__cell--select"
39
- }, Ve = {
39
+ class: "bb-table-skeleton__cell bb-table-skeleton__cell--select",
40
+ role: "cell"
41
+ }, We = {
40
42
  key: 0,
41
43
  class: "bb-table-skeleton__cell-content"
42
- }, He = {
44
+ }, Ge = {
43
45
  key: 1,
44
46
  class: "bb-table-skeleton__avatar"
45
- }, Ue = {
47
+ }, Ke = {
46
48
  key: 2,
47
49
  class: "bb-table-skeleton__avatar-text"
48
- }, We = { class: "bb-table-skeleton__cell-content" }, Ge = {
50
+ }, qe = { class: "bb-table-skeleton__cell-content" }, Je = {
49
51
  key: 3,
50
52
  class: "bb-table-skeleton__image"
51
- }, Ke = {
53
+ }, Ye = {
52
54
  key: 4,
53
55
  class: "bb-table-skeleton__badge"
54
- }, qe = {
56
+ }, Xe = {
55
57
  key: 1,
56
- class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions"
57
- }, Je = ["aria-rowindex"], Ye = ["colspan"], Xe = { class: "bb-table-no-data__text" }, Ze = [
58
+ class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions",
59
+ role: "cell"
60
+ }, Ze = ["aria-rowindex"], Qe = ["aria-colspan"], $e = { class: "bb-table-no-data__text" }, et = [
58
61
  "aria-current",
59
62
  "aria-rowindex",
60
63
  "inert",
@@ -64,7 +67,11 @@ var Oe = {
64
67
  "onDblclick",
65
68
  "onFocus",
66
69
  "onKeydown"
67
- ], Qe = { class: "bb-table-check__label-text sr-only" }, $e = { class: "bb-table-radio__label-text sr-only" }, et = ["id", "aria-rowindex"], tt = ["colspan"], nt = ["aria-rowindex"], rt = ["colspan"], it = { class: "bb-table-loading__text sr-only" }, at = 10, k = /*@__PURE__*/ y({
70
+ ], tt = { class: "bb-table-check__label-text sr-only" }, nt = { class: "bb-table-radio__label-text sr-only" }, rt = ["id", "aria-rowindex"], it = ["aria-colspan"], at = ["aria-rowindex"], ot = ["aria-colspan"], st = {
71
+ "aria-live": "polite",
72
+ class: "bb-table-loading__text sr-only",
73
+ role: "status"
74
+ }, ct = ["role"], lt = 10, O = /*@__PURE__*/ v({
68
75
  __name: "BbTable",
69
76
  props: /*@__PURE__*/ ve({
70
77
  accessibleLabel: {},
@@ -161,95 +168,99 @@ var Oe = {
161
168
  "update:highlighted",
162
169
  "update:expandedItems"
163
170
  ]),
164
- setup(y, { emit: ve }) {
165
- let k = Ee(y, "selectAll"), A = Ee(y, "sort"), j = Ee(y, "highlighted"), M = Ee(y, "expandedItems"), N = y, P = ve;
171
+ setup(v, { emit: ve }) {
172
+ let O = E(v, "selectAll"), k = E(v, "sort"), A = E(v, "highlighted"), j = E(v, "expandedItems"), M = v, N = ve, P = De();
166
173
  process.env.NODE_ENV !== "production" && r("BbTable", t("BbTable"));
167
- let { getItemValue: ot } = l(), st = e().id.value;
168
- N.multiple && !Array.isArray(N.modelValue) && n().throw("BbTable is set for multiple selection but modelValue is not an array.");
169
- let ct = ["actions", "select"];
174
+ let { getItemValue: ut } = c(), dt = e().id.value;
175
+ M.multiple && !Array.isArray(M.modelValue) && n().throw("BbTable is set for multiple selection but modelValue is not an array.");
176
+ let ft = ["actions", "select"], pt = ["prepend", "append"], mt = (e) => pt.includes(e);
170
177
  if (process.env.NODE_ENV !== "production") {
171
- let e = N.columns.filter((e) => ct.includes(e.key));
178
+ let e = M.columns.filter((e) => ft.includes(e.key));
172
179
  for (let t of e) n().warn(`BbTable: \`{ key: '${String(t.key)}' }\` is a reserved column and must not appear in \`columns\`. ` + (t.key === "actions" ? "Set the `actions` prop and fill the `#actions` slot instead." : "Selection is controlled by the `selectable` prop."));
180
+ for (let e of M.columns) {
181
+ let t = de(e.key);
182
+ mt(t) && n().warn(`BbTable: column key '${String(e.key)}' normalizes to the slot name '${t}', which collides with the table-wide \`#header:${t}\` slot. That name keeps its table-wide meaning and per-column header slots are unavailable for this column.`);
183
+ }
173
184
  }
174
- let { t: F } = s(), I = C(), L = C(), { id: lt, parentId: R, parentNode: ut, cssVars: dt, parentVar: ft, setTracks: pt } = ce({
175
- id: () => N.id,
176
- container: () => L.value,
177
- inheritFrom: () => typeof N.inheritColumnWidths == "string" ? N.inheritColumnWidths : void 0
178
- }), { data: mt } = f({ items: h(() => o(j.value) ? [] : [j.value]) }), z = (e) => {
179
- let t = e.valueHash in mt.value;
180
- j.value = t ? null : e.value;
181
- }, ht = (e, t) => {
185
+ let { t: F } = o(), I = we(), ht = we(), { id: gt, parentId: L, parentNode: R, node: _t, cssVars: vt, parentVar: yt, setTracks: bt } = le({
186
+ id: () => M.id,
187
+ container: () => ht.value,
188
+ inheritFrom: () => typeof M.inheritColumnWidths == "string" ? M.inheritColumnWidths : void 0
189
+ }), xt = p(() => `${gt.value}__caption`), { data: St } = ne({ items: p(() => a(A.value) ? [] : [A.value]) }), z = (e) => {
190
+ let t = e.valueHash in St.value;
191
+ A.value = t ? null : e.value;
192
+ }, Ct = (e, t) => {
182
193
  e.target instanceof Element && (e.target.closest("a, button, input, label, select, textarea, [contenteditable], [role=\"button\"]") || window.getSelection()?.toString() || z(t));
183
- }, gt = (e) => A.value.find(([t]) => t === e)?.[1] ?? null, _t = (e) => {
184
- let t = gt(e);
185
- t === null ? A.value = [...A.value, [e, "asc"]] : t === "asc" ? A.value = A.value.map((t) => t[0] === e ? [e, "desc"] : t) : A.value = A.value.filter(([t]) => t !== e);
186
- }, { state: B, isReady: vt } = te(() => lt.value, {
194
+ }, wt = (e) => k.value.find(([t]) => t === e)?.[1] ?? null, Tt = (e) => {
195
+ let t = wt(e);
196
+ t === null ? k.value = [...k.value, [e, "asc"]] : t === "asc" ? k.value = k.value.map((t) => t[0] === e ? [e, "desc"] : t) : k.value = k.value.filter(([t]) => t !== e);
197
+ }, { state: B, isReady: Et } = ee(() => gt.value, {
187
198
  selected: {
188
- get: () => N.modelValue,
189
- set: (e) => P("update:modelValue", e)
199
+ get: () => M.modelValue,
200
+ set: (e) => N("update:modelValue", e)
190
201
  },
191
202
  unselected: {
192
- get: () => N.unselectedItems,
193
- set: (e) => P("update:unselectedItems", e)
203
+ get: () => M.unselectedItems,
204
+ set: (e) => N("update:unselectedItems", e)
194
205
  },
195
206
  all: {
196
- get: () => k.value,
207
+ get: () => O.value,
197
208
  set: (e) => {
198
- k.value = e;
209
+ O.value = e;
199
210
  }
200
211
  },
201
212
  sort: {
202
- get: () => A.value,
213
+ get: () => k.value,
203
214
  set: (e) => {
204
- A.value = e;
215
+ k.value = e;
205
216
  }
206
217
  },
207
218
  highlighted: {
208
- get: () => j.value ?? null,
219
+ get: () => A.value ?? null,
209
220
  set: (e) => {
210
- j.value = e;
221
+ A.value = e;
211
222
  }
212
223
  },
213
- page: { get: () => N.page === void 0 ? void 0 : p(N.page, 1) },
224
+ page: { get: () => M.page === void 0 ? void 0 : oe(M.page, 1) },
214
225
  perPage: {
215
- get: () => ae(N.perPage),
216
- infer: () => Array.isArray(N.items) ? N.items.length : void 0
226
+ get: () => ae(M.perPage),
227
+ infer: () => Array.isArray(M.items) ? M.items.length : void 0
217
228
  },
218
229
  totalItems: {
219
- get: () => ae(N.totalItems),
220
- infer: () => Array.isArray(N.items) ? N.items.length : void 0
230
+ get: () => ae(M.totalItems),
231
+ infer: () => Array.isArray(M.items) ? M.items.length : void 0
221
232
  },
222
- totalPages: { get: () => N.totalPages === void 0 ? void 0 : p(N.totalPages, 1) }
223
- }), yt = h(() => N.columns.some((e) => e.snap != null)), V = h(() => !!N.inheritColumnWidths || yt.value), H = h(() => N.fixed || yt.value || N.columns.some((e) => e.width != null) || V.value && !!R.value), bt = h(() => V.value && !!R.value), xt = bt, St = (e) => {
233
+ totalPages: { get: () => M.totalPages === void 0 ? void 0 : oe(M.totalPages, 1) }
234
+ }), Dt = p(() => M.columns.some((e) => e.snap != null)), V = p(() => !!M.inheritColumnWidths || Dt.value), Ot = p(() => M.fixed || Dt.value || M.columns.some((e) => e.width != null) || V.value && !!L.value), H = p(() => V.value && !!L.value), kt = H, At = (e) => {
224
235
  if (typeof e == "number") return `${e}px`;
225
236
  let t = e.trim();
226
237
  return /^-?\d*\.?\d+$/.test(t) ? `${t}px` : t;
227
- }, Ct = h(() => {
228
- let e = ut.value?.tracks;
238
+ }, jt = p(() => {
239
+ let e = R.value?.tracks;
229
240
  return e ? Object.keys(e).filter((e) => /^\d+$/.test(e)).length : 0;
230
- }), wt = h(() => {
231
- let e = ut.value?.tracks ?? {}, t = [];
241
+ }), Mt = p(() => {
242
+ let e = R.value?.tracks ?? {}, t = [];
232
243
  "select" in e && t.push("select");
233
- for (let e = 0; e < Ct.value; e++) t.push(String(e));
244
+ for (let e = 0; e < jt.value; e++) t.push(String(e));
234
245
  return "actions" in e && t.push("actions"), t;
235
- }), Tt = h(() => +("select" in (ut.value?.tracks ?? {}))), Et = h(() => Tt.value + Ct.value), Dt = h(() => wt.value.length), Ot = (e) => {
236
- let t = wt.value[e];
237
- return t ? ft(t, "0px") : "0px";
238
- }, kt = (e, t) => {
239
- if (!R.value || t - e <= 1e-6) return null;
246
+ }), Nt = p(() => +("select" in (R.value?.tracks ?? {}))), Pt = p(() => Nt.value + jt.value), Ft = p(() => Mt.value.length), It = (e) => {
247
+ let t = Mt.value[e];
248
+ return t ? yt(t, "0px") : "0px";
249
+ }, Lt = (e, t) => {
250
+ if (!L.value || t - e <= 1e-6) return null;
240
251
  let n = [];
241
252
  for (let r = Math.floor(e); r < Math.ceil(t - 1e-6); r++) {
242
253
  let i = Math.min(t, r + 1) - Math.max(e, r);
243
254
  if (i <= 1e-6) continue;
244
- let a = Ot(r);
255
+ let a = It(r);
245
256
  n.push(i >= .999999 ? a : `${Number(i.toFixed(4))} * ${a}`);
246
257
  }
247
258
  return n.length ? n.length === 1 && !n[0].includes("*") ? n[0] : `calc(${n.join(" + ")})` : null;
248
- }, At = h(() => {
249
- let e = N.columns, t = e.map((e) => typeof e.snap == "number" ? e.snap : Array.isArray(e.snap) ? e.snap[0] : null), n = Tt.value;
259
+ }, U = p(() => {
260
+ let e = M.columns, t = e.map((e) => typeof e.snap == "number" ? e.snap : Array.isArray(e.snap) ? e.snap[0] : null), n = Nt.value;
250
261
  return e.map((e, r) => {
251
262
  let i = t[r] ?? n, a;
252
- if (Array.isArray(e.snap)) a = e.snap[1] === -1 ? Et.value : e.snap[1];
263
+ if (Array.isArray(e.snap)) a = e.snap[1] === -1 ? Pt.value : e.snap[1];
253
264
  else {
254
265
  let e = t[r + 1];
255
266
  a = e != null && e > i ? e : Math.floor(i) + 1;
@@ -259,312 +270,220 @@ var Oe = {
259
270
  end: a
260
271
  };
261
272
  });
262
- }), jt = (e) => bt.value && e.start >= Et.value, Mt = h(() => At.value.some(jt)), Nt = (e) => N.columns[e]?.width == null && !bt.value, Pt = h(() => {
263
- if (!bt.value) return -1;
264
- for (let e = N.columns.length - 1; e >= 0; e--) {
265
- let t = N.columns[e];
273
+ }), Rt = (e) => H.value && e.start >= Pt.value, zt = p(() => U.value.some(Rt)), Bt = (e) => M.columns[e]?.width == null && !H.value, Vt = p(() => {
274
+ if (!H.value) return -1;
275
+ for (let e = M.columns.length - 1; e >= 0; e--) {
276
+ let t = M.columns[e];
266
277
  if (t.width == null && t.snap == null) return e;
267
278
  }
268
279
  return -1;
269
- }), Ft = h(() => {
270
- let e = At.value[0];
271
- if (!V.value || !R.value || !e) return null;
272
- let t = kt(0, e.start), n = N.selectable ? U.select : null;
273
- return n ? `calc(${t ?? "0px"} - ${n})` : t;
274
- }), It = h(() => {
275
- let e = At.value, t = e[e.length - 1];
276
- if (!V.value || !R.value || !t || Mt.value || Pt.value === N.columns.length - 1) return null;
277
- let n = kt(t.end, Dt.value), r = N.actions ? U.actions : null;
278
- return r ? `calc(${n ?? "0px"} - ${r})` : n;
279
- }), Lt = h(() => Ft.value !== null), Rt = h(() => It.value !== null), U = Ce({
280
- select: null,
281
- actions: null
282
- }), zt = h(() => {
283
- let e = (e) => V.value ? ft(e) : "auto", t = (t) => H.value && U[t] ? U[t] : e(t), n = [];
284
- N.selectable && n.push({
280
+ }), W = p(() => {
281
+ let e = U.value[0];
282
+ return !V.value || !L.value || !e ? null : Lt(0, e.start);
283
+ }), G = p(() => {
284
+ let e = U.value, t = e[e.length - 1];
285
+ return !V.value || !L.value || !t || zt.value ? null : Lt(t.end, Ft.value);
286
+ }), Ht = (e) => _t.tracks[e] ?? null, Ut = (e, t, n) => !V.value || !L.value ? null : n ? t ? `calc(${e ?? "0px"} - ${t})` : null : e, Wt = p(() => Ut(W.value, M.selectable ? Ht("select") : null, !!M.selectable)), Gt = p(() => zt.value ? null : Ut(G.value, M.actions ? Ht("actions") : null, !!M.actions)), Kt = p(() => Wt.value !== null), qt = p(() => Gt.value !== null), Jt = (e) => e && Yt.value ? `minmax(${e}, max-content)` : "max-content", Yt = p(() => Object.keys(R.value?.tracks ?? {}).length > 0), Xt = (e) => /^(auto|min-content|max-content|fit-content\(.*\)|-?[\d.]+fr)$/.test(e.trim()), Zt = p(() => {
287
+ let e = [];
288
+ M.selectable && e.push({
285
289
  key: "select",
286
- width: t("select")
290
+ width: Jt(W.value)
287
291
  });
288
- let r = N.columns.length - 1;
289
- return N.columns.forEach((e, t) => {
290
- let i = String(t), a = e.width == null ? null : St(e.width), o = At.value[t];
291
- if (t === Pt.value && !Mt.value) {
292
- n.push({
293
- key: i,
294
- width: "auto"
292
+ let t = M.columns.length - 1, n = !H.value && M.columns.length > 0 && M.columns.every((e) => e.width != null);
293
+ return M.columns.forEach((r, i) => {
294
+ let a = String(i), o = r.width == null ? null : At(r.width), s = U.value[i], c = null, l = null;
295
+ if (o != null && Xt(o) ? l = o : o != null && n ? l = `minmax(${o}, ${parseFloat(o) || 1}fr)` : o == null ? Bt(i) ? l = M.fixed ? "minmax(0, 1fr)" : "auto" : Yt.value ? Rt(s) ? l = "min-content" : (c = Lt(s.start, s.end), c === null && (l = "auto")) : l = "max-content" : c = o, l !== null) {
296
+ e.push({
297
+ key: a,
298
+ width: l
295
299
  });
296
300
  return;
297
301
  }
298
- let s;
299
- s = a ?? (Nt(t) ? H.value && Kt.value[t] || null : jt(o) ? qt.value[t] ?? null : kt(o.start, o.end));
300
- let c = [];
301
- t === 0 && Lt.value && c.push("var(--offset-internal-start, 0px)"), t === r && Rt.value && c.push("var(--offset-internal-end, 0px)");
302
- let l = c.length ? `calc(${[...c, s ?? "0px"].join(" + ")})` : s ?? "auto";
303
- n.push({
304
- key: i,
305
- width: l
302
+ let u = [];
303
+ i === 0 && Kt.value && u.push("var(--offset-internal-start, 0px)"), i === t && qt.value && u.push("var(--offset-internal-end, 0px)");
304
+ let ee = u.length ? `calc(${[...u, c].join(" + ")})` : c, d = i === Vt.value && !zt.value ? `minmax(${ee}, 1fr)` : ee;
305
+ e.push({
306
+ key: a,
307
+ width: d
306
308
  });
307
- }), N.actions && n.push({
309
+ }), M.actions && e.push({
308
310
  key: "actions",
309
- width: t("actions")
310
- }), n;
311
- }), Bt = h(() => {
311
+ width: Jt(G.value)
312
+ }), e;
313
+ }), Qt = p(() => Zt.value.map((e) => e.width).join(" ")), $t = p(() => {
312
314
  let e = {};
313
- return Ft.value && (e["--offset-start"] = Ft.value), It.value && (e["--offset-end"] = It.value), e;
314
- }), Vt = h(() => {
315
- let e = {
316
- ...dt.value,
317
- ...Bt.value
318
- };
319
- return Jt.value && (e["--natural-width"] = Jt.value), W.value > 0 && (e["--fill"] = `${W.value}px`), e;
320
- }), Ht = () => Array.from(I.value?.querySelectorAll(":scope > thead > tr.bb-table-header-row > th") ?? []), Ut = () => {
321
- let e = zt.value.map((e) => e.key), t = {};
322
- Ht().forEach((n, r) => {
323
- let i = e[r];
324
- i != null && (t[i] = `${n.getBoundingClientRect().width}px`);
325
- }), pt(t);
326
- }, Wt = () => {
315
+ return Wt.value && (e["--offset-start"] = Wt.value), Gt.value && (e["--offset-end"] = Gt.value), e;
316
+ }), en = p(() => ({
317
+ ...vt.value,
318
+ ...$t.value
319
+ })), tn = () => {
320
+ let e = I.value, t = Zt.value.length;
321
+ if (!e || !t) return [];
322
+ let n = e.querySelector(":scope > .bb-table__head > .bb-table-header-row"), r = [...n ? [n] : [], ...Array.from(e.querySelectorAll(":scope > .bb-table__head > [role=\"row\"], :scope > .bb-table__body > [role=\"row\"]"))].find((e) => e.children.length >= t);
323
+ return r ? Array.from(r.children) : [];
324
+ }, nn = "", rn = () => {
327
325
  let e = I.value;
328
326
  if (!e) return;
329
- let t = [
330
- "block",
331
- "flex",
332
- "grid",
333
- "flow-root",
334
- "list-item"
335
- ], n = [
336
- "BUTTON",
337
- "INPUT",
338
- "SELECT",
339
- "TEXTAREA",
340
- "IMG",
341
- "svg",
342
- "VIDEO",
343
- "CANVAS"
344
- ], r = (e) => {
345
- let i = getComputedStyle(e), a = i.display.includes("flex") || i.display.includes("grid"), o = 0, s = 0;
346
- if (e.querySelectorAll(":scope > *").forEach((e) => {
347
- let i = getComputedStyle(e);
348
- if (i.position === "absolute" || i.position === "fixed") return;
349
- let c = parseFloat(i.marginLeft) + parseFloat(i.marginRight), l = !a && !n.includes(e.tagName) && i.cssFloat === "none" && t.includes(i.display) ? r(e) + parseFloat(i.paddingLeft) + parseFloat(i.paddingRight) + parseFloat(i.borderLeftWidth) + parseFloat(i.borderRightWidth) : e.getBoundingClientRect().width;
350
- o += l + (c || 0), s += 1;
351
- }), s === 0) {
352
- let t = document.createRange();
353
- return t.selectNodeContents(e), t.getBoundingClientRect().width;
354
- }
355
- if (s > 1) {
356
- let e = parseFloat(i.columnGap);
357
- e && (o += e * (s - 1));
358
- }
359
- return o;
360
- }, i = (t) => {
361
- let n = 0;
362
- return e.querySelectorAll(t).forEach((e) => {
363
- let t = getComputedStyle(e), i = parseFloat(t.paddingLeft) + parseFloat(t.paddingRight);
364
- n = Math.max(n, r(e) + i);
365
- }), n > 0 ? `${Math.ceil(n)}px` : null;
366
- };
367
- U.select = N.selectable ? i(":scope > thead > tr > th.bb-table-header--select, :scope > tbody > tr > td.bb-table-data__cell--select") : null, U.actions = N.actions ? i(":scope > thead > tr > th.bb-table-header--actions, :scope > tbody > tr > td.bb-table__cell--actions") : null;
368
- }, Gt = () => {
369
- Wt(), Ut();
370
- }, Kt = C([]), qt = C([]), W = C(0), Jt = C(null), Yt = () => {
371
- let e = L.value;
372
- if (!e || !H.value || !N.columns.some((e) => e.width != null) && !Mt.value && Pt.value < 0) return;
373
- let t = e.offsetWidth, n = +!!N.selectable, r = U.select ? parseFloat(U.select) : 0, i = U.actions ? parseFloat(U.actions) : 0, a = Ht(), o = 0, s = 0;
374
- N.columns.forEach((e, t) => {
375
- let r = a[n + t]?.getBoundingClientRect().width ?? 0;
376
- e.width != null && (o += r), Nt(t) || (s += r);
377
- });
378
- let c = document.createElement("div");
379
- c.style.cssText = [
380
- "position:absolute",
381
- "top:-9999px",
382
- "left:-9999px",
383
- "visibility:hidden",
384
- "pointer-events:none",
385
- `width:${t}px`,
386
- `height:${e.offsetHeight}px`,
387
- "overflow:visible"
388
- ].join(";");
389
- let l = e.cloneNode(!0);
390
- l.classList.remove("bb-table--fixed"), l.querySelectorAll(".bb-table-expand__row").forEach((e) => e.remove());
391
- let u = Array.from(l.querySelectorAll("col"));
392
- N.columns.forEach((e, t) => {
393
- if (e.width == null) {
394
- let e = u[n + t];
395
- e && (e.style.width = "");
396
- }
397
- });
398
- let ee = l.querySelector("table");
399
- ee && (ee.style.width = "min-content", ee.style.minWidth = "0"), c.appendChild(l), document.body.appendChild(c);
400
- let te = c.querySelector("table thead tr.bb-table-header-row"), ne = te ? Array.from(te.querySelectorAll(":scope > th")) : [], d = N.columns.map((e, t) => {
401
- if (e.width != null) return 0;
402
- let r = ne[n + t];
403
- return r ? r.getBoundingClientRect().width : 0;
327
+ let t = he(e);
328
+ if (!t) return;
329
+ let n = Zt.value.map((e) => e.key);
330
+ if (t.length !== n.length) return;
331
+ let r = t.join(" ");
332
+ if (r === nn) return;
333
+ nn = r;
334
+ let i = {};
335
+ n.forEach((e, n) => {
336
+ i[e] = t[n];
404
337
  });
405
- document.body.removeChild(c);
406
- let f = N.columns.reduce((e, t, n) => e + (Nt(n) ? d[n] : 0), 0), re = t - s - r - i, ie = (e) => `${Number(e.toFixed(3))}px`;
407
- if (Kt.value = N.columns.map((e, t) => {
408
- if (!Nt(t)) return null;
409
- let n = d[t];
410
- if (f <= 0) return ie(n);
411
- let r = re > 0 ? n / f * re : 0;
412
- return ie(Math.max(n, r));
413
- }), qt.value = d.map((e) => e > 0 ? ie(e) : null), Pt.value >= 0) {
414
- let e = Object.values(ut.value?.tracks ?? {}).reduce((e, t) => e + (parseFloat(t) || 0), 0), t = a.reduce((e, t) => e + t.getBoundingClientRect().width, 0);
415
- W.value = Math.max(0, e - t + W.value);
416
- } else W.value = 0;
417
- let ae = d.reduce((e, t) => e + t, 0), p = o + ae + r + i;
418
- Jt.value = p > 0 ? `${Math.ceil(p)}px` : null;
419
- }, G = null, Xt, Zt = C(!1), Qt = !1, $t = () => {
420
- let e = L.value, t = I.value;
421
- Qt = !!e && !!t && t.getBoundingClientRect().width > e.clientWidth + 1;
422
- }, en = () => {
423
- G !== null && clearTimeout(G), G = setTimeout(() => {
424
- G = null, Yt(), be(() => {
425
- Zt.value = !1, $t();
426
- });
427
- }, 200);
428
- }, K, tn, nn = () => {
429
- K && (K.disconnect(), Ht().forEach((e) => K?.observe(e)), Gt());
338
+ let a = String(M.columns.length - 1), o = Wt.value, s = Gt.value;
339
+ o && i[0] && (i[0] = `calc(${i[0]} - (${o}))`, !M.selectable && W.value && (i.select = W.value)), s && i[a] && (i[a] = `calc(${i[a]} - (${s}))`, !M.actions && G.value && (i.actions = G.value)), bt(i), M.fixedColumns?.length && ue(e, M.fixedColumns);
340
+ }, K, an = () => {
341
+ if (!K) return;
342
+ K.disconnect();
343
+ let e = tn();
344
+ e.forEach((e) => K?.observe(e)), e.length && rn();
430
345
  };
431
346
  Se(() => {
432
- K = new ResizeObserver(() => Gt()), nn(), be(Yt), I.value && (Xt = new MutationObserver(en), Xt.observe(I.value, {
433
- childList: !0,
434
- subtree: !0,
435
- characterData: !0
436
- })), L.value && (tn = new ResizeObserver(() => {
437
- Qt || (Zt.value = !0), en();
438
- }), tn.observe(L.value));
347
+ K = new ResizeObserver(rn), an();
439
348
  }), xe(() => {
440
- K?.disconnect(), tn?.disconnect(), Xt?.disconnect(), G !== null && clearTimeout(G);
441
- }), O(zt, () => be(nn), { flush: "post" });
442
- let rn = (e, t) => N.accessibleLabel ? N.accessibleLabel(e, t) : [F("table.select").value, ...e.map((e) => e.content)].join(" "), an = h(() => N.selectable ? "fieldset" : "div"), on = h(() => N.legend || N.caption || F("table.selectableLegend").value), q = h(() => N.loading || pn.value), sn = h(() => q.value && !N.interactiveWhileLoading), J = h(() => vt.value && !o(B.page) && !o(B.perPage) && !o(B.totalItems) && B.page >= 1 && B.perPage > 0 && B.totalItems >= 0), cn = h(() => ({
349
+ K?.disconnect();
350
+ }), D(Zt, () => be(an), { flush: "post" });
351
+ let on = (e, t) => M.accessibleLabel ? M.accessibleLabel(e, t) : [F("table.select").value, ...e.map((e) => e.content)].join(" "), sn = p(() => M.selectable ? "fieldset" : "div"), cn = p(() => M.legend || M.caption || F("table.selectableLegend").value), q = p(() => M.loading || hn.value), ln = p(() => q.value && !M.interactiveWhileLoading), J = p(() => Et.value && !a(B.page) && !a(B.perPage) && !a(B.totalItems) && B.page >= 1 && B.perPage > 0 && B.totalItems >= 0), un = p(() => ({
443
352
  "bb-table": !0,
444
- [`bb-table--align-${N.align}`]: !0,
445
- "bb-table--compact": N.compact,
446
- "bb-table--fixed": H.value,
447
- "bb-table--inherit-widths": xt.value,
448
- "bb-table--fixed-header": N.fixedHeaders,
353
+ [`bb-table--align-${M.align}`]: !0,
354
+ "bb-table--compact": M.compact,
355
+ "bb-table--fixed": Ot.value,
356
+ "bb-table--inherit-widths": kt.value,
357
+ "bb-table--fixed-header": M.fixedHeaders,
449
358
  "bb-table--loading": q.value,
450
359
  "bb-table--empty": !Y.value.length,
451
- "bb-table--selectable": !!N.selectable,
452
- "bb-table--measuring": Zt.value,
360
+ "bb-table--selectable": !!M.selectable,
453
361
  "scrollbar-border": !0
454
- })), ln = h(() => N.columns.length + Number(!!N.selectable) + Number(!!N.actions)), un = h(() => Object.fromEntries(N.columns.map((e) => [e.key, de(e.key)]))), { getter: dn, items: fn, loading: pn } = c({ items: Te(N, "items") }), { hasPrefilled: mn } = ie({
362
+ })), dn = p(() => M.columns.length + Number(!!M.selectable) + Number(!!M.actions)), fn = p(() => Object.fromEntries(M.columns.map((e) => [e.key, de(e.key)]))), { getter: pn, items: mn, loading: hn } = s({ items: Ee(M, "items") }), { hasPrefilled: gn } = ie({
455
363
  trigger: !0,
456
364
  fn: async (e) => {
457
- await dn(e, B.selected), yn();
365
+ await pn(e, B.selected), xn();
458
366
  }
459
- }), { data: hn } = f({ items: h(() => B.selected) }), { options: Y, baseOptions: gn } = re({
460
- disabled: Te(N, "disabled"),
461
- items: fn,
367
+ }), { data: _n } = ne({ items: p(() => B.selected) }), { options: Y, baseOptions: vn } = re({
368
+ disabled: Ee(M, "disabled"),
369
+ items: mn,
462
370
  itemText: void 0,
463
- itemValue: N.itemValue,
464
- max: N.max,
371
+ itemValue: M.itemValue,
372
+ max: M.max,
465
373
  selectable: !0,
466
- selectedIndexedByHash: hn
467
- }), _n = async (e) => {
468
- N.multiple ? B.selected = (B.selected ?? []).concat(e.value) : B.selected = e.value;
469
- }, vn = async (e) => {
470
- if (N.multiple) {
471
- let t = { ...hn.value };
374
+ selectedIndexedByHash: _n
375
+ }), yn = async (e) => {
376
+ M.multiple ? B.selected = (B.selected ?? []).concat(e.value) : B.selected = e.value;
377
+ }, bn = async (e) => {
378
+ if (M.multiple) {
379
+ let t = { ..._n.value };
472
380
  delete t[e.valueHash], B.selected = Object.values(t);
473
381
  } else B.selected = null;
474
382
  };
475
- ee(() => [
476
- N.dependencies,
477
- N.items,
478
- typeof N.items == "function" ? [B.page, B.perPage] : void 0
383
+ u(() => [
384
+ M.dependencies,
385
+ M.items,
386
+ typeof M.items == "function" ? [B.page, B.perPage] : void 0
479
387
  ], async () => {
480
- mn.value && (await dn(!0, B.selected), yn());
481
- }, { debounce: N.depsDebounceTime });
482
- let yn = () => {
483
- if (!N.enforceCoherence) return;
484
- let e = new Set(Y.value.map((e) => e.valueHash)), t = (t) => e.has(u(t));
485
- if (N.multiple) {
388
+ gn.value && (await pn(!0, B.selected), xn());
389
+ }, { debounce: M.depsDebounceTime });
390
+ let xn = () => {
391
+ if (!M.enforceCoherence) return;
392
+ let e = new Set(Y.value.map((e) => e.valueHash)), t = (t) => e.has(l(t));
393
+ if (M.multiple) {
486
394
  let e = B.selected ?? [];
487
395
  e.every(t) || (B.selected = e.filter(t));
488
- } else !o(B.selected) && !t(B.selected) && (B.selected = null);
396
+ } else !a(B.selected) && !t(B.selected) && (B.selected = null);
489
397
  let n = B.unselected ?? [];
490
- n.every(t) || (B.unselected = n.filter(t)), !o(j.value) && !t(j.value) && (j.value = null), M.value.every(t) || (M.value = M.value.filter(t));
491
- }, bn = (e, t) => {
492
- let n = un.value[e.key], r = e.align ?? "left", i = ot(t.item, e.key);
493
- return e.formatter && (!o(i) || e.formatOnNull !== !1) && (i = e.formatter(i, e.key, t.item)), e.placeholder && o(i) && (i = e.placeholder), {
398
+ n.every(t) || (B.unselected = n.filter(t)), !a(A.value) && !t(A.value) && (A.value = null), j.value.every(t) || (j.value = j.value.filter(t));
399
+ }, Sn = (e, t) => {
400
+ let n = fn.value[e.key], r = e.align ?? "left", i = ut(t.item, e.key);
401
+ return e.formatter && (!a(i) || e.formatOnNull !== !1) && (i = e.formatter(i, e.key, t.item)), e.placeholder && a(i) && (i = e.placeholder), {
494
402
  align: r,
495
- classes: fe([`bb-table-data__cell--${r}`], N.tdClass, e.tdClass, i, e.key, t.item),
403
+ classes: fe([`bb-table-data__cell--${r}`], M.tdClass, e.tdClass, i, e.key, t.item),
496
404
  content: i,
497
405
  key: e.key,
498
406
  label: e.label,
499
407
  slotName: n
500
408
  };
501
- }, xn = h(() => N.columns.map((e) => {
502
- let t = e.align ?? "left", n = `header:${un.value[e.key]}`, r = gt(e.key), i = r ?? e.sorted, a = i ? i === "asc" ? "ascending" : "descending" : void 0;
409
+ }, Cn = p(() => M.columns.map((e) => {
410
+ let t = e.align ?? "left", n = fn.value[e.key], r = mt(n) ? `header:${n} (shadowed)` : `header:${n}`, i = wt(e.key), a = i ?? e.sorted, o = a ? a === "asc" ? "ascending" : "descending" : void 0;
503
411
  return {
504
412
  align: t,
505
413
  key: e.key,
506
414
  label: e.label,
507
- slotName: n,
508
- classes: pe([`bb-table-header--${t}`], N.thClass, e.thClass),
415
+ slotName: r,
416
+ classes: pe([`bb-table-header--${t}`], M.thClass, e.thClass),
509
417
  sortable: !!e.sortable,
510
- sortDirection: a,
511
- sortOrder: r
418
+ sortDirection: o,
419
+ sortOrder: i
512
420
  };
513
- })), Sn = (e, t) => {
421
+ })), wn = (e, t) => {
422
+ let n = fn.value[e];
423
+ return (mt(n) ? void 0 : P[`header:${n}:${t}`]) ?? P[`header:${t}`];
424
+ }, Tn = (e) => ({
425
+ classes: e.classes,
426
+ columnKey: e.key,
427
+ items: mn.value,
428
+ label: e.label,
429
+ sortable: e.sortable,
430
+ sortOrder: e.sortOrder,
431
+ toggleSort: () => Tt(e.key)
432
+ }), En = (e, t) => {
514
433
  let n = Y.value[e];
515
434
  return n && n.valueHash === t ? n : Y.value.find((e) => e.valueHash === t);
516
- }, Cn = h(() => gn.value.map((e, t) => {
517
- let n = N.columns.map((t) => bn(t, e));
435
+ }, Dn = p(() => vn.value.map((e, t) => {
436
+ let n = M.columns.map((t) => Sn(t, e));
518
437
  return {
519
- accessibleLabel: rn(n, e.item),
438
+ accessibleLabel: on(n, e.item),
520
439
  cols: n,
521
- rowClasses: me(N.rowClass, N.columns, n, e.item),
440
+ rowClasses: me(M.rowClass, M.columns, n, e.item),
522
441
  onRowClick: (n) => {
523
- let r = Sn(t, e.valueHash);
524
- r && (ht(n, r), P("click:row", n, r, !!r.selected));
442
+ let r = En(t, e.valueHash);
443
+ r && (Ct(n, r), N("click:row", n, r.item));
525
444
  },
526
445
  onRowContextMenu: (n) => {
527
- let r = Sn(t, e.valueHash);
528
- r && P("contextmenu:row", n, r, !!r.selected);
446
+ let r = En(t, e.valueHash);
447
+ r && N("contextmenu:row", n, r.item);
529
448
  },
530
449
  onRowDblClick: (n) => {
531
- let r = Sn(t, e.valueHash);
532
- r && P("dblclick:row", n, r, !!r.selected);
450
+ let r = En(t, e.valueHash);
451
+ r && N("dblclick:row", n, r.item);
533
452
  },
534
453
  item: e.item,
535
454
  text: e.text,
536
455
  valueHash: e.valueHash,
537
456
  value: e.value
538
457
  };
539
- })), wn = h(() => {
458
+ })), On = p(() => {
540
459
  let e = 0, t = ((B.page ?? 0) - 1) * (B.perPage ?? 0);
541
- return Cn.value.map((n, r) => {
542
- let i = Y.value[r], a = !N.selectable || typeof N.selectable == "function" && !N.selectable(n.item) || !!i.disabled, o = r + 1, s = t + 1 + o + e, c = kn.value[n.valueHash] ?? !1;
460
+ return Dn.value.map((n, r) => {
461
+ let i = Y.value[r], a = !M.selectable || typeof M.selectable == "function" && !M.selectable(n.item) || !!i.disabled, o = r + 1, s = t + 1 + o + e, c = Nn.value[n.valueHash] ?? !1;
543
462
  return c && e++, {
544
463
  ...n,
545
464
  expanded: c,
546
- highlighted: n.valueHash in mt.value,
465
+ highlighted: n.valueHash in St.value,
547
466
  rowIndex: s,
548
467
  selected: i.selected,
549
468
  disabled: a
550
469
  };
551
470
  });
552
- }), X = C(0);
553
- O(() => wn.value.length, (e) => {
554
- X.value = ne(X.value, 0, Math.max(0, e - 1));
471
+ }), X = we(0);
472
+ D(() => On.value.length, (e) => {
473
+ X.value = d(X.value, 0, Math.max(0, e - 1));
555
474
  });
556
- let Tn = () => I.value?.querySelectorAll(":scope > tbody > tr.bb-table-data__row"), En = (e) => {
475
+ let kn = () => I.value?.querySelectorAll(":scope > .bb-table__body > .bb-table-data__row"), An = (e) => {
557
476
  X.value = e;
558
- let t = Tn()?.[e];
477
+ let t = kn()?.[e];
559
478
  t?.focus(), t?.scrollIntoView({ block: "nearest" });
560
- }, Dn = (e) => {
561
- N.keyboardNavigation && (X.value = e);
562
- }, On = (e, t) => {
563
- if (!N.keyboardNavigation || e.target !== e.currentTarget) return;
564
- let n = wn.value.length - 1;
479
+ }, jn = (e) => {
480
+ M.keyboardNavigation && (X.value = e);
481
+ }, Mn = (e, t) => {
482
+ if (!M.keyboardNavigation || e.target !== e.currentTarget) return;
483
+ let n = On.value.length - 1;
565
484
  if (n < 0) return;
566
485
  let r = (t) => {
567
- e.preventDefault(), En(ne(t, 0, n));
486
+ e.preventDefault(), An(d(t, 0, n));
568
487
  };
569
488
  switch (e.key) {
570
489
  case "ArrowDown":
@@ -574,10 +493,10 @@ var Oe = {
574
493
  r(t - 1);
575
494
  break;
576
495
  case "PageDown":
577
- r(t + at);
496
+ r(t + lt);
578
497
  break;
579
498
  case "PageUp":
580
- r(t - at);
499
+ r(t - lt);
581
500
  break;
582
501
  case "Home":
583
502
  r(0);
@@ -590,105 +509,111 @@ var Oe = {
590
509
  e.preventDefault(), e.currentTarget.click();
591
510
  break;
592
511
  }
593
- }, { data: kn } = f({ items: M }), An = (e, t) => {
512
+ }, { data: Nn } = ne({ items: j }), Pn = (e, t) => {
594
513
  e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), Z(t)));
595
- }, jn = (e) => ({
596
- "aria-controls": o(kn.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
514
+ }, Fn = (e) => ({
515
+ "aria-controls": a(Nn.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
597
516
  "aria-expanded": e.expanded ? "true" : "false",
598
517
  onClick: (t) => {
599
518
  t.stopPropagation(), Z(e.valueHash);
600
519
  },
601
- onKeydown: (t) => An(t, e.valueHash)
520
+ onKeydown: (t) => Pn(t, e.valueHash)
602
521
  }), Z = (e) => {
603
522
  let t = Y.value.find((t) => t.valueHash === e);
604
- t && (e in kn.value ? M.value = M.value.filter((t) => u(t) !== e) : M.value = [...M.value, t.value]);
523
+ t && (e in Nn.value ? j.value = j.value.filter((t) => l(t) !== e) : j.value = [...j.value, t.value]);
605
524
  };
606
- O(k, () => {
525
+ D(O, () => {
607
526
  Q.clear(), B.unselected = [], B.selected = [];
608
527
  });
609
- let Mn = h(() => {
528
+ let In = p(() => {
610
529
  let e = Array.isArray(B.selected) ? B.selected.length : 0;
611
- return !!(N.multiple && e > 0 && !k.value || k.value && Q.size > 0);
530
+ return !!(M.multiple && e > 0 && !O.value || O.value && Q.size > 0);
612
531
  }), Q = Ce(/* @__PURE__ */ new Set());
613
- O(() => B.unselected, (e) => {
532
+ D(() => B.unselected, (e) => {
614
533
  Q.clear(), (e ?? []).forEach((e) => {
615
- Q.add(u(e));
534
+ Q.add(l(e));
616
535
  });
617
536
  }, { immediate: !0 });
618
- let Nn = (e) => {
537
+ let Ln = (e) => {
619
538
  let t = B.unselected ?? [];
620
539
  if ($(e)) {
621
- vn(e), P("item:unselected", e.value), Q.add(e.valueHash), B.unselected = [...t, e.value];
540
+ bn(e), N("item:unselected", e.value), Q.add(e.valueHash), B.unselected = [...t, e.value];
622
541
  return;
623
542
  }
624
- k.value || _n(e), P("item:selected", e.value), Q.delete(e.valueHash), B.unselected = t.filter((t) => u(t) !== u(e.value));
625
- }, $ = (e) => Q.has(e.valueHash) ? !1 : e.selected || k.value, Pn = (e) => {
626
- if (N.disabled || N.readonly || typeof N.selectable == "function" && !N.selectable(e.item)) return !0;
543
+ O.value || yn(e), N("item:selected", e.value), Q.delete(e.valueHash), B.unselected = t.filter((t) => l(t) !== l(e.value));
544
+ }, $ = (e) => Q.has(e.valueHash) ? !1 : e.selected || O.value, Rn = (e) => {
545
+ if (M.disabled || M.readonly || typeof M.selectable == "function" && !M.selectable(e.item)) return !0;
627
546
  let t = Y.value.find((t) => t.valueHash === e.valueHash);
628
547
  return !t || !!t.disabled;
629
- }, Fn = (e) => {
630
- Pn(e) || Nn(e);
631
- }, In = se((e) => typeof e != "string", JSON.stringify), Ln = h(() => [].concat(B.selected ?? []).map((e) => ({
632
- disabled: N.disabled,
633
- name: N.name,
548
+ }, zn = (e) => {
549
+ Rn(e) || Ln(e);
550
+ }, Bn = ce((e) => typeof e != "string", JSON.stringify), Vn = p(() => [].concat(B.selected ?? []).map((e) => ({
551
+ disabled: M.disabled,
552
+ name: M.name,
634
553
  type: "hidden",
635
- value: In(e)
636
- }))), Rn = [
554
+ value: Bn(e)
555
+ }))), Hn = [
637
556
  70,
638
557
  45,
639
558
  85,
640
559
  55
641
- ], zn = h(() => ne(Y.value.length || N.columns.length || 1, 4, 10));
642
- return O(() => [wn.value, N.fixedColumns], () => {
643
- I.value && N.fixedColumns?.length && ue(I.value, N.fixedColumns);
644
- }, { flush: "post" }), (e, t) => (S(), he(we(an.value), {
560
+ ], Un = p(() => d(Y.value.length || M.columns.length || 1, 4, 10));
561
+ return D(() => [On.value, M.fixedColumns], () => {
562
+ I.value && M.fixedColumns?.length && ue(I.value, M.fixedColumns), P.thead && be(an);
563
+ }, { flush: "post" }), (e, t) => (x(), m(Te(sn.value), {
645
564
  id: e.id,
646
565
  ref_key: "containerRef",
647
- ref: L,
566
+ ref: ht,
648
567
  "aria-busy": q.value,
649
- class: b(cn.value),
650
- "data-bb-table-id": D(lt),
568
+ class: y(un.value),
569
+ "data-bb-table-id": T(gt),
651
570
  inert: e.disabled,
652
- style: x(Vt.value)
571
+ style: b(en.value)
653
572
  }, {
654
- default: De(() => [
655
- e.selectable ? (S(), _("legend", Oe, E(on.value), 1)) : g("", !0),
656
- v("table", {
573
+ default: Oe(() => [
574
+ e.selectable ? (x(), g("legend", ke, w(cn.value), 1)) : h("", !0),
575
+ e.caption ? (x(), g("div", {
576
+ key: 1,
577
+ id: xt.value,
578
+ class: y(["bb-table-caption", { "sr-only": !e.displayCaption }])
579
+ }, w(e.caption), 11, Ae)) : h("", !0),
580
+ _("div", {
657
581
  ref_key: "tableRef",
658
582
  ref: I,
659
- "aria-rowcount": J.value ? D(B).totalItems : void 0
583
+ "aria-labelledby": e.caption ? xt.value : void 0,
584
+ "aria-rowcount": J.value && T(B).totalItems != null ? T(B).totalItems + 1 : void 0,
585
+ class: "bb-table__table",
586
+ role: "table",
587
+ style: b({ gridTemplateColumns: Qt.value })
660
588
  }, [
661
- e.caption ? (S(), _("caption", {
662
- key: 0,
663
- class: b(["bb-table-caption", { "sr-only": !e.displayCaption }])
664
- }, E(e.caption), 3)) : g("", !0),
665
- v("colgroup", null, [(S(!0), _(m, null, w(zt.value, (e) => (S(), _("col", {
666
- key: e.key,
667
- style: x({ width: e.width })
668
- }, null, 4))), 128))]),
669
- v("thead", { inert: sn.value }, [T(e.$slots, "thead", {}, () => [v("tr", {
589
+ _("div", {
590
+ class: "bb-table__head",
591
+ inert: ln.value,
592
+ role: "rowgroup"
593
+ }, [C(e.$slots, "thead", {}, () => [_("div", {
670
594
  "aria-rowindex": J.value ? 1 : void 0,
671
- class: b(["bb-table-header-row", e.headerRowClass])
595
+ class: y(["bb-table-header-row", e.headerRowClass]),
596
+ role: "row"
672
597
  }, [
673
- e.selectable ? (S(), _("th", {
598
+ e.selectable ? (x(), g("div", {
674
599
  key: 0,
675
- class: b(["bb-table-header bb-table-header--select", e.thClass]),
676
- scope: "col"
677
- }, [T(e.$slots, "header:select", {
600
+ class: y(["bb-table-header bb-table-header--select", e.thClass]),
601
+ role: "columnheader"
602
+ }, [C(e.$slots, "header:select", {
678
603
  multiple: e.multiple,
679
- selectAll: !!k.value,
680
- text: e.selectText || D(F)("table.selectText").value
681
- }, () => [v("span", Me, [!e.disableSelectAll && e.multiple ? (S(), _("label", {
604
+ selectAll: !!O.value,
605
+ text: e.selectText || T(F)("table.selectText").value
606
+ }, () => [_("span", Pe, [!e.disableSelectAll && e.multiple ? (x(), g("label", {
682
607
  key: 0,
683
- class: b(["bb-table-check__label", { "bb-table-check__label--disabled": e.disabled }])
684
- }, [(S(), he(d, {
685
- key: Mn.value.toString(),
686
- modelValue: k.value,
687
- "onUpdate:modelValue": t[0] ||= (e) => k.value = e,
688
- checked: !!k.value,
608
+ class: y(["bb-table-check__label", { "bb-table-check__label--disabled": e.disabled }])
609
+ }, [(x(), m(te, {
610
+ key: In.value.toString(),
611
+ modelValue: O.value,
612
+ "onUpdate:modelValue": t[0] ||= (e) => O.value = e,
613
+ checked: !!O.value,
689
614
  class: "bb-table-check",
690
615
  disabled: e.disabled,
691
- indeterminate: Mn.value,
616
+ indeterminate: In.value,
692
617
  name: `select_all_${e.name || ""}`,
693
618
  readonly: e.readonly
694
619
  }, null, 8, [
@@ -698,118 +623,139 @@ var Oe = {
698
623
  "indeterminate",
699
624
  "name",
700
625
  "readonly"
701
- ])), v("span", Ne, E(e.selectAllLabel || D(F)("table.selectAllLabel").value), 1)], 2)) : e.multiple ? g("", !0) : (S(), _("span", Pe, E(e.selectText || D(F)("table.selectText").value), 1))])])], 2)) : g("", !0),
702
- (S(!0), _(m, null, w(xn.value, (t, n) => (S(), _("th", {
703
- key: t.key,
704
- "aria-sort": t.sortDirection ?? (t.sortable ? "none" : void 0),
705
- class: b(["bb-table-header", [t.classes, {
706
- "bb-table-header--edge-start": n === 0,
707
- "bb-table-header--edge-end": n === xn.value.length - 1
626
+ ])), _("span", Fe, w(e.selectAllLabel || T(F)("table.selectAllLabel").value), 1)], 2)) : e.multiple ? h("", !0) : (x(), g("span", Ie, w(e.selectText || T(F)("table.selectText").value), 1))])])], 2)) : h("", !0),
627
+ (x(!0), g(f, null, S(Cn.value, (n, r) => (x(), g("div", {
628
+ key: n.key,
629
+ "aria-sort": n.sortDirection ?? (n.sortable ? "none" : void 0),
630
+ class: y(["bb-table-header", [n.classes, {
631
+ "bb-table-header--edge-start": r === 0,
632
+ "bb-table-header--edge-end": r === Cn.value.length - 1
708
633
  }]]),
709
- scope: "col"
710
- }, [T(e.$slots, t.slotName, {
711
- classes: t.classes,
712
- items: D(fn),
713
- label: t.label,
714
- sortOrder: t.sortOrder,
715
- sortable: t.sortable,
716
- toggleSort: () => _t(t.key)
717
- }, () => [t.sortable ? (S(), he(i, {
718
- key: 0,
719
- class: b(["bb-table-sort", {
720
- "bb-table-sort--asc": t.sortOrder === "asc",
721
- "bb-table-sort--desc": t.sortOrder === "desc"
722
- }]),
723
- type: "button",
724
- onClick: () => _t(t.key)
725
- }, {
726
- default: De(() => [v("span", Ie, E(t.label), 1), _e(a, {
727
- class: "bb-table-sort__icon",
728
- icon: D(le),
729
- size: "sm"
730
- }, null, 8, ["icon"])]),
731
- _: 2
732
- }, 1032, ["class", "onClick"])) : (S(), _("span", Le, E(t.label), 1))])], 10, Fe))), 128)),
733
- e.actions ? (S(), _("th", {
634
+ role: "columnheader"
635
+ }, [
636
+ wn(n.key, "prepend") ? (x(), m(Te(wn(n.key, "prepend")), ye({
637
+ key: 0,
638
+ ref_for: !0
639
+ }, Tn(n)), null, 16)) : h("", !0),
640
+ C(e.$slots, n.slotName, {
641
+ classes: n.classes,
642
+ items: T(mn),
643
+ label: n.label,
644
+ sortOrder: n.sortOrder,
645
+ sortable: n.sortable,
646
+ toggleSort: () => Tt(n.key)
647
+ }, () => [n.sortable ? (x(), m(i, {
648
+ key: 0,
649
+ class: y(["bb-table-sort", {
650
+ "bb-table-sort--asc": n.sortOrder === "asc",
651
+ "bb-table-sort--desc": n.sortOrder === "desc"
652
+ }]),
653
+ type: "button",
654
+ onClick: () => Tt(n.key)
655
+ }, {
656
+ default: Oe(() => [_("span", Re, w(n.label), 1), t[1] ||= _("svg", {
657
+ "aria-hidden": "true",
658
+ class: "bb-table-sort__icon",
659
+ fill: "none",
660
+ height: "1em",
661
+ stroke: "currentColor",
662
+ "stroke-linecap": "round",
663
+ "stroke-linejoin": "round",
664
+ "stroke-width": "2",
665
+ viewBox: "0 0 24 24",
666
+ width: "1em"
667
+ }, [_("path", { d: "M12 20V4m-7 7l7-7l7 7" })], -1)]),
668
+ _: 2
669
+ }, 1032, ["class", "onClick"])) : (x(), g("span", ze, w(n.label), 1))]),
670
+ wn(n.key, "append") ? (x(), m(Te(wn(n.key, "append")), ye({
671
+ key: 1,
672
+ ref_for: !0
673
+ }, Tn(n)), null, 16)) : h("", !0)
674
+ ], 10, Le))), 128)),
675
+ e.actions ? (x(), g("div", {
734
676
  key: 1,
735
- class: b(["bb-table-header bb-table-header--actions", e.thClass]),
736
- scope: "col"
737
- }, [T(e.$slots, "header:actions", { text: e.actionsText || D(F)("table.actionsText").value }, () => [v("span", Re, E(e.actionsText || D(F)("table.actionsText").value), 1)])], 2)) : g("", !0)
738
- ], 10, je)])], 8, Ae),
739
- v("tbody", null, [q.value && !D(Y).length ? T(e.$slots, "loading", {
677
+ class: y(["bb-table-header bb-table-header--actions", e.thClass]),
678
+ role: "columnheader"
679
+ }, [C(e.$slots, "header:actions", { text: e.actionsText || T(F)("table.actionsText").value }, () => [_("span", Be, w(e.actionsText || T(F)("table.actionsText").value), 1)])], 2)) : h("", !0)
680
+ ], 10, Ne)])], 8, Me),
681
+ _("div", Ve, [q.value && !T(Y).length ? C(e.$slots, "loading", {
740
682
  key: 0,
741
- items: D(fn)
742
- }, () => [(S(!0), _(m, null, w(zn.value, (n, r) => (S(), _("tr", {
683
+ items: T(mn)
684
+ }, () => [(x(!0), g(f, null, S(Un.value, (n, r) => (x(), g("div", {
743
685
  key: r,
744
686
  "aria-rowindex": J.value ? r + 2 : void 0,
745
- class: "bb-table-skeleton__row"
687
+ class: "bb-table-skeleton__row",
688
+ role: "row"
746
689
  }, [
747
- e.selectable ? (S(), _("td", Be, t[1] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : g("", !0),
748
- (S(!0), _(m, null, w(N.columns, (e, n) => (S(), _("td", {
690
+ e.selectable ? (x(), g("div", Ue, t[2] ||= [_("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : h("", !0),
691
+ (x(!0), g(f, null, S(M.columns, (e, n) => (x(), g("div", {
749
692
  key: e.key,
750
- class: b(["bb-table-skeleton__cell", [`bb-table-skeleton__cell--${e.skeleton ?? "text"}`]])
751
- }, [!e.skeleton || e.skeleton === "text" ? (S(), _("div", Ve, [v("div", {
693
+ class: y(["bb-table-skeleton__cell", [`bb-table-skeleton__cell--${e.skeleton ?? "text"}`]]),
694
+ role: "cell"
695
+ }, [!e.skeleton || e.skeleton === "text" ? (x(), g("div", We, [_("div", {
752
696
  class: "bb-table-skeleton__line",
753
- style: x({ width: `${Rn[(r + n) % 4]}%` })
754
- }, null, 4), v("div", {
697
+ style: b({ width: `${Hn[(r + n) % 4]}%` })
698
+ }, null, 4), _("div", {
755
699
  class: "bb-table-skeleton__line",
756
- style: x({ width: `${Rn[(r + n + 2) % 4]}%` })
757
- }, null, 4)])) : e.skeleton === "avatar" ? (S(), _("div", He)) : e.skeleton === "avatar-text" ? (S(), _("div", Ue, [t[2] ||= v("div", { class: "bb-table-skeleton__avatar" }, null, -1), v("div", We, [v("div", {
700
+ style: b({ width: `${Hn[(r + n + 2) % 4]}%` })
701
+ }, null, 4)])) : e.skeleton === "avatar" ? (x(), g("div", Ge)) : e.skeleton === "avatar-text" ? (x(), g("div", Ke, [t[3] ||= _("div", { class: "bb-table-skeleton__avatar" }, null, -1), _("div", qe, [_("div", {
758
702
  class: "bb-table-skeleton__line",
759
- style: x({ width: `${Rn[(r + n) % 4]}%` })
760
- }, null, 4), v("div", {
703
+ style: b({ width: `${Hn[(r + n) % 4]}%` })
704
+ }, null, 4), _("div", {
761
705
  class: "bb-table-skeleton__line",
762
- style: x({ width: `${Rn[(r + n + 2) % 4]}%` })
763
- }, null, 4)])])) : e.skeleton === "image" ? (S(), _("div", Ge)) : e.skeleton === "badge" ? (S(), _("div", Ke)) : g("", !0)], 2))), 128)),
764
- e.actions ? (S(), _("td", qe, t[3] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : g("", !0)
765
- ], 8, ze))), 128))]) : D(Y).length ? T(e.$slots, "tbody", { key: 2 }, () => [(S(!0), _(m, null, w(wn.value, (t, n) => (S(), _(m, { key: t.valueHash }, [v("tr", {
706
+ style: b({ width: `${Hn[(r + n + 2) % 4]}%` })
707
+ }, null, 4)])])) : e.skeleton === "image" ? (x(), g("div", Je)) : e.skeleton === "badge" ? (x(), g("div", Ye)) : h("", !0)], 2))), 128)),
708
+ e.actions ? (x(), g("div", Xe, t[4] ||= [_("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : h("", !0)
709
+ ], 8, He))), 128))]) : T(Y).length ? C(e.$slots, "tbody", { key: 2 }, () => [(x(!0), g(f, null, S(On.value, (t, n) => (x(), g(f, { key: t.valueHash }, [_("div", {
766
710
  "aria-current": t.highlighted ? "true" : void 0,
767
711
  "aria-rowindex": J.value && t.rowIndex ? t.rowIndex : void 0,
768
- class: b(["bb-table-data__row", [t.rowClasses, { "bb-table-data__row--highlighted": t.highlighted }]]),
769
- inert: sn.value,
712
+ class: y(["bb-table-data__row", [t.rowClasses, { "bb-table-data__row--highlighted": t.highlighted }]]),
713
+ inert: ln.value,
714
+ role: "row",
770
715
  tabindex: e.keyboardNavigation ? n === X.value ? 0 : -1 : void 0,
771
716
  onClick: t.onRowClick,
772
717
  onContextmenu: t.onRowContextMenu,
773
718
  onDblclick: t.onRowDblClick,
774
- onFocus: () => Dn(n),
775
- onKeydown: (e) => On(e, n)
719
+ onFocus: () => jn(n),
720
+ onKeydown: (e) => Mn(e, n)
776
721
  }, [
777
- e.selectable ? (S(), _("td", {
722
+ e.selectable ? (x(), g("div", {
778
723
  key: 0,
779
- class: b(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
780
- }, [T(e.$slots, "select", {
724
+ class: y(["bb-table-data__cell bb-table-data__cell--select", e.tdClass]),
725
+ role: "cell"
726
+ }, [C(e.$slots, "select", {
781
727
  checked: $(t),
782
- disabled: Pn(t),
783
- inputName: D(st),
728
+ disabled: Rn(t),
729
+ inputName: T(dt),
784
730
  item: t.item,
785
731
  readonly: !!e.readonly,
786
- toggleSelected: () => Fn(t),
732
+ toggleSelected: () => zn(t),
787
733
  value: t.value
788
- }, () => [e.multiple ? (S(), _("label", {
734
+ }, () => [e.multiple ? (x(), g("label", {
789
735
  key: 0,
790
- class: b(["bb-table-check__label", { "bb-table-check__label--disabled": t.disabled }])
791
- }, [_e(d, {
736
+ class: y(["bb-table-check__label", { "bb-table-check__label--disabled": t.disabled }])
737
+ }, [_e(te, {
792
738
  checked: $(t),
793
739
  class: "bb-table-check",
794
740
  disabled: t.disabled,
795
741
  readonly: e.readonly,
796
- onChange: () => Nn(t)
742
+ onChange: () => Ln(t)
797
743
  }, null, 8, [
798
744
  "checked",
799
745
  "disabled",
800
746
  "readonly",
801
747
  "onChange"
802
- ]), v("span", Qe, E(t.accessibleLabel), 1)], 2)) : (S(), _("label", {
748
+ ]), _("span", tt, w(t.accessibleLabel), 1)], 2)) : (x(), g("label", {
803
749
  key: 1,
804
- class: b(["bb-table-radio__label", { "bb-table-radio__label--disabled": t.disabled }])
805
- }, [_e(oe, {
750
+ class: y(["bb-table-radio__label", { "bb-table-radio__label--disabled": t.disabled }])
751
+ }, [_e(se, {
806
752
  checked: t.selected,
807
753
  class: "bb-table-radio",
808
754
  disabled: t.disabled,
809
- name: D(st),
755
+ name: T(dt),
810
756
  readonly: e.readonly,
811
757
  value: t.value,
812
- onChange: () => Nn(t)
758
+ onChange: () => Ln(t)
813
759
  }, null, 8, [
814
760
  "checked",
815
761
  "disabled",
@@ -817,79 +763,88 @@ var Oe = {
817
763
  "readonly",
818
764
  "value",
819
765
  "onChange"
820
- ]), v("span", $e, E(t.accessibleLabel), 1)], 2))])], 2)) : g("", !0),
821
- (S(!0), _(m, null, w(t.cols, (n, r) => (S(), _("td", {
766
+ ]), _("span", nt, w(t.accessibleLabel), 1)], 2))])], 2)) : h("", !0),
767
+ (x(!0), g(f, null, S(t.cols, (n, r) => (x(), g("div", {
822
768
  key: n.key,
823
- class: b(["bb-table-data__cell", [n.classes, {
769
+ class: y(["bb-table-data__cell", [n.classes, {
824
770
  "bb-table-data__cell--edge-start": r === 0,
825
771
  "bb-table-data__cell--edge-end": r === t.cols.length - 1
826
- }]])
827
- }, [T(e.$slots, n.slotName, {
772
+ }]]),
773
+ role: "cell"
774
+ }, [C(e.$slots, n.slotName, {
828
775
  classes: n.classes,
829
776
  content: n.content,
830
- expandProps: jn(t),
777
+ expandProps: Fn(t),
831
778
  expanded: t.expanded,
832
779
  highlighted: t.highlighted,
833
780
  item: t.item,
834
781
  selected: $(t),
835
- sortOrder: gt(n.key),
782
+ sortOrder: wt(n.key),
836
783
  toggleExpanded: () => Z(t.valueHash),
837
784
  toggleHighlighted: () => z(t),
838
- toggleSelected: () => Fn(t),
785
+ toggleSelected: () => zn(t),
839
786
  value: t.value
840
- }, () => [ge(E(n.content), 1)])], 2))), 128)),
841
- e.actions ? (S(), _("td", {
787
+ }, () => [ge(w(n.content), 1)])], 2))), 128)),
788
+ e.actions ? (x(), g("div", {
842
789
  key: 1,
843
- class: b(["bb-table__cell bb-table__cell--actions", e.tdClass])
844
- }, [T(e.$slots, "actions", {
845
- expandProps: jn(t),
790
+ class: y(["bb-table__cell bb-table__cell--actions", e.tdClass]),
791
+ role: "cell"
792
+ }, [C(e.$slots, "actions", {
793
+ expandProps: Fn(t),
846
794
  expanded: t.expanded,
847
795
  highlighted: t.highlighted,
848
796
  item: t.item,
849
797
  selected: $(t),
850
798
  toggleExpanded: () => Z(t.valueHash),
851
799
  toggleHighlighted: () => z(t),
852
- toggleSelected: () => Fn(t),
800
+ toggleSelected: () => zn(t),
853
801
  value: t.value
854
- })], 2)) : g("", !0)
855
- ], 42, Ze), t.expanded ? (S(), _("tr", {
802
+ })], 2)) : h("", !0)
803
+ ], 42, et), t.expanded ? (x(), g("div", {
856
804
  key: 0,
857
805
  id: `expanded_${t.valueHash}`,
858
806
  "aria-rowindex": J.value && t.rowIndex ? t.rowIndex + 1 : void 0,
859
- class: b(["bb-table-expand__row", { "bb-table-expand__row--highlighted": t.highlighted }])
860
- }, [v("td", {
807
+ class: y(["bb-table-expand__row", { "bb-table-expand__row--highlighted": t.highlighted }]),
808
+ role: "row"
809
+ }, [_("div", {
810
+ "aria-colspan": dn.value,
861
811
  class: "bb-table-expand__cell",
862
- colspan: ln.value
863
- }, [T(e.$slots, "expand", {
864
- expandProps: jn(t),
812
+ role: "cell"
813
+ }, [C(e.$slots, "expand", {
814
+ expandProps: Fn(t),
865
815
  expanded: t.expanded,
866
816
  highlighted: t.highlighted,
867
817
  item: t.item,
868
818
  selected: $(t),
869
819
  toggleExpanded: () => Z(t.valueHash),
870
820
  toggleHighlighted: () => z(t),
871
- toggleSelected: () => Fn(t),
821
+ toggleSelected: () => zn(t),
872
822
  value: t.value
873
- })], 8, tt)], 10, et)) : g("", !0)], 64))), 128))]) : (S(), _("tr", {
823
+ })], 8, it)], 10, rt)) : h("", !0)], 64))), 128))]) : (x(), g("div", {
874
824
  key: 1,
875
825
  "aria-rowindex": J.value ? 2 : void 0,
876
- class: "bb-table-no-data__row"
877
- }, [v("td", {
826
+ class: "bb-table-no-data__row",
827
+ role: "row"
828
+ }, [_("div", {
829
+ "aria-colspan": dn.value,
878
830
  class: "bb-table-no-data__cell",
879
- colspan: ln.value
880
- }, [T(e.$slots, "no-data", {}, () => [v("span", Xe, E(e.noDataText || D(F)("common.noDataText").value), 1)])], 8, Ye)], 8, Je)), q.value ? (S(), _("tr", {
831
+ role: "cell"
832
+ }, [C(e.$slots, "no-data", {}, () => [_("span", $e, w(e.noDataText || T(F)("common.noDataText").value), 1)])], 8, Qe)], 8, Ze)), q.value ? (x(), g("div", {
881
833
  key: 3,
882
- "aria-rowindex": J.value && !D(Y).length ? zn.value + 2 : void 0,
883
- class: "bb-table-loading__row bb-table-loading__row--sr-only"
884
- }, [v("td", {
885
- "aria-live": "polite",
834
+ "aria-rowindex": J.value && !T(Y).length ? Un.value + 2 : void 0,
835
+ class: "bb-table-loading__row bb-table-loading__row--sr-only",
836
+ role: "row"
837
+ }, [_("div", {
838
+ "aria-colspan": dn.value,
886
839
  class: "bb-table-loading__cell",
887
- colspan: ln.value,
888
- role: "status"
889
- }, [v("span", it, E(e.loadingText || D(F)("common.loadingText").value), 1)], 8, rt)], 8, nt)) : g("", !0)]),
890
- v("tfoot", null, [T(e.$slots, "tfoot", { columnCount: ln.value })])
891
- ], 8, ke),
892
- (S(!0), _(m, null, w(Ln.value, (e) => (S(), _("input", ye({
840
+ role: "cell"
841
+ }, [_("span", st, w(e.loadingText || T(F)("common.loadingText").value), 1)], 8, ot)], 8, at)) : h("", !0)]),
842
+ _("div", {
843
+ class: "bb-table__foot",
844
+ role: P.tfoot ? "rowgroup" : void 0
845
+ }, [C(e.$slots, "tfoot", { columnCount: dn.value })], 8, ct)
846
+ ], 12, je),
847
+ (x(!0), g(f, null, S(Vn.value, (e) => (x(), g("input", ye({
893
848
  key: e.value,
894
849
  ref_for: !0
895
850
  }, e), null, 16))), 128))
@@ -906,4 +861,4 @@ var Oe = {
906
861
  }
907
862
  });
908
863
  //#endregion
909
- export { k as default };
864
+ export { O as default };