@slotted/react 0.1.0-beta.37 → 0.1.0-beta.39

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 (92) hide show
  1. package/dist/calendar-CX0wN5Bh.js +564 -0
  2. package/dist/calendar.js +1 -1
  3. package/dist/{data-grid-C5YmAqdN.js → data-grid-Cx0ZOf_e.js} +4 -4
  4. package/dist/data-grid.js +1 -1
  5. package/dist/{data-list-DovwQEMt.js → data-list-Cb2sNA6I.js} +218 -214
  6. package/dist/data-list.js +1 -1
  7. package/dist/{date-picker-DQbj3FON.js → date-picker-CLXTtQGe.js} +1 -1
  8. package/dist/date-picker.js +1 -1
  9. package/dist/{date-range-picker-B16hMhJf.js → date-range-picker-Br0neGyT.js} +1 -1
  10. package/dist/date-range-picker.js +1 -1
  11. package/dist/{datetime-picker-C9pxH7Xf.js → datetime-picker-CR-H_BLu.js} +1 -1
  12. package/dist/datetime-picker.js +1 -1
  13. package/dist/{datetime-range-picker-Cmn7o_Qv.js → datetime-range-picker-BLo58OIk.js} +1 -1
  14. package/dist/datetime-range-picker.js +1 -1
  15. package/dist/docs/calendar.json +44 -4
  16. package/dist/docs/calendar.md +7 -1
  17. package/dist/docs/dialog.json +1 -0
  18. package/dist/docs/dialog.md +1 -1
  19. package/dist/docs/drawer.json +1 -0
  20. package/dist/docs/drawer.md +1 -1
  21. package/dist/docs/list-item.json +1 -1
  22. package/dist/docs/message.json +15 -0
  23. package/dist/docs/message.md +2 -1
  24. package/dist/docs/section.json +1 -1
  25. package/dist/docs/table.json +12 -0
  26. package/dist/docs/table.md +2 -0
  27. package/dist/{filter-bar-Cfwk-3Eu.js → filter-bar-b8bRNPs9.js} +2 -2
  28. package/dist/filter-bar.js +1 -1
  29. package/dist/{import-export-center-BH1bNw_E.js → import-export-center-C_oNc-RM.js} +1 -1
  30. package/dist/import-export-center.js +1 -1
  31. package/dist/index.js +40 -40
  32. package/dist/{message-CdcUyh3g.js → message-D1Dd6Y2k.js} +6 -5
  33. package/dist/message.js +1 -1
  34. package/dist/roving-focus-BXshJYlW.js +149 -0
  35. package/dist/roving-focus.js +2 -2
  36. package/dist/styles/action-sheet.css +1 -1
  37. package/dist/styles/calendar.css +1 -1
  38. package/dist/styles/column-manager.css +1 -1
  39. package/dist/styles/command-palette.css +1 -1
  40. package/dist/styles/data-grid.css +1 -1
  41. package/dist/styles/data-list.css +1 -1
  42. package/dist/styles/date-picker.css +1 -1
  43. package/dist/styles/date-range-picker.css +1 -1
  44. package/dist/styles/datetime-picker.css +1 -1
  45. package/dist/styles/datetime-range-picker.css +1 -1
  46. package/dist/styles/detail-panel.css +1 -1
  47. package/dist/styles/dialog.css +1 -1
  48. package/dist/styles/drawer.css +1 -1
  49. package/dist/styles/event-calendar.css +1 -1
  50. package/dist/styles/filter-bar.css +2 -2
  51. package/dist/styles/import-export-center.css +2 -2
  52. package/dist/styles/index.css +7 -7
  53. package/dist/styles/list-item.css +1 -1
  54. package/dist/styles/media-viewer.css +1 -1
  55. package/dist/styles/message.css +1 -1
  56. package/dist/styles/section.css +1 -1
  57. package/dist/styles/table.css +2 -2
  58. package/dist/styles/upload.css +1 -1
  59. package/dist/styles.css +1 -1
  60. package/dist/{table-CnXBp9j9.js → table-DqwYPHGS.js} +353 -351
  61. package/dist/table.js +1 -1
  62. package/dist/types/calendar/calendar-day-cell.d.ts +30 -0
  63. package/dist/types/calendar/calendar-day-cell.d.ts.map +1 -0
  64. package/dist/types/calendar/calendar-month-table.d.ts +18 -0
  65. package/dist/types/calendar/calendar-month-table.d.ts.map +1 -0
  66. package/dist/types/calendar/calendar-periods.d.ts +24 -0
  67. package/dist/types/calendar/calendar-periods.d.ts.map +1 -0
  68. package/dist/types/calendar/calendar.d.ts +1 -1
  69. package/dist/types/calendar/calendar.d.ts.map +1 -1
  70. package/dist/types/calendar/calendar.types.d.ts +23 -0
  71. package/dist/types/calendar/calendar.types.d.ts.map +1 -1
  72. package/dist/types/calendar/index.d.ts +1 -1
  73. package/dist/types/calendar/index.d.ts.map +1 -1
  74. package/dist/types/data-list/data-list.d.ts.map +1 -1
  75. package/dist/types/message/message-parts.d.ts +1 -1
  76. package/dist/types/message/message-parts.d.ts.map +1 -1
  77. package/dist/types/message/message.types.d.ts +2 -0
  78. package/dist/types/message/message.types.d.ts.map +1 -1
  79. package/dist/types/roving-focus/index.d.ts +2 -0
  80. package/dist/types/roving-focus/index.d.ts.map +1 -1
  81. package/dist/types/roving-focus/roving-grid.d.ts +27 -0
  82. package/dist/types/roving-focus/roving-grid.d.ts.map +1 -0
  83. package/dist/types/table/index.d.ts +1 -1
  84. package/dist/types/table/index.d.ts.map +1 -1
  85. package/dist/types/table/table-defaults.d.ts.map +1 -1
  86. package/dist/types/table/table.d.ts +1 -1
  87. package/dist/types/table/table.d.ts.map +1 -1
  88. package/dist/types/table/table.types.d.ts +10 -0
  89. package/dist/types/table/table.types.d.ts.map +1 -1
  90. package/package.json +7 -6
  91. package/dist/calendar-D8FhdXWc.js +0 -537
  92. package/dist/roving-focus-C5-rVFzI.js +0 -89
