bitboss-ui 2.1.128 → 2.1.129

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/dist/index327.js CHANGED
@@ -13,52 +13,52 @@ import { useHashedWatcher as d } from "./index96.js";
13
13
  import { usePrefill as ee } from "./index97.js";
14
14
  import { when as te } from "./index151.js";
15
15
  import f from "./index154.js";
16
- import { useTableWidthContext as p } from "./index325.js";
17
- import { applyFixedTableColumns as m, columnKeyToSlotName as ne, mergeCellClasses as re, mergeHeaderClasses as ie } from "./index326.js";
18
- import { Fragment as h, computed as g, createBlock as ae, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as oe, createVNode as se, defineComponent as b, mergeModels as ce, mergeProps as le, nextTick as ue, normalizeClass as x, normalizeStyle as S, onBeforeUnmount as de, onMounted as fe, openBlock as C, reactive as pe, ref as w, renderList as T, renderSlot as E, resolveDynamicComponent as me, toDisplayString as D, toRef as he, unref as O, useModel as ge, watch as k, withCtx as _e } from "vue";
16
+ import { useTableWidthContext as ne } from "./index325.js";
17
+ import { applyFixedTableColumns as re, columnKeyToSlotName as p, mergeCellClasses as ie, mergeHeaderClasses as ae } from "./index326.js";
18
+ import { Fragment as m, computed as h, createBlock as oe, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as se, createVNode as ce, defineComponent as y, mergeModels as le, mergeProps as ue, nextTick as de, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as fe, onMounted as pe, openBlock as S, reactive as me, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as he, toDisplayString as E, toRef as ge, unref as D, useModel as _e, watch as O, withCtx as ve } from "vue";
19
19
  //#region src/components/BbTable/BbTable.vue?vue&type=script&setup=true&lang.ts
