bitboss-ui 2.1.103 → 2.1.104
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/components/BbSelectPopover/BbSelectPopover.vue.d.ts +277 -0
- package/dist/components/FlatListBox.vue.d.ts +4 -1
- package/dist/components/GroupedListBox.vue.d.ts +4 -1
- package/dist/components/ListBox.vue.d.ts +5 -1
- package/dist/composables/useCoherence.d.ts +1 -0
- package/dist/composables/usePrefill.d.ts +13 -3
- package/dist/index.d.ts +1 -0
- package/dist/index109.js +21 -23
- package/dist/index116.js +1 -1
- package/dist/index122.js +4 -4
- package/dist/index124.js +15 -17
- package/dist/index132.js +1 -1
- package/dist/index134.js +5 -5
- package/dist/index136.js +1 -1
- package/dist/index138.js +2 -2
- package/dist/index14.js +1 -1
- package/dist/index141.js +1 -1
- package/dist/index145.js +1 -1
- package/dist/index146.js +2 -2
- package/dist/index16.js +3 -3
- package/dist/index18.js +3 -3
- package/dist/index20.js +14 -14
- package/dist/index218.js +2 -2
- package/dist/index22.js +14 -14
- package/dist/index220.js +2 -2
- package/dist/index221.js +3 -5
- package/dist/index222.js +4 -7
- package/dist/index223.js +8 -2
- package/dist/index224.js +34 -2
- package/dist/index225.js +67 -3
- package/dist/index226.js +86 -33
- package/dist/index228.js +32 -0
- package/dist/index229.js +17 -5
- package/dist/index230.js +51 -5
- package/dist/index231.js +18 -5
- package/dist/index232.js +3 -5
- package/dist/index233.js +12 -3
- package/dist/index234.js +18 -2
- package/dist/index235.js +13 -6
- package/dist/index236.js +12 -7
- package/dist/index237.js +13 -268
- package/dist/index238.js +2 -52
- package/dist/index239.js +101 -47
- package/dist/index24.js +11 -11
- package/dist/index241.js +95 -55
- package/dist/index243.js +3 -3
- package/dist/index244.js +17 -85
- package/dist/index245.js +14 -0
- package/dist/index246.js +4 -29
- package/dist/index247.js +135 -16
- package/dist/index249.js +107 -51
- package/dist/index250.js +2 -15
- package/dist/index251.js +11 -12
- package/dist/index252.js +2 -2
- package/dist/index253.js +2 -4
- package/dist/index254.js +7 -106
- package/dist/index255.js +9 -0
- package/dist/index256.js +5 -100
- package/dist/index257.js +11 -0
- package/dist/index258.js +23 -3
- package/dist/index259.js +4 -10
- package/dist/index26.js +3 -3
- package/dist/index260.js +22 -2
- package/dist/index261.js +8 -4
- package/dist/index262.js +9 -5
- package/dist/index263.js +25 -5
- package/dist/index264.js +6 -5
- package/dist/index265.js +16 -2
- package/dist/index266.js +3 -20
- package/dist/index267.js +2 -135
- package/dist/index268.js +4 -0
- package/dist/index269.js +6 -187
- package/dist/index270.js +5 -3
- package/dist/index271.js +5 -13
- package/dist/index272.js +5 -13
- package/dist/index273.js +5 -23
- package/dist/index274.js +5 -9
- package/dist/index275.js +5 -23
- package/dist/index276.js +18 -16
- package/dist/index277.js +4 -12
- package/dist/index278.js +7 -102
- package/dist/index279.js +20 -10
- package/dist/index28.js +1 -1
- package/dist/index280.js +33 -9
- package/dist/index281.js +27 -20
- package/dist/index283.js +9 -32
- package/dist/index284.js +3 -4
- package/dist/index285.js +3 -67
- package/dist/index286.js +373 -9
- package/dist/index288.js +188 -2
- package/dist/index289.js +3 -7
- package/dist/index290.js +5 -7
- package/dist/index291.js +6 -3
- package/dist/index292.js +268 -6
- package/dist/index293.js +50 -14
- package/dist/index294.js +52 -5
- package/dist/index295.js +31 -52
- package/dist/index296.js +58 -32
- package/dist/index297.js +32 -372
- package/dist/index298.js +55 -0
- package/dist/index299.js +4 -0
- package/dist/index30.js +3 -3
- package/dist/index300.js +5 -3
- package/dist/index301.js +2 -5
- package/dist/index302.js +3 -280
- package/dist/index303.js +17 -2
- package/dist/index304.js +27 -15
- package/dist/index305.js +3 -2
- package/dist/index306.js +3 -16
- package/dist/index307.js +4 -2
- package/dist/index308.js +7 -27
- package/dist/index310.js +3 -2
- package/dist/index311.js +3 -2
- package/dist/index312.js +1 -1
- package/dist/index313.js +5 -2
- package/dist/index314.js +719 -28
- package/dist/index315.js +366 -2
- package/dist/index316.js +57 -7
- package/dist/index317.js +280 -3
- package/dist/index318.js +2 -17
- package/dist/index319.js +125 -4
- package/dist/index32.js +2 -2
- package/dist/index320.js +2 -3
- package/dist/index321.js +15 -3
- package/dist/index322.js +2 -125
- package/dist/index323.js +16 -2
- package/dist/index324.js +2 -15
- package/dist/index325.js +16 -2
- package/dist/index326.js +2 -19
- package/dist/index327.js +19 -2
- package/dist/index328.js +2 -3
- package/dist/index329.js +3 -2
- package/dist/index330.js +27 -2
- package/dist/index331.js +2 -6
- package/dist/index332.js +2 -4
- package/dist/index333.js +2 -5
- package/dist/index334.js +2 -719
- package/dist/index335.js +2 -366
- package/dist/index336.js +2 -57
- package/dist/index337.js +228 -2
- package/dist/index338.js +6 -5
- package/dist/index339.js +67 -7
- package/dist/index34.js +12 -12
- package/dist/index340.js +67 -7
- package/dist/index341.js +3 -18
- package/dist/index342.js +34 -8
- package/dist/index343.js +6 -15
- package/dist/index344.js +125 -31
- package/dist/index345.js +398 -6
- package/dist/index346.js +197 -126
- package/dist/index347.js +256 -395
- package/dist/index348.js +92 -66
- package/dist/index349.js +133 -66
- package/dist/index350.js +2 -228
- package/dist/index351.js +2 -3
- package/dist/index352.js +5 -191
- package/dist/index353.js +7 -258
- package/dist/index354.js +7 -22
- package/dist/index355.js +21 -0
- package/dist/index356.js +7 -132
- package/dist/index357.js +12 -90
- package/dist/index358.js +21 -1
- package/dist/index36.js +4 -4
- package/dist/index363.js +1 -1
- package/dist/index38.js +244 -244
- package/dist/index40.js +7 -7
- package/dist/index42.js +2 -2
- package/dist/index44.js +27 -29
- package/dist/index46.js +6 -6
- package/dist/index50.js +2 -2
- package/dist/index54.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index58.js +2 -2
- package/dist/index60.js +2 -2
- package/dist/index62.js +5 -5
- package/dist/index68.js +1 -1
- package/dist/index74.js +4 -4
- package/dist/index82.js +7 -7
- package/dist/index84.js +1 -1
- package/dist/index86.js +2 -2
- package/dist/index88.js +3 -3
- package/dist/index90.js +1 -1
- package/dist/index93.js +3 -3
- package/dist/index95.js +2 -2
- package/dist/index97.js +5 -5
- package/dist/index99.js +1 -1
- package/package.json +1 -1
- package/dist/index227.js +0 -30
- package/dist/index240.js +0 -34
- package/dist/index242.js +0 -15
- package/dist/index248.js +0 -19
- package/dist/index282.js +0 -27
- package/dist/index287.js +0 -9
- package/dist/index309.js +0 -4
- package/dist/index359.js +0 -4
package/dist/index347.js
CHANGED
|
@@ -1,400 +1,261 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return Array.from(t.getClientRects());
|
|
105
|
-
}
|
|
106
|
-
function mt(t) {
|
|
107
|
-
const e = R(t), n = I(t), o = t.ownerDocument.body, i = E(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = E(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
108
|
-
let s = -n.scrollLeft + M(t);
|
|
109
|
-
const c = -n.scrollTop;
|
|
110
|
-
return b(o).direction === "rtl" && (s += E(e.clientWidth, o.clientWidth) - i), {
|
|
111
|
-
width: i,
|
|
112
|
-
height: r,
|
|
113
|
-
x: s,
|
|
114
|
-
y: c
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
const K = 25;
|
|
118
|
-
function yt(t, e) {
|
|
119
|
-
const n = L(t), o = R(t), i = n.visualViewport;
|
|
120
|
-
let r = o.clientWidth, s = o.clientHeight, c = 0, f = 0;
|
|
121
|
-
if (i) {
|
|
122
|
-
r = i.width, s = i.height;
|
|
123
|
-
const u = Y();
|
|
124
|
-
(!u || u && e === "fixed") && (c = i.offsetLeft, f = i.offsetTop);
|
|
125
|
-
}
|
|
126
|
-
const l = M(o);
|
|
127
|
-
if (l <= 0) {
|
|
128
|
-
const u = o.ownerDocument, h = u.body, d = getComputedStyle(h), a = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, w = Math.abs(o.clientWidth - h.clientWidth - a);
|
|
129
|
-
w <= K && (r -= w);
|
|
130
|
-
} else l <= K && (r += l);
|
|
131
|
-
return {
|
|
132
|
-
width: r,
|
|
133
|
-
height: s,
|
|
134
|
-
x: c,
|
|
135
|
-
y: f
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
const xt = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
139
|
-
function vt(t, e) {
|
|
140
|
-
const n = T(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = C(t) ? F(t) : y(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, f = i * r.x, l = o * r.y;
|
|
141
|
-
return {
|
|
142
|
-
width: s,
|
|
143
|
-
height: c,
|
|
144
|
-
x: f,
|
|
145
|
-
y: l
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
function j(t, e, n) {
|
|
149
|
-
let o;
|
|
150
|
-
if (e === "viewport")
|
|
151
|
-
o = yt(t, n);
|
|
152
|
-
else if (e === "document")
|
|
153
|
-
o = mt(R(t));
|
|
154
|
-
else if (v(e))
|
|
155
|
-
o = vt(e, n);
|
|
156
|
-
else {
|
|
157
|
-
const i = tt(t);
|
|
158
|
-
o = {
|
|
159
|
-
x: e.x - i.x,
|
|
160
|
-
y: e.y - i.y,
|
|
161
|
-
width: e.width,
|
|
162
|
-
height: e.height
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
return J(o);
|
|
166
|
-
}
|
|
167
|
-
function ot(t, e) {
|
|
168
|
-
const n = W(t);
|
|
169
|
-
return n === e || !v(n) || H(n) ? !1 : b(n).position === "fixed" || ot(n, e);
|
|
170
|
-
}
|
|
171
|
-
function bt(t, e) {
|
|
172
|
-
const n = e.get(t);
|
|
173
|
-
if (n)
|
|
174
|
-
return n;
|
|
175
|
-
let o = z(t, [], !1).filter((c) => v(c) && _(c) !== "body"), i = null;
|
|
176
|
-
const r = b(t).position === "fixed";
|
|
177
|
-
let s = r ? W(t) : t;
|
|
178
|
-
for (; v(s) && !H(s); ) {
|
|
179
|
-
const c = b(s), f = Q(s);
|
|
180
|
-
!f && c.position === "fixed" && (i = null), (r ? !f && !i : !f && c.position === "static" && !!i && xt.has(i.position) || q(s) && !f && ot(t, s)) ? o = o.filter((u) => u !== s) : i = c, s = W(s);
|
|
181
|
-
}
|
|
182
|
-
return e.set(t, o), o;
|
|
183
|
-
}
|
|
184
|
-
function Rt(t) {
|
|
185
|
-
let {
|
|
186
|
-
element: e,
|
|
187
|
-
boundary: n,
|
|
188
|
-
rootBoundary: o,
|
|
189
|
-
strategy: i
|
|
190
|
-
} = t;
|
|
191
|
-
const s = [...n === "clippingAncestors" ? $(e) ? [] : bt(e, this._c) : [].concat(n), o], c = s[0], f = s.reduce((l, u) => {
|
|
192
|
-
const h = j(e, u, i);
|
|
193
|
-
return l.top = E(h.top, l.top), l.right = V(h.right, l.right), l.bottom = V(h.bottom, l.bottom), l.left = E(h.left, l.left), l;
|
|
194
|
-
}, j(e, c, i));
|
|
195
|
-
return {
|
|
196
|
-
width: f.right - f.left,
|
|
197
|
-
height: f.bottom - f.top,
|
|
198
|
-
x: f.left,
|
|
199
|
-
y: f.top
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
function Ct(t) {
|
|
203
|
-
const {
|
|
204
|
-
width: e,
|
|
205
|
-
height: n
|
|
206
|
-
} = Z(t);
|
|
207
|
-
return {
|
|
208
|
-
width: e,
|
|
209
|
-
height: n
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
function Ot(t, e, n) {
|
|
213
|
-
const o = C(e), i = R(e), r = n === "fixed", s = T(t, !0, r, e);
|
|
214
|
-
let c = {
|
|
215
|
-
scrollLeft: 0,
|
|
216
|
-
scrollTop: 0
|
|
217
|
-
};
|
|
218
|
-
const f = y(0);
|
|
219
|
-
function l() {
|
|
220
|
-
f.x = M(i);
|
|
221
|
-
}
|
|
222
|
-
if (o || !o && !r)
|
|
223
|
-
if ((_(e) !== "body" || q(i)) && (c = I(e)), o) {
|
|
224
|
-
const a = T(e, !0, r, e);
|
|
225
|
-
f.x = a.x + e.clientLeft, f.y = a.y + e.clientTop;
|
|
226
|
-
} else i && l();
|
|
227
|
-
r && !o && i && l();
|
|
228
|
-
const u = i && !o && !r ? et(i, c) : y(0), h = s.left + c.scrollLeft - f.x - u.x, d = s.top + c.scrollTop - f.y - u.y;
|
|
229
|
-
return {
|
|
230
|
-
x: h,
|
|
231
|
-
y: d,
|
|
232
|
-
width: s.width,
|
|
233
|
-
height: s.height
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
function N(t) {
|
|
237
|
-
return b(t).position === "static";
|
|
238
|
-
}
|
|
239
|
-
function G(t, e) {
|
|
240
|
-
if (!C(t) || b(t).position === "fixed")
|
|
241
|
-
return null;
|
|
242
|
-
if (e)
|
|
243
|
-
return e(t);
|
|
244
|
-
let n = t.offsetParent;
|
|
245
|
-
return R(t) === n && (n = n.ownerDocument.body), n;
|
|
246
|
-
}
|
|
247
|
-
function nt(t, e) {
|
|
248
|
-
const n = L(t);
|
|
249
|
-
if ($(t))
|
|
250
|
-
return n;
|
|
251
|
-
if (!C(t)) {
|
|
252
|
-
let i = W(t);
|
|
253
|
-
for (; i && !H(i); ) {
|
|
254
|
-
if (v(i) && !N(i))
|
|
255
|
-
return i;
|
|
256
|
-
i = W(i);
|
|
257
|
-
}
|
|
258
|
-
return n;
|
|
259
|
-
}
|
|
260
|
-
let o = G(t, e);
|
|
261
|
-
for (; o && ht(o) && N(o); )
|
|
262
|
-
o = G(o, e);
|
|
263
|
-
return o && H(o) && N(o) && !Q(o) ? n : o || at(t) || n;
|
|
264
|
-
}
|
|
265
|
-
const Lt = async function(t) {
|
|
266
|
-
const e = this.getOffsetParent || nt, n = this.getDimensions, o = await n(t.floating);
|
|
267
|
-
return {
|
|
268
|
-
reference: Ot(t.reference, await e(t.floating), t.strategy),
|
|
269
|
-
floating: {
|
|
270
|
-
x: 0,
|
|
271
|
-
y: 0,
|
|
272
|
-
width: o.width,
|
|
273
|
-
height: o.height
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
function Tt(t) {
|
|
278
|
-
return b(t).direction === "rtl";
|
|
279
|
-
}
|
|
280
|
-
const Et = {
|
|
281
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: pt,
|
|
282
|
-
getDocumentElement: R,
|
|
283
|
-
getClippingRect: Rt,
|
|
284
|
-
getOffsetParent: nt,
|
|
285
|
-
getElementRects: Lt,
|
|
286
|
-
getClientRects: wt,
|
|
287
|
-
getDimensions: Ct,
|
|
288
|
-
getScale: F,
|
|
289
|
-
isElement: v,
|
|
290
|
-
isRTL: Tt
|
|
291
|
-
};
|
|
292
|
-
function it(t, e) {
|
|
293
|
-
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
294
|
-
}
|
|
295
|
-
function Ft(t, e) {
|
|
296
|
-
let n = null, o;
|
|
297
|
-
const i = R(t);
|
|
298
|
-
function r() {
|
|
299
|
-
var c;
|
|
300
|
-
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
301
|
-
}
|
|
302
|
-
function s(c, f) {
|
|
303
|
-
c === void 0 && (c = !1), f === void 0 && (f = 1), r();
|
|
304
|
-
const l = t.getBoundingClientRect(), {
|
|
305
|
-
left: u,
|
|
306
|
-
top: h,
|
|
307
|
-
width: d,
|
|
308
|
-
height: a
|
|
309
|
-
} = l;
|
|
310
|
-
if (c || e(), !d || !a)
|
|
311
|
-
return;
|
|
312
|
-
const w = A(h), p = A(i.clientWidth - (u + d)), m = A(i.clientHeight - (h + a)), g = A(u), O = {
|
|
313
|
-
rootMargin: -w + "px " + -p + "px " + -m + "px " + -g + "px",
|
|
314
|
-
threshold: E(0, V(1, f)) || 1
|
|
1
|
+
import { defineComponent as pe, useTemplateRef as G, computed as i, watch as E, ref as ve, createElementBlock as r, openBlock as c, withModifiers as he, normalizeStyle as V, normalizeClass as J, createElementVNode as v, renderSlot as b, createTextVNode as P, toDisplayString as x, unref as g, Fragment as Y, renderList as K } from "vue";
|
|
2
|
+
import { isNil as f } from "./index250.js";
|
|
3
|
+
import { useVirtualizer as be } from "./index362.js";
|
|
4
|
+
import { useLocale as me } from "./index236.js";
|
|
5
|
+
import { useListboxFocus as xe } from "./index363.js";
|
|
6
|
+
import { indexBy as A } from "./index279.js";
|
|
7
|
+
const ge = { class: "bb-listbox__outer-container scrollbar-border" }, fe = {
|
|
8
|
+
ref: "inner",
|
|
9
|
+
class: "bb-listbox__inner-container",
|
|
10
|
+
tabindex: "-1"
|
|
11
|
+
}, He = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "bb-listbox__loading"
|
|
14
|
+
}, _e = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "bb-listbox__no-data"
|
|
17
|
+
}, ye = ["aria-activedescendant", "aria-multiselectable"], Ie = ["aria-labelledby", "aria-disabled"], $e = ["id"], ke = { class: "bb-listbox__group-header-label" }, Be = ["aria-selected", "aria-setsize", "aria-posinset", "id", "data-index"], De = { class: "autocomplete-option__label" }, Ee = /* @__PURE__ */ pe({
|
|
18
|
+
__name: "GroupedListBox",
|
|
19
|
+
props: {
|
|
20
|
+
compact: { type: Boolean },
|
|
21
|
+
groups: {},
|
|
22
|
+
headerHeight: {},
|
|
23
|
+
loading: { type: Boolean },
|
|
24
|
+
loadingText: {},
|
|
25
|
+
multiple: { type: Boolean },
|
|
26
|
+
noDataText: {},
|
|
27
|
+
open: { type: Boolean },
|
|
28
|
+
optionHeight: {},
|
|
29
|
+
transitionDuration: { default: 250 }
|
|
30
|
+
},
|
|
31
|
+
emits: ["option:selected", "option:unselected", "focused:change"],
|
|
32
|
+
setup(Q, { expose: U, emit: W }) {
|
|
33
|
+
const s = Q, H = W, { t: F } = me(), h = G("inner"), X = G("listbox"), _ = i(() => s.optionHeight ? s.optionHeight : s.compact ? 32 : 40), y = i(() => s.headerHeight ? s.headerHeight : s.compact ? 24 : 32), Z = i(() => {
|
|
34
|
+
let e = 0;
|
|
35
|
+
return s.groups.map((a, t) => {
|
|
36
|
+
const l = a.id, p = e, d = a.options.length, D = y.value + d * _.value, M = `group-header-${a.id}`, S = typeof a.data == "string" ? a.data : JSON.stringify(a.data), T = a.options.every((O) => O.disabled), z = a.data, L = a.options;
|
|
37
|
+
return e += d, {
|
|
38
|
+
offset: p,
|
|
39
|
+
length: d,
|
|
40
|
+
height: D,
|
|
41
|
+
id: l,
|
|
42
|
+
headerId: M,
|
|
43
|
+
label: S,
|
|
44
|
+
index: t,
|
|
45
|
+
allOptionsAreDisabled: T,
|
|
46
|
+
data: z,
|
|
47
|
+
options: L
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
}), n = i(
|
|
51
|
+
() => A(Z.value, "index")
|
|
52
|
+
), m = i(() => s.groups.flatMap(
|
|
53
|
+
(e, a) => e.options.map((t, l) => {
|
|
54
|
+
const p = t.valueHash, d = n.value[a].offset + l, D = e.id, M = !!t.selected, S = !!t.disabled, T = t.item, z = t.text, L = t.value, O = d === u.value;
|
|
55
|
+
return {
|
|
56
|
+
id: p,
|
|
57
|
+
globalIndex: d,
|
|
58
|
+
groupIndex: a,
|
|
59
|
+
groupId: D,
|
|
60
|
+
indexInGroup: l,
|
|
61
|
+
selected: M,
|
|
62
|
+
disabled: S,
|
|
63
|
+
item: T,
|
|
64
|
+
text: z,
|
|
65
|
+
value: L,
|
|
66
|
+
valueHash: t.valueHash,
|
|
67
|
+
focused: O
|
|
68
|
+
};
|
|
69
|
+
})
|
|
70
|
+
)), o = i(() => A(m.value, "id")), I = i(
|
|
71
|
+
() => A(m.value, "globalIndex")
|
|
72
|
+
), N = (e) => `listbox-option-${e}`, $ = i(() => {
|
|
73
|
+
if (f(u.value)) return;
|
|
74
|
+
const e = I.value[u.value];
|
|
75
|
+
if (e)
|
|
76
|
+
return N(e.valueHash);
|
|
77
|
+
}), k = i(() => m.value.length > 0), w = (e) => y.value + s.groups[e].options.length * _.value, B = be({
|
|
78
|
+
get count() {
|
|
79
|
+
return s.groups.length;
|
|
80
|
+
},
|
|
81
|
+
getScrollElement: () => h.value ?? null,
|
|
82
|
+
estimateSize: (e) => w(e),
|
|
83
|
+
overscan: 2
|
|
84
|
+
}), ee = i(() => B.value.getVirtualItems()), te = i(() => B.value.getTotalSize()), {
|
|
85
|
+
focusedIndex: u,
|
|
86
|
+
focusNext: ae,
|
|
87
|
+
focusPrevious: le,
|
|
88
|
+
focusFirst: se,
|
|
89
|
+
focusLast: oe,
|
|
90
|
+
focusFirstSelected: ne,
|
|
91
|
+
focusLastSelected: ie,
|
|
92
|
+
focusByHash: ue,
|
|
93
|
+
blur: C,
|
|
94
|
+
getHighlighted: de
|
|
95
|
+
} = xe(
|
|
96
|
+
i(() => m.value),
|
|
97
|
+
{ disabled: () => !s.open }
|
|
98
|
+
), re = () => {
|
|
99
|
+
if (!h.value || f(u.value)) return;
|
|
100
|
+
const e = h.value.querySelector(
|
|
101
|
+
`[data-index="${u.value}"]`
|
|
102
|
+
);
|
|
103
|
+
e && e.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
315
104
|
};
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
105
|
+
E(u, () => {
|
|
106
|
+
re(), H("focused:change", $.value);
|
|
107
|
+
});
|
|
108
|
+
const R = () => {
|
|
109
|
+
if (f(u.value) || !s.open) return;
|
|
110
|
+
const e = I.value[u.value];
|
|
111
|
+
if (!e || e.disabled) return;
|
|
112
|
+
const a = {
|
|
113
|
+
text: e.text,
|
|
114
|
+
value: e.value,
|
|
115
|
+
item: e.item,
|
|
116
|
+
valueHash: e.valueHash,
|
|
117
|
+
selected: e.selected,
|
|
118
|
+
disabled: e.disabled
|
|
119
|
+
};
|
|
120
|
+
e.selected ? H("option:unselected", a) : H("option:selected", a);
|
|
121
|
+
}, j = ve(0), q = () => {
|
|
122
|
+
h.value && (j.value = h.value.scrollHeight);
|
|
123
|
+
}, ce = (e) => {
|
|
124
|
+
if (e.preventDefault(), h.value && e.target instanceof HTMLElement && X.value) {
|
|
125
|
+
let a = e.target, t = a.dataset.index;
|
|
126
|
+
for (; f(t) && a.parentElement; )
|
|
127
|
+
a = a.parentElement, t = a.dataset.index;
|
|
128
|
+
if (t) {
|
|
129
|
+
const l = I.value[+t];
|
|
130
|
+
l && !l.disabled && (u.value = +t, R());
|
|
131
|
+
}
|
|
325
132
|
}
|
|
326
|
-
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
133
|
+
};
|
|
134
|
+
return E(() => s.open, q, { flush: "post" }), E(
|
|
135
|
+
() => s.groups,
|
|
136
|
+
(e, a) => {
|
|
137
|
+
const t = e.flatMap((p) => p.options.map((d) => d.valueHash)).join(","), l = a.flatMap((p) => p.options.map((d) => d.valueHash)).join(",");
|
|
138
|
+
t !== l && (B.value.measure(), q(), C());
|
|
139
|
+
},
|
|
140
|
+
{ flush: "post" }
|
|
141
|
+
), U({
|
|
142
|
+
focusNext: ae,
|
|
143
|
+
focusPrevious: le,
|
|
144
|
+
focusFirst: se,
|
|
145
|
+
focusFirstSelected: ne,
|
|
146
|
+
focusLast: oe,
|
|
147
|
+
focusLastSelected: ie,
|
|
148
|
+
blur: C,
|
|
149
|
+
confirmOption: R,
|
|
150
|
+
focusByHash: ue,
|
|
151
|
+
getHighlighted: de,
|
|
152
|
+
getActiveDescendantId: () => $.value
|
|
153
|
+
}), (e, a) => (c(), r("span", {
|
|
154
|
+
class: J(["bb-listbox bb-listbox--grouped", {
|
|
155
|
+
"bb-listbox--compact": e.compact,
|
|
156
|
+
"bb-listbox--loading": e.loading,
|
|
157
|
+
"bb-listbox--multiple": e.multiple,
|
|
158
|
+
"bb-listbox--no-data": !k.value,
|
|
159
|
+
"bb-listbox--open": e.open
|
|
160
|
+
}]),
|
|
161
|
+
style: V({
|
|
162
|
+
"--transition-duration": `${e.transitionDuration}ms`,
|
|
163
|
+
"--overlay-min-height": `${j.value}px`,
|
|
164
|
+
"--option-height": `${_.value}px`,
|
|
165
|
+
"--group-header-height": `${y.value}px`
|
|
166
|
+
}),
|
|
167
|
+
onClick: he(ce, ["stop"])
|
|
168
|
+
}, [
|
|
169
|
+
v("span", ge, [
|
|
170
|
+
v("span", fe, [
|
|
171
|
+
b(e.$slots, "options:prepend"),
|
|
172
|
+
e.loading && !k.value ? (c(), r("span", He, [
|
|
173
|
+
b(e.$slots, "loading", {}, () => [
|
|
174
|
+
P(x(e.loadingText || g(F)("common.loadingText").value), 1)
|
|
175
|
+
])
|
|
176
|
+
])) : k.value ? (c(), r("span", {
|
|
177
|
+
key: 2,
|
|
178
|
+
role: "listbox",
|
|
179
|
+
ref: "listbox",
|
|
180
|
+
style: V({ height: `${te.value}px` }),
|
|
181
|
+
"aria-activedescendant": $.value,
|
|
182
|
+
"aria-multiselectable": e.multiple ? !0 : void 0,
|
|
183
|
+
tabindex: "-1"
|
|
184
|
+
}, [
|
|
185
|
+
(c(!0), r(Y, null, K(ee.value, (t) => (c(), r("span", {
|
|
186
|
+
key: n.value[t.index].id,
|
|
187
|
+
style: V({ transform: `translateY(${t.start}px)` }),
|
|
188
|
+
role: "group",
|
|
189
|
+
"aria-labelledby": n.value[t.index].headerId,
|
|
190
|
+
"aria-disabled": n.value[t.index].allOptionsAreDisabled,
|
|
191
|
+
class: "bb-listbox__group"
|
|
192
|
+
}, [
|
|
193
|
+
v("span", {
|
|
194
|
+
class: "bb-listbox__group-header",
|
|
195
|
+
role: "presentation",
|
|
196
|
+
id: n.value[t.index].headerId
|
|
197
|
+
}, [
|
|
198
|
+
b(e.$slots, "group", {
|
|
199
|
+
text: n.value[t.index].label,
|
|
200
|
+
item: n.value[t.index].data,
|
|
201
|
+
index: t.index,
|
|
202
|
+
length: n.value[t.index].length,
|
|
203
|
+
disabled: n.value[t.index].allOptionsAreDisabled
|
|
204
|
+
}, () => [
|
|
205
|
+
v("span", ke, x(n.value[t.index].label), 1)
|
|
206
|
+
])
|
|
207
|
+
], 8, $e),
|
|
208
|
+
(c(!0), r(Y, null, K(n.value[t.index].options, (l) => (c(), r("span", {
|
|
209
|
+
key: l.valueHash,
|
|
210
|
+
"aria-selected": o.value[l.valueHash].selected ? !0 : void 0,
|
|
211
|
+
"aria-setsize": n.value[t.index].length,
|
|
212
|
+
"aria-posinset": o.value[l.valueHash].indexInGroup + 1,
|
|
213
|
+
id: N(l.valueHash),
|
|
214
|
+
class: J({
|
|
215
|
+
"bb-listbox__option autocomplete-option": !0,
|
|
216
|
+
"autocomplete-option--focused": g(u) === o.value[l.valueHash].globalIndex,
|
|
217
|
+
"autocomplete-option--selected": o.value[l.valueHash].selected,
|
|
218
|
+
"autocomplete-option--disabled": o.value[l.valueHash].disabled
|
|
219
|
+
}),
|
|
220
|
+
"data-index": o.value[l.valueHash].globalIndex,
|
|
221
|
+
role: "option"
|
|
222
|
+
}, [
|
|
223
|
+
b(e.$slots, "option", {
|
|
224
|
+
disabled: !!o.value[l.valueHash].disabled,
|
|
225
|
+
focused: g(u) === o.value[l.valueHash].globalIndex,
|
|
226
|
+
index: o.value[l.valueHash].globalIndex,
|
|
227
|
+
item: o.value[l.valueHash].item,
|
|
228
|
+
selected: !!o.value[l.valueHash].selected,
|
|
229
|
+
text: o.value[l.valueHash].text,
|
|
230
|
+
value: o.value[l.valueHash].value
|
|
231
|
+
}, () => [
|
|
232
|
+
a[0] || (a[0] = v("svg", {
|
|
233
|
+
class: "autocomplete-option__checkbox",
|
|
234
|
+
role: "presentation",
|
|
235
|
+
viewBox: "276.411 158.834 114.971 114.97"
|
|
236
|
+
}, [
|
|
237
|
+
v("path", {
|
|
238
|
+
d: "M 297.574 224.786 L 318.309 243.134 L 371.568 189.232",
|
|
239
|
+
fill: "none",
|
|
240
|
+
"stroke-linecap": "round",
|
|
241
|
+
"stroke-width": "14px"
|
|
242
|
+
})
|
|
243
|
+
], -1)),
|
|
244
|
+
v("span", De, x(o.value[l.valueHash].text), 1)
|
|
245
|
+
])
|
|
246
|
+
], 10, Be))), 128))
|
|
247
|
+
], 12, Ie))), 128))
|
|
248
|
+
], 12, ye)) : (c(), r("span", _e, [
|
|
249
|
+
b(e.$slots, "no-data", {}, () => [
|
|
250
|
+
P(x(e.noDataText || g(F)("common.noDataText").value), 1)
|
|
251
|
+
])
|
|
252
|
+
])),
|
|
253
|
+
b(e.$slots, "options:append")
|
|
254
|
+
], 512)
|
|
255
|
+
])
|
|
256
|
+
], 6));
|
|
369
257
|
}
|
|
370
|
-
|
|
371
|
-
var g;
|
|
372
|
-
u.forEach((x) => {
|
|
373
|
-
i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
|
|
374
|
-
}), h?.(), (g = a) == null || g.disconnect(), a = null, f && cancelAnimationFrame(w);
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
const Dt = rt, Ht = ct, It = st, Mt = lt, Nt = ft, Vt = (t, e, n) => {
|
|
378
|
-
const o = /* @__PURE__ */ new Map(), i = {
|
|
379
|
-
platform: Et,
|
|
380
|
-
...n
|
|
381
|
-
}, r = {
|
|
382
|
-
...i.platform,
|
|
383
|
-
_c: o
|
|
384
|
-
};
|
|
385
|
-
return ut(t, e, {
|
|
386
|
-
...i,
|
|
387
|
-
platform: r
|
|
388
|
-
});
|
|
389
|
-
};
|
|
258
|
+
});
|
|
390
259
|
export {
|
|
391
|
-
|
|
392
|
-
At as autoUpdate,
|
|
393
|
-
Vt as computePosition,
|
|
394
|
-
It as flip,
|
|
395
|
-
z as getOverflowAncestors,
|
|
396
|
-
Mt as hide,
|
|
397
|
-
Dt as offset,
|
|
398
|
-
Et as platform,
|
|
399
|
-
Ht as shift
|
|
260
|
+
Ee as default
|
|
400
261
|
};
|