@@ -41,7 +41,7 @@ function Be({ children: e, ...t }) {
41
41
  }
42
42
  //#endregion
43
43
  //#region src/data-list/data-list.tsx
44
- var Ve = "\0none", x = [
44
+ var Ve = "\0none", He = "var(--slotted-control-height-sm, 30px)", x = [
45
45
  "9rem",
46
46
  "7rem",
47
47
  "8rem",
@@ -54,14 +54,14 @@ var Ve = "\0none", x = [
54
54
  "5rem",
55
55
  "4.5rem",
56
56
  "6rem"
57
- ], He = (e) => e?.detail === 0 ? "keyboard" : "pointer";
58
- function Ue(e) {
57
+ ], Ue = (e) => e?.detail === 0 ? "keyboard" : "pointer";
58
+ function We(e) {
59
59
  return Array.isArray(e) ? e : e == null ? [] : [e];
60
60
  }
61
- function We(e, t) {
61
+ function Ge(e, t) {
62
62
  return e.length === t.length && e.every((e, n) => e === t[n]);
63
63
  }
64
- function Ge(e, t, n, r, i = {}) {
64
+ function Ke(e, t, n, r, i = {}) {
65
65
  let a = !1;
66
66
  return {
67
67
  value: e,
@@ -77,53 +77,53 @@ function Ge(e, t, n, r, i = {}) {
77
77
  }
78
78
  };
79
79
  }
80
- function Ke(e, t) {
80
+ function qe(e, t) {
81
81
  for (let n of e?.querySelectorAll("[data-ui=\"list-item\"][data-key]") ?? []) if (n.getAttribute("data-key") === t) return n;
82
82
  return null;
83
83
  }
84
- function qe(e) {
84
+ function Je(e) {
85
85
  return e?.querySelector("input:not(:disabled), a[href][data-part=\"title\"], button[data-part=\"title\"]:not(:disabled), button[data-part=\"more\"], [data-part=\"actions\"] :is(a[href], button:not(:disabled))") ?? null;
86
86
  }
87
- function Je({ activatable: ge, className: _e, columnState: je, columns: b, current: Be, defaultExpanded: Je, defaultQuery: Ye, defaultValue: Xe, disabledKeys: Ze, error: C, expanded: Qe, fields: $e, footer: et, hasMore: tt, href: nt, label: rt, labelledBy: it, loading: w = !1, loadingDelay: at, loadingKeys: ot, loadingMinDuration: st, locale: ct, messages: lt, mode: ut, onActivate: dt, onExpandedChange: ft, onLoadMore: pt, onQueryChange: mt, onRetry: ht, onValueChange: gt, query: _t, ref: vt, renderCell: yt, renderEmpty: bt, renderMedia: xt, rowKey: T, rows: E, selectionMode: St, size: Ct, skeletonRows: wt, subtitle: Tt, title: Et, totalCount: Dt, trailing: Ot, value: kt, variant: At, ...jt }) {
88
- let D = ze(), O = t(Ce, lt), Mt = e(), k = ct ?? Mt, Nt = O("true"), Pt = O("false"), A = Se(() => ({
89
- true: Nt,
90
- false: Pt
91
- }), [Nt, Pt]), j = At ?? D.variant, M = Ct ?? D.size, N = St ?? D.selectionMode, Ft = ut ?? (Dt === void 0 ? "client" : "server"), P = ye(), F = g(null), [It, Lt] = _(() => Ye ?? Oe()), I = _t ?? It, [Rt, zt] = _(() => Xe === void 0 ? N === "multiple" ? [] : null : Xe), Bt = kt === void 0 ? Rt : kt, [Vt, Ht] = _(() => Je ?? []), L = Qe ?? Vt, R = g(void 0), Ut = g(!1), z = g(!1);
92
- function Wt(e, t, n, r) {
93
- if (Ae(e, I)) return !1;
94
- let i = Ge(e, I, n, r, { change: t });
95
- return mt?.(e, i), !i.cancelled && (_t === void 0 && Lt(e), !0);
87
+ function Ye({ activatable: ge, className: _e, columnState: je, columns: b, current: Be, defaultExpanded: Ye, defaultQuery: Xe, defaultValue: Ze, disabledKeys: Qe, error: C, expanded: $e, fields: et, footer: tt, hasMore: nt, href: rt, label: it, labelledBy: at, loading: ot = !1, loadingDelay: st, loadingKeys: ct, loadingMinDuration: lt, locale: ut, messages: dt, mode: ft, onActivate: pt, onExpandedChange: mt, onLoadMore: ht, onQueryChange: gt, onRetry: _t, onValueChange: vt, query: yt, ref: bt, renderCell: xt, renderEmpty: St, renderMedia: Ct, rowKey: w, rows: T, selectionMode: wt, size: Tt, skeletonRows: Et, subtitle: Dt, title: Ot, totalCount: kt, trailing: At, value: jt, variant: Mt, ...Nt }) {
88
+ let E = ze(), D = t(Ce, dt), Pt = e(), O = ut ?? Pt, Ft = D("true"), It = D("false"), k = Se(() => ({
89
+ true: Ft,
90
+ false: It
91
+ }), [Ft, It]), A = Mt ?? E.variant, j = Tt ?? E.size, M = wt ?? E.selectionMode, Lt = ft ?? (kt === void 0 ? "client" : "server"), N = ye(), P = g(null), [Rt, zt] = _(() => Xe ?? Oe()), F = yt ?? Rt, [Bt, Vt] = _(() => Ze === void 0 ? M === "multiple" ? [] : null : Ze), Ht = jt === void 0 ? Bt : jt, [Ut, Wt] = _(() => Ye ?? []), I = $e ?? Ut, L = g(void 0), Gt = g(!1), R = g(!1);
92
+ function Kt(e, t, n, r) {
93
+ if (Ae(e, F)) return !1;
94
+ let i = Ke(e, F, n, r, { change: t });
95
+ return gt?.(e, i), !i.cancelled && (yt === void 0 && zt(e), !0);
96
96
  }
97
- function B(e, t, n) {
98
- if (We(Ue(e), Ue(Bt))) return;
99
- let r = Ge(e, Bt, t, n);
100
- gt?.(e, r), !r.cancelled && kt === void 0 && zt(e);
97
+ function z(e, t, n) {
98
+ if (Ge(We(e), We(Ht))) return;
99
+ let r = Ke(e, Ht, t, n);
100
+ vt?.(e, r), !r.cancelled && jt === void 0 && Vt(e);
101
101
  }
102
- function Gt(e, t, n) {
103
- let r = L.includes(e) ? L.filter((t) => t !== e) : [...L, e], i = Ge(r, L, t, n, { key: e });
104
- ft?.(r, i), !i.cancelled && Qe === void 0 && Ht(r);
102
+ function qt(e, t, n) {
103
+ let r = I.includes(e) ? I.filter((t) => t !== e) : [...I, e], i = Ke(r, I, t, n, { key: e });
104
+ mt?.(r, i), !i.cancelled && $e === void 0 && Wt(r);
105
105
  }
106
- let V = Se(() => typeof T == "function" ? T : (e) => String(e[T]), [T]), H = Ie(b, {
107
- title: Et,
108
- subtitle: Tt,
109
- trailing: Ot,
110
- fields: $e ?? D.fields,
106
+ let B = Se(() => typeof w == "function" ? w : (e) => String(e[w]), [w]), V = Ie(b, {
107
+ title: Ot,
108
+ subtitle: Dt,
109
+ trailing: At,
110
+ fields: et ?? E.fields,
111
111
  columnState: je
112
- }), U = Se(() => {
113
- if (Ft === "server") return {
114
- nodes: E.map((e, t) => ({
112
+ }), H = Se(() => {
113
+ if (Lt === "server") return {
114
+ nodes: T.map((e, t) => ({
115
115
  kind: "row",
116
- key: V(e),
116
+ key: B(e),
117
117
  row: e,
118
118
  index: t
119
119
  })),
120
- visible: E,
121
- total: Dt ?? E.length
120
+ visible: T,
121
+ total: kt ?? T.length
122
122
  };
123
- let e = Ee(E, b, I, {
124
- rowKey: V,
125
- locale: k,
126
- booleans: A
123
+ let e = Ee(T, b, F, {
124
+ rowKey: B,
125
+ locale: O,
126
+ booleans: k
127
127
  });
128
128
  return {
129
129
  nodes: Pe(e.nodes),
@@ -131,95 +131,95 @@ function Je({ activatable: ge, className: _e, columnState: je, columns: b, curre
131
131
  total: e.total
132
132
  };
133
133
  }, [
134
- A,
135
- b,
136
- V,
137
134
  k,
138
- Ft,
139
- I,
140
- E,
141
- Dt
142
- ]), Kt = U.nodes, W = Ne(Kt), G = new Set(Ze ?? []), qt = new Set(ot ?? []), K = Ue(Bt), q = new Set(K), J = w && E.length === 0, [Jt, Yt] = _(J);
135
+ b,
136
+ B,
137
+ O,
138
+ Lt,
139
+ F,
140
+ T,
141
+ kt
142
+ ]), Jt = H.nodes, U = Ne(Jt), W = new Set(Qe ?? []), Yt = new Set(ct ?? []), G = We(Ht), K = new Set(G), q = ot && T.length === 0, [Xt, Zt] = _(q);
143
143
  ve(() => {
144
- J && Yt(!0);
145
- }, [J]);
146
- let Y = J || Jt, Xt = Y ? null : C && E.length === 0 ? "error" : W.length > 0 ? null : E.length === 0 && !ke(I) ? "empty" : "no-results";
147
- function Zt(e) {
148
- Te(F.current?.ownerDocument).announce(e);
144
+ q && Zt(!0);
145
+ }, [q]);
146
+ let J = q || Xt, Qt = J ? null : C && T.length === 0 ? "error" : U.length > 0 ? null : T.length === 0 && !ke(F) ? "empty" : "no-results";
147
+ function $t(e) {
148
+ Te(P.current?.ownerDocument).announce(e);
149
149
  }
150
- let X = I.sort[0], Qt = X ? b.find((e) => e.id === X.column) ?? null : null;
151
- function $t(e, t, n) {
152
- (Wt(e, "sort", t, n) || _t !== void 0) && Zt(e.sort.length === 0 ? O("sortCleared") : O("sortedBy", { order: Fe(e.sort, b, O) }));
150
+ let Y = F.sort[0], en = Y ? b.find((e) => e.id === Y.column) ?? null : null;
151
+ function tn(e, t, n) {
152
+ (Kt(e, "sort", t, n) || yt !== void 0) && $t(e.sort.length === 0 ? D("sortCleared") : D("sortedBy", { order: Fe(e.sort, b, D) }));
153
153
  }
154
- let en = W.filter((e) => !G.has(e)), Z = Ft === "client" ? U.visible.map(V).filter((e) => !G.has(e)) : en, Q = Z.length > 0 && Z.every((e) => q.has(e)), tn = Z.some((e) => q.has(e));
155
- function nn(e, t, n, r) {
156
- if (!(N === "none" || G.has(e))) {
157
- if (N === "single") {
158
- B(q.has(e) ? null : e, n, r), R.current = e;
154
+ let nn = U.filter((e) => !W.has(e)), X = Lt === "client" ? H.visible.map(B).filter((e) => !W.has(e)) : nn, Z = X.length > 0 && X.every((e) => K.has(e)), rn = X.some((e) => K.has(e));
155
+ function an(e, t, n, r) {
156
+ if (!(M === "none" || W.has(e))) {
157
+ if (M === "single") {
158
+ z(K.has(e) ? null : e, n, r), L.current = e;
159
159
  return;
160
160
  }
161
- if (t && R.current !== void 0) {
161
+ if (t && L.current !== void 0) {
162
162
  let t = we({
163
163
  action: "range",
164
164
  mode: "multiple",
165
- selected: K,
166
- keys: en,
165
+ selected: G,
166
+ keys: nn,
167
167
  key: e,
168
- anchor: R.current,
169
- disabled: (e) => G.has(e)
168
+ anchor: L.current,
169
+ disabled: (e) => W.has(e)
170
170
  });
171
- B([...K.filter((e) => !en.includes(e)), ...t.selected], "select", r);
171
+ z([...G.filter((e) => !nn.includes(e)), ...t.selected], "select", r);
172
172
  return;
173
173
  }
174
- R.current = e, B(q.has(e) ? K.filter((t) => t !== e) : [...K, e], n, r);
174
+ L.current = e, z(K.has(e) ? G.filter((t) => t !== e) : [...G, e], n, r);
175
175
  }
176
176
  }
177
- function rn(e) {
178
- let t = new Set(Z);
179
- B(Q ? K.filter((e) => !t.has(e)) : [...K, ...Z.filter((e) => !q.has(e))], Q ? "clear" : "select", e);
177
+ function on(e) {
178
+ let t = new Set(X);
179
+ z(Z ? G.filter((e) => !t.has(e)) : [...G, ...X.filter((e) => !K.has(e))], Z ? "clear" : "select", e);
180
180
  }
181
- let an = g(null), on = g(W);
181
+ let Q = g(null), sn = g(U);
182
182
  xe(() => {
183
- let e = on.current;
184
- on.current = W;
185
- let t = an.current;
186
- if (t === null || W.includes(t)) return;
187
- let n = F.current, r = n?.ownerDocument.activeElement;
183
+ let e = sn.current;
184
+ sn.current = U;
185
+ let t = Q.current;
186
+ if (t === null || U.includes(t)) return;
187
+ let n = P.current, r = n?.ownerDocument.activeElement;
188
188
  if (r && r !== n?.ownerDocument.body && n?.contains(r)) return;
189
- let i = e.indexOf(t), a = e.slice(i + 1).find((e) => W.includes(e)), o = e.slice(0, Math.max(i, 0)).reverse().find((e) => W.includes(e)), s = a ?? o;
190
- an.current = s ?? null, s === void 0 ? n?.querySelector("[data-part=\"empty\"] [data-ui=\"result-state\"]")?.focus() : qe(Ke(n ?? null, s))?.focus();
189
+ let i = e.indexOf(t), a = e.slice(i + 1).find((e) => U.includes(e)), o = e.slice(0, Math.max(i, 0)).reverse().find((e) => U.includes(e)), s = a ?? o;
190
+ Q.current = s ?? null, s === void 0 ? n?.querySelector("[data-part=\"empty\"] [data-ui=\"result-state\"]")?.focus() : Je(qe(n ?? null, s))?.focus();
191
191
  });
192
- function sn(e) {
192
+ function cn(e) {
193
193
  return () => {
194
- an.current = e;
194
+ Q.current = e;
195
195
  };
196
196
  }
197
- function cn(e) {
198
- jt.onBlur?.(e);
197
+ function ln(e) {
198
+ Nt.onBlur?.(e);
199
199
  let t = e.relatedTarget;
200
- t !== null && (F.current?.contains(t) || (an.current = null));
200
+ t !== null && (P.current?.contains(t) || (Q.current = null));
201
201
  }
202
- be(vt, () => ({
202
+ be(bt, () => ({
203
203
  get root() {
204
- return F.current;
204
+ return P.current;
205
205
  },
206
206
  focus() {
207
- let e = F.current, t = qe(e?.querySelector("[data-ui=\"list-item\"][data-key]") ?? null);
207
+ let e = P.current, t = Je(e?.querySelector("[data-ui=\"list-item\"][data-key]") ?? null);
208
208
  t ? t.focus() : e?.querySelector("[data-part=\"empty\"] [data-ui=\"result-state\"]")?.focus();
209
209
  },
210
210
  focusKey(e) {
211
- let t = qe(Ke(F.current, e));
211
+ let t = Je(qe(P.current, e));
212
212
  return t?.focus(), t !== null;
213
213
  },
214
214
  scrollToKey(e) {
215
- let t = Ke(F.current, e);
215
+ let t = qe(P.current, e);
216
216
  return t?.scrollIntoView({ block: "nearest" }), t !== null;
217
217
  }
218
218
  }), []);
219
219
  function $(e, t, n, r) {
220
220
  let i = Me(e, t, {
221
- locale: k,
222
- booleans: A
221
+ locale: O,
222
+ booleans: k
223
223
  }), a = {
224
224
  column: e,
225
225
  row: t,
@@ -227,29 +227,29 @@ function Je({ activatable: ge, className: _e, columnState: je, columns: b, curre
227
227
  value: De(e, t),
228
228
  text: i ?? "",
229
229
  place: r
230
- }, o = yt?.(a);
230
+ }, o = xt?.(a);
231
231
  return o === void 0 ? i === null ? /* @__PURE__ */ y("span", {
232
232
  "data-part": "field-empty",
233
233
  "data-part-field-empty": "",
234
234
  children: [/* @__PURE__ */ v("span", {
235
235
  "aria-hidden": "true",
236
236
  children: "—"
237
- }), /* @__PURE__ */ v(p, { children: O("empty") })]
237
+ }), /* @__PURE__ */ v(p, { children: D("empty") })]
238
238
  }) : i : o;
239
239
  }
240
- function ln(e, t) {
241
- let i = G.has(e), a = qt.has(e), o = N !== "none" && q.has(e), s = Be != null && Be === e, c = L.includes(e), l = `${P}-${e}-fields`, ee = H.title ? Me(H.title, t, {
242
- locale: k,
243
- booleans: A
244
- }) ?? "" : e, u = c ? H.fields : H.fields.slice(0, H.shown), d = H.fields.length - H.shown, f = nt?.(t), p = i || a, m = H.title ? $(H.title, t, e, "title") : e, ne;
240
+ function un(e, t) {
241
+ let i = W.has(e), a = Yt.has(e), o = M !== "none" && K.has(e), s = Be != null && Be === e, c = I.includes(e), l = `${N}-${e}-fields`, ee = V.title ? Me(V.title, t, {
242
+ locale: O,
243
+ booleans: k
244
+ }) ?? "" : e, u = c ? V.fields : V.fields.slice(0, V.shown), d = V.fields.length - V.shown, f = rt?.(t), p = i || a, m = V.title ? $(V.title, t, e, "title") : e, ne;
245
245
  ne = f === void 0 ? ge === !0 ? /* @__PURE__ */ v("button", {
246
246
  "data-part": "title",
247
247
  "data-part-title": "",
248
248
  disabled: p,
249
- onClick: (n) => dt?.({
249
+ onClick: (n) => pt?.({
250
250
  key: e,
251
251
  row: t,
252
- reason: He(n),
252
+ reason: Ue(n),
253
253
  event: n
254
254
  }),
255
255
  type: "button",
@@ -268,16 +268,16 @@ function Je({ activatable: ge, className: _e, columnState: je, columns: b, curre
268
268
  n.preventDefault();
269
269
  return;
270
270
  }
271
- dt?.({
271
+ pt?.({
272
272
  key: e,
273
273
  row: t,
274
- reason: He(n),
274
+ reason: Ue(n),
275
275
  event: n
276
276
  });
277
277
  },
278
278
  children: m
279
279
  });
280
- let h = xt?.(t), re = N !== "none" || h !== void 0;
280
+ let h = Ct?.(t), re = M !== "none" || h !== void 0;
281
281
  return /* @__PURE__ */ y(se, {
282
282
  align: "start",
283
283
  current: s ? f === void 0 || "page" : !1,
@@ -285,34 +285,34 @@ function Je({ activatable: ge, className: _e, columnState: je, columns: b, curre
285
285
  "data-key": e,
286
286
  disabled: i,
287
287
  loading: a,
288
- onFocus: sn(e),
288
+ onFocus: cn(e),
289
289
  selected: o,
290
- size: M,
291
- variant: j,
290
+ size: j,
291
+ variant: A,
292
292
  children: [/* @__PURE__ */ y(le, { children: [
293
- re ? /* @__PURE__ */ y(fe, { children: [N === "none" ? null : /* @__PURE__ */ v("span", {
293
+ re ? /* @__PURE__ */ y(fe, { children: [M === "none" ? null : /* @__PURE__ */ v("span", {
294
294
  "data-part": "selection",
295
295
  "data-part-selection": "",
296
296
  children: /* @__PURE__ */ v(te, {
297
- "aria-label": O("selectRow", { title: ee }),
297
+ "aria-label": D("selectRow", { title: ee }),
298
298
  checked: o,
299
299
  disabled: i,
300
- onCheckedChange: (t, n) => nn(e, Ut.current, n.reason, n.source),
300
+ onCheckedChange: (t, n) => an(e, Gt.current, n.reason, n.source),
301
301
  onClick: (e) => {
302
- Ut.current = e.shiftKey;
302
+ Gt.current = e.shiftKey;
303
303
  },
304
- size: M
304
+ size: j
305
305
  })
306
306
  }), h === void 0 ? null : /* @__PURE__ */ v("span", {
307
307
  "data-part": "media",
308
308
  "data-part-media": "",
309
309
  children: h
310
310
  })] }) : null,
311
- /* @__PURE__ */ y(ue, { children: [/* @__PURE__ */ v(oe, { children: ne }), H.subtitle ? /* @__PURE__ */ v(de, { children: $(H.subtitle, t, e, "subtitle") }) : null] }),
312
- H.trailing ? /* @__PURE__ */ v(ce, { children: /* @__PURE__ */ v("span", {
311
+ /* @__PURE__ */ y(ue, { children: [/* @__PURE__ */ v(oe, { children: ne }), V.subtitle ? /* @__PURE__ */ v(de, { children: $(V.subtitle, t, e, "subtitle") }) : null] }),
312
+ V.trailing ? /* @__PURE__ */ v(ce, { children: /* @__PURE__ */ v("span", {
313
313
  "data-part": "trailing",
314
314
  "data-part-trailing": "",
315
- children: $(H.trailing, t, e, "trailing")
315
+ children: $(V.trailing, t, e, "trailing")
316
316
  }) }) : null,
317
317
  u.length > 0 ? /* @__PURE__ */ v("dl", {
318
318
  "data-part": "fields",
@@ -338,35 +338,35 @@ function Je({ activatable: ge, className: _e, columnState: je, columns: b, curre
338
338
  "aria-expanded": c,
339
339
  "data-part": "more",
340
340
  "data-part-more": "",
341
- onClick: (t) => Gt(e, He(t), t),
341
+ onClick: (t) => qt(e, Ue(t), t),
342
342
  type: "button",
343
- children: [c ? O("less") : O("more", { count: d }), /* @__PURE__ */ v(r, {
343
+ children: [c ? D("less") : D("more", { count: d }), /* @__PURE__ */ v(r, {
344
344
  size: "sm",
345
345
  children: /* @__PURE__ */ v(n, { name: "chevron-down" })
346
346
  })]
347
347
  }) : null
348
- ] }), H.actions.length > 0 ? /* @__PURE__ */ v(pe, { children: H.actions.map((n) => /* @__PURE__ */ v(he, { children: $(n, t, e, "actions") }, n.id)) }) : null]
348
+ ] }), V.actions.length > 0 ? /* @__PURE__ */ v(pe, { children: V.actions.map((n) => /* @__PURE__ */ v(he, { children: $(n, t, e, "actions") }, n.id)) }) : null]
349
349
  }, e);
350
350
  }
351
- function un(e) {
351
+ function dn(e) {
352
352
  return e.map((e) => {
353
- if (e.kind === "row") return ln(e.key, e.row);
353
+ if (e.kind === "row") return un(e.key, e.row);
354
354
  let t = b.find((t) => t.id === e.column);
355
355
  return /* @__PURE__ */ v(ie, {
356
- label: `${t?.label ?? e.column}: ${e.text} · ${new Intl.NumberFormat(k).format(e.count)}`,
356
+ label: `${t?.label ?? e.column}: ${e.text} · ${new Intl.NumberFormat(O).format(e.count)}`,
357
357
  level: String(Math.min(e.level + 2, 6)),
358
- children: un(e.children)
358
+ children: dn(e.children)
359
359
  }, e.key);
360
360
  });
361
361
  }
362
- let dn = N !== "none" && K.length > 0 ? O("selectedCount", {
363
- selected: K.length,
364
- count: U.total
365
- }) : O("count", { count: U.total }), fn = /* @__PURE__ */ v(c, { render: ({ ref: e, ...t }) => /* @__PURE__ */ v(u, {
362
+ let fn = M !== "none" && G.length > 0 ? D("selectedCount", {
363
+ selected: G.length,
364
+ count: H.total
365
+ }) : D("count", { count: H.total }), pn = /* @__PURE__ */ v(c, { render: ({ ref: e, ...t }) => /* @__PURE__ */ v(u, {
366
366
  ...t,
367
- "aria-label": X ? O("sortNamed", { order: Fe(I.sort, b, O) }) : O("sort"),
368
- disabled: Y,
369
- end: X ? /* @__PURE__ */ v(r, {
367
+ "aria-label": Y ? D("sortNamed", { order: Fe(F.sort, b, D) }) : D("sort"),
368
+ disabled: J,
369
+ end: Y ? /* @__PURE__ */ v(r, {
370
370
  size: "sm",
371
371
  children: /* @__PURE__ */ v(n, { name: "chevron-down" })
372
372
  }) : /* @__PURE__ */ v("span", {}),
@@ -374,55 +374,55 @@ function Je({ activatable: ge, className: _e, columnState: je, columns: b, curre
374
374
  size: "sm",
375
375
  tone: "secondary",
376
376
  variant: "ghost",
377
- children: Qt ? O("sortSummary", {
378
- column: Qt.label,
379
- more: I.sort.length - 1
380
- }) : O("sort")
381
- }) }), pn = /* @__PURE__ */ y("div", {
377
+ children: en ? D("sortSummary", {
378
+ column: en.label,
379
+ more: F.sort.length - 1
380
+ }) : D("sort")
381
+ }) }), mn = /* @__PURE__ */ y("div", {
382
382
  "data-part": "header",
383
383
  "data-part-header": "",
384
384
  children: [
385
- N === "multiple" && !Y ? /* @__PURE__ */ v("span", {
385
+ M === "multiple" && !J ? /* @__PURE__ */ v("span", {
386
386
  "data-part": "select-all",
387
387
  "data-part-select-all": "",
388
388
  children: /* @__PURE__ */ v(te, {
389
- "aria-label": O("selectAll", { count: Z.length }),
390
- checked: Q,
391
- disabled: Z.length === 0,
392
- indeterminate: tn && !Q,
393
- onCheckedChange: (e, t) => rn(t.source),
394
- size: M
389
+ "aria-label": D("selectAll", { count: X.length }),
390
+ checked: Z,
391
+ disabled: X.length === 0,
392
+ indeterminate: rn && !Z,
393
+ onCheckedChange: (e, t) => on(t.source),
394
+ size: j
395
395
  })
396
396
  }) : null,
397
397
  /* @__PURE__ */ v("output", {
398
398
  "aria-live": "polite",
399
399
  "data-part": "count",
400
400
  "data-part-count": "",
401
- children: Y ? "" : dn
401
+ children: J ? "" : fn
402
402
  }),
403
- H.sortable.length > 0 ? /* @__PURE__ */ v("span", {
404
- "data-direction": X?.direction,
403
+ V.sortable.length > 0 ? /* @__PURE__ */ v("span", {
404
+ "data-direction": Y?.direction,
405
405
  "data-part": "sort",
406
406
  "data-part-sort": "",
407
407
  children: /* @__PURE__ */ y(i, {
408
408
  align: "end",
409
- children: [fn, /* @__PURE__ */ y(ee, {
410
- "aria-label": O("sort"),
409
+ children: [pn, /* @__PURE__ */ y(ee, {
410
+ "aria-label": D("sort"),
411
411
  children: [
412
412
  /* @__PURE__ */ y(s, {
413
- "aria-labelledby": `${P}-sort-column`,
414
- onValueChange: (e, t) => $t(Le(I, e === Ve ? null : e), t.reason, t.source),
415
- value: X?.column ?? Ve,
413
+ "aria-labelledby": `${N}-sort-column`,
414
+ onValueChange: (e, t) => tn(Le(F, e === Ve ? null : e), t.reason, t.source),
415
+ value: Y?.column ?? Ve,
416
416
  children: [
417
417
  /* @__PURE__ */ v(l, {
418
- id: `${P}-sort-column`,
419
- children: O("sortColumn")
418
+ id: `${N}-sort-column`,
419
+ children: D("sortColumn")
420
420
  }),
421
421
  /* @__PURE__ */ v(o, {
422
422
  value: Ve,
423
- children: O("sortNone")
423
+ children: D("sortNone")
424
424
  }),
425
- H.sortable.map((e) => /* @__PURE__ */ v(o, {
425
+ V.sortable.map((e) => /* @__PURE__ */ v(o, {
426
426
  value: e.id,
427
427
  children: e.label
428
428
  }, e.id))
@@ -430,23 +430,23 @@ function Je({ activatable: ge, className: _e, columnState: je, columns: b, curre
430
430
  }),
431
431
  /* @__PURE__ */ v(a, {}),
432
432
  /* @__PURE__ */ y(s, {
433
- "aria-labelledby": `${P}-sort-direction`,
434
- onValueChange: (e, t) => $t(Re(I, e), t.reason, t.source),
435
- value: X?.direction ?? "",
433
+ "aria-labelledby": `${N}-sort-direction`,
434
+ onValueChange: (e, t) => tn(Re(F, e), t.reason, t.source),
435
+ value: Y?.direction ?? "",
436
436
  children: [
437
437
  /* @__PURE__ */ v(l, {
438
- id: `${P}-sort-direction`,
439
- children: O("sortDirection")
438
+ id: `${N}-sort-direction`,
439
+ children: D("sortDirection")
440
440
  }),
441
441
  /* @__PURE__ */ v(o, {
442
- disabled: !X,
442
+ disabled: !Y,
443
443
  value: "ascending",
444
- children: O("ascending")
444
+ children: D("ascending")
445
445
  }),
446
446
  /* @__PURE__ */ v(o, {
447
- disabled: !X,
447
+ disabled: !Y,
448
448
  value: "descending",
449
- children: O("descending")
449
+ children: D("descending")
450
450
  })
451
451
  ]
452
452
  })
@@ -455,31 +455,31 @@ function Je({ activatable: ge, className: _e, columnState: je, columns: b, curre
455
455
  })
456
456
  }) : null
457
457
  ]
458
- }), mn = wt ?? D.skeletonRows, hn = Y ? /* @__PURE__ */ v("div", {
458
+ }), hn = Et ?? E.skeletonRows, gn = J ? /* @__PURE__ */ v("div", {
459
459
  "data-part": "loader",
460
460
  "data-part-loader": "",
461
461
  children: /* @__PURE__ */ v(f, {
462
- delay: at ?? D.loadingDelay,
463
- messages: { label: O("loading") },
464
- loading: J,
465
- minDuration: st ?? D.loadingMinDuration,
466
- onReveal: () => Yt(!1),
462
+ delay: st ?? E.loadingDelay,
463
+ messages: { label: D("loading") },
464
+ loading: q,
465
+ minDuration: lt ?? E.loadingMinDuration,
466
+ onReveal: () => Zt(!1),
467
467
  children: /* @__PURE__ */ v(ae, {
468
468
  "aria-hidden": !0,
469
469
  inert: !0,
470
- size: M,
471
- variant: j,
472
- children: Array.from({ length: mn }, (e, t) => /* @__PURE__ */ v(se, {
470
+ size: j,
471
+ variant: A,
472
+ children: Array.from({ length: hn }, (e, t) => /* @__PURE__ */ y(se, {
473
473
  align: "start",
474
- size: M,
475
- variant: j,
476
- children: /* @__PURE__ */ y(le, { children: [
477
- /* @__PURE__ */ y(ue, { children: [/* @__PURE__ */ v(oe, { children: /* @__PURE__ */ v(d, { inlineSize: x[t % x.length] }) }), H.subtitle ? /* @__PURE__ */ v(de, { children: /* @__PURE__ */ v(d, { inlineSize: x[(t + 2) % x.length] }) }) : null] }),
478
- H.trailing ? /* @__PURE__ */ v(ce, { children: /* @__PURE__ */ v(d, { inlineSize: S[(t + 3) % S.length] }) }) : null,
479
- H.shown > 0 ? /* @__PURE__ */ v("dl", {
474
+ size: j,
475
+ variant: A,
476
+ children: [/* @__PURE__ */ y(le, { children: [
477
+ /* @__PURE__ */ y(ue, { children: [/* @__PURE__ */ v(oe, { children: /* @__PURE__ */ v(d, { inlineSize: x[t % x.length] }) }), V.subtitle ? /* @__PURE__ */ v(de, { children: /* @__PURE__ */ v(d, { inlineSize: x[(t + 2) % x.length] }) }) : null] }),
478
+ V.trailing ? /* @__PURE__ */ v(ce, { children: /* @__PURE__ */ v(d, { inlineSize: S[(t + 3) % S.length] }) }) : null,
479
+ V.shown > 0 ? /* @__PURE__ */ v("dl", {
480
480
  "data-part": "fields",
481
481
  "data-part-fields": "",
482
- children: H.fields.slice(0, H.shown).map((e, n) => /* @__PURE__ */ y("div", {
482
+ children: V.fields.slice(0, V.shown).map((e, n) => /* @__PURE__ */ y("div", {
483
483
  "data-part": "field",
484
484
  "data-part-field": "",
485
485
  children: [/* @__PURE__ */ v("dt", {
@@ -493,19 +493,23 @@ function Je({ activatable: ge, className: _e, columnState: je, columns: b, curre
493
493
  })]
494
494
  }, e.id))
495
495
  }) : null
496
- ] })
496
+ ] }), V.actions.length > 0 ? /* @__PURE__ */ v(pe, { children: V.actions.map((e) => /* @__PURE__ */ v(d, {
497
+ blockSize: He,
498
+ inlineSize: He,
499
+ shape: "block"
500
+ }, e.id)) }) : null]
497
501
  }, t))
498
502
  })
499
503
  })
500
504
  }) : null;
501
- function gn(e) {
502
- let t = bt?.(e);
505
+ function _n(e) {
506
+ let t = St?.(e);
503
507
  if (t !== void 0) return /* @__PURE__ */ v("div", {
504
508
  "data-part": "empty",
505
509
  "data-part-empty": "",
506
510
  children: t
507
511
  });
508
- let n = e === "error" ? typeof C == "string" ? C : O("errorTitle") : O(e === "no-results" ? "noResultsTitle" : "emptyTitle");
512
+ let n = e === "error" ? typeof C == "string" ? C : D("errorTitle") : D(e === "no-results" ? "noResultsTitle" : "emptyTitle");
509
513
  return /* @__PURE__ */ v("div", {
510
514
  "data-part": "empty",
511
515
  "data-part-empty": "",
@@ -514,74 +518,74 @@ function Je({ activatable: ge, className: _e, columnState: je, columns: b, curre
514
518
  status: e,
515
519
  tabIndex: -1,
516
520
  children: [/* @__PURE__ */ v(h, { children: /* @__PURE__ */ v(ne, { children: n }) }), e === "no-results" ? /* @__PURE__ */ v(m, { children: /* @__PURE__ */ v(u, {
517
- onClick: (e) => Wt({
518
- ...I,
521
+ onClick: (e) => Kt({
522
+ ...F,
519
523
  filter: null,
520
524
  search: "",
521
- page: I.page && "index" in I.page ? {
522
- ...I.page,
525
+ page: F.page && "index" in F.page ? {
526
+ ...F.page,
523
527
  index: 0
524
- } : I.page
528
+ } : F.page
525
529
  }, "filter", "clear", e),
526
530
  size: "md",
527
531
  tone: "secondary",
528
532
  variant: "outline",
529
- children: O("clearFilters")
530
- }) }) : e === "error" && ht ? /* @__PURE__ */ v(m, { children: /* @__PURE__ */ v(u, {
531
- onClick: () => ht(),
533
+ children: D("clearFilters")
534
+ }) }) : e === "error" && _t ? /* @__PURE__ */ v(m, { children: /* @__PURE__ */ v(u, {
535
+ onClick: () => _t(),
532
536
  size: "md",
533
537
  tone: "secondary",
534
538
  variant: "outline",
535
- children: O("retry")
539
+ children: D("retry")
536
540
  }) }) : null]
537
541
  })
538
542
  });
539
543
  }
540
- w || (z.current = !1);
541
- let _n = w && !Y && E.length > 0 && !z.current, vn = C && E.length > 0 && !Y;
544
+ ot || (R.current = !1);
545
+ let vn = ot && !J && T.length > 0 && !R.current, yn = C && T.length > 0 && !J;
542
546
  return /* @__PURE__ */ y("div", {
543
- ...me(jt, "part", "root"),
544
- "aria-busy": _n || void 0,
547
+ ...me(Nt, "part", "root"),
548
+ "aria-busy": vn || void 0,
545
549
  className: _e,
546
- "data-loading": _n ? "" : void 0,
547
- "data-size": M,
550
+ "data-loading": vn ? "" : void 0,
551
+ "data-size": j,
548
552
  "data-ui": "data-list",
549
553
  "data-ui-data-list": "",
550
- "data-variant": j,
551
- onBlur: cn,
552
- ref: F,
554
+ "data-variant": A,
555
+ onBlur: ln,
556
+ ref: P,
553
557
  children: [
554
- pn,
555
- vn ? gn("error") : null,
556
- hn,
557
- Y || Xt !== null ? null : /* @__PURE__ */ v(ae, {
558
- "aria-label": it === void 0 ? rt : void 0,
559
- "aria-labelledby": it,
560
- size: M,
561
- variant: j,
562
- children: un(Kt)
558
+ mn,
559
+ yn ? _n("error") : null,
560
+ gn,
561
+ J || Qt !== null ? null : /* @__PURE__ */ v(ae, {
562
+ "aria-label": at === void 0 ? it : void 0,
563
+ "aria-labelledby": at,
564
+ size: j,
565
+ variant: A,
566
+ children: dn(Jt)
563
567
  }),
564
- Xt === null ? null : gn(Xt),
565
- tt || et !== void 0 ? /* @__PURE__ */ y("div", {
568
+ Qt === null ? null : _n(Qt),
569
+ nt || tt !== void 0 ? /* @__PURE__ */ y("div", {
566
570
  "data-part": "footer",
567
571
  "data-part-footer": "",
568
- children: [tt && !Y ? /* @__PURE__ */ v("span", {
572
+ children: [nt && !J ? /* @__PURE__ */ v("span", {
569
573
  "data-part": "load-more",
570
574
  "data-part-load-more": "",
571
575
  children: /* @__PURE__ */ v(u, {
572
- loading: w && z.current,
576
+ loading: ot && R.current,
573
577
  onClick: () => {
574
- z.current = !0, pt?.();
578
+ R.current = !0, ht?.();
575
579
  },
576
580
  size: "sm",
577
581
  tone: "secondary",
578
582
  variant: "outline",
579
- children: O("loadMore")
583
+ children: D("loadMore")
580
584
  })
581
- }) : null, et]
585
+ }) : null, tt]
582
586
  }) : null
583
587
  ]
584
588
  });
585
589
  }
586
590
  //#endregion
587
- export { Be as n, ze as r, Je as t };
591
+ export { Be as n, ze as r, Ye as t };