@slotted/react 0.1.0-beta.38 → 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.
- package/dist/{calendar-CE3aMhdR.js → calendar-CX0wN5Bh.js} +5 -9
- package/dist/calendar.js +1 -1
- package/dist/{data-grid-BKuD1dvr.js → data-grid-Cx0ZOf_e.js} +4 -4
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-DovwQEMt.js → data-list-Cb2sNA6I.js} +218 -214
- package/dist/data-list.js +1 -1
- package/dist/{date-picker-CF3WQxYe.js → date-picker-CLXTtQGe.js} +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/{date-range-picker-CvFs-nHN.js → date-range-picker-Br0neGyT.js} +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-picker-lWc4HT6a.js → datetime-picker-CR-H_BLu.js} +1 -1
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-ynZUZreq.js → datetime-range-picker-BLo58OIk.js} +1 -1
- package/dist/datetime-range-picker.js +1 -1
- package/dist/docs/calendar.json +2 -2
- package/dist/docs/dialog.json +1 -0
- package/dist/docs/dialog.md +1 -1
- package/dist/docs/drawer.json +1 -0
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/list-item.json +1 -1
- package/dist/docs/section.json +1 -1
- package/dist/{filter-bar-DUXtlPRn.js → filter-bar-b8bRNPs9.js} +2 -2
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-D0ckqmhq.js → import-export-center-C_oNc-RM.js} +1 -1
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +10 -10
- package/dist/styles/action-sheet.css +1 -1
- package/dist/styles/column-manager.css +1 -1
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/data-list.css +1 -1
- package/dist/styles/detail-panel.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/event-calendar.css +1 -1
- package/dist/styles/filter-bar.css +1 -1
- package/dist/styles/import-export-center.css +1 -1
- package/dist/styles/index.css +5 -5
- package/dist/styles/list-item.css +1 -1
- package/dist/styles/media-viewer.css +1 -1
- package/dist/styles/section.css +1 -1
- package/dist/styles/table.css +1 -1
- package/dist/styles/upload.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table-B04FiwYZ.js → table-DqwYPHGS.js} +4 -4
- package/dist/table.js +1 -1
- package/dist/types/calendar/calendar-periods.d.ts.map +1 -1
- package/dist/types/data-list/data-list.d.ts.map +1 -1
- package/package.json +7 -6
|
@@ -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
|
-
],
|
|
58
|
-
function
|
|
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
|
|
61
|
+
function Ge(e, t) {
|
|
62
62
|
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
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
|
|
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
|
|
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
|
|
88
|
-
let
|
|
89
|
-
true:
|
|
90
|
-
false:
|
|
91
|
-
}), [
|
|
92
|
-
function
|
|
93
|
-
if (Ae(e,
|
|
94
|
-
let i =
|
|
95
|
-
return
|
|
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
|
|
98
|
-
if (We(
|
|
99
|
-
let r =
|
|
100
|
-
|
|
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
|
|
103
|
-
let r =
|
|
104
|
-
|
|
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
|
|
107
|
-
title:
|
|
108
|
-
subtitle:
|
|
109
|
-
trailing:
|
|
110
|
-
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
|
-
}),
|
|
113
|
-
if (
|
|
114
|
-
nodes:
|
|
112
|
+
}), H = Se(() => {
|
|
113
|
+
if (Lt === "server") return {
|
|
114
|
+
nodes: T.map((e, t) => ({
|
|
115
115
|
kind: "row",
|
|
116
|
-
key:
|
|
116
|
+
key: B(e),
|
|
117
117
|
row: e,
|
|
118
118
|
index: t
|
|
119
119
|
})),
|
|
120
|
-
visible:
|
|
121
|
-
total:
|
|
120
|
+
visible: T,
|
|
121
|
+
total: kt ?? T.length
|
|
122
122
|
};
|
|
123
|
-
let e = Ee(
|
|
124
|
-
rowKey:
|
|
125
|
-
locale:
|
|
126
|
-
booleans:
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
-
|
|
145
|
-
}, [
|
|
146
|
-
let
|
|
147
|
-
function
|
|
148
|
-
Te(
|
|
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
|
|
151
|
-
function
|
|
152
|
-
(
|
|
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
|
|
155
|
-
function
|
|
156
|
-
if (!(
|
|
157
|
-
if (
|
|
158
|
-
|
|
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 &&
|
|
161
|
+
if (t && L.current !== void 0) {
|
|
162
162
|
let t = we({
|
|
163
163
|
action: "range",
|
|
164
164
|
mode: "multiple",
|
|
165
|
-
selected:
|
|
166
|
-
keys:
|
|
165
|
+
selected: G,
|
|
166
|
+
keys: nn,
|
|
167
167
|
key: e,
|
|
168
|
-
anchor:
|
|
169
|
-
disabled: (e) =>
|
|
168
|
+
anchor: L.current,
|
|
169
|
+
disabled: (e) => W.has(e)
|
|
170
170
|
});
|
|
171
|
-
|
|
171
|
+
z([...G.filter((e) => !nn.includes(e)), ...t.selected], "select", r);
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
L.current = e, z(K.has(e) ? G.filter((t) => t !== e) : [...G, e], n, r);
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
let t = new Set(
|
|
179
|
-
|
|
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
|
|
181
|
+
let Q = g(null), sn = g(U);
|
|
182
182
|
xe(() => {
|
|
183
|
-
let e =
|
|
184
|
-
|
|
185
|
-
let t =
|
|
186
|
-
if (t === null ||
|
|
187
|
-
let n =
|
|
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) =>
|
|
190
|
-
|
|
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
|
|
192
|
+
function cn(e) {
|
|
193
193
|
return () => {
|
|
194
|
-
|
|
194
|
+
Q.current = e;
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
|
|
197
|
+
function ln(e) {
|
|
198
|
+
Nt.onBlur?.(e);
|
|
199
199
|
let t = e.relatedTarget;
|
|
200
|
-
t !== null && (
|
|
200
|
+
t !== null && (P.current?.contains(t) || (Q.current = null));
|
|
201
201
|
}
|
|
202
|
-
be(
|
|
202
|
+
be(bt, () => ({
|
|
203
203
|
get root() {
|
|
204
|
-
return
|
|
204
|
+
return P.current;
|
|
205
205
|
},
|
|
206
206
|
focus() {
|
|
207
|
-
let e =
|
|
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(
|
|
211
|
+
let t = Je(qe(P.current, e));
|
|
212
212
|
return t?.focus(), t !== null;
|
|
213
213
|
},
|
|
214
214
|
scrollToKey(e) {
|
|
215
|
-
let t =
|
|
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:
|
|
222
|
-
booleans:
|
|
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 =
|
|
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:
|
|
237
|
+
}), /* @__PURE__ */ v(p, { children: D("empty") })]
|
|
238
238
|
}) : i : o;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
let i =
|
|
242
|
-
locale:
|
|
243
|
-
booleans:
|
|
244
|
-
}) ?? "" : e, u = c ?
|
|
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) =>
|
|
249
|
+
onClick: (n) => pt?.({
|
|
250
250
|
key: e,
|
|
251
251
|
row: t,
|
|
252
|
-
reason:
|
|
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
|
-
|
|
271
|
+
pt?.({
|
|
272
272
|
key: e,
|
|
273
273
|
row: t,
|
|
274
|
-
reason:
|
|
274
|
+
reason: Ue(n),
|
|
275
275
|
event: n
|
|
276
276
|
});
|
|
277
277
|
},
|
|
278
278
|
children: m
|
|
279
279
|
});
|
|
280
|
-
let h =
|
|
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:
|
|
288
|
+
onFocus: cn(e),
|
|
289
289
|
selected: o,
|
|
290
|
-
size:
|
|
291
|
-
variant:
|
|
290
|
+
size: j,
|
|
291
|
+
variant: A,
|
|
292
292
|
children: [/* @__PURE__ */ y(le, { children: [
|
|
293
|
-
re ? /* @__PURE__ */ y(fe, { children: [
|
|
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":
|
|
297
|
+
"aria-label": D("selectRow", { title: ee }),
|
|
298
298
|
checked: o,
|
|
299
299
|
disabled: i,
|
|
300
|
-
onCheckedChange: (t, n) =>
|
|
300
|
+
onCheckedChange: (t, n) => an(e, Gt.current, n.reason, n.source),
|
|
301
301
|
onClick: (e) => {
|
|
302
|
-
|
|
302
|
+
Gt.current = e.shiftKey;
|
|
303
303
|
},
|
|
304
|
-
size:
|
|
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 }),
|
|
312
|
-
|
|
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: $(
|
|
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) =>
|
|
341
|
+
onClick: (t) => qt(e, Ue(t), t),
|
|
342
342
|
type: "button",
|
|
343
|
-
children: [c ?
|
|
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
|
-
] }),
|
|
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
|
|
351
|
+
function dn(e) {
|
|
352
352
|
return e.map((e) => {
|
|
353
|
-
if (e.kind === "row") return
|
|
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(
|
|
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:
|
|
358
|
+
children: dn(e.children)
|
|
359
359
|
}, e.key);
|
|
360
360
|
});
|
|
361
361
|
}
|
|
362
|
-
let
|
|
363
|
-
selected:
|
|
364
|
-
count:
|
|
365
|
-
}) :
|
|
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":
|
|
368
|
-
disabled:
|
|
369
|
-
end:
|
|
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:
|
|
378
|
-
column:
|
|
379
|
-
more:
|
|
380
|
-
}) :
|
|
381
|
-
}) }),
|
|
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
|
-
|
|
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":
|
|
390
|
-
checked:
|
|
391
|
-
disabled:
|
|
392
|
-
indeterminate:
|
|
393
|
-
onCheckedChange: (e, t) =>
|
|
394
|
-
size:
|
|
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:
|
|
401
|
+
children: J ? "" : fn
|
|
402
402
|
}),
|
|
403
|
-
|
|
404
|
-
"data-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: [
|
|
410
|
-
"aria-label":
|
|
409
|
+
children: [pn, /* @__PURE__ */ y(ee, {
|
|
410
|
+
"aria-label": D("sort"),
|
|
411
411
|
children: [
|
|
412
412
|
/* @__PURE__ */ y(s, {
|
|
413
|
-
"aria-labelledby": `${
|
|
414
|
-
onValueChange: (e, t) =>
|
|
415
|
-
value:
|
|
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: `${
|
|
419
|
-
children:
|
|
418
|
+
id: `${N}-sort-column`,
|
|
419
|
+
children: D("sortColumn")
|
|
420
420
|
}),
|
|
421
421
|
/* @__PURE__ */ v(o, {
|
|
422
422
|
value: Ve,
|
|
423
|
-
children:
|
|
423
|
+
children: D("sortNone")
|
|
424
424
|
}),
|
|
425
|
-
|
|
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": `${
|
|
434
|
-
onValueChange: (e, t) =>
|
|
435
|
-
value:
|
|
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: `${
|
|
439
|
-
children:
|
|
438
|
+
id: `${N}-sort-direction`,
|
|
439
|
+
children: D("sortDirection")
|
|
440
440
|
}),
|
|
441
441
|
/* @__PURE__ */ v(o, {
|
|
442
|
-
disabled: !
|
|
442
|
+
disabled: !Y,
|
|
443
443
|
value: "ascending",
|
|
444
|
-
children:
|
|
444
|
+
children: D("ascending")
|
|
445
445
|
}),
|
|
446
446
|
/* @__PURE__ */ v(o, {
|
|
447
|
-
disabled: !
|
|
447
|
+
disabled: !Y,
|
|
448
448
|
value: "descending",
|
|
449
|
-
children:
|
|
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
|
-
}),
|
|
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:
|
|
463
|
-
messages: { label:
|
|
464
|
-
loading:
|
|
465
|
-
minDuration:
|
|
466
|
-
onReveal: () =>
|
|
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:
|
|
471
|
-
variant:
|
|
472
|
-
children: Array.from({ length:
|
|
470
|
+
size: j,
|
|
471
|
+
variant: A,
|
|
472
|
+
children: Array.from({ length: hn }, (e, t) => /* @__PURE__ */ y(se, {
|
|
473
473
|
align: "start",
|
|
474
|
-
size:
|
|
475
|
-
variant:
|
|
476
|
-
children: /* @__PURE__ */ y(le, { children: [
|
|
477
|
-
/* @__PURE__ */ y(ue, { children: [/* @__PURE__ */ v(oe, { children: /* @__PURE__ */ v(d, { inlineSize: x[t % x.length] }) }),
|
|
478
|
-
|
|
479
|
-
|
|
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:
|
|
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
|
|
502
|
-
let t =
|
|
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 :
|
|
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) =>
|
|
518
|
-
...
|
|
521
|
+
onClick: (e) => Kt({
|
|
522
|
+
...F,
|
|
519
523
|
filter: null,
|
|
520
524
|
search: "",
|
|
521
|
-
page:
|
|
522
|
-
...
|
|
525
|
+
page: F.page && "index" in F.page ? {
|
|
526
|
+
...F.page,
|
|
523
527
|
index: 0
|
|
524
|
-
} :
|
|
528
|
+
} : F.page
|
|
525
529
|
}, "filter", "clear", e),
|
|
526
530
|
size: "md",
|
|
527
531
|
tone: "secondary",
|
|
528
532
|
variant: "outline",
|
|
529
|
-
children:
|
|
530
|
-
}) }) : e === "error" &&
|
|
531
|
-
onClick: () =>
|
|
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:
|
|
539
|
+
children: D("retry")
|
|
536
540
|
}) }) : null]
|
|
537
541
|
})
|
|
538
542
|
});
|
|
539
543
|
}
|
|
540
|
-
|
|
541
|
-
let
|
|
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(
|
|
544
|
-
"aria-busy":
|
|
547
|
+
...me(Nt, "part", "root"),
|
|
548
|
+
"aria-busy": vn || void 0,
|
|
545
549
|
className: _e,
|
|
546
|
-
"data-loading":
|
|
547
|
-
"data-size":
|
|
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":
|
|
551
|
-
onBlur:
|
|
552
|
-
ref:
|
|
554
|
+
"data-variant": A,
|
|
555
|
+
onBlur: ln,
|
|
556
|
+
ref: P,
|
|
553
557
|
children: [
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
"aria-label":
|
|
559
|
-
"aria-labelledby":
|
|
560
|
-
size:
|
|
561
|
-
variant:
|
|
562
|
-
children:
|
|
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
|
-
|
|
565
|
-
|
|
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: [
|
|
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:
|
|
576
|
+
loading: ot && R.current,
|
|
573
577
|
onClick: () => {
|
|
574
|
-
|
|
578
|
+
R.current = !0, ht?.();
|
|
575
579
|
},
|
|
576
580
|
size: "sm",
|
|
577
581
|
tone: "secondary",
|
|
578
582
|
variant: "outline",
|
|
579
|
-
children:
|
|
583
|
+
children: D("loadMore")
|
|
580
584
|
})
|
|
581
|
-
}) : null,
|
|
585
|
+
}) : null, tt]
|
|
582
586
|
}) : null
|
|
583
587
|
]
|
|
584
588
|
});
|
|
585
589
|
}
|
|
586
590
|
//#endregion
|
|
587
|
-
export { Be as n, ze as r,
|
|
591
|
+
export { Be as n, ze as r, Ye as t };
|