20
- var ve = {
20
+ var ye = {
21
21
  key: 0,
22
22
  class: "sr-only"
23
- }, ye = ["aria-rowindex"], be = { class: "bb-table-header__content" }, xe = { class: "bb-table-check__label-text sr-only" }, Se = {
23
+ }, be = ["aria-rowindex"], xe = { class: "bb-table-header__content" }, Se = { class: "bb-table-check__label-text sr-only" }, Ce = {
24
24
  key: 1,
25
25
  class: "bb-table-radio__label-text sr-only"
26
- }, Ce = ["aria-sort"], we = { class: "bb-table-header__content" }, Te = { class: "bb-table-header__content sr-only" }, Ee = ["aria-rowindex"], De = {
26
+ }, we = ["aria-sort"], Te = { class: "bb-table-header__content" }, Ee = { class: "bb-table-header__content sr-only" }, De = ["aria-rowindex"], Oe = {
27
27
  key: 0,
28
28
  class: "bb-table-skeleton__cell bb-table-skeleton__cell--select"
29
- }, Oe = {
29
+ }, ke = {
30
30
  key: 0,
31
31
  class: "bb-table-skeleton__cell-content"
32
- }, ke = {
32
+ }, Ae = {
33
33
  key: 1,
34
34
  class: "bb-table-skeleton__avatar"
35
- }, Ae = {
35
+ }, je = {
36
36
  key: 2,
37
37
  class: "bb-table-skeleton__avatar-text"
38
- }, je = { class: "bb-table-skeleton__cell-content" }, Me = {
38
+ }, Me = { class: "bb-table-skeleton__cell-content" }, Ne = {
39
39
  key: 3,
40
40
  class: "bb-table-skeleton__image"
41
- }, Ne = {
41
+ }, Pe = {
42
42
  key: 4,
43
43
  class: "bb-table-skeleton__badge"
44
- }, Pe = {
44
+ }, Fe = {
45
45
  key: 1,
46
46
  class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions"
47
- }, Fe = ["aria-rowindex"], Ie = ["colspan"], Le = { class: "bb-table-loading__text sr-only" }, Re = ["aria-rowindex"], ze = ["colspan"], Be = { class: "bb-table-no-data__text" }, Ve = [
47
+ }, Ie = ["aria-rowindex"], Le = ["colspan"], Re = { class: "bb-table-loading__text sr-only" }, ze = ["aria-rowindex"], Be = ["colspan"], Ve = { class: "bb-table-no-data__text" }, He = [
48
48
  "aria-rowindex",
49
49
  "onClick",
50
50
  "onContextmenu",
51
51
  "onDblclick"
52
- ], He = { class: "bb-table-check__label-text sr-only" }, Ue = { class: "bb-table-radio__label-text sr-only" }, We = ["aria-rowindex", "id"], Ge = ["colspan"], Ke = /* @__PURE__ */ b({
52
+ ], Ue = { class: "bb-table-check__label-text sr-only" }, We = { class: "bb-table-radio__label-text sr-only" }, Ge = ["aria-rowindex", "id"], Ke = ["colspan"], qe = /* @__PURE__ */ y({
53
53
  __name: "BbTable",
54
- props: /* @__PURE__ */ ce({
54
+ props: /* @__PURE__ */ le({
55
55
  accessibleLabel: {},
56
56
  actions: { type: Boolean },
57
57
  actionsText: { default: "Azioni" },
58
58
  align: { default: "left" },
59
59
  id: {},
60
60
  inheritColumnWidths: {
61
- type: Boolean,
61
+ type: [Boolean, String],
62
62
  default: !0
63
63
  },
64
64
  allowSelectAll: {
@@ -115,7 +115,7 @@ var ve = {
115
115
  },
116
116
  expandedItemsModifiers: {}
117
117
  }),
118
- emits: /* @__PURE__ */ ce([
118
+ emits: /* @__PURE__ */ le([
119
119
  "click:row",
120
120
  "contextmenu:row",
121
121
  "dblclick:row",
@@ -126,42 +126,43 @@ var ve = {
126
126
  "item:selected",
127
127
  "item:unselected"
128
128
  ], ["update:selectAll", "update:expandedItems"]),
129
- setup(b, { emit: ce }) {
130
- let { getItemValue: Ke } = c(), qe = t().id.value, A = b, j = ce;
131
- A.multiple && !Array.isArray(A.modelValue) && n().throw("BbTable is set for multiple selection but modelValue is not an array.");
132
- let { t: M } = r(), N = w(), P = w(), { id: Je, parentId: F, parentNode: I, cssVars: Ye, parentVar: Xe, setTracks: Ze } = p({
133
- id: () => A.id,
134
- container: () => P.value
135
- }), L = g(() => A.inheritColumnWidths !== !1), R = g(() => A.fixed || A.columns.some((e) => e.width != null) || L.value && !!F.value), Qe = g(() => L.value && !!F.value), $e = (e) => {
129
+ setup(y, { emit: le }) {
130
+ let { getItemValue: qe } = c(), Je = t().id.value, k = y, A = le;
131
+ k.multiple && !Array.isArray(k.modelValue) && n().throw("BbTable is set for multiple selection but modelValue is not an array.");
132
+ let { t: j } = r(), M = C(), N = C(), { id: Ye, parentId: P, parentNode: F, cssVars: Xe, parentVar: Ze, setTracks: Qe } = ne({
133
+ id: () => k.id,
134
+ container: () => N.value,
135
+ inheritFrom: () => typeof k.inheritColumnWidths == "string" ? k.inheritColumnWidths : void 0
136
+ }), I = h(() => k.inheritColumnWidths !== !1), L = h(() => k.fixed || k.columns.some((e) => e.width != null) || I.value && !!P.value), R = h(() => I.value && !!P.value), $e = R, et = (e) => {
136
137
  if (typeof e == "number") return `${e}px`;
137
138
  let t = e.trim();
138
139
  return /^-?\d*\.?\d+$/.test(t) ? `${t}px` : t;
139
- }, et = g(() => {
140
- let e = I.value?.tracks;
140
+ }, tt = h(() => {
141
+ let e = F.value?.tracks;
141
142
  return e ? Object.keys(e).filter((e) => /^\d+$/.test(e)).length : 0;
142
- }), tt = g(() => {
143
- let e = I.value?.tracks ?? {}, t = [];
143
+ }), nt = h(() => {
144
+ let e = F.value?.tracks ?? {}, t = [];
144
145
  "select" in e && t.push("select");
145
- for (let e = 0; e < et.value; e++) t.push(String(e));
146
+ for (let e = 0; e < tt.value; e++) t.push(String(e));
146
147
  return "actions" in e && t.push("actions"), t;
147
- }), z = g(() => +("select" in (I.value?.tracks ?? {}))), nt = g(() => z.value + et.value), rt = g(() => tt.value.length), it = (e) => {
148
- let t = tt.value[e];
149
- return t ? Xe(t, "0px") : "0px";
150
- }, B = (e, t) => {
151
- if (!F.value || t - e <= 1e-6) return null;
148
+ }), rt = h(() => +("select" in (F.value?.tracks ?? {}))), it = h(() => rt.value + tt.value), at = h(() => nt.value.length), ot = (e) => {
149
+ let t = nt.value[e];
150
+ return t ? Ze(t, "0px") : "0px";
151
+ }, st = (e, t) => {
152
+ if (!P.value || t - e <= 1e-6) return null;
152
153
  let n = [];
153
154
  for (let r = Math.floor(e); r < Math.ceil(t - 1e-6); r++) {
154
155
  let i = Math.min(t, r + 1) - Math.max(e, r);
155
156
  if (i <= 1e-6) continue;
156
- let a = it(r);
157
+ let a = ot(r);
157
158
  n.push(i >= .999999 ? a : `${Number(i.toFixed(4))} * ${a}`);
158
159
  }
159
160
  return n.length ? n.length === 1 && !n[0].includes("*") ? n[0] : `calc(${n.join(" + ")})` : null;
160
- }, V = g(() => {
161
- let e = A.columns, t = e.map((e) => typeof e.snap == "number" ? e.snap : Array.isArray(e.snap) ? e.snap[0] : null), n = z.value;
161
+ }, z = h(() => {
162
+ let e = k.columns, t = e.map((e) => typeof e.snap == "number" ? e.snap : Array.isArray(e.snap) ? e.snap[0] : null), n = rt.value;
162
163
  return e.map((e, r) => {
163
164
  let i = t[r] ?? n, a;
164
- if (Array.isArray(e.snap)) a = e.snap[1] === -1 ? nt.value : e.snap[1];
165
+ if (Array.isArray(e.snap)) a = e.snap[1] === -1 ? it.value : e.snap[1];
165
166
  else {
166
167
  let e = t[r + 1];
167
168
  a = e != null && e > i ? e : Math.floor(i) + 1;
@@ -171,77 +172,98 @@ var ve = {
171
172
  end: a
172
173
  };
173
174
  });
174
- }), H = g(() => {
175
- let e = V.value[0];
176
- return !L.value || !e ? null : B(A.selectable && z.value === 1 ? 1 : 0, e.start);
177
- }), U = g(() => {
178
- let e = V.value, t = e[e.length - 1];
179
- if (!L.value || !t) return null;
180
- let n = "actions" in (I.value?.tracks ?? {}), r = A.actions && n ? rt.value - 1 : rt.value;
181
- return B(t.end, r);
182
- }), at = g(() => H.value !== null), ot = g(() => U.value !== null), W = pe({
175
+ }), ct = (e) => R.value && e.start >= it.value, lt = h(() => z.value.some(ct)), B = (e) => k.columns[e]?.width == null && !R.value, V = h(() => {
176
+ if (!R.value) return -1;
177
+ for (let e = k.columns.length - 1; e >= 0; e--) {
178
+ let t = k.columns[e];
179
+ if (t.width == null && t.snap == null) return e;
180
+ }
181
+ return -1;
182
+ }), ut = h(() => {
183
+ let e = z.value[0];
184
+ if (!I.value || !P.value || !e) return null;
185
+ let t = st(0, e.start), n = k.selectable ? H.select : null;
186
+ return n ? `calc(${t ?? "0px"} - ${n})` : t;
187
+ }), dt = h(() => {
188
+ let e = z.value, t = e[e.length - 1];
189
+ if (!I.value || !P.value || !t || lt.value || V.value === k.columns.length - 1) return null;
190
+ let n = st(t.end, at.value), r = k.actions ? H.actions : null;
191
+ return r ? `calc(${n ?? "0px"} - ${r})` : n;
192
+ }), ft = h(() => ut.value !== null), pt = h(() => dt.value !== null), H = me({
183
193
  select: null,
184
194
  actions: null
185
- }), st = g(() => {
186
- let e = (e) => L.value ? Xe(e) : "auto", t = (t) => R.value && W[t] ? W[t] : e(t), n = [];
187
- A.selectable && n.push({
195
+ }), mt = h(() => {
196
+ let e = (e) => I.value ? Ze(e) : "auto", t = (t) => L.value && H[t] ? H[t] : e(t), n = [];
197
+ k.selectable && n.push({
188
198
  key: "select",
189
199
  width: t("select")
190
200
  });
191
- let r = A.columns.length - 1;
192
- return A.columns.forEach((e, t) => {
193
- let i = String(t), a = e.width == null ? null : $e(e.width), o = a == null && R.value ? mt.value[t] ?? null : null, s = V.value[t], c = a ?? o ?? B(s.start, s.end), l = [];
194
- t === 0 && at.value && l.push("var(--bb-table-offset-internal-start)"), t === r && ot.value && l.push("var(--bb-table-offset-internal-end)");
195
- let u = l.length ? `calc(${[...l, c ?? "0px"].join(" + ")})` : c ?? "auto";
201
+ let r = k.columns.length - 1;
202
+ return k.columns.forEach((e, t) => {
203
+ let i = String(t), a = e.width == null ? null : et(e.width), o = z.value[t];
204
+ if (t === V.value && !lt.value) {
205
+ n.push({
206
+ key: i,
207
+ width: "auto"
208
+ });
209
+ return;
210
+ }
211
+ let s;
212
+ s = a ?? (B(t) ? L.value && xt.value[t] || null : ct(o) ? St.value[t] ?? null : st(o.start, o.end));
213
+ let c = [];
214
+ t === 0 && ft.value && c.push("var(--bb-table-offset-internal-start)"), t === r && pt.value && c.push("var(--bb-table-offset-internal-end)");
215
+ let l = c.length ? `calc(${[...c, s ?? "0px"].join(" + ")})` : s ?? "auto";
196
216
  n.push({
197
217
  key: i,
198
- width: u
218
+ width: l
199
219
  });
200
- }), A.actions && n.push({
220
+ }), k.actions && n.push({
201
221
  key: "actions",
202
222
  width: t("actions")
203
223
  }), n;
204
- }), ct = g(() => {
224
+ }), ht = h(() => {
205
225
  let e = {};
206
- return H.value && (e["--bb-table-offset-start"] = H.value), U.value && (e["--bb-table-offset-end"] = U.value), e;
207
- }), lt = g(() => {
226
+ return ut.value && (e["--bb-table-offset-start"] = ut.value), dt.value && (e["--bb-table-offset-end"] = dt.value), e;
227
+ }), gt = h(() => {
208
228
  let e = {
209
- ...Ye.value,
210
- ...ct.value
229
+ ...Xe.value,
230
+ ...ht.value
211
231
  };
212
- return ht.value && (e["--bb-table-natural-width"] = ht.value), e;
213
- }), ut = () => Array.from(N.value?.querySelectorAll(":scope > thead > tr.bb-table-header-row > th") ?? []), dt = () => {
214
- let e = st.value.map((e) => e.key), t = {};
215
- ut().forEach((n, r) => {
232
+ return Ct.value && (e["--bb-table-natural-width"] = Ct.value), U.value > 0 && (e["--bb-table-fill"] = `${U.value}px`), e;
233
+ }), _t = () => Array.from(M.value?.querySelectorAll(":scope > thead > tr.bb-table-header-row > th") ?? []), vt = () => {
234
+ let e = mt.value.map((e) => e.key), t = {};
235
+ _t().forEach((n, r) => {
216
236
  let i = e[r];
217
237
  i != null && (t[i] = `${n.getBoundingClientRect().width}px`);
218
- }), Ze(t);
219
- }, ft = () => {
220
- let e = N.value;
238
+ }), Qe(t);
239
+ }, yt = () => {
240
+ let e = M.value;
221
241
  if (!e) return;
222
242
  let t = (t) => {
223
243
  let n = 0;
224
244
  return e.querySelectorAll(t).forEach((e) => {
225
- let t = 0;
245
+ let t = Infinity, r = -Infinity;
226
246
  e.querySelectorAll(":scope > *").forEach((e) => {
227
- t = Math.max(t, e.getBoundingClientRect().width);
247
+ let n = e.getBoundingClientRect();
248
+ t = Math.min(t, n.left), r = Math.max(r, n.right);
228
249
  });
229
- let r = getComputedStyle(e), i = parseFloat(r.paddingLeft) + parseFloat(r.paddingRight);
230
- n = Math.max(n, t + i);
250
+ let i = r > t ? r - t : 0, a = getComputedStyle(e), o = parseFloat(a.paddingLeft) + parseFloat(a.paddingRight);
251
+ n = Math.max(n, i + o);
231
252
  }), n > 0 ? `${Math.ceil(n)}px` : null;
232
253
  };
233
- W.select = A.selectable ? t(".bb-table-header--select, .bb-table-data__cell--select") : null, W.actions = A.actions ? t(".bb-table-header--actions, .bb-table__cell--actions") : null;
234
- }, pt = () => {
235
- ft(), dt();
236
- }, mt = w([]), ht = w(null), gt = () => {
237
- let e = P.value;
238
- if (!e || !R.value || !A.columns.some((e) => e.width != null)) return;
239
- let t = e.offsetWidth, n = +!!A.selectable, r = W.select ? parseFloat(W.select) : 0, i = W.actions ? parseFloat(W.actions) : 0, a = ut(), o = 0;
240
- A.columns.forEach((e, t) => {
241
- e.width != null && (o += a[n + t]?.getBoundingClientRect().width ?? 0);
254
+ H.select = k.selectable ? t(":scope > thead > tr > th.bb-table-header--select, :scope > tbody > tr > td.bb-table-data__cell--select") : null, H.actions = k.actions ? t(":scope > thead > tr > th.bb-table-header--actions, :scope > tbody > tr > td.bb-table__cell--actions") : null;
255
+ }, bt = () => {
256
+ yt(), vt();
257
+ }, xt = C([]), St = C([]), U = C(0), Ct = C(null), wt = () => {
258
+ let e = N.value;
259
+ if (!e || !L.value || !k.columns.some((e) => e.width != null) && !lt.value && V.value < 0) return;
260
+ let t = e.offsetWidth, n = +!!k.selectable, r = H.select ? parseFloat(H.select) : 0, i = H.actions ? parseFloat(H.actions) : 0, a = _t(), o = 0, s = 0;
261
+ k.columns.forEach((e, t) => {
262
+ let r = a[n + t]?.getBoundingClientRect().width ?? 0;
263
+ e.width != null && (o += r), B(t) || (s += r);
242
264
  });
243
- let s = document.createElement("div");
244
- s.style.cssText = [
265
+ let c = document.createElement("div");
266
+ c.style.cssText = [
245
267
  "position:absolute",
246
268
  "top:-9999px",
247
269
  "left:-9999px",
@@ -251,114 +273,118 @@ var ve = {
251
273
  `height:${e.offsetHeight}px`,
252
274
  "overflow:visible"
253
275
  ].join(";");
254
- let c = e.cloneNode(!0);
255
- c.classList.remove("bb-table--fixed");
256
- let l = Array.from(c.querySelectorAll("col"));
257
- A.columns.forEach((e, t) => {
276
+ let l = e.cloneNode(!0);
277
+ l.classList.remove("bb-table--fixed"), l.querySelectorAll(".bb-table-expand__row").forEach((e) => e.remove());
278
+ let u = Array.from(l.querySelectorAll("col"));
279
+ k.columns.forEach((e, t) => {
258
280
  if (e.width == null) {
259
- let e = l[n + t];
281
+ let e = u[n + t];
260
282
  e && (e.style.width = "");
261
283
  }
262
284
  });
263
- let u = c.querySelector("table");
264
- u && (u.style.width = "max-content", u.style.minWidth = "0"), s.appendChild(c), document.body.appendChild(s);
265
- let d = s.querySelector("table thead tr.bb-table-header-row"), ee = d ? Array.from(d.querySelectorAll(":scope > th")) : [], te = A.columns.map((e, t) => {
285
+ let d = l.querySelector("table");
286
+ d && (d.style.width = "min-content", d.style.minWidth = "0"), c.appendChild(l), document.body.appendChild(c);
287
+ let ee = c.querySelector("table thead tr.bb-table-header-row"), te = ee ? Array.from(ee.querySelectorAll(":scope > th")) : [], f = k.columns.map((e, t) => {
266
288
  if (e.width != null) return 0;
267
- let r = ee[n + t];
289
+ let r = te[n + t];
268
290
  return r ? r.getBoundingClientRect().width : 0;
269
291
  });
270
- document.body.removeChild(s);
271
- let f = te.reduce((e, t) => e + t, 0), p = t - o - r - i;
272
- mt.value = A.columns.map((e, t) => {
273
- if (e.width != null) return null;
274
- let n = te[t];
275
- if (f <= 0) return `${Math.ceil(n)}px`;
276
- let r = p > 0 ? n / f * p : 0;
277
- return `${Math.ceil(Math.max(n, r))}px`;
278
- });
279
- let m = o + f + r + i;
280
- ht.value = m > 0 ? `${Math.ceil(m)}px` : null;
281
- }, G = null, _t, vt = () => {
282
- G !== null && clearTimeout(G), G = setTimeout(() => {
283
- G = null, gt();
292
+ document.body.removeChild(c);
293
+ let ne = k.columns.reduce((e, t, n) => e + (B(n) ? f[n] : 0), 0), re = t - s - r - i, p = (e) => `${Number(e.toFixed(3))}px`;
294
+ if (xt.value = k.columns.map((e, t) => {
295
+ if (!B(t)) return null;
296
+ let n = f[t];
297
+ if (ne <= 0) return p(n);
298
+ let r = re > 0 ? n / ne * re : 0;
299
+ return p(Math.max(n, r));
300
+ }), St.value = f.map((e) => e > 0 ? p(e) : null), V.value >= 0) {
301
+ let e = Object.values(F.value?.tracks ?? {}).reduce((e, t) => e + (parseFloat(t) || 0), 0), t = a.reduce((e, t) => e + t.getBoundingClientRect().width, 0);
302
+ U.value = Math.max(0, e - t + U.value);
303
+ } else U.value = 0;
304
+ let ie = f.reduce((e, t) => e + t, 0), ae = o + ie + r + i;
305
+ Ct.value = ae > 0 ? `${Math.ceil(ae)}px` : null;
306
+ }, W = null, Tt, Et = () => {
307
+ W !== null && clearTimeout(W), W = setTimeout(() => {
308
+ W = null, wt();
284
309
  }, 200);
285
- }, K, yt, bt = () => {
286
- K && (K.disconnect(), ut().forEach((e) => K?.observe(e)), pt());
310
+ }, G, Dt, Ot = () => {
311
+ G && (G.disconnect(), _t().forEach((e) => G?.observe(e)), bt());
287
312
  };
288
- fe(() => {
289
- K = new ResizeObserver(() => pt()), bt(), ue(gt), N.value && (_t = new MutationObserver(vt), _t.observe(N.value, {
313
+ pe(() => {
314
+ G = new ResizeObserver(() => bt()), Ot(), de(wt), M.value && (Tt = new MutationObserver(Et), Tt.observe(M.value, {
290
315
  childList: !0,
291
316
  subtree: !0,
292
317
  characterData: !0
293
- })), P.value && (yt = new ResizeObserver(vt), yt.observe(P.value));
294
- }), de(() => {
295
- K?.disconnect(), yt?.disconnect(), _t?.disconnect(), G !== null && clearTimeout(G);
296
- }), k(st, () => ue(bt), { flush: "post" });
297
- let xt = (e) => [M("table.select").value, ...e.map((e) => e.content)].join(" "), St = g(() => A.selectable ? "fieldset" : "div"), Ct = g(() => A.loading || kt.value), q = g(() => !u(A.page) && !u(A.perPage) && !u(A.totalItems)), wt = g(() => ({
318
+ })), N.value && (Dt = new ResizeObserver(Et), Dt.observe(N.value));
319
+ }), fe(() => {
320
+ G?.disconnect(), Dt?.disconnect(), Tt?.disconnect(), W !== null && clearTimeout(W);
321
+ }), O(mt, () => de(Ot), { flush: "post" });
322
+ let kt = (e) => [j("table.select").value, ...e.map((e) => e.content)].join(" "), At = h(() => k.selectable ? "fieldset" : "div"), jt = h(() => k.loading || Lt.value), K = h(() => !u(k.page) && !u(k.perPage) && !u(k.totalItems)), Mt = h(() => ({
298
323
  "bb-table": !0,
299
- [`bb-table--align-${A.align}`]: !0,
300
- "bb-table--compact": A.compact,
301
- "bb-table--fixed": R.value,
302
- "bb-table--inherit-widths": Qe.value,
303
- "bb-table--fixed-header": A.fixedHeaders,
304
- "bb-table--loading": Ct.value,
305
- "bb-table--empty": !J.value.length,
306
- "bb-table--selectable": !!A.selectable
307
- })), Tt = g(() => A.columns.length + Number(!!A.selectable) + Number(!!A.actions)), Et = g(() => Object.fromEntries(A.columns.map((e) => [e.key, ne(e.key)]))), { getter: Dt, items: Ot, loading: kt } = o({ items: he(A, "items") }), { hasPrefilled: At } = ee({
324
+ [`bb-table--align-${k.align}`]: !0,
325
+ "bb-table--compact": k.compact,
326
+ "bb-table--fixed": L.value,
327
+ "bb-table--inherit-widths": $e.value,
328
+ "bb-table--fixed-header": k.fixedHeaders,
329
+ "bb-table--loading": jt.value,
330
+ "bb-table--empty": !q.value.length,
331
+ "bb-table--selectable": !!k.selectable,
332
+ "scrollbar-border": !0
333
+ })), Nt = h(() => k.columns.length + Number(!!k.selectable) + Number(!!k.actions)), Pt = h(() => Object.fromEntries(k.columns.map((e) => [e.key, p(e.key)]))), { getter: Ft, items: It, loading: Lt } = o({ items: ge(k, "items") }), { hasPrefilled: Rt } = ee({
308
334
  trigger: !0,
309
335
  fn: async (e) => {
310
- await Dt(e, A.modelValue);
336
+ await Ft(e, k.modelValue);
311
337
  }
312
- }), { data: jt } = s({ items: he(A, "modelValue") }), { options: J } = l({
313
- disabled: he(A, "disabled"),
314
- items: Ot,
338
+ }), { data: zt } = s({ items: ge(k, "modelValue") }), { options: q } = l({
339
+ disabled: ge(k, "disabled"),
340
+ items: It,
315
341
  itemText: void 0,
316
- itemValue: A.itemValue,
317
- max: A.max,
342
+ itemValue: k.itemValue,
343
+ max: k.max,
318
344
  selectable: !0,
319
- selectedIndexedByHash: jt
320
- }), Mt = async (e) => {
321
- A.multiple ? j("update:modelValue", A.modelValue.concat(e.value)) : j("update:modelValue", e.value);
322
- }, Nt = async (e) => {
323
- if (A.multiple) {
324
- let t = { ...jt.value };
325
- delete t[e.valueHash], j("update:modelValue", Object.values(t));
326
- } else j("update:modelValue", null);
345
+ selectedIndexedByHash: zt
346
+ }), Bt = async (e) => {
347
+ k.multiple ? A("update:modelValue", k.modelValue.concat(e.value)) : A("update:modelValue", e.value);
348
+ }, Vt = async (e) => {
349
+ if (k.multiple) {
350
+ let t = { ...zt.value };
351
+ delete t[e.valueHash], A("update:modelValue", Object.values(t));
352
+ } else A("update:modelValue", null);
327
353
  };
328
- d(() => [A.dependencies, A.items], async () => {
329
- At.value && await Dt(!1, A.modelValue);
330
- }, { debounce: A.depsDebounceTime });
331
- let Pt = (e, t) => {
332
- let n = Et.value[e.key], r = e.align ?? "left", i = Ke(t.item, e.key);
354
+ d(() => [k.dependencies, k.items], async () => {
355
+ Rt.value && await Ft(!1, k.modelValue);
356
+ }, { debounce: k.depsDebounceTime });
357
+ let Ht = (e, t) => {
358
+ let n = Pt.value[e.key], r = e.align ?? "left", i = qe(t.item, e.key);
333
359
  return e.formatter && (!u(i) || e.formatOnNull !== !1) && (i = e.formatter(i, e.key, t.item)), e.placeholder && u(i) && (i = e.placeholder), {
334
360
  align: r,
335
- classes: re([`bb-table-data__cell--${r}`], A.tdClass, e.tdClass, i, e.key, t.item),
361
+ classes: ie([`bb-table-data__cell--${r}`], k.tdClass, e.tdClass, i, e.key, t.item),
336
362
  content: i,
337
363
  key: e.key,
338
364
  label: e.label,
339
365
  slotName: n
340
366
  };
341
- }, Ft = g(() => A.columns.map((e) => {
342
- let t = e.align ?? "left", n = `header:${Et.value[e.key]}`, r = e.sorted ? e.sorted === "asc" ? "ascending" : "descending" : void 0;
367
+ }, Ut = h(() => k.columns.map((e) => {
368
+ let t = e.align ?? "left", n = `header:${Pt.value[e.key]}`, r = e.sorted ? e.sorted === "asc" ? "ascending" : "descending" : void 0;
343
369
  return {
344
370
  align: t,
345
371
  key: e.key,
346
372
  label: e.label,
347
373
  slotName: n,
348
- classes: ie([`bb-table-header--${t}`], A.thClass, e.thClass),
374
+ classes: ae([`bb-table-header--${t}`], k.thClass, e.thClass),
349
375
  sortDirection: r
350
376
  };
351
- })), It = g(() => {
377
+ })), Wt = h(() => {
352
378
  let e = 0;
353
- return J.value.map((t, n) => {
354
- let r = !A.selectable || typeof A.selectable == "function" && !A.selectable(t.item) || !!t.disabled, i = (A.page ?? -1) * (A.perPage ?? 0), a = n + 1, o = i + 1 + a + e, s = A.columns.map((e) => Pt(e, t)), c = Lt.value[t.valueHash] ?? !1;
379
+ return q.value.map((t, n) => {
380
+ let r = !k.selectable || typeof k.selectable == "function" && !k.selectable(t.item) || !!t.disabled, i = (k.page ?? -1) * (k.perPage ?? 0), a = n + 1, o = i + 1 + a + e, s = k.columns.map((e) => Ht(e, t)), c = X.value[t.valueHash] ?? !1;
355
381
  return c && e++, {
356
- accessibleLabel: xt(s),
382
+ accessibleLabel: kt(s),
357
383
  cols: s,
358
384
  expanded: c,
359
- onRowClick: (e) => j("click:row", e, t, !!t.selected),
360
- onRowContextMenu: (e) => j("contextmenu:row", e, t, !!t.selected),
361
- onRowDblClick: (e) => j("dblclick:row", e, t, !!t.selected),
385
+ onRowClick: (e) => A("click:row", e, t, !!t.selected),
386
+ onRowContextMenu: (e) => A("contextmenu:row", e, t, !!t.selected),
387
+ onRowDblClick: (e) => A("dblclick:row", e, t, !!t.selected),
362
388
  item: t.item,
363
389
  text: t.text,
364
390
  rowIndex: o,
@@ -368,96 +394,96 @@ var ve = {
368
394
  disabled: r
369
395
  };
370
396
  });
371
- }), Y = ge(b, "selectAll"), X = ge(b, "expandedItems"), { data: Lt } = s({ items: X }), Rt = (e, t) => {
397
+ }), J = _e(y, "selectAll"), Y = _e(y, "expandedItems"), { data: X } = s({ items: Y }), Gt = (e, t) => {
372
398
  e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), Z(t)));
373
- }, zt = (e) => ({
374
- "aria-controls": u(Lt.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
399
+ }, Kt = (e) => ({
400
+ "aria-controls": u(X.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
375
401
  "aria-expanded": e.expanded ? "true" : "false",
376
402
  onClick: (t) => {
377
403
  t.stopPropagation(), Z(e.valueHash);
378
404
  },
379
- onKeydown: (t) => Rt(t, e.valueHash)
405
+ onKeydown: (t) => Gt(t, e.valueHash)
380
406
  }), Z = (e) => {
381
- let t = J.value.find((t) => t.valueHash === e);
382
- t && (e in Lt.value ? X.value = X.value.filter((t) => i(t) !== e) : X.value = [...X.value, t.value]);
407
+ let t = q.value.find((t) => t.valueHash === e);
408
+ t && (e in X.value ? Y.value = Y.value.filter((t) => i(t) !== e) : Y.value = [...Y.value, t.value]);
383
409
  };
384
- k(Y, () => {
385
- Q.clear(), j("update:unselectedItems", []), j("update:modelValue", []);
410
+ O(J, () => {
411
+ Q.clear(), A("update:unselectedItems", []), A("update:modelValue", []);
386
412
  });
387
- let Bt = g(() => !!(A.multiple && A.modelValue.length > 0 && !A.selectAll || Y.value && Q.size > 0)), Q = pe(/* @__PURE__ */ new Set());
388
- k(() => A.unselectedItems, () => {
389
- Q.clear(), A.unselectedItems.forEach((e) => {
413
+ let qt = h(() => !!(k.multiple && k.modelValue.length > 0 && !k.selectAll || J.value && Q.size > 0)), Q = me(/* @__PURE__ */ new Set());
414
+ O(() => k.unselectedItems, () => {
415
+ Q.clear(), k.unselectedItems.forEach((e) => {
390
416
  Q.add(i(e));
391
417
  });
392
418
  });
393
- let Vt = (e) => {
394
- if (Ht(e)) {
395
- Nt(e), j("item:unselected", e.value), Q.add(e.valueHash), j("update:unselectedItems", [...A.unselectedItems, e.value]);
419
+ let Jt = (e) => {
420
+ if (Yt(e)) {
421
+ Vt(e), A("item:unselected", e.value), Q.add(e.valueHash), A("update:unselectedItems", [...k.unselectedItems, e.value]);
396
422
  return;
397
423
  }
398
- Y.value || Mt(e), j("item:selected", e.value), Q.delete(e.valueHash), j("update:unselectedItems", A.unselectedItems.filter((t) => i(t) !== i(e.value)));
399
- }, Ht = (e) => Q.has(e.valueHash) ? !1 : e.selected || Y.value, Ut = te((e) => typeof e != "string", JSON.stringify), Wt = g(() => [].concat(A.modelValue ?? []).map((e) => ({
400
- disabled: A.disabled,
401
- name: A.name,
424
+ J.value || Bt(e), A("item:selected", e.value), Q.delete(e.valueHash), A("update:unselectedItems", k.unselectedItems.filter((t) => i(t) !== i(e.value)));
425
+ }, Yt = (e) => Q.has(e.valueHash) ? !1 : e.selected || J.value, Xt = te((e) => typeof e != "string", JSON.stringify), Zt = h(() => [].concat(k.modelValue ?? []).map((e) => ({
426
+ disabled: k.disabled,
427
+ name: k.name,
402
428
  type: "hidden",
403
- value: Ut(e)
429
+ value: Xt(e)
404
430
  }))), $ = [
405
431
  70,
406
432
  45,
407
433
  85,
408
434
  55
409
- ], Gt = g(() => e(J.value.length || A.columns.length || 1, 4, 10));
410
- return k(() => [It.value, A.fixedColumns], () => {
411
- N.value && A.fixedColumns?.length && m(N.value, A.fixedColumns);
412
- }, { flush: "post" }), (e, t) => (C(), ae(me(St.value), {
435
+ ], Qt = h(() => e(q.value.length || k.columns.length || 1, 4, 10));
436
+ return O(() => [Wt.value, k.fixedColumns], () => {
437
+ M.value && k.fixedColumns?.length && re(M.value, k.fixedColumns);
438
+ }, { flush: "post" }), (e, t) => (S(), oe(he(At.value), {
413
439
  ref_key: "containerRef",
414
- ref: P,
415
- "aria-busy": Ct.value,
416
- "aria-rowcount": q.value ? A.totalItems : void 0,
417
- class: x(wt.value),
418
- "data-bb-table-id": O(Je),
440
+ ref: N,
441
+ "aria-busy": jt.value,
442
+ "aria-rowcount": K.value ? k.totalItems : void 0,
443
+ class: b(Mt.value),
444
+ "data-bb-table-id": D(Ye),
419
445
  inert: e.disabled,
420
- style: S(lt.value)
446
+ style: x(gt.value)
421
447
  }, {
422
- default: _e(() => [
423
- e.selectable ? (C(), v("legend", ve, D(e.legend), 1)) : _("", !0),
424
- y("table", {
448
+ default: ve(() => [
449
+ e.selectable ? (S(), _("legend", ye, E(e.legend), 1)) : g("", !0),
450
+ v("table", {
425
451
  ref_key: "tableRef",
426
- ref: N
452
+ ref: M
427
453
  }, [
428
- e.caption ? (C(), v("caption", {
454
+ e.caption ? (S(), _("caption", {
429
455
  key: 0,
430
- class: x({
456
+ class: b({
431
457
  "bb-table-caption": !0,
432
458
  "sr-only": !e.displayCaption
433
459
  })
434
- }, D(e.caption), 3)) : _("", !0),
435
- y("colgroup", null, [(C(!0), v(h, null, T(st.value, (e) => (C(), v("col", {
460
+ }, E(e.caption), 3)) : g("", !0),
461
+ v("colgroup", null, [(S(!0), _(m, null, w(mt.value, (e) => (S(), _("col", {
436
462
  key: e.key,
437
- style: S({ width: e.width })
463
+ style: x({ width: e.width })
438
464
  }, null, 4))), 128))]),
439
- y("thead", null, [E(e.$slots, "thead", {}, () => [y("tr", {
440
- "aria-rowindex": q.value ? 1 : void 0,
465
+ v("thead", null, [T(e.$slots, "thead", {}, () => [v("tr", {
466
+ "aria-rowindex": K.value ? 1 : void 0,
441
467
  class: "bb-table-header-row"
442
468
  }, [
443
- e.selectable ? (C(), v("th", {
469
+ e.selectable ? (S(), _("th", {
444
470
  key: 0,
445
- class: x(["bb-table-header bb-table-header--select", e.thClass]),
471
+ class: b(["bb-table-header bb-table-header--select", e.thClass]),
446
472
  scope: "col"
447
- }, [E(e.$slots, "header:select", {
473
+ }, [T(e.$slots, "header:select", {
448
474
  multiple: e.multiple,
449
- selectAll: !!Y.value,
450
- text: e.selectText || O(M)("table.selectText").value
451
- }, () => [y("span", be, [e.allowSelectAll && e.multiple ? (C(), v("label", {
475
+ selectAll: !!J.value,
476
+ text: e.selectText || D(j)("table.selectText").value
477
+ }, () => [v("span", xe, [e.allowSelectAll && e.multiple ? (S(), _("label", {
452
478
  key: 0,
453
- class: x(["bb-table-check__label", { "bb-table-check__label--disabled": e.disabled }])
454
- }, [(C(), ae(a, {
455
- key: Bt.value.toString(),
456
- modelValue: Y.value,
457
- "onUpdate:modelValue": t[0] ||= (e) => Y.value = e,
479
+ class: b(["bb-table-check__label", { "bb-table-check__label--disabled": e.disabled }])
480
+ }, [(S(), oe(a, {
481
+ key: qt.value.toString(),
482
+ modelValue: J.value,
483
+ "onUpdate:modelValue": t[0] ||= (e) => J.value = e,
458
484
  class: "bb-table-check",
459
485
  disabled: e.disabled,
460
- indeterminate: Bt.value,
486
+ indeterminate: qt.value,
461
487
  name: `select_all_${e.name || ""}`,
462
488
  readonly: e.readonly
463
489
  }, null, 8, [
@@ -466,99 +492,102 @@ var ve = {
466
492
  "indeterminate",
467
493
  "name",
468
494
  "readonly"
469
- ])), y("span", xe, D(e.selectAllLabel || O(M)("table.selectAllLabel").value), 1)], 2)) : e.multiple ? _("", !0) : (C(), v("span", Se, D(e.selectText || O(M)("table.selectText").value), 1))])])], 2)) : _("", !0),
470
- (C(!0), v(h, null, T(Ft.value, (t) => (C(), v("th", {
495
+ ])), v("span", Se, E(e.selectAllLabel || D(j)("table.selectAllLabel").value), 1)], 2)) : e.multiple ? g("", !0) : (S(), _("span", Ce, E(e.selectText || D(j)("table.selectText").value), 1))])])], 2)) : g("", !0),
496
+ (S(!0), _(m, null, w(Ut.value, (t, n) => (S(), _("th", {
471
497
  key: t.key,
472
498
  "aria-sort": t.sortDirection,
473
- class: x(["bb-table-header", t.classes]),
499
+ class: b(["bb-table-header", [t.classes, {
500
+ "bb-table-header--edge-start": n === 0,
501
+ "bb-table-header--edge-end": n === Ut.value.length - 1
502
+ }]]),
474
503
  scope: "col"
475
- }, [E(e.$slots, t.slotName, {
504
+ }, [T(e.$slots, t.slotName, {
476
505
  classes: t.classes,
477
- items: O(Ot),
506
+ items: D(It),
478
507
  label: t.label
479
- }, () => [y("span", we, D(t.label), 1)])], 10, Ce))), 128)),
480
- e.actions ? (C(), v("th", {
508
+ }, () => [v("span", Te, E(t.label), 1)])], 10, we))), 128)),
509
+ e.actions ? (S(), _("th", {
481
510
  key: 1,
482
- class: x(["bb-table-header bb-table-header--actions", e.thClass]),
511
+ class: b(["bb-table-header bb-table-header--actions", e.thClass]),
483
512
  scope: "col"
484
- }, [E(e.$slots, "header:actions", { text: e.actionsText }, () => [y("span", Te, D(e.actionsText), 1)])], 2)) : _("", !0)
485
- ], 8, ye)])]),
486
- y("tbody", null, [Ct.value ? E(e.$slots, "loading", {
513
+ }, [T(e.$slots, "header:actions", { text: e.actionsText }, () => [v("span", Ee, E(e.actionsText), 1)])], 2)) : g("", !0)
514
+ ], 8, be)])]),
515
+ v("tbody", null, [jt.value ? T(e.$slots, "loading", {
487
516
  key: 0,
488
- items: O(Ot)
489
- }, () => [(C(!0), v(h, null, T(Gt.value, (n, r) => (C(), v("tr", {
517
+ items: D(It)
518
+ }, () => [(S(!0), _(m, null, w(Qt.value, (n, r) => (S(), _("tr", {
490
519
  key: r,
491
- "aria-rowindex": q.value ? r + 2 : void 0,
520
+ "aria-rowindex": K.value ? r + 2 : void 0,
492
521
  class: "bb-table-skeleton__row"
493
522
  }, [
494
- e.selectable ? (C(), v("td", De, t[1] ||= [y("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : _("", !0),
495
- (C(!0), v(h, null, T(A.columns, (e, n) => (C(), v("td", {
523
+ e.selectable ? (S(), _("td", Oe, t[1] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : g("", !0),
524
+ (S(!0), _(m, null, w(k.columns, (e, n) => (S(), _("td", {
496
525
  key: e.key,
497
- class: x(["bb-table-skeleton__cell", `bb-table-skeleton__cell--${e.skeleton ?? "text"}`])
498
- }, [!e.skeleton || e.skeleton === "text" ? (C(), v("div", Oe, [y("div", {
526
+ class: b(["bb-table-skeleton__cell", `bb-table-skeleton__cell--${e.skeleton ?? "text"}`])
527
+ }, [!e.skeleton || e.skeleton === "text" ? (S(), _("div", ke, [v("div", {
499
528
  class: "bb-table-skeleton__line",
500
- style: S({ width: `${$[(r + n) % 4]}%` })
501
- }, null, 4), y("div", {
529
+ style: x({ width: `${$[(r + n) % 4]}%` })
530
+ }, null, 4), v("div", {
502
531
  class: "bb-table-skeleton__line",
503
- style: S({ width: `${$[(r + n + 2) % 4]}%` })
504
- }, null, 4)])) : e.skeleton === "avatar" ? (C(), v("div", ke)) : e.skeleton === "avatar-text" ? (C(), v("div", Ae, [t[2] ||= y("div", { class: "bb-table-skeleton__avatar" }, null, -1), y("div", je, [y("div", {
532
+ style: x({ width: `${$[(r + n + 2) % 4]}%` })
533
+ }, null, 4)])) : e.skeleton === "avatar" ? (S(), _("div", Ae)) : e.skeleton === "avatar-text" ? (S(), _("div", je, [t[2] ||= v("div", { class: "bb-table-skeleton__avatar" }, null, -1), v("div", Me, [v("div", {
505
534
  class: "bb-table-skeleton__line",
506
- style: S({ width: `${$[(r + n) % 4]}%` })
507
- }, null, 4), y("div", {
535
+ style: x({ width: `${$[(r + n) % 4]}%` })
536
+ }, null, 4), v("div", {
508
537
  class: "bb-table-skeleton__line",
509
- style: S({ width: `${$[(r + n + 2) % 4]}%` })
510
- }, null, 4)])])) : e.skeleton === "image" ? (C(), v("div", Me)) : e.skeleton === "badge" ? (C(), v("div", Ne)) : _("", !0)], 2))), 128)),
511
- e.actions ? (C(), v("td", Pe, t[3] ||= [y("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : _("", !0)
512
- ], 8, Ee))), 128)), y("tr", {
513
- "aria-rowindex": q.value ? Gt.value + 2 : void 0,
538
+ style: x({ width: `${$[(r + n + 2) % 4]}%` })
539
+ }, null, 4)])])) : e.skeleton === "image" ? (S(), _("div", Ne)) : e.skeleton === "badge" ? (S(), _("div", Pe)) : g("", !0)], 2))), 128)),
540
+ e.actions ? (S(), _("td", Fe, t[3] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : g("", !0)
541
+ ], 8, De))), 128)), v("tr", {
542
+ "aria-rowindex": K.value ? Qt.value + 2 : void 0,
514
543
  class: "bb-table-loading__row bb-table-loading__row--sr-only"
515
- }, [y("td", {
516
- colspan: Tt.value,
544
+ }, [v("td", {
545
+ colspan: Nt.value,
517
546
  class: "bb-table-loading__cell",
518
547
  "aria-live": "polite",
519
548
  role: "status"
520
- }, [y("span", Le, D(e.loadingText), 1)], 8, Ie)], 8, Fe)]) : O(J).length ? E(e.$slots, "tbody", { key: 2 }, () => [(C(!0), v(h, null, T(It.value, (t) => (C(), v(h, { key: t.valueHash }, [y("tr", {
521
- "aria-rowindex": q.value && t.rowIndex ? t.rowIndex : void 0,
549
+ }, [v("span", Re, E(e.loadingText), 1)], 8, Le)], 8, Ie)]) : D(q).length ? T(e.$slots, "tbody", { key: 2 }, () => [(S(!0), _(m, null, w(Wt.value, (t) => (S(), _(m, { key: t.valueHash }, [v("tr", {
550
+ "aria-rowindex": K.value && t.rowIndex ? t.rowIndex : void 0,
522
551
  class: "bb-table-data__row",
523
552
  onClick: t.onRowClick,
524
553
  onContextmenu: t.onRowContextMenu,
525
554
  onDblclick: t.onRowDblClick
526
555
  }, [
527
- e.selectable ? (C(), v("td", {
556
+ e.selectable ? (S(), _("td", {
528
557
  key: 0,
529
- class: x(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
530
- }, [E(e.$slots, "select", {
531
- checked: Ht(t),
558
+ class: b(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
559
+ }, [T(e.$slots, "select", {
560
+ checked: Yt(t),
532
561
  disabled: !!t.disabled,
533
- inputName: O(qe),
562
+ inputName: D(Je),
534
563
  item: t.item,
535
564
  readonly: !!e.readonly,
536
565
  value: t.value
537
- }, () => [e.multiple ? (C(), v("label", {
566
+ }, () => [e.multiple ? (S(), _("label", {
538
567
  key: 0,
539
- class: x(["bb-table-check__label", { "bb-table-check__label--disabled": t.disabled }])
540
- }, [se(a, {
541
- checked: Ht(t),
568
+ class: b(["bb-table-check__label", { "bb-table-check__label--disabled": t.disabled }])
569
+ }, [ce(a, {
570
+ checked: Yt(t),
542
571
  class: "bb-table-check",
543
572
  disabled: t.disabled,
544
573
  readonly: e.readonly,
545
- onChange: () => Vt(t)
574
+ onChange: () => Jt(t)
546
575
  }, null, 8, [
547
576
  "checked",
548
577
  "disabled",
549
578
  "readonly",
550
579
  "onChange"
551
- ]), y("span", He, D(t.accessibleLabel), 1)], 2)) : (C(), v("label", {
580
+ ]), v("span", Ue, E(t.accessibleLabel), 1)], 2)) : (S(), _("label", {
552
581
  key: 1,
553
- class: x(["bb-table-radio__label", { "bb-table-radio__label--disabled": t.disabled }])
554
- }, [se(f, {
582
+ class: b(["bb-table-radio__label", { "bb-table-radio__label--disabled": t.disabled }])
583
+ }, [ce(f, {
555
584
  checked: t.selected,
556
585
  class: "bb-table-radio",
557
586
  disabled: t.disabled,
558
- name: O(qe),
587
+ name: D(Je),
559
588
  readonly: e.readonly,
560
589
  value: t.value,
561
- onChange: () => Vt(t)
590
+ onChange: () => Jt(t)
562
591
  }, null, 8, [
563
592
  "checked",
564
593
  "disabled",
@@ -566,53 +595,56 @@ var ve = {
566
595
  "readonly",
567
596
  "value",
568
597
  "onChange"
569
- ]), y("span", Ue, D(t.accessibleLabel), 1)], 2))])], 2)) : _("", !0),
570
- (C(!0), v(h, null, T(t.cols, (n) => (C(), v("td", {
598
+ ]), v("span", We, E(t.accessibleLabel), 1)], 2))])], 2)) : g("", !0),
599
+ (S(!0), _(m, null, w(t.cols, (n, r) => (S(), _("td", {
571
600
  key: n.key,
572
- class: x(["bb-table-data__cell", n.classes])
573
- }, [E(e.$slots, n.slotName, {
601
+ class: b(["bb-table-data__cell", [n.classes, {
602
+ "bb-table-data__cell--edge-start": r === 0,
603
+ "bb-table-data__cell--edge-end": r === t.cols.length - 1
604
+ }]])
605
+ }, [T(e.$slots, n.slotName, {
574
606
  classes: n.classes,
575
607
  content: n.content,
576
608
  expanded: t.expanded,
577
609
  item: t.item,
578
- expandProps: zt(t),
610
+ expandProps: Kt(t),
579
611
  toggleExpanded: () => Z(t.valueHash),
580
612
  value: t.value
581
- }, () => [oe(D(n.content), 1)])], 2))), 128)),
582
- e.actions ? (C(), v("td", {
613
+ }, () => [se(E(n.content), 1)])], 2))), 128)),
614
+ e.actions ? (S(), _("td", {
583
615
  key: 1,
584
- class: x(["bb-table__cell bb-table__cell--actions", e.tdClass])
585
- }, [E(e.$slots, "actions", {
616
+ class: b(["bb-table__cell bb-table__cell--actions", e.tdClass])
617
+ }, [T(e.$slots, "actions", {
586
618
  expanded: t.expanded,
587
619
  item: t.item,
588
- expandProps: zt(t),
620
+ expandProps: Kt(t),
589
621
  toggleExpanded: () => Z(t.valueHash),
590
622
  value: t.value
591
- })], 2)) : _("", !0)
592
- ], 40, Ve), t.expanded ? (C(), v("tr", {
623
+ })], 2)) : g("", !0)
624
+ ], 40, He), t.expanded ? (S(), _("tr", {
593
625
  key: 0,
594
- "aria-rowindex": q.value && t.rowIndex ? t.rowIndex + 1 : void 0,
626
+ "aria-rowindex": K.value && t.rowIndex ? t.rowIndex + 1 : void 0,
595
627
  id: `expanded_${t.valueHash}`,
596
628
  class: "bb-table-expand__row"
597
- }, [y("td", {
598
- colspan: Tt.value,
629
+ }, [v("td", {
630
+ colspan: Nt.value,
599
631
  class: "bb-table-expand__cell"
600
- }, [E(e.$slots, "expand", {
632
+ }, [T(e.$slots, "expand", {
601
633
  expanded: t.expanded,
602
634
  item: t.item,
603
- expandProps: zt(t),
635
+ expandProps: Kt(t),
604
636
  toggleExpanded: () => Z(t.valueHash),
605
637
  value: t.value
606
- })], 8, Ge)], 8, We)) : _("", !0)], 64))), 128))]) : E(e.$slots, "no-data", { key: 1 }, () => [y("tr", {
607
- "aria-rowindex": q.value ? 2 : void 0,
638
+ })], 8, Ke)], 8, Ge)) : g("", !0)], 64))), 128))]) : T(e.$slots, "no-data", { key: 1 }, () => [v("tr", {
639
+ "aria-rowindex": K.value ? 2 : void 0,
608
640
  class: "bb-table-no-data__row"
609
- }, [y("td", {
641
+ }, [v("td", {
610
642
  class: "bb-table-no-data__cell",
611
- colspan: Tt.value
612
- }, [y("span", Be, D(e.noDataText || O(M)("table.noDataText").value), 1)], 8, ze)], 8, Re)])]),
613
- y("tfoot", null, [E(e.$slots, "tfoot")])
643
+ colspan: Nt.value
644
+ }, [v("span", Ve, E(e.noDataText || D(j)("table.noDataText").value), 1)], 8, Be)], 8, ze)])]),
645
+ v("tfoot", null, [T(e.$slots, "tfoot")])
614
646
  ], 512),
615
- (C(!0), v(h, null, T(Wt.value, (e) => (C(), v("input", le({
647
+ (S(!0), _(m, null, w(Zt.value, (e) => (S(), _("input", ue({
616
648
  key: e.value,
617
649
  ref_for: !0
618
650
  }, e), null, 16))), 128))
@@ -629,4 +661,4 @@ var ve = {
629
661
  }
630
662
  });
631
663
  //#endregion
632
- export { Ke as default };
664
+ export { qe as default };