bitboss-ui 2.1.118 → 2.1.119
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/ai/BbSelectPopover.md +2 -0
- package/dist/index109.js +9 -9
- package/dist/index110.js +165 -163
- package/dist/index118.js +1 -1
- package/dist/index124.js +3 -3
- package/dist/index126.js +13 -13
- package/dist/index134.js +1 -1
- package/dist/index136.js +5 -5
- package/dist/index138.js +1 -1
- package/dist/index14.js +1 -1
- package/dist/index140.js +2 -2
- package/dist/index144.js +1 -1
- package/dist/index146.js +2 -2
- package/dist/index149.js +2 -2
- package/dist/index16.js +3 -3
- package/dist/index18.js +3 -3
- package/dist/index20.js +9 -9
- package/dist/index22.js +14 -14
- package/dist/index222.js +138 -2
- package/dist/index223.js +2 -138
- package/dist/index224.js +34 -5
- package/dist/index225.js +2 -8
- package/dist/index226.js +2 -2
- package/dist/index227.js +2 -2
- package/dist/index228.js +13 -3
- package/dist/index229.js +5 -7
- package/dist/index230.js +8 -2
- package/dist/index231.js +4 -86
- package/dist/index232.js +22 -0
- package/dist/index233.js +8 -28
- package/dist/index234.js +2 -16
- package/dist/index235.js +4 -51
- package/dist/index236.js +3 -18
- package/dist/index237.js +11 -3
- package/dist/index238.js +3 -12
- package/dist/index239.js +2 -18
- package/dist/index24.js +10 -10
- package/dist/index240.js +18 -4
- package/dist/index241.js +22 -7
- package/dist/index242.js +12 -13
- package/dist/index243.js +50 -12
- package/dist/index244.js +18 -135
- package/dist/index245.js +14 -0
- package/dist/index246.js +17 -4
- package/dist/index247.js +29 -22
- package/dist/index248.js +18 -4
- package/dist/index249.js +12 -19
- package/dist/index250.js +129 -28
- package/dist/index252.js +33 -9
- package/dist/index253.js +106 -20
- package/dist/index254.js +6 -188
- package/dist/index255.js +2 -3
- package/dist/index256.js +106 -5
- package/dist/index258.js +100 -5
- package/dist/index26.js +3 -3
- package/dist/index260.js +3 -5
- package/dist/index261.js +3 -2
- package/dist/index262.js +5 -6
- package/dist/index263.js +5 -268
- package/dist/index264.js +5 -52
- package/dist/index265.js +5 -52
- package/dist/index266.js +6 -32
- package/dist/index267.js +6 -58
- package/dist/index268.js +267 -52
- package/dist/index269.js +52 -5
- package/dist/index270.js +52 -5
- package/dist/index271.js +32 -5
- package/dist/index272.js +60 -3
- package/dist/index273.js +25 -9
- package/dist/index274.js +2 -33
- package/dist/index275.js +7 -28
- package/dist/index276.js +9 -0
- package/dist/index277.js +4 -11
- package/dist/index278.js +9 -18
- package/dist/index279.js +9 -12
- package/dist/index28.js +1 -1
- package/dist/index280.js +20 -105
- package/dist/index282.js +81 -95
- package/dist/index284.js +3 -107
- package/dist/index285.js +6 -2
- package/dist/index286.js +16 -7
- package/dist/index287.js +373 -7
- package/dist/index289.js +7 -6
- package/dist/index290.js +5 -3
- package/dist/index291.js +5 -6
- package/dist/index292.js +5 -16
- package/dist/index293.js +5 -2
- package/dist/index294.js +51 -7
- package/dist/index295.js +67 -23
- package/dist/index296.js +188 -3
- package/dist/index297.js +3 -10
- package/dist/index298.js +8 -2
- package/dist/index299.js +23 -67
- package/dist/index30.js +3 -3
- package/dist/index300.js +25 -370
- package/dist/index302.js +7 -3
- package/dist/index303.js +2 -17
- package/dist/index304.js +3 -28
- package/dist/index305.js +3 -4
- package/dist/index306.js +3 -7
- package/dist/index307.js +1 -1
- package/dist/index308.js +27 -3
- package/dist/index309.js +17 -3
- package/dist/index310.js +4 -280
- package/dist/index311.js +3 -2
- package/dist/index312.js +277 -13
- package/dist/index313.js +2 -2
- package/dist/index314.js +9 -9
- package/dist/index316.js +12 -23
- package/dist/index318.js +27 -2
- package/dist/index319.js +2 -2
- package/dist/index32.js +2 -2
- package/dist/index320.js +1 -1
- package/dist/index321.js +1 -1
- package/dist/index322.js +1 -1
- package/dist/index323.js +4 -0
- package/dist/index324.js +2 -7
- package/dist/index325.js +5 -3
- package/dist/index326.js +5 -125
- package/dist/index327.js +719 -2
- package/dist/index328.js +366 -15
- package/dist/index329.js +57 -2
- package/dist/index331.js +7 -2
- package/dist/index332.js +1 -1
- package/dist/index333.js +125 -3
- package/dist/index334.js +2 -2
- package/dist/index335.js +15 -5
- package/dist/index336.js +2 -719
- package/dist/index337.js +19 -366
- package/dist/index338.js +2 -57
- package/dist/index339.js +2 -5
- package/dist/index34.js +8 -8
- package/dist/index340.js +3 -5
- package/dist/index341.js +67 -2
- package/dist/index342.js +40 -40
- package/dist/index343.js +3 -67
- package/dist/index344.js +5 -6
- package/dist/index345.js +2 -2
- package/dist/index346.js +7 -3
- package/dist/index349.js +1 -1
- package/dist/index350.js +1 -1
- package/dist/index351.js +91 -33
- package/dist/index352.js +222 -123
- package/dist/index353.js +198 -396
- package/dist/index354.js +255 -18
- package/dist/index355.js +37 -0
- package/dist/index356.js +121 -85
- package/dist/index357.js +378 -114
- package/dist/index358.js +18 -196
- package/dist/index36.js +4 -4
- package/dist/index360.js +2 -228
- package/dist/index361.js +1 -1
- package/dist/index362.js +134 -2
- package/dist/index366.js +1 -1
- package/dist/index38.js +21 -21
- package/dist/index40.js +7 -7
- package/dist/index42.js +2 -2
- package/dist/index44.js +8 -8
- 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 +6 -6
- 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 +2 -2
- package/dist/index257.js +0 -7
- package/dist/index259.js +0 -7
- package/dist/index288.js +0 -27
- package/dist/index330.js +0 -21
- package/dist/index359.js +0 -261
- /package/dist/{index251.js → index281.js} +0 -0
package/dist/index110.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { defineComponent as at, ref as f, computed as l, watch as Q, toRef as X, onBeforeUnmount as rt, createElementBlock as Y, openBlock as Z, Fragment as nt, renderSlot as m, createCommentVNode as it, createVNode as F, normalizeProps as
|
|
2
|
-
import { extractDomContainer as
|
|
3
|
-
import { get as
|
|
4
|
-
import { hash as
|
|
5
|
-
import { isNil as
|
|
6
|
-
import { matchAnyKey as Be } from "./
|
|
7
|
-
import { parseWidthString as
|
|
8
|
-
import { useArray as
|
|
9
|
-
import { useBaseOptions as
|
|
10
|
-
import { useCoherence as
|
|
11
|
-
import { useElementSize as
|
|
12
|
-
import { useHashedWatcher as Ae } from "./
|
|
13
|
-
import { useId as
|
|
14
|
-
import { useIndexById as Ie } from "./
|
|
15
|
-
import { useItemsGetter as
|
|
16
|
-
import { useMobile as
|
|
17
|
-
import { usePrefill as
|
|
18
|
-
import { useUntil as
|
|
19
|
-
import { wait as
|
|
1
|
+
import { defineComponent as at, ref as f, computed as l, watch as Q, toRef as X, onBeforeUnmount as rt, createElementBlock as Y, openBlock as Z, Fragment as nt, renderSlot as m, createCommentVNode as it, createVNode as F, normalizeProps as ge, mergeProps as ee, withCtx as g, createElementVNode as L, withDirectives as lt, withKeys as h, withModifiers as c, unref as I, vModelDynamic as st, guardReactiveProps as ut, nextTick as we } from "vue";
|
|
2
|
+
import { extractDomContainer as dt } from "./index235.js";
|
|
3
|
+
import { get as ct } from "./index237.js";
|
|
4
|
+
import { hash as te } from "./index238.js";
|
|
5
|
+
import { isNil as pt } from "./index239.js";
|
|
6
|
+
import { matchAnyKey as Be } from "./index240.js";
|
|
7
|
+
import { parseWidthString as vt } from "./index241.js";
|
|
8
|
+
import { useArray as ft } from "./index242.js";
|
|
9
|
+
import { useBaseOptions as mt } from "./index243.js";
|
|
10
|
+
import { useCoherence as ht } from "./index244.js";
|
|
11
|
+
import { useElementSize as bt, useIntersectionObserver as yt } from "./index146.js";
|
|
12
|
+
import { useHashedWatcher as Ae } from "./index245.js";
|
|
13
|
+
import { useId as gt } from "./index8.js";
|
|
14
|
+
import { useIndexById as Ie } from "./index246.js";
|
|
15
|
+
import { useItemsGetter as wt } from "./index247.js";
|
|
16
|
+
import { useMobile as Bt } from "./index9.js";
|
|
17
|
+
import { usePrefill as At } from "./index248.js";
|
|
18
|
+
import { useUntil as It } from "./index249.js";
|
|
19
|
+
import { wait as H } from "./index145.js";
|
|
20
20
|
/* empty css */
|
|
21
21
|
/* empty css */
|
|
22
|
-
import
|
|
22
|
+
import Vt from "./index118.js";
|
|
23
23
|
/* empty css */
|
|
24
|
-
import
|
|
24
|
+
import Et from "./index250.js";
|
|
25
25
|
/* empty css */
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import { waitFor as
|
|
29
|
-
const
|
|
26
|
+
import xt from "./index252.js";
|
|
27
|
+
import St from "./index253.js";
|
|
28
|
+
import { waitFor as kt } from "./index254.js";
|
|
29
|
+
const Dt = {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "bb-select-popover__search-container"
|
|
32
|
-
},
|
|
32
|
+
}, Lt = ["id", "aria-activedescendant", "aria-controls", "aria-describedby", "aria-invalid", "aria-label", "autocomplete", "inputmode", "tabindex", "onKeydown"], Ht = ["aria-controls", "aria-describedby", "aria-invalid", "aria-label", "onKeydown"], Pt = ["aria-hidden", "inert"], $t = ["aria-hidden", "inert"], so = /* @__PURE__ */ at({
|
|
33
|
+
inheritAttrs: !1,
|
|
33
34
|
__name: "BbSelectPopover",
|
|
34
35
|
props: {
|
|
35
36
|
activator: {},
|
|
@@ -74,38 +75,38 @@ const Ct = {
|
|
|
74
75
|
width: { default: "200" }
|
|
75
76
|
},
|
|
76
77
|
emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue", "option:add"],
|
|
77
|
-
setup(Ve, { emit:
|
|
78
|
-
const t = Ve, s =
|
|
78
|
+
setup(Ve, { emit: Ee }) {
|
|
79
|
+
const t = Ve, s = Ee;
|
|
79
80
|
if (t.multiple && !Array.isArray(t.modelValue))
|
|
80
81
|
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
|
81
|
-
const v = f(),
|
|
82
|
+
const v = f(), d = f(null), O = f(null), T = f(null), P = f(), { width: w } = bt(
|
|
82
83
|
v,
|
|
83
84
|
{ width: 0, height: 0 },
|
|
84
85
|
{
|
|
85
86
|
box: "border-box"
|
|
86
87
|
}
|
|
87
|
-
),
|
|
88
|
-
const o =
|
|
88
|
+
), xe = l(() => t.activator != null), oe = (e) => {
|
|
89
|
+
const o = dt(e);
|
|
89
90
|
o && (v.value = o);
|
|
90
91
|
};
|
|
91
92
|
Q(
|
|
92
93
|
() => t.activator,
|
|
93
94
|
(e) => {
|
|
94
|
-
e &&
|
|
95
|
+
e && oe(e);
|
|
95
96
|
},
|
|
96
97
|
{ immediate: !0 }
|
|
97
98
|
);
|
|
98
|
-
const { isMobile:
|
|
99
|
-
() => t.allowWriting === "not-mobile" &&
|
|
100
|
-
),
|
|
99
|
+
const { isMobile: ae } = Bt(), b = l(() => t.allowWriting === "not-mobile" ? !ae.value : !!t.allowWriting), Se = l(
|
|
100
|
+
() => t.allowWriting === "not-mobile" && ae.value ? "none" : void 0
|
|
101
|
+
), re = l(
|
|
101
102
|
() => t.searchInputAriaLabel ?? "Search options"
|
|
102
|
-
), V = t.id ||
|
|
103
|
+
), V = t.id || gt().id.value, _ = l(() => t.ariaInvalid ?? !!t.hasErrors ? "true" : void 0), W = l(() => {
|
|
103
104
|
const e = t.ariaDescribedby;
|
|
104
105
|
if (Array.isArray(e))
|
|
105
106
|
return e.map((r) => r.trim()).filter(Boolean).join(" ") || void 0;
|
|
106
107
|
if (typeof e == "string")
|
|
107
108
|
return e.trim() || void 0;
|
|
108
|
-
}), { resume: ke, pause: De } =
|
|
109
|
+
}), { resume: ke, pause: De } = yt(
|
|
109
110
|
v,
|
|
110
111
|
async ([{ intersectionRatio: e }]) => {
|
|
111
112
|
e !== 1 && a.value && await A();
|
|
@@ -116,153 +117,153 @@ const Ct = {
|
|
|
116
117
|
if (t.width == null || t.width === "")
|
|
117
118
|
return w.value ? `${w.value}px` : "320px";
|
|
118
119
|
try {
|
|
119
|
-
const { value: e, unit: o } =
|
|
120
|
+
const { value: e, unit: o } = vt(t.width);
|
|
120
121
|
return o === "%" ? w.value ? `${w.value * (e / 100)}px` : "320px" : `${e}${o}`;
|
|
121
122
|
} catch {
|
|
122
123
|
return typeof t.width == "string" ? t.width.trim() : w.value ? `${w.value}px` : "320px";
|
|
123
124
|
}
|
|
124
|
-
}),
|
|
125
|
+
}), He = l(() => ({
|
|
125
126
|
"--bb-select-popover-width": Le.value
|
|
126
|
-
})),
|
|
127
|
+
})), K = () => {
|
|
127
128
|
v.value?.focus();
|
|
128
|
-
},
|
|
129
|
+
}, E = () => {
|
|
129
130
|
O.value instanceof HTMLInputElement && O.value.focus();
|
|
130
|
-
},
|
|
131
|
+
}, M = () => {
|
|
131
132
|
T.value instanceof HTMLButtonElement && T.value.focus();
|
|
132
|
-
},
|
|
133
|
+
}, x = () => {
|
|
133
134
|
if (b.value) {
|
|
134
|
-
|
|
135
|
+
E();
|
|
135
136
|
return;
|
|
136
137
|
}
|
|
137
|
-
|
|
138
|
-
}, He = (e) => {
|
|
139
|
-
s("focus", e), $();
|
|
138
|
+
M();
|
|
140
139
|
}, Pe = (e) => {
|
|
141
|
-
s("
|
|
140
|
+
s("focus", e), C();
|
|
142
141
|
}, $e = (e) => {
|
|
142
|
+
s("blur", e), ye();
|
|
143
|
+
}, Ce = (e) => {
|
|
143
144
|
s("change", e);
|
|
144
145
|
}, Fe = (e) => {
|
|
145
|
-
|
|
146
|
+
C();
|
|
146
147
|
}, Oe = (e) => {
|
|
147
|
-
s("input", e),
|
|
148
|
+
s("input", e), We(i.value, !1, t.modelValue);
|
|
148
149
|
}, Te = (e) => {
|
|
149
|
-
|
|
150
|
+
P.value = e;
|
|
150
151
|
}, B = async (e) => {
|
|
151
152
|
const o = e.target instanceof Element ? e.target : e.target instanceof Text ? e.target.parentElement : null;
|
|
152
153
|
if (!o) return;
|
|
153
154
|
const r = v.value?.contains(o), n = !!o.closest(".bb-common-popover");
|
|
154
|
-
r || n || (await A(),
|
|
155
|
-
},
|
|
155
|
+
r || n || (await A(), be());
|
|
156
|
+
}, q = l(() => !(t.readonly || t.disabled || S.value)), z = async () => kt(() => !!d.value, 100), ne = () => {
|
|
156
157
|
const e = y.value[0];
|
|
157
158
|
if (e?.valueHash) {
|
|
158
|
-
|
|
159
|
+
d.value?.focusByHash(e.valueHash);
|
|
159
160
|
return;
|
|
160
161
|
}
|
|
161
|
-
|
|
162
|
+
d.value?.focusFirstSelected();
|
|
162
163
|
}, _e = () => {
|
|
163
164
|
const e = y.value[y.value.length - 1];
|
|
164
165
|
if (e?.valueHash) {
|
|
165
|
-
|
|
166
|
+
d.value?.focusByHash(e.valueHash);
|
|
166
167
|
return;
|
|
167
168
|
}
|
|
168
|
-
|
|
169
|
+
d.value?.focusLastSelected();
|
|
169
170
|
}, U = async () => {
|
|
170
|
-
|
|
171
|
+
q.value && (a.value ? d.value?.focusPrevious() : (await k({ focusPopoverContent: !1 }), await z(), await H(t.transitionDuration), _e()));
|
|
171
172
|
}, N = async () => {
|
|
172
|
-
|
|
173
|
+
q.value && (a.value ? d.value?.focusNext() : (await k({ focusPopoverContent: !1 }), await z(), await H(t.transitionDuration), ne()));
|
|
173
174
|
}, j = async () => {
|
|
174
|
-
if (!
|
|
175
|
+
if (!q.value)
|
|
175
176
|
return;
|
|
176
177
|
if (a.value) {
|
|
177
|
-
if (
|
|
178
|
-
|
|
178
|
+
if (d.value?.getHighlighted()) {
|
|
179
|
+
d.value.confirmOption();
|
|
179
180
|
return;
|
|
180
181
|
}
|
|
181
182
|
} else {
|
|
182
|
-
await k({ focusPopoverContent: !1 }), await
|
|
183
|
+
await k({ focusPopoverContent: !1 }), await z(), await H(t.transitionDuration), y.value.length ? ne() : b.value ? E() : M();
|
|
183
184
|
return;
|
|
184
185
|
}
|
|
185
186
|
if (!b.value) return;
|
|
186
187
|
const e = i.value.trim();
|
|
187
188
|
Ge(e) || (s("option:add", e), i.value = "");
|
|
188
189
|
}, G = async () => {
|
|
189
|
-
a.value && (await A(),
|
|
190
|
-
}, i = f(""),
|
|
190
|
+
a.value && (await A(), K());
|
|
191
|
+
}, i = f(""), ie = f(!1), {
|
|
191
192
|
getter: R,
|
|
192
|
-
debouncedGetter:
|
|
193
|
-
items:
|
|
194
|
-
loading:
|
|
195
|
-
} =
|
|
193
|
+
debouncedGetter: We,
|
|
194
|
+
items: Ke,
|
|
195
|
+
loading: Me
|
|
196
|
+
} = wt({
|
|
196
197
|
items: X(t, "items"),
|
|
197
198
|
debounce: t.queryDebounceTime
|
|
198
199
|
}), {
|
|
199
|
-
array:
|
|
200
|
-
add:
|
|
201
|
-
remove:
|
|
202
|
-
set:
|
|
203
|
-
} =
|
|
200
|
+
array: le,
|
|
201
|
+
add: se,
|
|
202
|
+
remove: qe,
|
|
203
|
+
set: ze
|
|
204
|
+
} = ft(), {
|
|
204
205
|
hasPrefilled: Ue,
|
|
205
206
|
isPrefilling: Ne,
|
|
206
|
-
canLoad:
|
|
207
|
+
canLoad: ue,
|
|
207
208
|
prefill: je
|
|
208
|
-
} =
|
|
209
|
+
} = At({
|
|
209
210
|
trigger: l(
|
|
210
|
-
() => t.prefill === !0 || t.prefill === "interaction" &&
|
|
211
|
+
() => t.prefill === !0 || t.prefill === "interaction" && ie.value
|
|
211
212
|
),
|
|
212
213
|
currentValue: void 0,
|
|
213
214
|
multiple: !1,
|
|
214
215
|
fn: async (e) => {
|
|
215
|
-
await R(i.value, e, t.modelValue), t.stash &&
|
|
216
|
+
await R(i.value, e, t.modelValue), t.stash && se(...$.value.map((o) => o.item));
|
|
216
217
|
}
|
|
217
|
-
}), { data:
|
|
218
|
+
}), { data: de, get: Ge } = Ie({
|
|
218
219
|
items: l(() => [].concat(t.modelValue))
|
|
219
|
-
}), { options:
|
|
220
|
+
}), { options: $ } = mt({
|
|
220
221
|
disabled: X(t, "disabled"),
|
|
221
|
-
items: l(() => [...
|
|
222
|
+
items: l(() => [...Ke.value, ...le.value]),
|
|
222
223
|
itemText: t.itemText,
|
|
223
224
|
itemValue: t.itemValue,
|
|
224
225
|
max: t.max,
|
|
225
226
|
selectable: !0,
|
|
226
|
-
selectedIndexedByHash:
|
|
227
|
+
selectedIndexedByHash: de
|
|
227
228
|
}), { data: ce } = Ie({
|
|
228
|
-
items:
|
|
229
|
+
items: $,
|
|
229
230
|
key: "valueHash"
|
|
230
|
-
}), { coherent:
|
|
231
|
+
}), { coherent: pe, coherentValue: ve } = ht({
|
|
231
232
|
modelValue: X(t, "modelValue"),
|
|
232
233
|
multiple: t.multiple,
|
|
233
|
-
iteratee: (e) => !!ce.value[
|
|
234
|
+
iteratee: (e) => !!ce.value[te(e)]
|
|
234
235
|
}), y = l(
|
|
235
|
-
() => [].concat(t.modelValue).map((e) => ce.value[
|
|
236
|
-
), S = l(() => !!(
|
|
236
|
+
() => [].concat(t.modelValue).map((e) => ce.value[te(e)]).filter(Boolean)
|
|
237
|
+
), S = l(() => !!(Me.value || t.loading)), Re = l(() => !!t.hasErrors), Je = l(() => t.multiple ? "" : y.value[0]?.text ?? "");
|
|
237
238
|
Ae(
|
|
238
239
|
() => t.modelValue,
|
|
239
240
|
async () => {
|
|
240
|
-
|
|
241
|
+
ue.value && (pe.value || (await R(i.value, !0, t.modelValue), t.enforceCoherence && (s("update:modelValue", ve.value), d.value?.blur())));
|
|
241
242
|
},
|
|
242
243
|
{ debounce: t.modelValueDebounceTime }
|
|
243
244
|
), Ae(
|
|
244
245
|
() => [t.dependencies, t.items],
|
|
245
246
|
async () => {
|
|
246
|
-
|
|
247
|
+
ue.value && (await R(i.value, !0, t.modelValue), t.enforceCoherence && !pe.value && (s("update:modelValue", ve.value), d.value?.blur()));
|
|
247
248
|
},
|
|
248
249
|
{ debounce: t.depsDebounceTime }
|
|
249
250
|
);
|
|
250
251
|
const Qe = async (e) => {
|
|
251
|
-
t.multiple ? (s("update:modelValue", t.modelValue.concat(e.value)), t.stash &&
|
|
252
|
+
t.multiple ? (s("update:modelValue", t.modelValue.concat(e.value)), t.stash && se(e.item)) : (t.stash && ze(e.item), s("update:modelValue", e.value), await we()), t.multiple && b.value && a.value ? E() : K(), t.multiple || A();
|
|
252
253
|
}, Xe = async (e) => {
|
|
253
|
-
if (
|
|
254
|
-
const o = { ...
|
|
254
|
+
if (qe((o) => o.valueHash !== e.valueHash), t.multiple) {
|
|
255
|
+
const o = { ...de.value };
|
|
255
256
|
delete o[e.valueHash], s("update:modelValue", Object.values(o));
|
|
256
257
|
} else
|
|
257
258
|
s("update:modelValue", null);
|
|
258
|
-
t.multiple && b.value && a.value ?
|
|
259
|
-
},
|
|
259
|
+
t.multiple && b.value && a.value ? E() : K();
|
|
260
|
+
}, fe = l(() => {
|
|
260
261
|
const e = y.value.some(
|
|
261
262
|
(n) => n.text === i.value
|
|
262
263
|
);
|
|
263
|
-
if (!(t.multiple && i.value || t.filterBy === "not_stashed" && i.value || i.value && !e && !t.multiple) || !t.filterBy) return
|
|
264
|
-
const r = t.filterBy === "not_stashed" ? new Set(
|
|
265
|
-
return
|
|
264
|
+
if (!(t.multiple && i.value || t.filterBy === "not_stashed" && i.value || i.value && !e && !t.multiple) || !t.filterBy) return $.value;
|
|
265
|
+
const r = t.filterBy === "not_stashed" ? new Set(le.value.map((n) => n.valueHash)) : null;
|
|
266
|
+
return $.value.filter((n) => {
|
|
266
267
|
let p = !1;
|
|
267
268
|
return typeof t.filterBy == "function" ? p = t.filterBy(n.value, n.item, i.value) : t.filterBy === "not_stashed" && i.value ? p = !r.has(n.valueHash) : Array.isArray(t.filterBy) && t.filterBy.length && (p = Be(
|
|
268
269
|
n.item,
|
|
@@ -270,10 +271,10 @@ const Ct = {
|
|
|
270
271
|
i.value.trim()
|
|
271
272
|
)), p || Be(n, ["text"], i.value.trim());
|
|
272
273
|
});
|
|
273
|
-
}), Ye = Symbol("default"), Ze = (e) =>
|
|
274
|
+
}), Ye = Symbol("default"), Ze = (e) => pt(t.groupBy) ? Ye : typeof t.groupBy == "function" ? t.groupBy(e.item) : ct(e.item, t.groupBy), et = l(() => {
|
|
274
275
|
const e = {};
|
|
275
|
-
for (const o of
|
|
276
|
-
const r = Ze(o), n =
|
|
276
|
+
for (const o of fe.value) {
|
|
277
|
+
const r = Ze(o), n = te(r);
|
|
277
278
|
e[n] || (e[n] = {
|
|
278
279
|
id: n,
|
|
279
280
|
data: r ?? null,
|
|
@@ -281,27 +282,27 @@ const Ct = {
|
|
|
281
282
|
}), e[n].options.push(o);
|
|
282
283
|
}
|
|
283
284
|
return Object.values(e).filter((o) => o.options.length);
|
|
284
|
-
}), a = f(!1),
|
|
285
|
+
}), a = f(!1), me = It(a), k = async ({
|
|
285
286
|
focusPopoverContent: e = !0
|
|
286
287
|
} = {}) => {
|
|
287
|
-
t.disabled || t.readonly || a.value || (
|
|
288
|
+
t.disabled || t.readonly || a.value || (ie.value = !0, ke(), a.value = !0, !Ue.value && !Ne.value && await je(), await we(), document.addEventListener("click", B), document.addEventListener("focusin", B), e && (b.value ? (await H(0), E()) : (await H(0), M())));
|
|
288
289
|
}, A = async () => {
|
|
289
|
-
a.value && (a.value = !1,
|
|
290
|
-
},
|
|
290
|
+
a.value && (a.value = !1, d.value?.blur(), P.value = void 0, De(), document.removeEventListener("click", B), document.removeEventListener("focusin", B), i.value = "");
|
|
291
|
+
}, he = () => a.value ? A() : k(), J = f(!1), C = () => {
|
|
291
292
|
J.value = !0;
|
|
292
|
-
},
|
|
293
|
+
}, be = () => {
|
|
293
294
|
J.value && (J.value = !1, s("inactive"));
|
|
294
295
|
}, tt = (e) => {
|
|
295
296
|
if (!(e instanceof Node)) return !1;
|
|
296
|
-
const o = !!v.value?.contains(e), r = !!
|
|
297
|
+
const o = !!v.value?.contains(e), r = !!d.value?.$el?.closest(".bb-common-popover")?.contains(e);
|
|
297
298
|
return o || r;
|
|
298
|
-
},
|
|
299
|
+
}, ye = () => {
|
|
299
300
|
setTimeout(() => {
|
|
300
301
|
if (tt(document.activeElement)) {
|
|
301
|
-
|
|
302
|
+
C();
|
|
302
303
|
return;
|
|
303
304
|
}
|
|
304
|
-
|
|
305
|
+
be();
|
|
305
306
|
}, 0);
|
|
306
307
|
}, ot = () => {
|
|
307
308
|
s("update:modelValue", t.multiple ? [] : null);
|
|
@@ -313,7 +314,7 @@ const Ct = {
|
|
|
313
314
|
if (D && (D(), D = null), !e) return;
|
|
314
315
|
e.setAttribute("role", "combobox"), e.setAttribute("aria-haspopup", "listbox");
|
|
315
316
|
const o = (u) => {
|
|
316
|
-
s("click", u), !(t.disabled || t.readonly) && (u.preventDefault(),
|
|
317
|
+
s("click", u), !(t.disabled || t.readonly) && (u.preventDefault(), he());
|
|
317
318
|
}, r = (u) => {
|
|
318
319
|
switch (u.key) {
|
|
319
320
|
case "ArrowDown":
|
|
@@ -330,9 +331,9 @@ const Ct = {
|
|
|
330
331
|
break;
|
|
331
332
|
}
|
|
332
333
|
}, n = (u) => {
|
|
333
|
-
s("focus", u),
|
|
334
|
+
s("focus", u), C();
|
|
334
335
|
}, p = (u) => {
|
|
335
|
-
s("blur", u),
|
|
336
|
+
s("blur", u), ye();
|
|
336
337
|
};
|
|
337
338
|
e.addEventListener("click", o), e.addEventListener("keydown", r), e.addEventListener("focus", n), e.addEventListener("blur", p), D = () => {
|
|
338
339
|
e.removeEventListener("click", o), e.removeEventListener("keydown", r), e.removeEventListener("focus", n), e.removeEventListener("blur", p), e.removeAttribute("role"), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls"), e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedby"), e.removeAttribute("aria-activedescendant");
|
|
@@ -343,10 +344,10 @@ const Ct = {
|
|
|
343
344
|
[
|
|
344
345
|
v,
|
|
345
346
|
a,
|
|
346
|
-
|
|
347
|
+
me,
|
|
347
348
|
_,
|
|
348
|
-
|
|
349
|
-
|
|
349
|
+
W,
|
|
350
|
+
P
|
|
350
351
|
],
|
|
351
352
|
([e, o, r, n, p, u]) => {
|
|
352
353
|
e && (e.setAttribute("aria-expanded", String(o)), n != null ? e.setAttribute("aria-invalid", n) : e.removeAttribute("aria-invalid"), r ? e.setAttribute("aria-controls", `${V}_listbox`) : e.removeAttribute("aria-controls"), p != null ? e.setAttribute("aria-describedby", p) : e.removeAttribute("aria-describedby"), o && u ? e.setAttribute("aria-activedescendant", u) : e.removeAttribute("aria-activedescendant"));
|
|
@@ -355,9 +356,9 @@ const Ct = {
|
|
|
355
356
|
), rt(() => {
|
|
356
357
|
D?.(), document.removeEventListener("click", B), document.removeEventListener("focusin", B);
|
|
357
358
|
}), (e, o) => (Z(), Y(nt, null, [
|
|
358
|
-
|
|
359
|
+
xe.value ? it("", !0) : m(e.$slots, "activator", ge(ee({ key: 0 }, {
|
|
359
360
|
props: {
|
|
360
|
-
ref:
|
|
361
|
+
ref: oe
|
|
361
362
|
},
|
|
362
363
|
shown: a.value,
|
|
363
364
|
disabled: e.disabled,
|
|
@@ -369,63 +370,64 @@ const Ct = {
|
|
|
369
370
|
clear: ot,
|
|
370
371
|
open: k,
|
|
371
372
|
close: A,
|
|
372
|
-
toggle:
|
|
373
|
+
toggle: he
|
|
373
374
|
}))),
|
|
374
|
-
F(
|
|
375
|
+
F(Et, ee({
|
|
375
376
|
modelValue: a.value,
|
|
376
|
-
"onUpdate:modelValue": o[1] || (o[1] = (r) => a.value = r)
|
|
377
|
+
"onUpdate:modelValue": o[1] || (o[1] = (r) => a.value = r)
|
|
378
|
+
}, e.$attrs, {
|
|
377
379
|
anchor: v.value,
|
|
378
380
|
"arrow-padding": e.arrowPadding,
|
|
379
381
|
boundary: e.boundary,
|
|
380
|
-
class:
|
|
382
|
+
class: ["bb-select-popover", {
|
|
381
383
|
"bb-select-popover--errors": Re.value,
|
|
382
384
|
"bb-select-popover--loading": S.value
|
|
383
|
-
}]
|
|
385
|
+
}],
|
|
384
386
|
flip: e.flip,
|
|
385
387
|
placement: e.placement,
|
|
386
388
|
offset: e.offset,
|
|
387
389
|
padding: e.padding,
|
|
388
390
|
"transition-duration": e.transitionDuration,
|
|
389
391
|
"hide-arrow": e.hideArrow,
|
|
390
|
-
style:
|
|
391
|
-
}, {
|
|
392
|
+
style: He.value
|
|
393
|
+
}), {
|
|
392
394
|
default: g(() => [
|
|
393
|
-
b.value ? (Z(), Y("div",
|
|
394
|
-
|
|
395
|
+
b.value ? (Z(), Y("div", Dt, [
|
|
396
|
+
lt(L("input", {
|
|
395
397
|
id: `${I(V)}_search`,
|
|
396
398
|
ref_key: "searchInput",
|
|
397
399
|
ref: O,
|
|
398
400
|
"onUpdate:modelValue": o[0] || (o[0] = (r) => i.value = r),
|
|
399
|
-
"aria-activedescendant":
|
|
400
|
-
"aria-controls": I(
|
|
401
|
-
"aria-describedby":
|
|
401
|
+
"aria-activedescendant": P.value,
|
|
402
|
+
"aria-controls": I(me) ? `${I(V)}_listbox` : void 0,
|
|
403
|
+
"aria-describedby": W.value,
|
|
402
404
|
"aria-invalid": _.value,
|
|
403
|
-
"aria-label":
|
|
405
|
+
"aria-label": re.value,
|
|
404
406
|
autocomplete: e.autocomplete,
|
|
405
407
|
class: "bb-select-popover__search-input",
|
|
406
408
|
inputmode: Se.value,
|
|
407
409
|
tabindex: a.value ? 0 : -1,
|
|
408
410
|
role: "searchbox",
|
|
409
411
|
type: "text",
|
|
410
|
-
onBlur:
|
|
411
|
-
onChange:
|
|
412
|
-
onFocus:
|
|
413
|
-
onInput:
|
|
412
|
+
onBlur: c($e, ["stop"]),
|
|
413
|
+
onChange: c(Ce, ["stop"]),
|
|
414
|
+
onFocus: c(Pe, ["stop"]),
|
|
415
|
+
onInput: c(Oe, ["stop"]),
|
|
414
416
|
onKeydown: [
|
|
415
|
-
h(
|
|
416
|
-
h(
|
|
417
|
-
h(
|
|
418
|
-
h(
|
|
417
|
+
h(c(N, ["stop", "prevent"]), ["down"]),
|
|
418
|
+
h(c(j, ["stop", "prevent"]), ["enter"]),
|
|
419
|
+
h(c(G, ["stop", "prevent"]), ["esc"]),
|
|
420
|
+
h(c(U, ["stop", "prevent"]), ["up"])
|
|
419
421
|
]
|
|
420
|
-
}, null, 40,
|
|
421
|
-
[
|
|
422
|
+
}, null, 40, Lt), [
|
|
423
|
+
[st, i.value]
|
|
422
424
|
]),
|
|
423
|
-
F(
|
|
425
|
+
F(xt, {
|
|
424
426
|
"aria-hidden": "true",
|
|
425
427
|
class: "bb-select-popover__search-error-icon",
|
|
426
428
|
focusable: "false"
|
|
427
429
|
}),
|
|
428
|
-
F(I(
|
|
430
|
+
F(I(Vt), {
|
|
429
431
|
"aria-hidden": "true",
|
|
430
432
|
class: "bb-select-popover__search-spinner",
|
|
431
433
|
focusable: "false"
|
|
@@ -452,36 +454,36 @@ const Ct = {
|
|
|
452
454
|
class: "bb-select-popover__focus-proxy sr-only",
|
|
453
455
|
type: "button",
|
|
454
456
|
"aria-controls": `${I(V)}_listbox`,
|
|
455
|
-
"aria-describedby":
|
|
457
|
+
"aria-describedby": W.value,
|
|
456
458
|
"aria-invalid": _.value,
|
|
457
|
-
"aria-label":
|
|
459
|
+
"aria-label": re.value,
|
|
458
460
|
tabindex: "-1",
|
|
459
461
|
onFocus: Fe,
|
|
460
462
|
onKeydown: [
|
|
461
|
-
h(
|
|
462
|
-
h(
|
|
463
|
-
h(
|
|
464
|
-
h(
|
|
463
|
+
h(c(N, ["stop", "prevent"]), ["down"]),
|
|
464
|
+
h(c(U, ["stop", "prevent"]), ["up"]),
|
|
465
|
+
h(c(j, ["stop", "prevent"]), ["enter"]),
|
|
466
|
+
h(c(G, ["stop", "prevent"]), ["esc"])
|
|
465
467
|
]
|
|
466
|
-
}, " Focus options ", 40,
|
|
468
|
+
}, " Focus options ", 40, Ht)),
|
|
467
469
|
L("div", {
|
|
468
470
|
class: "bb-select-popover__options-outer",
|
|
469
471
|
"aria-hidden": a.value ? void 0 : "true",
|
|
470
472
|
inert: !a.value
|
|
471
473
|
}, [
|
|
472
|
-
m(e.$slots, "options:prepend:outer", { focus:
|
|
473
|
-
], 8,
|
|
474
|
-
F(
|
|
474
|
+
m(e.$slots, "options:prepend:outer", { focus: x })
|
|
475
|
+
], 8, Pt),
|
|
476
|
+
F(St, {
|
|
475
477
|
id: `${I(V)}_listbox`,
|
|
476
478
|
ref_key: "optionsContainer",
|
|
477
|
-
ref:
|
|
479
|
+
ref: d,
|
|
478
480
|
compact: e.compact,
|
|
479
481
|
loading: S.value,
|
|
480
482
|
"loading-text": e.loadingText,
|
|
481
483
|
multiple: e.multiple,
|
|
482
484
|
"no-data-text": e.noDataText,
|
|
483
485
|
open: a.value,
|
|
484
|
-
options: e.groupBy ? void 0 :
|
|
486
|
+
options: e.groupBy ? void 0 : fe.value,
|
|
485
487
|
groups: e.groupBy ? et.value : void 0,
|
|
486
488
|
"header-height": e.headerHeight,
|
|
487
489
|
"option-height": e.itemHeight,
|
|
@@ -490,7 +492,7 @@ const Ct = {
|
|
|
490
492
|
"onOption:unselected": Xe
|
|
491
493
|
}, {
|
|
492
494
|
"options:prepend": g(() => [
|
|
493
|
-
m(e.$slots, "options:prepend", { focus:
|
|
495
|
+
m(e.$slots, "options:prepend", { focus: x })
|
|
494
496
|
]),
|
|
495
497
|
loading: g(() => [
|
|
496
498
|
m(e.$slots, "loading", { query: i.value })
|
|
@@ -498,17 +500,17 @@ const Ct = {
|
|
|
498
500
|
"no-data": g(() => [
|
|
499
501
|
m(e.$slots, "no-data", {
|
|
500
502
|
query: i.value,
|
|
501
|
-
focus:
|
|
503
|
+
focus: x
|
|
502
504
|
})
|
|
503
505
|
]),
|
|
504
506
|
"options:append": g(() => [
|
|
505
|
-
m(e.$slots, "options:append", { focus:
|
|
507
|
+
m(e.$slots, "options:append", { focus: x })
|
|
506
508
|
]),
|
|
507
509
|
option: g((r) => [
|
|
508
|
-
m(e.$slots, "option",
|
|
510
|
+
m(e.$slots, "option", ee({ loading: S.value }, r))
|
|
509
511
|
]),
|
|
510
512
|
group: g((r) => [
|
|
511
|
-
m(e.$slots, "group",
|
|
513
|
+
m(e.$slots, "group", ge(ut(r)))
|
|
512
514
|
]),
|
|
513
515
|
_: 3
|
|
514
516
|
}, 8, ["id", "compact", "loading", "loading-text", "multiple", "no-data-text", "open", "options", "groups", "header-height", "option-height"]),
|
|
@@ -517,14 +519,14 @@ const Ct = {
|
|
|
517
519
|
"aria-hidden": a.value ? void 0 : "true",
|
|
518
520
|
inert: !a.value
|
|
519
521
|
}, [
|
|
520
|
-
m(e.$slots, "options:append:outer", { focus:
|
|
521
|
-
], 8,
|
|
522
|
+
m(e.$slots, "options:append:outer", { focus: x })
|
|
523
|
+
], 8, $t)
|
|
522
524
|
]),
|
|
523
525
|
_: 3
|
|
524
|
-
},
|
|
526
|
+
}, 16, ["modelValue", "anchor", "arrow-padding", "boundary", "class", "flip", "placement", "offset", "padding", "transition-duration", "hide-arrow", "style"])
|
|
525
527
|
], 64));
|
|
526
528
|
}
|
|
527
529
|
});
|
|
528
530
|
export {
|
|
529
|
-
|
|
531
|
+
so as default
|
|
530
532
|
};
|
package/dist/index118.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, computed as s, createElementBlock as b, openBlock as _, mergeProps as a, createStaticVNode as x } from "vue";
|
|
2
|
-
import { isCssColor as m } from "./
|
|
2
|
+
import { isCssColor as m } from "./index227.js";
|
|
3
3
|
const d = /* @__PURE__ */ p({
|
|
4
4
|
__name: "BbSpinner",
|
|
5
5
|
props: {
|
package/dist/index124.js
CHANGED
|
@@ -8,11 +8,11 @@ import Ce from "./index14.js";
|
|
|
8
8
|
import Be from "./index116.js";
|
|
9
9
|
/* empty css */
|
|
10
10
|
import { useFrameworkDetection as Te } from "./index147.js";
|
|
11
|
-
import { isNil as qe } from "./
|
|
11
|
+
import { isNil as qe } from "./index239.js";
|
|
12
12
|
import { useQuery as Le } from "./index11.js";
|
|
13
|
-
import { hash as Fe } from "./
|
|
13
|
+
import { hash as Fe } from "./index238.js";
|
|
14
14
|
import { isNotNil as Ee } from "./index150.js";
|
|
15
|
-
import { useLogger as Ne } from "./
|
|
15
|
+
import { useLogger as Ne } from "./index267.js";
|
|
16
16
|
const Pe = ["id"], Re = { class: "bb-tab__label-boundary" }, Ve = { class: "bb-tab__label" }, Ke = { class: "bb-tab__panes-container" }, De = ["id", "aria-labelledby", "tabindex"], ot = /* @__PURE__ */ fe({
|
|
17
17
|
__name: "BbTab",
|
|
18
18
|
props: {
|