bitboss-ui 2.0.150 → 2.0.151
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/index100.js +8 -8
- package/dist/index111.js +11 -11
- package/dist/index119.js +2 -2
- package/dist/index121.js +4 -4
- package/dist/index123.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index129.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index131.js +1 -1
- package/dist/index132.js +3 -3
- package/dist/index133.js +1 -1
- package/dist/index134.js +2 -2
- package/dist/index15.js +8 -8
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index206.js +115 -2
- package/dist/index207.js +2 -2
- package/dist/index208.js +5 -4
- package/dist/index209.js +125 -2
- package/dist/index21.js +16 -16
- package/dist/index210.js +16 -4
- package/dist/index211.js +15 -40
- package/dist/index212.js +19 -20
- package/dist/index213.js +15 -94
- package/dist/index214.js +4 -0
- package/dist/index215.js +2 -200
- package/dist/index216.js +43 -0
- package/dist/index217.js +12 -65
- package/dist/index218.js +22 -0
- package/dist/index219.js +6 -13
- package/dist/index220.js +93 -12
- package/dist/index222.js +66 -5
- package/dist/index224.js +13 -16
- package/dist/index225.js +2 -16
- package/dist/index226.js +18 -18
- package/dist/index227.js +24 -12
- package/dist/index228.js +3 -2
- package/dist/index229.js +8 -2
- package/dist/index23.js +16 -16
- package/dist/index230.js +249 -5
- package/dist/index231.js +52 -2
- package/dist/index232.js +44 -3
- package/dist/index233.js +5 -7
- package/dist/index234.js +58 -6
- package/dist/index235.js +2 -15
- package/dist/index236.js +4 -19
- package/dist/index237.js +2 -27
- package/dist/index238.js +86 -3
- package/dist/index240.js +28 -51
- package/dist/index241.js +17 -44
- package/dist/index242.js +51 -5
- package/dist/index243.js +15 -60
- package/dist/index244.js +12 -34
- package/dist/index245.js +16 -3
- package/dist/index246.js +3 -86
- package/dist/index247.js +9 -0
- package/dist/index248.js +15 -29
- package/dist/index249.js +2 -17
- package/dist/index25.js +7 -7
- package/dist/index250.js +3 -51
- package/dist/index251.js +4 -15
- package/dist/index252.js +200 -12
- package/dist/index254.js +34 -2
- package/dist/index256.js +2 -2
- package/dist/index257.js +1 -1
- package/dist/index259.js +1 -1
- package/dist/index262.js +3 -3
- package/dist/index263.js +3 -3
- package/dist/index266.js +8 -174
- package/dist/index267.js +2 -9
- package/dist/index268.js +175 -2
- package/dist/index269.js +9 -4
- package/dist/index27.js +1 -1
- package/dist/index270.js +6 -431
- package/dist/index271.js +16 -3
- package/dist/index272.js +9 -3
- package/dist/index273.js +23 -3
- package/dist/index274.js +11 -0
- package/dist/index275.js +8 -7
- package/dist/index276.js +281 -7
- package/dist/index277.js +5 -10
- package/dist/index278.js +2 -281
- package/dist/index279.js +2 -6
- package/dist/index280.js +2 -2
- package/dist/index281.js +2 -2
- package/dist/index285.js +2 -2
- package/dist/index286.js +2 -200
- package/dist/index287.js +1 -1
- package/dist/index288.js +2 -89
- package/dist/index289.js +28 -2
- package/dist/index29.js +3 -3
- package/dist/index290.js +22 -2
- package/dist/index292.js +7 -2
- package/dist/index293.js +7 -2
- package/dist/index294.js +11 -2
- package/dist/index295.js +2 -28
- package/dist/index296.js +429 -20
- package/dist/index297.js +5 -0
- package/dist/index298.js +3 -2
- package/dist/index300.js +4 -23
- package/dist/index301.js +200 -224
- package/dist/index302.js +5 -9
- package/dist/index303.js +2 -6
- package/dist/index304.js +224 -16
- package/dist/index305.js +66 -2
- package/dist/index306.js +3 -17
- package/dist/index307.js +15 -7
- package/dist/index308.js +3 -8
- package/dist/index309.js +2 -126
- package/dist/index31.js +2 -2
- package/dist/index310.js +89 -3
- package/dist/index311.js +2 -3
- package/dist/index312.js +126 -2
- package/dist/index313.js +3 -436
- package/dist/index314.js +3 -127
- package/dist/index315.js +2 -5
- package/dist/index316.js +434 -65
- package/dist/index317.js +126 -4
- package/dist/index318.js +4 -7
- package/dist/index319.js +7 -479
- package/dist/index320.js +3 -7
- package/dist/index321.js +3 -6
- package/dist/index322.js +3 -8
- package/dist/index323.js +57 -32
- package/dist/index324.js +7 -28
- package/dist/index325.js +9 -0
- package/dist/index326.js +18 -57
- package/dist/index327.js +33 -33
- package/dist/index328.js +58 -2
- package/dist/index329.js +480 -7
- package/dist/index33.js +8 -8
- package/dist/index330.js +32 -18
- package/dist/index331.js +28 -7
- package/dist/index333.js +2 -3
- package/dist/index334.js +8 -3
- package/dist/index335.js +5 -57
- package/dist/index336.js +8 -47
- package/dist/index337.js +47 -2
- package/dist/index339.js +1 -1
- package/dist/index35.js +4 -4
- package/dist/index37.js +173 -172
- package/dist/index39.js +3 -3
- package/dist/index41.js +2 -2
- package/dist/index43.js +8 -8
- package/dist/index45.js +6 -6
- package/dist/index47.js +2 -2
- package/dist/index49.js +3 -3
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +1 -1
- package/dist/index61.js +3 -3
- package/dist/index75.js +3 -3
- package/dist/index77.js +1 -1
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index84.js +4 -4
- package/dist/index86.js +2 -2
- package/dist/index88.js +5 -5
- package/dist/index90.js +1 -1
- package/package.json +1 -1
- package/dist/index221.js +0 -117
- package/dist/index223.js +0 -127
- package/dist/index239.js +0 -252
- package/dist/index253.js +0 -18
- package/dist/index291.js +0 -4
- package/dist/index299.js +0 -11
- package/dist/index332.js +0 -6
package/dist/index37.js
CHANGED
@@ -1,41 +1,41 @@
|
|
1
|
-
import { defineComponent as
|
1
|
+
import { defineComponent as Je, ref as f, computed as y, onMounted as Qe, toRef as H, openBlock as h, createBlock as L, normalizeClass as ee, withCtx as r, renderSlot as c, createVNode as U, unref as g, createElementVNode as j, createElementBlock as $, Fragment as te, toDisplayString as _e, createCommentVNode as R, withDirectives as Xe, normalizeStyle as le, withModifiers as p, withKeys as w, vModelDynamic as Ye, renderList as Ze, mergeProps as ae, nextTick as G } from "vue";
|
2
2
|
/* empty css */
|
3
3
|
/* empty css */
|
4
|
-
import { useId as
|
5
|
-
import { useMobile as
|
6
|
-
import
|
4
|
+
import { useId as et } from "./index8.js";
|
5
|
+
import { useMobile as tt } from "./index9.js";
|
6
|
+
import lt from "./index128.js";
|
7
7
|
/* empty css */
|
8
|
-
import { last as
|
8
|
+
import { last as at } from "./index215.js";
|
9
9
|
import { matchAnyKey as oe } from "./index255.js";
|
10
|
-
import { useFloating as
|
11
|
-
import { useIntersectionObserver as
|
12
|
-
import { wait as
|
13
|
-
import { when as
|
14
|
-
import
|
10
|
+
import { useFloating as ot } from "./index256.js";
|
11
|
+
import { useMounted as nt, useIntersectionObserver as ut } from "./index132.js";
|
12
|
+
import { wait as F } from "./index130.js";
|
13
|
+
import { when as rt } from "./index236.js";
|
14
|
+
import it from "./index257.js";
|
15
15
|
/* empty css */
|
16
|
-
import
|
16
|
+
import st from "./index259.js";
|
17
17
|
/* empty css */
|
18
|
-
import
|
18
|
+
import dt from "./index222.js";
|
19
19
|
/* empty css */
|
20
|
-
import
|
21
|
-
import { waitFor as
|
22
|
-
import
|
23
|
-
import { useItemsGetter as
|
24
|
-
import { usePrefill as
|
25
|
-
import { useArray as
|
26
|
-
import { useBaseOptions as
|
27
|
-
import { useIndexById as ne } from "./
|
28
|
-
import { useCoherence as
|
29
|
-
import { hash as
|
30
|
-
import { useHashedWatcher as ue } from "./
|
31
|
-
import { useLocale as
|
32
|
-
import { isEmpty as
|
33
|
-
import
|
34
|
-
import { autoUpdate as
|
35
|
-
const
|
20
|
+
import ct from "./index224.js";
|
21
|
+
import { waitFor as pt } from "./index219.js";
|
22
|
+
import mt from "./index248.js";
|
23
|
+
import { useItemsGetter as ft } from "./index240.js";
|
24
|
+
import { usePrefill as vt } from "./index245.js";
|
25
|
+
import { useArray as yt } from "./index261.js";
|
26
|
+
import { useBaseOptions as ht } from "./index242.js";
|
27
|
+
import { useIndexById as ne } from "./index241.js";
|
28
|
+
import { useCoherence as bt } from "./index243.js";
|
29
|
+
import { hash as gt } from "./index228.js";
|
30
|
+
import { useHashedWatcher as ue } from "./index244.js";
|
31
|
+
import { useLocale as wt } from "./index217.js";
|
32
|
+
import { isEmpty as Bt } from "./index225.js";
|
33
|
+
import Vt from "./index262.js";
|
34
|
+
import { autoUpdate as kt, flip as It, offset as Ct, shift as St } from "./index263.js";
|
35
|
+
const $t = { class: "bb-base-select__input-container" }, Ot = {
|
36
36
|
key: 1,
|
37
37
|
class: "bb-base-select__max-reached"
|
38
|
-
},
|
38
|
+
}, Dt = ["id", "aria-controls", "aria-describedby", "aria-expanded", "autocomplete", "autofocus", "disabled", "inputmode", "placeholder", "readonly", "required", "onKeydown"], dl = /* @__PURE__ */ Je({
|
39
39
|
__name: "BaseSelect",
|
40
40
|
props: {
|
41
41
|
allowWriting: { type: [Boolean, String], default: !0 },
|
@@ -83,73 +83,73 @@ const Ct = { class: "bb-base-select__input-container" }, St = {
|
|
83
83
|
const t = re, u = ie;
|
84
84
|
if (t.multiple && !Array.isArray(t.modelValue))
|
85
85
|
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
86
|
-
const { t: se } =
|
86
|
+
const { t: se } = wt(), de = nt(), E = f(null), k = f(null), n = f(null), J = f(null), Q = f(null), s = y(
|
87
87
|
() => t.comma ? J.value : Q.value
|
88
|
-
), { isMobile:
|
89
|
-
() => t.allowWriting === "not-mobile" &&
|
90
|
-
), _ = t.id ||
|
91
|
-
|
88
|
+
), { isMobile: ce } = tt(), pe = y(
|
89
|
+
() => t.allowWriting === "not-mobile" && ce.value ? "none" : void 0
|
90
|
+
), _ = t.id || et().id.value;
|
91
|
+
ut(
|
92
92
|
// @ts-expect-error - wrong inferred type
|
93
|
-
|
93
|
+
k,
|
94
94
|
([{ intersectionRatio: e }]) => {
|
95
95
|
e !== 1 && C();
|
96
96
|
},
|
97
97
|
{ threshold: [0, 1] }
|
98
98
|
);
|
99
|
-
const { floatingStyles:
|
99
|
+
const { floatingStyles: me } = ot(
|
100
100
|
// @ts-expect-error - wrong inferred type
|
101
|
-
|
101
|
+
k,
|
102
102
|
n,
|
103
103
|
{
|
104
104
|
placement: "bottom",
|
105
|
-
whileElementsMounted:
|
106
|
-
middleware: [
|
105
|
+
whileElementsMounted: kt,
|
106
|
+
middleware: [It(), Ct(5), St()]
|
107
107
|
}
|
108
|
-
),
|
108
|
+
), fe = y(() => {
|
109
109
|
var l;
|
110
110
|
const e = {
|
111
|
-
...
|
111
|
+
...me.value,
|
112
112
|
zIndex: "10"
|
113
113
|
};
|
114
|
-
return
|
115
|
-
}),
|
116
|
-
|
117
|
-
},
|
118
|
-
u("focus", e),
|
119
|
-
},
|
120
|
-
t.prefill === "focus" &&
|
121
|
-
},
|
114
|
+
return k.value && (e.width = `${(l = k.value) == null ? void 0 : l.$el.clientWidth}px`), e;
|
115
|
+
}), A = f(null), q = () => {
|
116
|
+
A.value instanceof HTMLInputElement && A.value.focus();
|
117
|
+
}, ve = async (e) => {
|
118
|
+
u("focus", e), ze(), document.addEventListener("click", O), document.addEventListener("focusin", O);
|
119
|
+
}, ye = () => {
|
120
|
+
t.prefill === "focus" && !De.value && !Y.value && Te();
|
121
|
+
}, he = async (e) => {
|
122
122
|
u("blur", e);
|
123
|
-
},
|
123
|
+
}, be = (e) => u("change", e), ge = (e) => {
|
124
124
|
var l;
|
125
|
-
u("input", e), o.value === "" && (t.multiple || u("update:modelValue", null)), (l = s.value) == null || l.blur(),
|
125
|
+
u("input", e), o.value === "" && (t.multiple || u("update:modelValue", null)), (l = s.value) == null || l.blur(), W.value && I(), $e(o.value, !1, t.modelValue);
|
126
126
|
}, O = async (e) => {
|
127
127
|
var l, a;
|
128
|
-
if (e.target instanceof Node &&
|
129
|
-
C(),
|
128
|
+
if (e.target instanceof Node && E.value && !E.value.$el.contains(e.target) && !((a = (l = n.value) == null ? void 0 : l.$el) != null && a.contains(e.target))) {
|
129
|
+
C(), Ke(), document.removeEventListener("click", O), document.removeEventListener("focusin", O), await F(t.transitionDuration), b();
|
130
130
|
return;
|
131
131
|
}
|
132
|
-
},
|
132
|
+
}, B = y(() => !(t.readonly || t.disabled || T.value || !s.value && t.multiple && i.value.length <= t.maxSelectedLabels)), we = async () => {
|
133
133
|
var e, l, a;
|
134
|
-
|
135
|
-
},
|
134
|
+
B.value && ((e = s.value) == null || e.blur(), m.value ? (l = n.value) == null || l.focusPrevious() : (await I(), await F(t.transitionDuration), (a = n.value) == null || a.focusLastSelected()));
|
135
|
+
}, Be = async () => {
|
136
136
|
var e, l, a;
|
137
|
-
|
138
|
-
},
|
137
|
+
B.value && ((e = s.value) == null || e.blur(), m.value ? (l = n.value) == null || l.focusNext() : (await I(), await F(t.transitionDuration), (a = n.value) == null || a.focusFirstSelected()));
|
138
|
+
}, Ve = (e) => {
|
139
139
|
var a, d, v, S;
|
140
|
-
if (!
|
140
|
+
if (!B.value || !t.multiple || o.value || (e.preventDefault(), (a = n.value) == null || a.blur(), !i.value.length)) return;
|
141
141
|
(d = s.value) == null || d.focusPrevious();
|
142
142
|
const l = (v = s.value) == null ? void 0 : v.getHighlighted();
|
143
143
|
l && ((S = n.value) == null || S.focusByHash(l.valueHash));
|
144
|
-
},
|
144
|
+
}, ke = (e) => {
|
145
145
|
var a, d, v, S;
|
146
|
-
if (!
|
146
|
+
if (!B.value || !t.multiple || o.value || (e.preventDefault(), (a = n.value) == null || a.blur(), !i.value.length)) return;
|
147
147
|
(d = s.value) == null || d.focusNext();
|
148
148
|
const l = (v = s.value) == null ? void 0 : v.getHighlighted();
|
149
149
|
l && ((S = n.value) == null || S.focusByHash(l.valueHash));
|
150
150
|
}, Ie = async () => {
|
151
151
|
var l, a;
|
152
|
-
if (!
|
152
|
+
if (!B.value)
|
153
153
|
return;
|
154
154
|
if (m.value) {
|
155
155
|
if ((a = n.value) != null && a.getHighlighted()) {
|
@@ -157,100 +157,100 @@ const Ct = { class: "bb-base-select__input-container" }, St = {
|
|
157
157
|
return;
|
158
158
|
}
|
159
159
|
} else {
|
160
|
-
await
|
160
|
+
await I(), await F(t.transitionDuration), i.value.length && ((l = n.value) == null || l.focusFirstSelected());
|
161
161
|
return;
|
162
162
|
}
|
163
163
|
const e = o.value.trim();
|
164
|
-
|
165
|
-
}, ke = async () => {
|
166
|
-
m.value && await C();
|
164
|
+
qe(e) || (u("option:add", e), o.value = "");
|
167
165
|
}, Ce = async () => {
|
166
|
+
m.value && await C();
|
167
|
+
}, Se = async () => {
|
168
168
|
var e, l;
|
169
|
-
!
|
169
|
+
!B.value || o.value || !i.value.length || ((e = s.value) != null && e.getHighlighted() && s.value.confirmOption(), await G(), (l = s.value) == null || l.focusPrevious());
|
170
170
|
}, o = f("");
|
171
|
-
|
171
|
+
Qe(() => {
|
172
172
|
o.value = `${o.value}`;
|
173
173
|
});
|
174
174
|
const {
|
175
|
-
getter:
|
176
|
-
debouncedGetter:
|
175
|
+
getter: x,
|
176
|
+
debouncedGetter: $e,
|
177
177
|
items: Oe,
|
178
178
|
loading: X
|
179
|
-
} =
|
180
|
-
items:
|
179
|
+
} = ft({
|
180
|
+
items: H(t, "items"),
|
181
181
|
debounce: t.queryDebounceTime
|
182
|
-
}),
|
182
|
+
}), M = () => {
|
183
183
|
var e, l;
|
184
|
-
t.enforceCoherence && !Z.value && (t.multiple ? u("update:modelValue",
|
184
|
+
t.enforceCoherence && !Z.value && (t.multiple ? u("update:modelValue", Ne.value.coherent) : u("update:modelValue", null), (e = s.value) == null || e.blur(), (l = n.value) == null || l.blur());
|
185
185
|
}, {
|
186
186
|
hasPrefilled: Y,
|
187
|
-
isPrefilling:
|
188
|
-
prefill:
|
189
|
-
} =
|
187
|
+
isPrefilling: De,
|
188
|
+
prefill: Te
|
189
|
+
} = vt({
|
190
190
|
onStart: t.prefill === !0,
|
191
191
|
currentValue: t.modelValue,
|
192
192
|
multiple: t.multiple,
|
193
193
|
fn: async ({ prefill: e }) => {
|
194
|
-
await
|
194
|
+
await x(o.value, e, t.modelValue), M(), b();
|
195
195
|
}
|
196
196
|
}), {
|
197
|
-
array:
|
198
|
-
add:
|
199
|
-
remove:
|
200
|
-
set:
|
201
|
-
} =
|
197
|
+
array: He,
|
198
|
+
add: Le,
|
199
|
+
remove: Fe,
|
200
|
+
set: Ee
|
201
|
+
} = yt(), i = y(() => {
|
202
202
|
const e = Object.fromEntries(
|
203
|
-
Object.entries(
|
203
|
+
Object.entries(P.value).map(([l], a) => [l, a])
|
204
204
|
);
|
205
|
-
return
|
206
|
-
}),
|
207
|
-
items:
|
208
|
-
}), { options:
|
209
|
-
disabled:
|
210
|
-
items: y(() => [...Oe.value, ...
|
205
|
+
return D.value.filter((l) => l.selected).sort((l, a) => e[l.valueHash] - e[a.valueHash]);
|
206
|
+
}), Ae = y(() => i.value.length ? "" : t.placeholder), { data: P, get: qe } = ne({
|
207
|
+
items: H(t, "modelValue")
|
208
|
+
}), { options: D } = ht({
|
209
|
+
disabled: H(t, "disabled"),
|
210
|
+
items: y(() => [...Oe.value, ...He.value]),
|
211
211
|
itemText: t.itemText,
|
212
212
|
itemValue: t.itemValue,
|
213
213
|
max: t.max,
|
214
214
|
selectable: !0,
|
215
|
-
selectedIndexedByHash:
|
216
|
-
}),
|
215
|
+
selectedIndexedByHash: P
|
216
|
+
}), T = y(() => !!(X.value || t.loading)), xe = y(() => {
|
217
217
|
let e = [];
|
218
218
|
const l = i.value.some(
|
219
219
|
(d) => d.text === o.value
|
220
220
|
);
|
221
|
-
return (t.multiple && o.value || o.value && !l && !t.multiple) && t.filterBy ? e =
|
221
|
+
return (t.multiple && o.value || o.value && !l && !t.multiple) && t.filterBy ? e = D.value.filter((d) => {
|
222
222
|
let v = !1;
|
223
223
|
return typeof t.filterBy == "function" ? v = t.filterBy(d.value, d.item) : Array.isArray(t.filterBy) && t.filterBy.length && (v = v || oe(d.item, t.filterBy, o.value.trim())), v || oe(d, ["text"], o.value.trim());
|
224
|
-
}) : e =
|
224
|
+
}) : e = D.value, e;
|
225
225
|
}), b = () => {
|
226
226
|
if (t.multiple) {
|
227
227
|
o.value = "";
|
228
228
|
return;
|
229
229
|
}
|
230
230
|
let e;
|
231
|
-
i.value && (e =
|
232
|
-
},
|
233
|
-
t.multiple ? (u("update:modelValue", t.modelValue.concat(e.value)), t.stash &&
|
234
|
-
},
|
235
|
-
if (
|
236
|
-
const l = { ...
|
231
|
+
i.value && (e = at(i.value)), o.value = (e == null ? void 0 : e.text) || "";
|
232
|
+
}, Me = async (e) => {
|
233
|
+
t.multiple ? (u("update:modelValue", t.modelValue.concat(e.value)), t.stash && Le(e.item), b()) : (t.stash && Ee(e.item), u("update:modelValue", e.value), await G(), b()), q(), t.multiple || C();
|
234
|
+
}, N = async (e) => {
|
235
|
+
if (Fe((l) => l.valueHash !== e.valueHash), t.multiple) {
|
236
|
+
const l = { ...P.value };
|
237
237
|
delete l[e.valueHash], u("update:modelValue", Object.values(l));
|
238
238
|
} else
|
239
239
|
u("update:modelValue", null), await G(), b();
|
240
|
-
|
241
|
-
}, { data:
|
242
|
-
items:
|
240
|
+
q();
|
241
|
+
}, { data: Pe } = ne({
|
242
|
+
items: D,
|
243
243
|
key: "valueHash"
|
244
|
-
}), { coherent: Z, status:
|
245
|
-
modelValue:
|
244
|
+
}), { coherent: Z, status: Ne } = bt({
|
245
|
+
modelValue: H(t, "modelValue"),
|
246
246
|
multiple: t.multiple,
|
247
|
-
iteratee: (e) => !!
|
247
|
+
iteratee: (e) => !!Pe.value[gt(e)]
|
248
248
|
});
|
249
|
-
let
|
249
|
+
let V = 0;
|
250
250
|
ue(
|
251
251
|
() => t.modelValue,
|
252
252
|
async () => {
|
253
|
-
|
253
|
+
V++, Z.value || (await x(o.value, !1, t.modelValue), M()), V === 1 && b(), V--;
|
254
254
|
},
|
255
255
|
{
|
256
256
|
debounce: t.modelValueDebounceTime
|
@@ -258,52 +258,52 @@ const Ct = { class: "bb-base-select__input-container" }, St = {
|
|
258
258
|
), ue(
|
259
259
|
() => [t.dependencies, t.items],
|
260
260
|
async () => {
|
261
|
-
Y.value && (
|
261
|
+
Y.value && (V++, await x(o.value, !1, t.modelValue), V === 1 && (M(), b()), V--);
|
262
262
|
},
|
263
263
|
{
|
264
264
|
debounce: t.depsDebounceTime
|
265
265
|
}
|
266
266
|
);
|
267
|
-
const m = f(!1),
|
268
|
-
|
267
|
+
const m = f(!1), W = f(!0), z = f(!1), I = async () => {
|
268
|
+
z.value = !0, await pt(() => !!n.value), W.value = !1, m.value = !0;
|
269
269
|
}, C = async () => {
|
270
270
|
var e;
|
271
|
-
m.value = !1,
|
272
|
-
},
|
273
|
-
|
274
|
-
},
|
275
|
-
|
276
|
-
},
|
277
|
-
e.preventDefault(), u("click", e), !(t.disabled || t.readonly) && (
|
278
|
-
},
|
271
|
+
m.value = !1, W.value = !0, (e = s.value) == null || e.blur();
|
272
|
+
}, We = () => m.value ? C() : I(), K = f(!1), ze = () => {
|
273
|
+
K.value = !0;
|
274
|
+
}, Ke = () => {
|
275
|
+
K.value = !1, u("inactive");
|
276
|
+
}, Ue = (e) => {
|
277
|
+
e.preventDefault(), u("click", e), !(t.disabled || t.readonly) && (q(), We());
|
278
|
+
}, je = rt(
|
279
279
|
(e) => typeof e != "string",
|
280
280
|
JSON.stringify
|
281
|
-
),
|
282
|
-
const l =
|
281
|
+
), Re = y(() => [].concat(t.modelValue).map((e) => {
|
282
|
+
const l = je(e);
|
283
283
|
return {
|
284
284
|
disabled: t.disabled,
|
285
285
|
name: t.name,
|
286
286
|
type: "hidden",
|
287
287
|
value: l
|
288
288
|
};
|
289
|
-
})),
|
289
|
+
})), Ge = () => {
|
290
290
|
let e = null;
|
291
291
|
t.multiple && (e = []), u("update:modelValue", e);
|
292
292
|
};
|
293
|
-
return (e, l) => (h(),
|
293
|
+
return (e, l) => (h(), L(ct, {
|
294
294
|
ref_key: "outerContainer",
|
295
|
-
ref:
|
295
|
+
ref: E,
|
296
296
|
class: ee({
|
297
297
|
"bb-base-select": !0,
|
298
|
-
"bb-base-select--active":
|
298
|
+
"bb-base-select--active": K.value,
|
299
299
|
"bb-base-select--shown": m.value,
|
300
|
-
"bb-base-select--loading":
|
300
|
+
"bb-base-select--loading": T.value,
|
301
301
|
"bb-base-select--disabled": e.disabled,
|
302
302
|
"bb-base-select--errors": e.hasErrors,
|
303
303
|
"bb-base-select--readonly": e.readonly,
|
304
304
|
"bb-base-select--compact": e.compact
|
305
305
|
}),
|
306
|
-
onClick:
|
306
|
+
onClick: Ue
|
307
307
|
}, {
|
308
308
|
"prepend-outer": r(() => [
|
309
309
|
c(e.$slots, "prepend-outer", { query: o.value })
|
@@ -312,14 +312,14 @@ const Ct = { class: "bb-base-select__input-container" }, St = {
|
|
312
312
|
c(e.$slots, "append-outer", { query: o.value })
|
313
313
|
]),
|
314
314
|
default: r(() => [
|
315
|
-
|
315
|
+
U(dt, {
|
316
316
|
ref_key: "innerContainer",
|
317
|
-
ref:
|
317
|
+
ref: k,
|
318
318
|
"append:icon": t["append:icon"],
|
319
|
-
clearable: e.clearable && !
|
319
|
+
clearable: e.clearable && !g(Bt)(e.modelValue),
|
320
320
|
"prepend:icon": t["prepend:icon"],
|
321
321
|
"prevent-focus": !0,
|
322
|
-
"onClick:clear":
|
322
|
+
"onClick:clear": Ge
|
323
323
|
}, {
|
324
324
|
prepend: r(() => [
|
325
325
|
c(e.$slots, "prepend", { query: o.value })
|
@@ -334,61 +334,62 @@ const Ct = { class: "bb-base-select__input-container" }, St = {
|
|
334
334
|
c(e.$slots, "suffix")
|
335
335
|
]),
|
336
336
|
default: r(() => [
|
337
|
-
|
337
|
+
U(g(lt), { tag: "span" }, {
|
338
338
|
default: r(() => [
|
339
|
-
|
340
|
-
e.multiple && i.value.length <= e.maxSelectedLabels ? (h(),
|
341
|
-
e.comma ? (h(),
|
339
|
+
j("span", $t, [
|
340
|
+
e.multiple && i.value.length <= e.maxSelectedLabels ? (h(), $(te, { key: 0 }, [
|
341
|
+
e.comma ? (h(), L(st, {
|
342
342
|
key: 0,
|
343
343
|
ref_key: "commaBox",
|
344
344
|
ref: J,
|
345
345
|
options: i.value,
|
346
|
-
"onOption:unselected":
|
347
|
-
}, null, 8, ["options"])) : (h(),
|
346
|
+
"onOption:unselected": N
|
347
|
+
}, null, 8, ["options"])) : (h(), L(it, {
|
348
348
|
key: 1,
|
349
349
|
ref_key: "chipsBox",
|
350
350
|
ref: Q,
|
351
351
|
options: i.value,
|
352
|
-
"onOption:unselected":
|
352
|
+
"onOption:unselected": N
|
353
353
|
}, null, 8, ["options"]))
|
354
|
-
], 64)) : e.multiple ? (h(),
|
355
|
-
|
356
|
-
id:
|
354
|
+
], 64)) : e.multiple ? (h(), $("span", Ot, _e(e.selectedLabelsFn ? e.selectedLabelsFn(i.value.length) : g(se)("select.multipleMaxReached", i.value.length)), 1)) : R("", !0),
|
355
|
+
Xe((h(), $("input", {
|
356
|
+
id: g(_),
|
357
|
+
key: `${g(de)}`,
|
357
358
|
ref_key: "input",
|
358
|
-
ref:
|
359
|
+
ref: A,
|
359
360
|
"onUpdate:modelValue": l[0] || (l[0] = (a) => o.value = a),
|
360
361
|
"aria-autocomplete": "list",
|
361
|
-
"aria-controls":
|
362
|
+
"aria-controls": z.value ? `${g(_)}_listbox` : void 0,
|
362
363
|
"aria-describedby": e.ariaDescribedby,
|
363
364
|
"aria-expanded": m.value,
|
364
365
|
autocomplete: e.autocomplete,
|
365
366
|
autofocus: e.autofocus,
|
366
367
|
class: ee("bb-base-select__text-input"),
|
367
368
|
disabled: e.disabled,
|
368
|
-
inputmode:
|
369
|
-
placeholder:
|
369
|
+
inputmode: pe.value,
|
370
|
+
placeholder: Ae.value,
|
370
371
|
readonly: e.readonly || !e.allowWriting,
|
371
372
|
required: e.required && (!e.multiple || !e.modelValue.length),
|
372
373
|
role: "combobox",
|
373
374
|
size: "1",
|
374
375
|
style: le({ "--characters": o.value.length }),
|
375
376
|
type: "text",
|
376
|
-
onBlur: p(
|
377
|
-
onChange: p(
|
378
|
-
onFocusOnce: p(
|
379
|
-
onFocus: p(
|
380
|
-
onInput: p(
|
377
|
+
onBlur: p(he, ["stop"]),
|
378
|
+
onChange: p(be, ["stop"]),
|
379
|
+
onFocusOnce: p(ye, ["stop"]),
|
380
|
+
onFocus: p(ve, ["stop"]),
|
381
|
+
onInput: p(ge, ["stop"]),
|
381
382
|
onKeydown: [
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
383
|
+
w(p(Se, ["stop"]), ["delete"]),
|
384
|
+
w(p(Ve, ["stop"]), ["left"]),
|
385
|
+
w(p(Be, ["stop", "prevent"]), ["down"]),
|
386
|
+
w(p(Ie, ["stop", "prevent"]), ["enter"]),
|
387
|
+
w(p(Ce, ["stop", "prevent"]), ["esc"]),
|
388
|
+
w(p(we, ["stop", "prevent"]), ["up"]),
|
389
|
+
w(p(ke, ["stop"]), ["right"])
|
389
390
|
]
|
390
|
-
}, null, 44,
|
391
|
-
[
|
391
|
+
}, null, 44, Dt)), [
|
392
|
+
[Ye, o.value]
|
392
393
|
])
|
393
394
|
])
|
394
395
|
]),
|
@@ -396,15 +397,15 @@ const Ct = { class: "bb-base-select__input-container" }, St = {
|
|
396
397
|
}),
|
397
398
|
e.showChevron ? c(e.$slots, "chevron", {
|
398
399
|
key: 0,
|
399
|
-
loading: !!
|
400
|
+
loading: !!g(X),
|
400
401
|
shown: m.value
|
401
402
|
}, () => [
|
402
|
-
l[1] || (l[1] =
|
403
|
+
l[1] || (l[1] = j("svg", {
|
403
404
|
class: "bb-base-select__chevron",
|
404
405
|
viewBox: "0 0 24 24",
|
405
406
|
xmlns: "http://www.w3.org/2000/svg"
|
406
407
|
}, [
|
407
|
-
|
408
|
+
j("path", {
|
408
409
|
d: "M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z",
|
409
410
|
fill: "currentColor"
|
410
411
|
})
|
@@ -413,28 +414,28 @@ const Ct = { class: "bb-base-select__input-container" }, St = {
|
|
413
414
|
]),
|
414
415
|
_: 3
|
415
416
|
}, 8, ["append:icon", "clearable", "prepend:icon"]),
|
416
|
-
(h(!0),
|
417
|
+
(h(!0), $(te, null, Ze(Re.value, (a) => (h(), $("input", ae({
|
417
418
|
key: a.value,
|
418
419
|
ref_for: !0
|
419
420
|
}, a), null, 16))), 128)),
|
420
|
-
|
421
|
+
z.value ? (h(), L(mt, {
|
421
422
|
key: 0,
|
422
423
|
target: e.teleportTarget
|
423
424
|
}, {
|
424
425
|
default: r(() => [
|
425
|
-
|
426
|
+
U(Vt, {
|
426
427
|
ref_key: "optionsContainer",
|
427
428
|
ref: n,
|
428
429
|
compact: e.compact,
|
429
|
-
loading:
|
430
|
+
loading: T.value,
|
430
431
|
"loading-text": e.loadingText,
|
431
432
|
multiple: e.multiple,
|
432
433
|
"no-data-text": e.noDataText,
|
433
434
|
open: m.value,
|
434
|
-
options:
|
435
|
-
style: le(
|
436
|
-
"onOption:selected":
|
437
|
-
"onOption:unselected":
|
435
|
+
options: xe.value,
|
436
|
+
style: le(fe.value),
|
437
|
+
"onOption:selected": Me,
|
438
|
+
"onOption:unselected": N
|
438
439
|
}, {
|
439
440
|
"options:prepend": r(() => [
|
440
441
|
c(e.$slots, "options:prepend")
|
@@ -451,7 +452,7 @@ const Ct = { class: "bb-base-select__input-container" }, St = {
|
|
451
452
|
option: r((a) => [
|
452
453
|
c(e.$slots, "option", ae({
|
453
454
|
hasErrors: e.hasErrors,
|
454
|
-
loading:
|
455
|
+
loading: T.value
|
455
456
|
}, a))
|
456
457
|
]),
|
457
458
|
_: 3
|
@@ -465,5 +466,5 @@ const Ct = { class: "bb-base-select__input-container" }, St = {
|
|
465
466
|
}
|
466
467
|
});
|
467
468
|
export {
|
468
|
-
|
469
|
+
dl as default
|
469
470
|
};
|
package/dist/index39.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as U, ref as d, computed as h, onMounted as W, watch as Z, openBlock as g, createElementBlock as w, mergeProps as T, renderSlot as f, createElementVNode as c, Fragment as ee, renderList as ae, createCommentVNode as H, normalizeProps as re, guardReactiveProps as te, unref as b, normalizeClass as F, normalizeStyle as I } from "vue";
|
2
|
-
import { clamp as le } from "./
|
2
|
+
import { clamp as le } from "./index207.js";
|
3
3
|
import { head as O } from "./index264.js";
|
4
|
-
import { isCssColor as Y } from "./
|
4
|
+
import { isCssColor as Y } from "./index235.js";
|
5
5
|
import { isNil as P } from "./index265.js";
|
6
6
|
import { isNotNil as ne } from "./index135.js";
|
7
7
|
import { transposeValue as y } from "./index131.js";
|
8
|
-
import { hash as J } from "./
|
8
|
+
import { hash as J } from "./index228.js";
|
9
9
|
const oe = { class: "bb-base-slider__slider-container" }, ie = {
|
10
10
|
key: 0,
|
11
11
|
class: "bb-base-slider__ticks-container"
|
package/dist/index41.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { defineComponent as I, ref as f, computed as n, watch as S, openBlock as h, createElementBlock as y, normalizeProps as r, guardReactiveProps as d, mergeProps as V, createCommentVNode as A, createElementVNode as l, renderSlot as F } from "vue";
|
2
|
-
import { isCssColor as b } from "./
|
3
|
-
import { when as N } from "./
|
2
|
+
import { isCssColor as b } from "./index235.js";
|
3
|
+
import { when as N } from "./index236.js";
|
4
4
|
const x = { class: "bb-base-switch-container" }, $ = /* @__PURE__ */ I({
|
5
5
|
__name: "BaseSwitch",
|
6
6
|
props: {
|
package/dist/index43.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
import { defineComponent as j, ref as k, toRef as d, openBlock as z, createBlock as G, unref as B, withCtx as s, renderSlot as l, normalizeProps as v, guardReactiveProps as b, createVNode as R, mergeProps as w, createSlots as W } from "vue";
|
2
2
|
import K from "./index41.js";
|
3
3
|
/* empty css */
|
4
|
-
import N from "./
|
4
|
+
import N from "./index238.js";
|
5
5
|
/* empty css */
|
6
|
-
import { useItemsGetter as U } from "./
|
7
|
-
import { useIndexById as T } from "./
|
8
|
-
import { useBaseOptions as q } from "./
|
9
|
-
import { useCoherence as J } from "./
|
10
|
-
import { hash as Q } from "./
|
11
|
-
import { useHashedWatcher as $ } from "./
|
12
|
-
import { usePrefill as X } from "./
|
6
|
+
import { useItemsGetter as U } from "./index240.js";
|
7
|
+
import { useIndexById as T } from "./index241.js";
|
8
|
+
import { useBaseOptions as q } from "./index242.js";
|
9
|
+
import { useCoherence as J } from "./index243.js";
|
10
|
+
import { hash as Q } from "./index228.js";
|
11
|
+
import { useHashedWatcher as $ } from "./index244.js";
|
12
|
+
import { usePrefill as X } from "./index245.js";
|
13
13
|
const ue = /* @__PURE__ */ j({
|
14
14
|
__name: "BaseSwitchGroup",
|
15
15
|
props: {
|