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