@shtabapp/ui-kit 1.59.1 → 1.60.1

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.
@@ -0,0 +1,580 @@
1
+ import { n as e, o as t, r as n, t as r } from "./useSelectionGroup-cKj38lEN.js";
2
+ import { r as i, t as a } from "./SListItem-BYMbFs2A.js";
3
+ import { Fragment as o, computed as s, createBlock as c, createElementBlock as l, createElementVNode as u, createSlots as d, createVNode as f, defineComponent as p, mergeModels as m, mergeProps as h, nextTick as ee, normalizeClass as g, normalizeStyle as _, openBlock as v, provide as te, renderList as ne, renderSlot as y, toValue as b, unref as x, useId as re, useModel as S, useSlots as ie, useTemplateRef as ae, withCtx as C } from "vue";
4
+ import { ESIconName as w, SSpinner as T, useUiKitI18n as oe } from "@shtabapp/ui-kit-primitives";
5
+ import { useInfiniteScroll as E } from "@vueuse/core";
6
+ import { useVirtualizer as se } from "@tanstack/vue-virtual";
7
+ //#region src/composables/useFlatTreeList.ts
8
+ var D = (e, t) => {
9
+ if (typeof t == "function") return t(e);
10
+ let n = e[t];
11
+ return typeof n == "string" ? n : typeof n == "number" ? String(n) : "";
12
+ }, O = (e, t) => {
13
+ let n = e[t];
14
+ return Array.isArray(n) ? n.filter((e) => typeof e == "object" && !!e) : [];
15
+ }, k = (e, t) => {
16
+ if (!t) return !1;
17
+ let n = e[t];
18
+ return typeof n == "boolean" ? n : !1;
19
+ }, ce = "__s-ui-load-more:", A = (e) => `${ce}${e}`, j = "__s-ui-list-divider__", M = () => Object.create(null), N = (e) => e === void 0 ? /* @__PURE__ */ new Set() : typeof e == "string" ? new Set([e]) : new Set(e), P = (e, t, n, r) => {
20
+ O(e, n).forEach((e) => {
21
+ let i = D(e, t);
22
+ i && r.add(i), P(e, t, n, r);
23
+ });
24
+ }, F = (e, t, n, r) => {
25
+ for (let i of e) {
26
+ if (D(i, n) === t) return i;
27
+ let e = F(O(i, r), t, n, r);
28
+ if (e) return e;
29
+ }
30
+ }, I = (e, t, n, r, i, a, o, s) => {
31
+ e.forEach((e) => {
32
+ let c = D(e, t);
33
+ if (!c) return;
34
+ let l = O(e, n), u = l.length > 0, d = r.includes(c);
35
+ o.push({
36
+ key: c,
37
+ item: e,
38
+ depth: i,
39
+ flatIndex: o.length,
40
+ hasChildren: u,
41
+ expanded: d,
42
+ parentKey: a
43
+ }), u && d && I(l, t, n, r, i + 1, c, o, s), u && d && k(e, s) && o.push({
44
+ key: A(c),
45
+ item: e,
46
+ depth: i + 1,
47
+ flatIndex: o.length,
48
+ hasChildren: !1,
49
+ expanded: !1,
50
+ parentKey: c,
51
+ loadMoreForKey: c
52
+ });
53
+ });
54
+ }, le = (e, t, n, r) => {
55
+ let i = N(r);
56
+ if (i.size === 0) return;
57
+ let a = [], o = [];
58
+ for (let r of e) {
59
+ if (O(r, n).length > 0) return;
60
+ i.has(D(r, t)) ? a.push(r) : o.push(r);
61
+ }
62
+ if (!(a.length === 0 || o.length === 0)) return {
63
+ selectedItems: a,
64
+ restItems: o
65
+ };
66
+ }, ue = ({ items: e, childrenKey: t, itemKey: n, expanded: r, hasMoreChildrenKey: i, selectedOnTop: a, selectedKeys: o }) => ({
67
+ flatRows: s(() => {
68
+ let s = [], c = b(e), l = b(t), u = b(n), d = b(i), f = b(a) ? le(c, u, l, b(o)) : void 0;
69
+ return f ? (I(f.selectedItems, u, l, r.value, 0, void 0, s, d), s.push({
70
+ key: j,
71
+ item: M(),
72
+ depth: 0,
73
+ flatIndex: s.length,
74
+ hasChildren: !1,
75
+ expanded: !1,
76
+ divider: !0
77
+ }), I(f.restItems, u, l, r.value, 0, void 0, s, d), s) : (I(c, u, l, r.value, 0, void 0, s, d), s);
78
+ }),
79
+ toggleExpanded: (i) => {
80
+ let a = b(e), o = b(t), s = b(n), c = new Set(r.value);
81
+ if (c.has(i)) {
82
+ c.delete(i);
83
+ let e = F(a, i, s, o);
84
+ if (e) {
85
+ let t = /* @__PURE__ */ new Set();
86
+ P(e, s, o, t), t.forEach((e) => {
87
+ c.delete(e);
88
+ });
89
+ }
90
+ } else c.add(i);
91
+ r.value = [...c];
92
+ },
93
+ isExpanded: (e) => r.value.includes(e)
94
+ }), de = (e, t) => E(e, () => {
95
+ t.onEndReached();
96
+ }, {
97
+ distance: b(t.distance),
98
+ canLoadMore: () => t.canLoadMore === void 0 ? !0 : b(t.canLoadMore),
99
+ direction: "bottom"
100
+ }), L = /* @__PURE__ */ function(e) {
101
+ return e.NONE = "none", e.TWO_X_SMALL = "2x-small", e.X_SMALL = "x-small", e.SMALL = "small", e.MEDIUM = "medium", e.X_MEDIUM = "x-medium", e.LARGE = "large", e.X_LARGE = "x-large", e.TWO_X_LARGE = "2x-large", e;
102
+ }({}), R = L.TWO_X_SMALL, fe = {
103
+ [L.NONE]: "var(--s-ui-space-gap-none)",
104
+ [L.TWO_X_SMALL]: "var(--s-ui-space-gap-2x-small)",
105
+ [L.X_SMALL]: "var(--s-ui-space-gap-x-small)",
106
+ [L.SMALL]: "var(--s-ui-space-gap-small)",
107
+ [L.MEDIUM]: "var(--s-ui-space-gap-medium)",
108
+ [L.X_MEDIUM]: "var(--s-ui-space-gap-x-medium)",
109
+ [L.LARGE]: "var(--s-ui-space-gap-large)",
110
+ [L.X_LARGE]: "var(--s-ui-space-gap-x-large)",
111
+ [L.TWO_X_LARGE]: "var(--s-ui-space-gap-2x-large)"
112
+ }, pe = {
113
+ [L.NONE]: 0,
114
+ [L.TWO_X_SMALL]: 2,
115
+ [L.X_SMALL]: 4,
116
+ [L.SMALL]: 8,
117
+ [L.MEDIUM]: 12,
118
+ [L.X_MEDIUM]: 16,
119
+ [L.LARGE]: 20,
120
+ [L.X_LARGE]: 24,
121
+ [L.TWO_X_LARGE]: 32
122
+ }, me = (e, t) => `s-ui-list-option-${e}-${t}`, z = (e, t) => {
123
+ let n = e[t];
124
+ if (typeof n == "string") return n;
125
+ }, B = (e, t) => {
126
+ let n = e[t];
127
+ return typeof n == "boolean" ? n : !1;
128
+ }, V = (e) => e in w, H = (e, t) => {
129
+ let n = e[t];
130
+ if (typeof n == "string" && n.length > 0 && V(n)) return n;
131
+ }, U = (e, t) => typeof t == "string" && t ? t : Array.isArray(t) && t[0] ? t[0] : e, he = (e) => e.some((e) => e.hasChildren || e.parentKey), W = (e, t, n) => {
132
+ if (!e.hasChildren) return null;
133
+ if (!e.expanded) return {
134
+ type: "expand",
135
+ rowKey: t
136
+ };
137
+ let r = n.find((e) => e.parentKey === t);
138
+ return r ? {
139
+ type: "select",
140
+ rowKey: r.key
141
+ } : null;
142
+ }, G = (e, t) => e.hasChildren && e.expanded ? {
143
+ type: "collapse",
144
+ rowKey: t
145
+ } : e.parentKey ? {
146
+ type: "select",
147
+ rowKey: e.parentKey
148
+ } : null, ge = (e, t, n) => {
149
+ let r = n.find((e) => e.key === t);
150
+ return r ? e === "ArrowRight" ? W(r, t, n) : G(r, t) : null;
151
+ }, K = (e, t, n, r) => {
152
+ for (let i = t; i >= 0 && i < e.length; i += n) {
153
+ let t = e[i];
154
+ if (t && t.depth <= r) return t.key;
155
+ }
156
+ return null;
157
+ }, _e = (e, t, n) => {
158
+ let r = n.findIndex((e) => e.key === t);
159
+ if (r === -1) return null;
160
+ let i = n[r];
161
+ if (!i) return null;
162
+ let a = e === "ArrowDown" ? 1 : -1;
163
+ return K(n, r + a, a, i.depth);
164
+ }, ve = ["role", "aria-multiselectable"], ye = [
165
+ "aria-multiselectable",
166
+ "aria-activedescendant",
167
+ "tabindex"
168
+ ], be = ["data-index"], xe = {
169
+ key: 0,
170
+ class: "s-ui-list__divider",
171
+ role: "separator"
172
+ }, Se = {
173
+ key: 0,
174
+ class: "s-ui-list__divider",
175
+ role: "separator"
176
+ }, Ce = {
177
+ key: 2,
178
+ class: "s-ui-list__static"
179
+ }, q = /* @__PURE__ */ p({
180
+ __name: "SList",
181
+ props: /*@__PURE__*/ m({
182
+ items: {},
183
+ itemKey: {
184
+ type: [String, Function],
185
+ default: "id"
186
+ },
187
+ childrenKey: { default: "children" },
188
+ titleKey: { default: "title" },
189
+ subtitleKey: { default: "subtitle" },
190
+ iconLeftKey: { default: "iconLeft" },
191
+ disabledKey: { default: "disabled" },
192
+ itemProps: { type: Function },
193
+ selectionMode: { default: () => e.NONE },
194
+ mandatory: {
195
+ type: Boolean,
196
+ default: !1
197
+ },
198
+ virtual: { type: Boolean },
199
+ gap: { default: () => R },
200
+ estimateItemSize: { default: 36 },
201
+ overscan: { default: 5 },
202
+ endReachedDistance: { default: 0 },
203
+ canLoadMore: { type: Function },
204
+ height: { default: 320 },
205
+ maxHeight: {},
206
+ revealRight: {
207
+ type: Boolean,
208
+ default: !1
209
+ },
210
+ expandOnClick: {
211
+ type: Boolean,
212
+ default: !1
213
+ },
214
+ selectedOnTop: {
215
+ type: Boolean,
216
+ default: !1
217
+ },
218
+ hasMoreChildrenKey: {},
219
+ loadingMoreChildrenKeys: { default: () => [] }
220
+ }, {
221
+ modelValue: {},
222
+ modelModifiers: {},
223
+ selected: {},
224
+ selectedModifiers: {},
225
+ expanded: { default: () => [] },
226
+ expandedModifiers: {}
227
+ }),
228
+ emits: /*@__PURE__*/ m(["endReached", "loadMoreChildren"], [
229
+ "update:modelValue",
230
+ "update:selected",
231
+ "update:expanded"
232
+ ]),
233
+ setup(p, { expose: m, emit: b }) {
234
+ let w = S(p, "modelValue"), E = S(p, "selected"), D = S(p, "expanded"), O = b, k = ie(), ce = re(), A = ae("scrollElementRef"), j = ae("listRootElementRef"), M = s(() => pe[p.gap]), N = s(() => p.items !== void 0), P = s(() => N.value ? p.virtual === void 0 ? !0 : p.virtual : !1), { flatRows: F, toggleExpanded: I } = ue({
235
+ items: () => p.items ?? [],
236
+ childrenKey: () => p.childrenKey,
237
+ itemKey: () => p.itemKey,
238
+ expanded: D,
239
+ hasMoreChildrenKey: () => p.hasMoreChildrenKey,
240
+ selectedOnTop: () => p.selectedOnTop,
241
+ selectedKeys: () => E.value
242
+ }), { t: le } = oe(), L = s(() => new Set(p.loadingMoreChildrenKeys)), R = s(() => le("list.loadMore")), V = (e) => e.loadMoreForKey ? L.value.has(e.loadMoreForKey) : !1, W = (e, t) => {
243
+ L.value.has(e) || O("loadMoreChildren", {
244
+ key: e,
245
+ item: t
246
+ });
247
+ }, G = (e) => {
248
+ e.loadMoreForKey && W(e.loadMoreForKey, e.item);
249
+ }, K = (e) => ({
250
+ parentKey: e.loadMoreForKey ?? "",
251
+ parentItem: e.item,
252
+ depth: e.depth,
253
+ loading: V(e),
254
+ loadMore: () => {
255
+ G(e);
256
+ }
257
+ }), q = se(s(() => ({
258
+ count: F.value.length,
259
+ getScrollElement: () => A.value,
260
+ estimateSize: () => p.estimateItemSize,
261
+ gap: M.value,
262
+ overscan: p.overscan
263
+ }))), we = s(() => {
264
+ if (N.value) return F.value.reduce((e, t) => (t.divider || e.push(t.key), e), []);
265
+ }), Te = s(() => {
266
+ let e = /* @__PURE__ */ new Set();
267
+ for (let t of F.value) !t.loadMoreForKey && B(t.item, p.disabledKey) && e.add(t.key);
268
+ return e;
269
+ }), Ee = async (e) => {
270
+ if (!P.value) return;
271
+ let t = F.value.findIndex((t) => t.key === e);
272
+ t !== -1 && (q.value.scrollToIndex(t, { align: "auto" }), await new Promise((e) => {
273
+ requestAnimationFrame(() => {
274
+ e();
275
+ });
276
+ }), await ee());
277
+ }, De = (e) => me(ce, e), J = t({
278
+ modelValue: () => E.value,
279
+ onUpdateModelValue: (e) => {
280
+ E.value = e;
281
+ },
282
+ mode: () => p.selectionMode,
283
+ mandatory: () => p.mandatory,
284
+ orientation: () => n.VERTICAL,
285
+ enableTabNavigation: !0,
286
+ focusMode: () => P.value ? r.ACTIVE_DESCENDANT : r.DOM,
287
+ orderedValues: we,
288
+ isValueDisabled: (e) => Te.value.has(e),
289
+ onBeforeFocusItem: async (e) => {
290
+ await Ee(e);
291
+ },
292
+ onFocusGroup: () => {
293
+ A.value?.focus();
294
+ }
295
+ }), Oe = s(() => N.value && he(F.value)), Y = () => {
296
+ if (P.value) {
297
+ A.value?.focus();
298
+ return;
299
+ }
300
+ j.value?.focus();
301
+ }, ke = () => {
302
+ J.focusedValue.value = void 0, w.value = void 0;
303
+ let e = document.activeElement;
304
+ e instanceof HTMLElement && e !== A.value && e.blur(), Y();
305
+ }, X = async (e) => {
306
+ P.value && await Ee(e);
307
+ }, Ae = async (e) => {
308
+ if (ke(), e.type === "expand" || e.type === "collapse") {
309
+ I(e.rowKey), J.select(e.rowKey, !1), await X(e.rowKey);
310
+ return;
311
+ }
312
+ J.select(e.rowKey, !1), await X(e.rowKey);
313
+ }, je = async (e, t) => {
314
+ if (!Oe.value || e.key !== "ArrowUp" && e.key !== "ArrowDown") return !1;
315
+ let n = U(t, E.value), r = _e(e.key, n, F.value);
316
+ return r ? (e.preventDefault(), ke(), J.select(r, !1), await X(r), !0) : !1;
317
+ }, Me = async (e, t) => {
318
+ if (!Oe.value || e.key !== "ArrowLeft" && e.key !== "ArrowRight") return !1;
319
+ let n = U(t, E.value), r = ge(e.key, n, F.value);
320
+ return r ? (e.preventDefault(), await Ae(r), !0) : !1;
321
+ }, Z = () => {
322
+ if (w.value) return w.value;
323
+ let e = U("", E.value);
324
+ if (e) return e;
325
+ let t = we.value;
326
+ if (t) {
327
+ for (let e of t) if (!Te.value.has(e)) return e;
328
+ }
329
+ }, Ne = () => Z(), Pe = async (e) => {
330
+ let t = Ne();
331
+ t && await Q(e, t);
332
+ }, Fe = [
333
+ "Enter",
334
+ " ",
335
+ "Spacebar"
336
+ ], Ie = (e, t) => {
337
+ if (!Fe.includes(e.key)) return !1;
338
+ let n = F.value.find((e) => e.key === t);
339
+ return n?.loadMoreForKey ? (e.preventDefault(), W(n.loadMoreForKey, n.item), !0) : !1;
340
+ }, Q = async (e, t) => {
341
+ Ie(e, t) || await je(e, t) || await Me(e, t) || (await J.handleItemKeydown(e, t), w.value = J.focusedValue.value, !J.focusedValue.value && !P.value && Y());
342
+ }, Le = async (e) => {
343
+ let t = Z();
344
+ t && await Q(e, t);
345
+ }, Re = async (e) => {
346
+ if (P.value || e.target !== j.value) return;
347
+ let t = Z();
348
+ t && await Q(e, t);
349
+ }, ze = async () => {
350
+ let e = Z();
351
+ if (!e) {
352
+ Y();
353
+ return;
354
+ }
355
+ await J.focusItem(e, !1);
356
+ };
357
+ te(i, {
358
+ mode: () => p.selectionMode,
359
+ isSelected: J.isSelected,
360
+ selectItem: J.toggle,
361
+ registerItem: J.registerItem,
362
+ getItemTabIndex: J.getItemTabIndex,
363
+ getGroupTabIndex: J.getGroupTabIndex,
364
+ handleItemKeydown: Q,
365
+ activeKey: () => w.value,
366
+ setActiveKey: (e) => {
367
+ w.value = e;
368
+ },
369
+ isExpanded: (e) => D.value.includes(e),
370
+ toggleExpanded: (e) => {
371
+ if (N.value) {
372
+ I(e);
373
+ return;
374
+ }
375
+ let t = new Set(D.value);
376
+ t.has(e) ? t.delete(e) : t.add(e), D.value = [...t];
377
+ },
378
+ revealRight: () => p.revealRight,
379
+ expandOnClick: () => p.expandOnClick,
380
+ getItemOptionId: (e) => {
381
+ if (P.value) return De(e);
382
+ },
383
+ usesActiveDescendantNavigation: () => P.value,
384
+ handlesTreeKeyboardNavigation: () => N.value
385
+ });
386
+ let Be = s(() => q.value.getVirtualItems()), Ve = s(() => Be.value.flatMap((e) => {
387
+ let t = F.value[e.index];
388
+ return t ? [{
389
+ virtualRow: e,
390
+ flatRow: t
391
+ }] : [];
392
+ })), He = s(() => q.value.getTotalSize()), Ue = s(() => ({
393
+ height: `${He.value}px`,
394
+ position: "relative",
395
+ width: "100%"
396
+ })), We = s(() => {
397
+ let e = {};
398
+ return typeof p.height == "number" ? e.height = `${p.height}px` : p.height && (e.height = p.height), p.maxHeight && (typeof p.maxHeight == "number" ? e.maxHeight = `${p.maxHeight}px` : e.maxHeight = p.maxHeight), e;
399
+ }), Ge = s(() => ({
400
+ "s-ui-list--virtual": P.value,
401
+ "s-ui-list--static": !P.value
402
+ })), Ke = s(() => ({ "--s-ui-list-gap": fe[p.gap] })), qe = s(() => ({ "s-ui-list__scroll--flat": N.value && !P.value })), Je = s(() => {
403
+ if (p.selectionMode === e.MULTIPLE) return !0;
404
+ }), Ye = s(() => {
405
+ if (!P.value) return "listbox";
406
+ }), Xe = s(() => {
407
+ if (!P.value) return Je.value;
408
+ }), Ze = s(() => {
409
+ if (P.value) return J.getGroupTabIndex();
410
+ }), Qe = s(() => w.value ? w.value : U("", E.value)), $e = s(() => {
411
+ if (!P.value) return;
412
+ let e = Qe.value;
413
+ if (e) return De(e);
414
+ });
415
+ de(() => A.value, {
416
+ distance: () => p.endReachedDistance,
417
+ canLoadMore: () => p.canLoadMore ? p.canLoadMore() : !0,
418
+ onEndReached: () => {
419
+ O("endReached", { direction: "bottom" });
420
+ }
421
+ });
422
+ let et = (e) => ({
423
+ position: "absolute",
424
+ top: 0,
425
+ left: 0,
426
+ width: "100%",
427
+ transform: `translateY(${e.start}px)`
428
+ }), tt = (e) => {
429
+ e instanceof HTMLElement && q.value.measureElement(e);
430
+ }, nt = (e) => {
431
+ let t = e.item, n = {
432
+ rowKey: e.key,
433
+ depth: e.depth,
434
+ expandable: e.hasChildren,
435
+ expanded: e.expanded,
436
+ selected: J.isSelected(e.key),
437
+ active: w.value === e.key,
438
+ disabled: B(t, p.disabledKey),
439
+ title: z(t, p.titleKey),
440
+ subtitle: z(t, p.subtitleKey),
441
+ iconLeft: H(t, p.iconLeftKey),
442
+ revealRight: p.revealRight
443
+ };
444
+ return p.itemProps ? {
445
+ ...n,
446
+ ...p.itemProps(t, e)
447
+ } : n;
448
+ }, $ = (e) => ({
449
+ ...e,
450
+ revealRight: p.revealRight,
451
+ toggleExpanded: () => {
452
+ I(e.key);
453
+ }
454
+ });
455
+ return m({
456
+ focusNavigation: ze,
457
+ handleKeyboardNavigation: Le
458
+ }), (e, t) => (v(), l("div", {
459
+ ref_key: "listRootElementRef",
460
+ ref: j,
461
+ class: g(["s-ui-list", Ge.value]),
462
+ style: _(Ke.value),
463
+ role: Ye.value,
464
+ "aria-multiselectable": Xe.value,
465
+ tabindex: "-1",
466
+ onKeydown: Re
467
+ }, [N.value && P.value ? (v(), l("div", {
468
+ key: 0,
469
+ ref_key: "scrollElementRef",
470
+ ref: A,
471
+ class: g(["s-ui-list__scroll", qe.value]),
472
+ style: _(We.value),
473
+ role: "listbox",
474
+ "aria-multiselectable": Je.value,
475
+ "aria-activedescendant": $e.value,
476
+ tabindex: Ze.value,
477
+ onKeydown: Pe
478
+ }, [u("div", {
479
+ class: "s-ui-list__virtual-panel",
480
+ style: _(Ue.value)
481
+ }, [(v(!0), l(o, null, ne(Ve.value, (t) => (v(), l("div", {
482
+ key: t.virtualRow.index,
483
+ class: "s-ui-list__virtual-row",
484
+ "data-index": t.virtualRow.index,
485
+ ref_for: !0,
486
+ ref: tt,
487
+ style: _(et(t.virtualRow))
488
+ }, [t.flatRow.divider ? (v(), l("div", xe)) : t.flatRow.loadMoreForKey ? (v(), l(o, { key: 1 }, [x(k).loadMore ? y(e.$slots, "loadMore", h({
489
+ key: 0,
490
+ ref_for: !0
491
+ }, K(t.flatRow))) : (v(), c(x(a), {
492
+ key: 1,
493
+ "row-key": t.flatRow.key,
494
+ depth: t.flatRow.depth,
495
+ tiny: "",
496
+ title: R.value,
497
+ onClick: (e) => G(t.flatRow)
498
+ }, d({ _: 2 }, [V(t.flatRow) ? {
499
+ name: "icon-left",
500
+ fn: C(() => [f(x(T), { size: 16 })]),
501
+ key: "0"
502
+ } : void 0]), 1032, [
503
+ "row-key",
504
+ "depth",
505
+ "title",
506
+ "onClick"
507
+ ]))], 64)) : (v(), l(o, { key: 2 }, [x(k).item ? y(e.$slots, "item", h({
508
+ key: 0,
509
+ ref_for: !0
510
+ }, $(t.flatRow))) : (v(), c(x(a), h({
511
+ key: 1,
512
+ ref_for: !0
513
+ }, nt(t.flatRow)), d({ _: 2 }, [
514
+ x(k).itemIconLeft ? {
515
+ name: "icon-left",
516
+ fn: C(() => [y(e.$slots, "itemIconLeft", h({ ref_for: !0 }, $(t.flatRow)))]),
517
+ key: "0"
518
+ } : void 0,
519
+ x(k).itemTitle ? {
520
+ name: "title",
521
+ fn: C(() => [y(e.$slots, "itemTitle", h({ ref_for: !0 }, $(t.flatRow)))]),
522
+ key: "1"
523
+ } : void 0,
524
+ x(k).itemSubtitle ? {
525
+ name: "subtitle",
526
+ fn: C(() => [y(e.$slots, "itemSubtitle", h({ ref_for: !0 }, $(t.flatRow)))]),
527
+ key: "2"
528
+ } : void 0
529
+ ]), 1040))], 64))], 12, be))), 128))], 4)], 46, ye)) : N.value ? (v(), l("div", {
530
+ key: 1,
531
+ ref_key: "scrollElementRef",
532
+ ref: A,
533
+ class: g(["s-ui-list__scroll", qe.value]),
534
+ style: _(We.value)
535
+ }, [(v(!0), l(o, null, ne(x(F), (t) => (v(), l(o, { key: t.key }, [t.divider ? (v(), l("div", Se)) : t.loadMoreForKey ? (v(), l(o, { key: 1 }, [x(k).loadMore ? y(e.$slots, "loadMore", h({
536
+ key: 0,
537
+ ref_for: !0
538
+ }, K(t))) : (v(), c(x(a), {
539
+ key: 1,
540
+ "row-key": t.key,
541
+ depth: t.depth,
542
+ tiny: "",
543
+ title: R.value,
544
+ onClick: (e) => G(t)
545
+ }, d({ _: 2 }, [V(t) ? {
546
+ name: "icon-left",
547
+ fn: C(() => [f(x(T), { size: 16 })]),
548
+ key: "0"
549
+ } : void 0]), 1032, [
550
+ "row-key",
551
+ "depth",
552
+ "title",
553
+ "onClick"
554
+ ]))], 64)) : (v(), l(o, { key: 2 }, [x(k).item ? y(e.$slots, "item", h({
555
+ key: 0,
556
+ ref_for: !0
557
+ }, $(t))) : (v(), c(x(a), h({
558
+ key: 1,
559
+ ref_for: !0
560
+ }, nt(t)), d({ _: 2 }, [
561
+ x(k).itemIconLeft ? {
562
+ name: "icon-left",
563
+ fn: C(() => [y(e.$slots, "itemIconLeft", h({ ref_for: !0 }, $(t)))]),
564
+ key: "0"
565
+ } : void 0,
566
+ x(k).itemTitle ? {
567
+ name: "title",
568
+ fn: C(() => [y(e.$slots, "itemTitle", h({ ref_for: !0 }, $(t)))]),
569
+ key: "1"
570
+ } : void 0,
571
+ x(k).itemSubtitle ? {
572
+ name: "subtitle",
573
+ fn: C(() => [y(e.$slots, "itemSubtitle", h({ ref_for: !0 }, $(t)))]),
574
+ key: "2"
575
+ } : void 0
576
+ ]), 1040))], 64))], 64))), 128))], 6)) : (v(), l("div", Ce, [y(e.$slots, "default")]))], 46, ve));
577
+ }
578
+ });
579
+ //#endregion
580
+ export { L as a, z as i, B as n, de as o, H as r, ue as s, q as t };
@@ -0,0 +1 @@
1
+ const e=require("./useSelectionGroup-TaektE-I.cjs"),t=require("./SListItem-3IpjaE9h.cjs");let n=require("vue"),r=require("@shtabapp/ui-kit-primitives"),i=require("@vueuse/core"),a=require("@tanstack/vue-virtual");var o=(e,t)=>{if(typeof t==`function`)return t(e);let n=e[t];return typeof n==`string`?n:typeof n==`number`?String(n):``},s=(e,t)=>{let n=e[t];return Array.isArray(n)?n.filter(e=>typeof e==`object`&&!!e):[]},c=(e,t)=>{if(!t)return!1;let n=e[t];return typeof n==`boolean`?n:!1},l=`__s-ui-load-more:`,u=e=>`${l}${e}`,d=`__s-ui-list-divider__`,f=()=>Object.create(null),p=e=>e===void 0?new Set:typeof e==`string`?new Set([e]):new Set(e),m=(e,t,n,r)=>{s(e,n).forEach(e=>{let i=o(e,t);i&&r.add(i),m(e,t,n,r)})},h=(e,t,n,r)=>{for(let i of e){if(o(i,n)===t)return i;let e=h(s(i,r),t,n,r);if(e)return e}},g=(e,t,n,r,i,a,l,d)=>{e.forEach(e=>{let f=o(e,t);if(!f)return;let p=s(e,n),m=p.length>0,h=r.includes(f);l.push({key:f,item:e,depth:i,flatIndex:l.length,hasChildren:m,expanded:h,parentKey:a}),m&&h&&g(p,t,n,r,i+1,f,l,d),m&&h&&c(e,d)&&l.push({key:u(f),item:e,depth:i+1,flatIndex:l.length,hasChildren:!1,expanded:!1,parentKey:f,loadMoreForKey:f})})},_=(e,t,n,r)=>{let i=p(r);if(i.size===0)return;let a=[],c=[];for(let r of e){if(s(r,n).length>0)return;i.has(o(r,t))?a.push(r):c.push(r)}if(!(a.length===0||c.length===0))return{selectedItems:a,restItems:c}},v=({items:e,childrenKey:t,itemKey:r,expanded:i,hasMoreChildrenKey:a,selectedOnTop:o,selectedKeys:s})=>({flatRows:(0,n.computed)(()=>{let c=[],l=(0,n.toValue)(e),u=(0,n.toValue)(t),p=(0,n.toValue)(r),m=(0,n.toValue)(a),h=(0,n.toValue)(o)?_(l,p,u,(0,n.toValue)(s)):void 0;return h?(g(h.selectedItems,p,u,i.value,0,void 0,c,m),c.push({key:d,item:f(),depth:0,flatIndex:c.length,hasChildren:!1,expanded:!1,divider:!0}),g(h.restItems,p,u,i.value,0,void 0,c,m),c):(g(l,p,u,i.value,0,void 0,c,m),c)}),toggleExpanded:a=>{let o=(0,n.toValue)(e),s=(0,n.toValue)(t),c=(0,n.toValue)(r),l=new Set(i.value);if(l.has(a)){l.delete(a);let e=h(o,a,c,s);if(e){let t=new Set;m(e,c,s,t),t.forEach(e=>{l.delete(e)})}}else l.add(a);i.value=[...l]},isExpanded:e=>i.value.includes(e)}),y=(e,t)=>(0,i.useInfiniteScroll)(e,()=>{t.onEndReached()},{distance:(0,n.toValue)(t.distance),canLoadMore:()=>t.canLoadMore===void 0?!0:(0,n.toValue)(t.canLoadMore),direction:`bottom`}),b=function(e){return e.NONE=`none`,e.TWO_X_SMALL=`2x-small`,e.X_SMALL=`x-small`,e.SMALL=`small`,e.MEDIUM=`medium`,e.X_MEDIUM=`x-medium`,e.LARGE=`large`,e.X_LARGE=`x-large`,e.TWO_X_LARGE=`2x-large`,e}({}),x=b.TWO_X_SMALL,ee={[b.NONE]:`var(--s-ui-space-gap-none)`,[b.TWO_X_SMALL]:`var(--s-ui-space-gap-2x-small)`,[b.X_SMALL]:`var(--s-ui-space-gap-x-small)`,[b.SMALL]:`var(--s-ui-space-gap-small)`,[b.MEDIUM]:`var(--s-ui-space-gap-medium)`,[b.X_MEDIUM]:`var(--s-ui-space-gap-x-medium)`,[b.LARGE]:`var(--s-ui-space-gap-large)`,[b.X_LARGE]:`var(--s-ui-space-gap-x-large)`,[b.TWO_X_LARGE]:`var(--s-ui-space-gap-2x-large)`},S={[b.NONE]:0,[b.TWO_X_SMALL]:2,[b.X_SMALL]:4,[b.SMALL]:8,[b.MEDIUM]:12,[b.X_MEDIUM]:16,[b.LARGE]:20,[b.X_LARGE]:24,[b.TWO_X_LARGE]:32},te=(e,t)=>`s-ui-list-option-${e}-${t}`,C=(e,t)=>{let n=e[t];if(typeof n==`string`)return n},w=(e,t)=>{let n=e[t];return typeof n==`boolean`?n:!1},T=e=>e in r.ESIconName,E=(e,t)=>{let n=e[t];if(typeof n==`string`&&n.length>0&&T(n))return n},D=(e,t)=>typeof t==`string`&&t?t:Array.isArray(t)&&t[0]?t[0]:e,ne=e=>e.some(e=>e.hasChildren||e.parentKey),O=(e,t,n)=>{if(!e.hasChildren)return null;if(!e.expanded)return{type:`expand`,rowKey:t};let r=n.find(e=>e.parentKey===t);return r?{type:`select`,rowKey:r.key}:null},k=(e,t)=>e.hasChildren&&e.expanded?{type:`collapse`,rowKey:t}:e.parentKey?{type:`select`,rowKey:e.parentKey}:null,re=(e,t,n)=>{let r=n.find(e=>e.key===t);return r?e===`ArrowRight`?O(r,t,n):k(r,t):null},A=(e,t,n,r)=>{for(let i=t;i>=0&&i<e.length;i+=n){let t=e[i];if(t&&t.depth<=r)return t.key}return null},ie=(e,t,n)=>{let r=n.findIndex(e=>e.key===t);if(r===-1)return null;let i=n[r];if(!i)return null;let a=e===`ArrowDown`?1:-1;return A(n,r+a,a,i.depth)},ae=[`role`,`aria-multiselectable`],oe=[`aria-multiselectable`,`aria-activedescendant`,`tabindex`],se=[`data-index`],ce={key:0,class:`s-ui-list__divider`,role:`separator`},le={key:0,class:`s-ui-list__divider`,role:`separator`},j={key:2,class:`s-ui-list__static`},M=(0,n.defineComponent)({__name:`SList`,props:(0,n.mergeModels)({items:{},itemKey:{type:[String,Function],default:`id`},childrenKey:{default:`children`},titleKey:{default:`title`},subtitleKey:{default:`subtitle`},iconLeftKey:{default:`iconLeft`},disabledKey:{default:`disabled`},itemProps:{type:Function},selectionMode:{default:()=>e.n.NONE},mandatory:{type:Boolean,default:!1},virtual:{type:Boolean},gap:{default:()=>x},estimateItemSize:{default:36},overscan:{default:5},endReachedDistance:{default:0},canLoadMore:{type:Function},height:{default:320},maxHeight:{},revealRight:{type:Boolean,default:!1},expandOnClick:{type:Boolean,default:!1},selectedOnTop:{type:Boolean,default:!1},hasMoreChildrenKey:{},loadingMoreChildrenKeys:{default:()=>[]}},{modelValue:{},modelModifiers:{},selected:{},selectedModifiers:{},expanded:{default:()=>[]},expandedModifiers:{}}),emits:(0,n.mergeModels)([`endReached`,`loadMoreChildren`],[`update:modelValue`,`update:selected`,`update:expanded`]),setup(i,{expose:o,emit:s}){let c=(0,n.useModel)(i,`modelValue`),l=(0,n.useModel)(i,`selected`),u=(0,n.useModel)(i,`expanded`),d=s,f=(0,n.useSlots)(),p=(0,n.useId)(),m=(0,n.useTemplateRef)(`scrollElementRef`),h=(0,n.useTemplateRef)(`listRootElementRef`),g=(0,n.computed)(()=>S[i.gap]),_=(0,n.computed)(()=>i.items!==void 0),b=(0,n.computed)(()=>_.value?i.virtual===void 0?!0:i.virtual:!1),{flatRows:x,toggleExpanded:T}=v({items:()=>i.items??[],childrenKey:()=>i.childrenKey,itemKey:()=>i.itemKey,expanded:u,hasMoreChildrenKey:()=>i.hasMoreChildrenKey,selectedOnTop:()=>i.selectedOnTop,selectedKeys:()=>l.value}),{t:O}=(0,r.useUiKitI18n)(),k=(0,n.computed)(()=>new Set(i.loadingMoreChildrenKeys)),A=(0,n.computed)(()=>O(`list.loadMore`)),M=e=>e.loadMoreForKey?k.value.has(e.loadMoreForKey):!1,N=(e,t)=>{k.value.has(e)||d(`loadMoreChildren`,{key:e,item:t})},P=e=>{e.loadMoreForKey&&N(e.loadMoreForKey,e.item)},F=e=>({parentKey:e.loadMoreForKey??``,parentItem:e.item,depth:e.depth,loading:M(e),loadMore:()=>{P(e)}}),I=(0,a.useVirtualizer)((0,n.computed)(()=>({count:x.value.length,getScrollElement:()=>m.value,estimateSize:()=>i.estimateItemSize,gap:g.value,overscan:i.overscan}))),L=(0,n.computed)(()=>{if(_.value)return x.value.reduce((e,t)=>(t.divider||e.push(t.key),e),[])}),R=(0,n.computed)(()=>{let e=new Set;for(let t of x.value)!t.loadMoreForKey&&w(t.item,i.disabledKey)&&e.add(t.key);return e}),z=async e=>{if(!b.value)return;let t=x.value.findIndex(t=>t.key===e);t!==-1&&(I.value.scrollToIndex(t,{align:`auto`}),await new Promise(e=>{requestAnimationFrame(()=>{e()})}),await(0,n.nextTick)())},B=e=>te(p,e),V=e.o({modelValue:()=>l.value,onUpdateModelValue:e=>{l.value=e},mode:()=>i.selectionMode,mandatory:()=>i.mandatory,orientation:()=>e.r.VERTICAL,enableTabNavigation:!0,focusMode:()=>b.value?e.t.ACTIVE_DESCENDANT:e.t.DOM,orderedValues:L,isValueDisabled:e=>R.value.has(e),onBeforeFocusItem:async e=>{await z(e)},onFocusGroup:()=>{m.value?.focus()}}),H=(0,n.computed)(()=>_.value&&ne(x.value)),U=()=>{if(b.value){m.value?.focus();return}h.value?.focus()},W=()=>{V.focusedValue.value=void 0,c.value=void 0;let e=document.activeElement;e instanceof HTMLElement&&e!==m.value&&e.blur(),U()},G=async e=>{b.value&&await z(e)},ue=async e=>{if(W(),e.type===`expand`||e.type===`collapse`){T(e.rowKey),V.select(e.rowKey,!1),await G(e.rowKey);return}V.select(e.rowKey,!1),await G(e.rowKey)},de=async(e,t)=>{if(!H.value||e.key!==`ArrowUp`&&e.key!==`ArrowDown`)return!1;let n=D(t,l.value),r=ie(e.key,n,x.value);return r?(e.preventDefault(),W(),V.select(r,!1),await G(r),!0):!1},fe=async(e,t)=>{if(!H.value||e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return!1;let n=D(t,l.value),r=re(e.key,n,x.value);return r?(e.preventDefault(),await ue(r),!0):!1},K=()=>{if(c.value)return c.value;let e=D(``,l.value);if(e)return e;let t=L.value;if(t){for(let e of t)if(!R.value.has(e))return e}},q=()=>K(),pe=async e=>{let t=q();t&&await J(e,t)},me=[`Enter`,` `,`Spacebar`],he=(e,t)=>{if(!me.includes(e.key))return!1;let n=x.value.find(e=>e.key===t);return n?.loadMoreForKey?(e.preventDefault(),N(n.loadMoreForKey,n.item),!0):!1},J=async(e,t)=>{he(e,t)||await de(e,t)||await fe(e,t)||(await V.handleItemKeydown(e,t),c.value=V.focusedValue.value,!V.focusedValue.value&&!b.value&&U())},ge=async e=>{let t=K();t&&await J(e,t)},_e=async e=>{if(b.value||e.target!==h.value)return;let t=K();t&&await J(e,t)},ve=async()=>{let e=K();if(!e){U();return}await V.focusItem(e,!1)};(0,n.provide)(t.r,{mode:()=>i.selectionMode,isSelected:V.isSelected,selectItem:V.toggle,registerItem:V.registerItem,getItemTabIndex:V.getItemTabIndex,getGroupTabIndex:V.getGroupTabIndex,handleItemKeydown:J,activeKey:()=>c.value,setActiveKey:e=>{c.value=e},isExpanded:e=>u.value.includes(e),toggleExpanded:e=>{if(_.value){T(e);return}let t=new Set(u.value);t.has(e)?t.delete(e):t.add(e),u.value=[...t]},revealRight:()=>i.revealRight,expandOnClick:()=>i.expandOnClick,getItemOptionId:e=>{if(b.value)return B(e)},usesActiveDescendantNavigation:()=>b.value,handlesTreeKeyboardNavigation:()=>_.value});let ye=(0,n.computed)(()=>I.value.getVirtualItems()),be=(0,n.computed)(()=>ye.value.flatMap(e=>{let t=x.value[e.index];return t?[{virtualRow:e,flatRow:t}]:[]})),xe=(0,n.computed)(()=>I.value.getTotalSize()),Se=(0,n.computed)(()=>({height:`${xe.value}px`,position:`relative`,width:`100%`})),Y=(0,n.computed)(()=>{let e={};return typeof i.height==`number`?e.height=`${i.height}px`:i.height&&(e.height=i.height),i.maxHeight&&(typeof i.maxHeight==`number`?e.maxHeight=`${i.maxHeight}px`:e.maxHeight=i.maxHeight),e}),Ce=(0,n.computed)(()=>({"s-ui-list--virtual":b.value,"s-ui-list--static":!b.value})),we=(0,n.computed)(()=>({"--s-ui-list-gap":ee[i.gap]})),X=(0,n.computed)(()=>({"s-ui-list__scroll--flat":_.value&&!b.value})),Z=(0,n.computed)(()=>{if(i.selectionMode===e.n.MULTIPLE)return!0}),Te=(0,n.computed)(()=>{if(!b.value)return`listbox`}),Ee=(0,n.computed)(()=>{if(!b.value)return Z.value}),De=(0,n.computed)(()=>{if(b.value)return V.getGroupTabIndex()}),Oe=(0,n.computed)(()=>c.value?c.value:D(``,l.value)),ke=(0,n.computed)(()=>{if(!b.value)return;let e=Oe.value;if(e)return B(e)});y(()=>m.value,{distance:()=>i.endReachedDistance,canLoadMore:()=>i.canLoadMore?i.canLoadMore():!0,onEndReached:()=>{d(`endReached`,{direction:`bottom`})}});let Ae=e=>({position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`}),je=e=>{e instanceof HTMLElement&&I.value.measureElement(e)},Q=e=>{let t=e.item,n={rowKey:e.key,depth:e.depth,expandable:e.hasChildren,expanded:e.expanded,selected:V.isSelected(e.key),active:c.value===e.key,disabled:w(t,i.disabledKey),title:C(t,i.titleKey),subtitle:C(t,i.subtitleKey),iconLeft:E(t,i.iconLeftKey),revealRight:i.revealRight};return i.itemProps?{...n,...i.itemProps(t,e)}:n},$=e=>({...e,revealRight:i.revealRight,toggleExpanded:()=>{T(e.key)}});return o({focusNavigation:ve,handleKeyboardNavigation:ge}),(e,i)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{ref_key:`listRootElementRef`,ref:h,class:(0,n.normalizeClass)([`s-ui-list`,Ce.value]),style:(0,n.normalizeStyle)(we.value),role:Te.value,"aria-multiselectable":Ee.value,tabindex:`-1`,onKeydown:_e},[_.value&&b.value?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:0,ref_key:`scrollElementRef`,ref:m,class:(0,n.normalizeClass)([`s-ui-list__scroll`,X.value]),style:(0,n.normalizeStyle)(Y.value),role:`listbox`,"aria-multiselectable":Z.value,"aria-activedescendant":ke.value,tabindex:De.value,onKeydown:pe},[(0,n.createElementVNode)(`div`,{class:`s-ui-list__virtual-panel`,style:(0,n.normalizeStyle)(Se.value)},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(be.value,i=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:i.virtualRow.index,class:`s-ui-list__virtual-row`,"data-index":i.virtualRow.index,ref_for:!0,ref:je,style:(0,n.normalizeStyle)(Ae(i.virtualRow))},[i.flatRow.divider?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,ce)):i.flatRow.loadMoreForKey?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.unref)(f).loadMore?(0,n.renderSlot)(e.$slots,`loadMore`,(0,n.mergeProps)({key:0,ref_for:!0},F(i.flatRow))):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(t.t),{key:1,"row-key":i.flatRow.key,depth:i.flatRow.depth,tiny:``,title:A.value,onClick:e=>P(i.flatRow)},(0,n.createSlots)({_:2},[M(i.flatRow)?{name:`icon-left`,fn:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(r.SSpinner),{size:16})]),key:`0`}:void 0]),1032,[`row-key`,`depth`,`title`,`onClick`]))],64)):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:2},[(0,n.unref)(f).item?(0,n.renderSlot)(e.$slots,`item`,(0,n.mergeProps)({key:0,ref_for:!0},$(i.flatRow))):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(t.t),(0,n.mergeProps)({key:1,ref_for:!0},Q(i.flatRow)),(0,n.createSlots)({_:2},[(0,n.unref)(f).itemIconLeft?{name:`icon-left`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`itemIconLeft`,(0,n.mergeProps)({ref_for:!0},$(i.flatRow)))]),key:`0`}:void 0,(0,n.unref)(f).itemTitle?{name:`title`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`itemTitle`,(0,n.mergeProps)({ref_for:!0},$(i.flatRow)))]),key:`1`}:void 0,(0,n.unref)(f).itemSubtitle?{name:`subtitle`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`itemSubtitle`,(0,n.mergeProps)({ref_for:!0},$(i.flatRow)))]),key:`2`}:void 0]),1040))],64))],12,se))),128))],4)],46,oe)):_.value?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,ref_key:`scrollElementRef`,ref:m,class:(0,n.normalizeClass)([`s-ui-list__scroll`,X.value]),style:(0,n.normalizeStyle)(Y.value)},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(x),i=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:i.key},[i.divider?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,le)):i.loadMoreForKey?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.unref)(f).loadMore?(0,n.renderSlot)(e.$slots,`loadMore`,(0,n.mergeProps)({key:0,ref_for:!0},F(i))):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(t.t),{key:1,"row-key":i.key,depth:i.depth,tiny:``,title:A.value,onClick:e=>P(i)},(0,n.createSlots)({_:2},[M(i)?{name:`icon-left`,fn:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(r.SSpinner),{size:16})]),key:`0`}:void 0]),1032,[`row-key`,`depth`,`title`,`onClick`]))],64)):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:2},[(0,n.unref)(f).item?(0,n.renderSlot)(e.$slots,`item`,(0,n.mergeProps)({key:0,ref_for:!0},$(i))):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(t.t),(0,n.mergeProps)({key:1,ref_for:!0},Q(i)),(0,n.createSlots)({_:2},[(0,n.unref)(f).itemIconLeft?{name:`icon-left`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`itemIconLeft`,(0,n.mergeProps)({ref_for:!0},$(i)))]),key:`0`}:void 0,(0,n.unref)(f).itemTitle?{name:`title`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`itemTitle`,(0,n.mergeProps)({ref_for:!0},$(i)))]),key:`1`}:void 0,(0,n.unref)(f).itemSubtitle?{name:`subtitle`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`itemSubtitle`,(0,n.mergeProps)({ref_for:!0},$(i)))]),key:`2`}:void 0]),1040))],64))],64))),128))],6)):((0,n.openBlock)(),(0,n.createElementBlock)(`div`,j,[(0,n.renderSlot)(e.$slots,`default`)]))],46,ae))}});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return M}});
@@ -3,7 +3,7 @@ import { t as r } from "./SButton-DnU_XZ1C.js";
3
3
  import { n as i } from "./useSelectionGroup-cKj38lEN.js";
4
4
  import { t as a } from "./SDropdown-LOTCtlCX.js";
5
5
  import { n as o, t as s } from "./SInput-Csy2uch7.js";
6
- import { i as c, n as l, r as u, t as d } from "./SList-DhjYsx7q.js";
6
+ import { i as c, n as l, r as u, t as d } from "./SList-By6TzeID.js";
7
7
  import { t as f } from "./SListItem-BYMbFs2A.js";
8
8
  import { computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as v, createTextVNode as ee, createVNode as y, defineComponent as b, guardReactiveProps as x, isRef as te, mergeModels as S, mergeProps as C, nextTick as w, normalizeClass as T, normalizeProps as E, normalizeStyle as D, openBlock as O, ref as ne, renderSlot as k, toDisplayString as A, toValue as j, unref as M, useId as re, useModel as ie, useSlots as ae, useTemplateRef as N, vModelText as oe, watch as P, withCtx as F, withDirectives as se, withModifiers as ce } from "vue";
9
9
  import { SIcon as le, useUiKitI18n as ue } from "@shtabapp/ui-kit-primitives";