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