bitboss-ui 2.1.113 → 2.1.114
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/BaseCheckboxGroup/types.d.ts +12 -4
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +1 -1
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +8 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/index109.js +9 -9
- package/dist/index110.js +18 -18
- package/dist/index118.js +1 -1
- package/dist/index122.js +1 -0
- package/dist/index124.js +4 -4
- 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 +70 -59
- package/dist/index22.js +14 -14
- package/dist/index221.js +138 -2
- package/dist/index222.js +2 -138
- package/dist/index224.js +5 -34
- package/dist/index225.js +7 -32
- package/dist/index226.js +33 -28
- package/dist/index227.js +30 -0
- package/dist/index229.js +3 -7
- package/dist/index230.js +13 -7
- package/dist/index231.js +20 -2
- package/dist/index232.js +2 -9
- package/dist/index233.js +4 -13
- package/dist/index234.js +86 -3
- package/dist/index236.js +30 -11
- package/dist/index237.js +17 -8
- package/dist/index238.js +51 -3
- package/dist/index239.js +18 -3
- package/dist/index24.js +10 -10
- package/dist/index240.js +3 -2
- package/dist/index241.js +11 -17
- package/dist/index242.js +17 -11
- package/dist/index243.js +8 -51
- package/dist/index244.js +2 -18
- package/dist/index245.js +3 -12
- package/dist/index246.js +5 -17
- package/dist/index247.js +5 -30
- package/dist/index248.js +5 -18
- package/dist/index249.js +5 -4
- package/dist/index250.js +5 -106
- package/dist/index251.js +7 -0
- package/dist/index252.js +3 -100
- package/dist/{index254.js → index253.js} +6 -6
- package/dist/index255.js +4 -0
- package/dist/index256.js +100 -101
- package/dist/index258.js +100 -2
- package/dist/index26.js +3 -3
- package/dist/index260.js +10 -7
- package/dist/index261.js +3 -86
- package/dist/index262.js +6 -0
- package/dist/index263.js +3 -5
- package/dist/index264.js +188 -5
- package/dist/index265.js +3 -5
- package/dist/index266.js +5 -5
- package/dist/index267.js +6 -5
- package/dist/index268.js +268 -5
- package/dist/index269.js +42 -57
- package/dist/index270.js +51 -32
- package/dist/index271.js +32 -2
- package/dist/index272.js +60 -2
- package/dist/index273.js +7 -3
- package/dist/index274.js +2 -4
- package/dist/index275.js +369 -19
- package/dist/index277.js +2 -13
- package/dist/index278.js +7 -5
- package/dist/index279.js +6 -5
- package/dist/index28.js +1 -1
- package/dist/index280.js +2 -268
- package/dist/index281.js +30 -48
- package/dist/index282.js +9 -52
- package/dist/index283.js +25 -32
- package/dist/index284.js +11 -60
- package/dist/index285.js +13 -4
- package/dist/index286.js +21 -18
- package/dist/index287.js +9 -5
- package/dist/index288.js +23 -373
- package/dist/index289.js +7 -0
- package/dist/index290.js +9 -6
- package/dist/index291.js +20 -15
- package/dist/index292.js +6 -10
- package/dist/index293.js +16 -3
- package/dist/index294.js +17 -8
- package/dist/index295.js +12 -21
- package/dist/index296.js +106 -8
- package/dist/index297.js +6 -23
- package/dist/index298.js +3 -25
- package/dist/index299.js +51 -186
- package/dist/index30.js +3 -3
- package/dist/index300.js +13 -3
- package/dist/index301.js +67 -3
- package/dist/index302.js +31 -51
- package/dist/index305.js +1 -1
- package/dist/index306.js +4 -2
- package/dist/index307.js +7 -5
- package/dist/index308.js +3 -7
- package/dist/index309.js +17 -3
- package/dist/index310.js +28 -3
- package/dist/index311.js +1 -1
- package/dist/index312.js +3 -2
- package/dist/index313.js +5 -28
- package/dist/index314.js +3 -17
- package/dist/index315.js +3 -4
- package/dist/index316.js +280 -2
- package/dist/index317.js +2 -3
- package/dist/index318.js +13 -277
- package/dist/index319.js +2 -2
- package/dist/index32.js +2 -2
- package/dist/index320.js +12 -121
- package/dist/index321.js +2 -2
- package/dist/index322.js +25 -13
- package/dist/index324.js +2 -16
- package/dist/index325.js +2 -2
- package/dist/index326.js +2 -16
- package/dist/index327.js +2 -2
- package/dist/index328.js +2 -19
- package/dist/index329.js +125 -2
- package/dist/index330.js +2 -27
- package/dist/index331.js +15 -2
- package/dist/index332.js +2 -2
- package/dist/index333.js +19 -2
- package/dist/index334.js +2 -2
- package/dist/index335.js +1 -1
- package/dist/index336.js +719 -2
- package/dist/index337.js +366 -3
- package/dist/index338.js +56 -3
- package/dist/index339.js +4 -719
- package/dist/index34.js +8 -8
- package/dist/index340.js +5 -366
- package/dist/index341.js +2 -57
- package/dist/index343.js +2 -5
- package/dist/index344.js +6 -34
- package/dist/index345.js +66 -128
- package/dist/index346.js +65 -396
- package/dist/index347.js +34 -199
- package/dist/index348.js +125 -255
- package/dist/index349.js +390 -220
- package/dist/index350.js +7 -67
- package/dist/index351.js +18 -66
- package/dist/index352.js +9 -2
- package/dist/index353.js +15 -2
- package/dist/index354.js +5 -134
- package/dist/index355.js +200 -7
- package/dist/index356.js +257 -17
- package/dist/index357.js +92 -8
- package/dist/index358.js +225 -12
- package/dist/index359.js +134 -5
- package/dist/index36.js +4 -4
- package/dist/index360.js +22 -7
- package/dist/index362.js +4 -0
- package/dist/index363.js +2 -93
- package/dist/index367.js +1 -1
- package/dist/index38.js +133 -131
- package/dist/index40.js +7 -7
- package/dist/index42.js +2 -2
- package/dist/index44.js +16 -15
- 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/index66.js +3 -1
- 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 +1 -1
- package/dist/index228.js +0 -7
- package/dist/index235.js +0 -4
- package/dist/index257.js +0 -15
- package/dist/index259.js +0 -9
- package/dist/index276.js +0 -8
- package/dist/index361.js +0 -24
package/dist/index38.js
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as et, ref as v, computed as m, toRef as z, createBlock as K, openBlock as y, normalizeClass as ae, withCtx as n, createElementVNode as L, createVNode as F, createElementBlock as S, unref as b, renderSlot as s, createCommentVNode as V, withDirectives as tt, Fragment as le, toDisplayString as ot, withKeys as B, withModifiers as f, normalizeStyle as ne, vModelDynamic as at, normalizeProps as lt, guardReactiveProps as nt, mergeProps as ue, renderList as ut, nextTick as U } from "vue";
|
|
2
|
+
import rt from "./index116.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { hash as W } from "./
|
|
5
|
-
import { isEmpty as
|
|
6
|
-
import { last as
|
|
7
|
-
import { matchAnyKey as re } from "./
|
|
8
|
-
import { useArray as
|
|
9
|
-
import { useBaseOptions as
|
|
10
|
-
import { useCoherence as
|
|
11
|
-
import { useHashedWatcher as ie } from "./
|
|
12
|
-
import { useId as
|
|
13
|
-
import { useIndexById as se } from "./
|
|
14
|
-
import { useMounted as
|
|
15
|
-
import { useItemsGetter as
|
|
16
|
-
import { useLocale as
|
|
4
|
+
import { hash as W } from "./index240.js";
|
|
5
|
+
import { isEmpty as it } from "./index252.js";
|
|
6
|
+
import { last as st } from "./index255.js";
|
|
7
|
+
import { matchAnyKey as re } from "./index294.js";
|
|
8
|
+
import { useArray as dt } from "./index295.js";
|
|
9
|
+
import { useBaseOptions as pt } from "./index238.js";
|
|
10
|
+
import { useCoherence as ct } from "./index239.js";
|
|
11
|
+
import { useHashedWatcher as ie } from "./index241.js";
|
|
12
|
+
import { useId as mt } from "./index8.js";
|
|
13
|
+
import { useIndexById as se } from "./index237.js";
|
|
14
|
+
import { useMounted as ft, useElementSize as vt, useIntersectionObserver as ht } from "./index146.js";
|
|
15
|
+
import { useItemsGetter as yt } from "./index236.js";
|
|
16
|
+
import { useLocale as gt } from "./index230.js";
|
|
17
17
|
import { useMobile as bt } from "./index9.js";
|
|
18
|
-
import { usePrefill as
|
|
18
|
+
import { usePrefill as Bt } from "./index242.js";
|
|
19
19
|
import { wait as T } from "./index145.js";
|
|
20
|
-
import { when as
|
|
21
|
-
import
|
|
20
|
+
import { when as wt } from "./index233.js";
|
|
21
|
+
import Vt from "./index256.js";
|
|
22
22
|
/* empty css */
|
|
23
|
-
import
|
|
23
|
+
import kt from "./index258.js";
|
|
24
24
|
/* empty css */
|
|
25
|
-
import
|
|
25
|
+
import It from "./index140.js";
|
|
26
26
|
/* empty css */
|
|
27
|
-
import
|
|
27
|
+
import St from "./index142.js";
|
|
28
28
|
/* empty css */
|
|
29
|
-
import
|
|
29
|
+
import $t from "./index253.js";
|
|
30
30
|
/* empty css */
|
|
31
|
-
import
|
|
32
|
-
import { useUntil as
|
|
33
|
-
import { isNil as
|
|
34
|
-
import { get as
|
|
35
|
-
|
|
31
|
+
import Ct from "./index296.js";
|
|
32
|
+
import { useUntil as Dt } from "./index285.js";
|
|
33
|
+
import { isNil as Ht } from "./index274.js";
|
|
34
|
+
import { get as Ot } from "./index284.js";
|
|
35
|
+
import { useLogger as Lt } from "./index243.js";
|
|
36
|
+
const Ft = { class: "bb-base-select__input-container" }, Tt = {
|
|
36
37
|
key: 1,
|
|
37
38
|
class: "bb-base-select__max-reached"
|
|
38
|
-
},
|
|
39
|
+
}, At = ["id", "aria-activedescendant", "aria-controls", "aria-describedby", "aria-expanded", "autocomplete", "autofocus", "disabled", "inputmode", "placeholder", "readonly", "required", "onKeydown"], yo = /* @__PURE__ */ et({
|
|
39
40
|
__name: "BaseSelect",
|
|
40
41
|
props: {
|
|
41
42
|
allowWriting: { type: [Boolean, String], default: !0 },
|
|
@@ -82,53 +83,54 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
82
83
|
},
|
|
83
84
|
emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue", "option:add"],
|
|
84
85
|
setup(de, { emit: pe }) {
|
|
85
|
-
const t = de, u = pe;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
const t = de, u = pe, ce = Lt();
|
|
87
|
+
t.multiple && !Array.isArray(t.modelValue) && ce.throw(
|
|
88
|
+
'BaseSelect: multiple is set to "true" but modelValue is not an array.'
|
|
89
|
+
);
|
|
90
|
+
const { t: me } = gt(), fe = ft(), A = v(null), $ = v(null), r = v(null), G = v(null), R = v(null), d = m(
|
|
89
91
|
() => t.comma ? G.value : R.value
|
|
90
|
-
), { width:
|
|
91
|
-
() => t.allowWriting === "not-mobile" &&
|
|
92
|
-
), j = t.id ||
|
|
92
|
+
), { width: ve } = vt($), { isMobile: he } = bt(), ye = m(
|
|
93
|
+
() => t.allowWriting === "not-mobile" && he.value ? "none" : void 0
|
|
94
|
+
), j = t.id || mt().id.value, { resume: ge, pause: be } = ht(
|
|
93
95
|
$,
|
|
94
96
|
async ([{ intersectionRatio: e }]) => {
|
|
95
97
|
e !== 1 && l.value && await I();
|
|
96
98
|
},
|
|
97
99
|
{ threshold: [0, 1], immediate: !1 }
|
|
98
|
-
),
|
|
99
|
-
width: `${
|
|
100
|
-
})),
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
u("focus", e),
|
|
104
|
-
},
|
|
105
|
-
t.prefill === "focus" && !
|
|
106
|
-
},
|
|
100
|
+
), Be = m(() => ({
|
|
101
|
+
width: `${ve.value ?? 0}px`
|
|
102
|
+
})), E = v(null), q = v(), h = () => {
|
|
103
|
+
E.value instanceof HTMLInputElement && E.value.focus();
|
|
104
|
+
}, we = async (e) => {
|
|
105
|
+
u("focus", e), Je(), document.addEventListener("click", C), document.addEventListener("focusin", C);
|
|
106
|
+
}, Ve = () => {
|
|
107
|
+
t.prefill === "focus" && !Me.value && !Y.value && Ne();
|
|
108
|
+
}, ke = async (e) => {
|
|
107
109
|
u("blur", e);
|
|
108
|
-
},
|
|
109
|
-
u("input", e), o.value === "" && (t.multiple || u("update:modelValue", null)), d.value?.blur(), N.value && k(),
|
|
110
|
-
},
|
|
110
|
+
}, Ie = (e) => u("change", e), Se = (e) => {
|
|
111
|
+
u("input", e), o.value === "" && (t.multiple || u("update:modelValue", null)), d.value?.blur(), N.value && k(), Ae(o.value, !1, t.modelValue);
|
|
112
|
+
}, $e = (e) => {
|
|
111
113
|
q.value = e;
|
|
112
114
|
}, C = async (e) => {
|
|
113
|
-
if (e.target instanceof Node &&
|
|
114
|
-
I(),
|
|
115
|
+
if (e.target instanceof Node && A.value && !A.value.$el.contains(e.target) && !r.value?.$el?.contains(e.target)) {
|
|
116
|
+
I(), Qe(), document.removeEventListener("click", C), document.removeEventListener("focusin", C), await T(t.transitionDuration), g();
|
|
115
117
|
return;
|
|
116
118
|
}
|
|
117
|
-
}, w = m(() => !(t.readonly || t.disabled || H.value || !d.value && t.multiple && p.value.length <= t.maxSelectedLabels)),
|
|
119
|
+
}, w = m(() => !(t.readonly || t.disabled || H.value || !d.value && t.multiple && p.value.length <= t.maxSelectedLabels)), Ce = async () => {
|
|
118
120
|
w.value && (d.value?.blur(), l.value ? r.value?.focusPrevious() : (await k(), await T(t.transitionDuration), r.value?.focusLastSelected()));
|
|
119
|
-
},
|
|
121
|
+
}, De = async () => {
|
|
120
122
|
w.value && (d.value?.blur(), l.value ? r.value?.focusNext() : (await k(), await T(t.transitionDuration), r.value?.focusFirstSelected()));
|
|
121
|
-
},
|
|
123
|
+
}, He = (e) => {
|
|
122
124
|
if (!w.value || !t.multiple || o.value || (e.preventDefault(), r.value?.blur(), !p.value.length)) return;
|
|
123
125
|
d.value?.focusPrevious();
|
|
124
126
|
const a = d.value?.getHighlighted();
|
|
125
127
|
a && r.value?.focusByHash(a.valueHash);
|
|
126
|
-
},
|
|
128
|
+
}, Oe = (e) => {
|
|
127
129
|
if (!w.value || !t.multiple || o.value || (e.preventDefault(), r.value?.blur(), !p.value.length)) return;
|
|
128
130
|
d.value?.focusNext();
|
|
129
131
|
const a = d.value?.getHighlighted();
|
|
130
132
|
a && r.value?.focusByHash(a.valueHash);
|
|
131
|
-
},
|
|
133
|
+
}, Le = async () => {
|
|
132
134
|
if (!w.value)
|
|
133
135
|
return;
|
|
134
136
|
if (l.value) {
|
|
@@ -141,39 +143,39 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
141
143
|
return;
|
|
142
144
|
}
|
|
143
145
|
const e = o.value.trim();
|
|
144
|
-
|
|
145
|
-
}, Le = async () => {
|
|
146
|
-
l.value && await I();
|
|
146
|
+
xe(e) || (u("option:add", e), o.value = "");
|
|
147
147
|
}, Fe = async () => {
|
|
148
|
+
l.value && await I();
|
|
149
|
+
}, Te = async () => {
|
|
148
150
|
!w.value || o.value || !p.value.length || (d.value?.getHighlighted() && d.value.confirmOption(), await U(), d.value?.focusPrevious());
|
|
149
151
|
}, o = v(""), {
|
|
150
152
|
getter: P,
|
|
151
|
-
debouncedGetter:
|
|
153
|
+
debouncedGetter: Ae,
|
|
152
154
|
items: Ee,
|
|
153
155
|
loading: J
|
|
154
|
-
} =
|
|
156
|
+
} = yt({
|
|
155
157
|
items: z(t, "items"),
|
|
156
158
|
debounce: t.queryDebounceTime
|
|
157
159
|
}), {
|
|
158
160
|
array: Q,
|
|
159
161
|
add: X,
|
|
160
|
-
remove:
|
|
161
|
-
set:
|
|
162
|
-
} =
|
|
162
|
+
remove: qe,
|
|
163
|
+
set: Pe
|
|
164
|
+
} = dt(), {
|
|
163
165
|
hasPrefilled: Y,
|
|
164
|
-
isPrefilling:
|
|
165
|
-
prefill:
|
|
166
|
-
} =
|
|
166
|
+
isPrefilling: Me,
|
|
167
|
+
prefill: Ne
|
|
168
|
+
} = Bt({
|
|
167
169
|
trigger: t.prefill === !0,
|
|
168
170
|
currentValue: t.modelValue,
|
|
169
171
|
multiple: t.multiple,
|
|
170
172
|
fn: async (e) => {
|
|
171
|
-
await P(o.value, e, t.modelValue), t.stash && X(...D.value.map((a) => a.item)),
|
|
173
|
+
await P(o.value, e, t.modelValue), t.stash && X(...D.value.map((a) => a.item)), g();
|
|
172
174
|
}
|
|
173
|
-
}), { data: Z, get:
|
|
175
|
+
}), { data: Z, get: xe } = se({
|
|
174
176
|
// Force model value to be an array
|
|
175
177
|
items: m(() => [].concat(t.modelValue))
|
|
176
|
-
}), { options: D } =
|
|
178
|
+
}), { options: D } = pt({
|
|
177
179
|
disabled: z(t, "disabled"),
|
|
178
180
|
items: m(() => [...Ee.value, ...Q.value]),
|
|
179
181
|
itemText: t.itemText,
|
|
@@ -184,7 +186,7 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
184
186
|
}), { data: _ } = se({
|
|
185
187
|
items: D,
|
|
186
188
|
key: "valueHash"
|
|
187
|
-
}), { coherent: ee, coherentValue: te } =
|
|
189
|
+
}), { coherent: ee, coherentValue: te } = ct({
|
|
188
190
|
modelValue: z(t, "modelValue"),
|
|
189
191
|
multiple: t.multiple,
|
|
190
192
|
iteratee: (e) => !!_.value[W(e)]
|
|
@@ -194,31 +196,31 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
194
196
|
ie(
|
|
195
197
|
() => t.modelValue,
|
|
196
198
|
async () => {
|
|
197
|
-
ee.value || (await P(o.value, !0, t.modelValue), t.enforceCoherence && (u("update:modelValue", te.value), d.value?.blur(), r.value?.blur())),
|
|
199
|
+
ee.value || (await P(o.value, !0, t.modelValue), t.enforceCoherence && (u("update:modelValue", te.value), d.value?.blur(), r.value?.blur())), g();
|
|
198
200
|
},
|
|
199
201
|
{ debounce: t.modelValueDebounceTime }
|
|
200
202
|
), ie(
|
|
201
203
|
() => [t.dependencies, t.items],
|
|
202
204
|
async () => {
|
|
203
|
-
Y.value && (await P(o.value, !0, t.modelValue), t.enforceCoherence && !ee.value && (u("update:modelValue", te.value), d.value?.blur(), r.value?.blur()),
|
|
205
|
+
Y.value && (await P(o.value, !0, t.modelValue), t.enforceCoherence && !ee.value && (u("update:modelValue", te.value), d.value?.blur(), r.value?.blur()), g());
|
|
204
206
|
},
|
|
205
207
|
{ debounce: t.depsDebounceTime }
|
|
206
208
|
);
|
|
207
|
-
const
|
|
209
|
+
const g = () => {
|
|
208
210
|
if (t.multiple) {
|
|
209
211
|
o.value = "";
|
|
210
212
|
return;
|
|
211
213
|
}
|
|
212
214
|
let e;
|
|
213
|
-
p.value && (e =
|
|
214
|
-
},
|
|
215
|
-
t.multiple ? (u("update:modelValue", t.modelValue.concat(e.value)), t.stash && X(e.item),
|
|
215
|
+
p.value && (e = st(p.value)), o.value = e?.text || "";
|
|
216
|
+
}, ze = m(() => p.value.length ? "" : t.placeholder), Ke = async (e) => {
|
|
217
|
+
t.multiple ? (u("update:modelValue", t.modelValue.concat(e.value)), t.stash && X(e.item), g()) : (t.stash && Pe(e.item), u("update:modelValue", e.value), await U(), g()), h(), t.multiple || I();
|
|
216
218
|
}, M = async (e) => {
|
|
217
|
-
if (
|
|
219
|
+
if (qe((a) => a.valueHash !== e.valueHash), t.multiple) {
|
|
218
220
|
const a = { ...Z.value };
|
|
219
221
|
delete a[e.valueHash], u("update:modelValue", Object.values(a));
|
|
220
222
|
} else
|
|
221
|
-
u("update:modelValue", null), await U(),
|
|
223
|
+
u("update:modelValue", null), await U(), g();
|
|
222
224
|
h();
|
|
223
225
|
}, oe = m(() => {
|
|
224
226
|
const e = p.value.some(
|
|
@@ -234,10 +236,10 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
234
236
|
o.value.trim()
|
|
235
237
|
)), O || re(c, ["text"], o.value.trim());
|
|
236
238
|
});
|
|
237
|
-
}),
|
|
239
|
+
}), Ue = Symbol("default"), We = (e) => Ht(t.groupBy) ? Ue : typeof t.groupBy == "function" ? t.groupBy(e.item) : Ot(e.item, t.groupBy), Ge = m(() => {
|
|
238
240
|
const e = {};
|
|
239
241
|
for (const a of oe.value) {
|
|
240
|
-
const i =
|
|
242
|
+
const i = We(a), c = W(i);
|
|
241
243
|
e[c] || (e[c] = {
|
|
242
244
|
id: c,
|
|
243
245
|
data: i ?? null,
|
|
@@ -245,34 +247,34 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
245
247
|
}), e[c].options.push(a);
|
|
246
248
|
}
|
|
247
249
|
return Object.values(e).filter((a) => a.options.length);
|
|
248
|
-
}), l = v(!1), N = v(!0),
|
|
249
|
-
|
|
250
|
+
}), l = v(!1), N = v(!0), Re = Dt(l), k = async () => {
|
|
251
|
+
ge(), N.value = !1, l.value = !0;
|
|
250
252
|
}, I = async () => {
|
|
251
253
|
l.value = !1, N.value = !0, q.value = void 0, d.value?.blur(), be();
|
|
252
|
-
},
|
|
254
|
+
}, je = () => l.value ? I() : k(), x = v(!1), Je = () => {
|
|
253
255
|
x.value = !0;
|
|
254
|
-
},
|
|
256
|
+
}, Qe = () => {
|
|
255
257
|
x.value = !1, u("inactive");
|
|
256
|
-
},
|
|
257
|
-
e.preventDefault(), u("click", e), !(t.disabled || t.readonly) && (h(),
|
|
258
|
-
},
|
|
258
|
+
}, Xe = (e) => {
|
|
259
|
+
e.preventDefault(), u("click", e), !(t.disabled || t.readonly) && (h(), je());
|
|
260
|
+
}, Ye = wt(
|
|
259
261
|
(e) => typeof e != "string",
|
|
260
262
|
JSON.stringify
|
|
261
|
-
),
|
|
262
|
-
const a =
|
|
263
|
+
), Ze = m(() => [].concat(t.modelValue).map((e) => {
|
|
264
|
+
const a = Ye(e);
|
|
263
265
|
return {
|
|
264
266
|
disabled: t.disabled,
|
|
265
267
|
name: t.name,
|
|
266
268
|
type: "hidden",
|
|
267
269
|
value: a
|
|
268
270
|
};
|
|
269
|
-
})),
|
|
271
|
+
})), _e = () => {
|
|
270
272
|
let e = null;
|
|
271
273
|
t.multiple && (e = []), u("update:modelValue", e);
|
|
272
274
|
};
|
|
273
|
-
return (e, a) => (y(), K(
|
|
275
|
+
return (e, a) => (y(), K(St, {
|
|
274
276
|
ref_key: "outerContainer",
|
|
275
|
-
ref:
|
|
277
|
+
ref: A,
|
|
276
278
|
class: ae({
|
|
277
279
|
"bb-base-select": !0,
|
|
278
280
|
"bb-base-select--active": x.value,
|
|
@@ -283,7 +285,7 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
283
285
|
"bb-base-select--readonly": e.readonly,
|
|
284
286
|
"bb-base-select--compact": e.compact
|
|
285
287
|
}),
|
|
286
|
-
onClick:
|
|
288
|
+
onClick: Xe
|
|
287
289
|
}, {
|
|
288
290
|
"prepend-outer": n(() => [
|
|
289
291
|
s(e.$slots, "prepend-outer", { query: o.value })
|
|
@@ -297,12 +299,12 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
297
299
|
ref: $,
|
|
298
300
|
class: "bb-base-select__inner-wrapper"
|
|
299
301
|
}, [
|
|
300
|
-
F(
|
|
302
|
+
F(It, {
|
|
301
303
|
"append:icon": t["append:icon"],
|
|
302
|
-
clearable: e.clearable && !
|
|
304
|
+
clearable: e.clearable && !b(it)(e.modelValue),
|
|
303
305
|
"prepend:icon": t["prepend:icon"],
|
|
304
306
|
"prevent-focus": !0,
|
|
305
|
-
"onClick:clear":
|
|
307
|
+
"onClick:clear": _e
|
|
306
308
|
}, {
|
|
307
309
|
prepend: n(() => [
|
|
308
310
|
s(e.$slots, "prepend", {
|
|
@@ -323,63 +325,63 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
323
325
|
s(e.$slots, "suffix")
|
|
324
326
|
]),
|
|
325
327
|
default: n(() => [
|
|
326
|
-
F(
|
|
328
|
+
F(rt, { tag: "span" }, {
|
|
327
329
|
default: n(() => [
|
|
328
|
-
L("span",
|
|
330
|
+
L("span", Ft, [
|
|
329
331
|
e.multiple && p.value.length <= e.maxSelectedLabels ? (y(), S(le, { key: 0 }, [
|
|
330
|
-
e.comma ? (y(), K(
|
|
332
|
+
e.comma ? (y(), K(kt, {
|
|
331
333
|
key: 0,
|
|
332
334
|
ref_key: "commaBox",
|
|
333
335
|
ref: G,
|
|
334
336
|
options: p.value,
|
|
335
337
|
"onOption:unselected": M
|
|
336
|
-
}, null, 8, ["options"])) : (y(), K(
|
|
338
|
+
}, null, 8, ["options"])) : (y(), K(Vt, {
|
|
337
339
|
key: 1,
|
|
338
340
|
ref_key: "chipsBox",
|
|
339
341
|
ref: R,
|
|
340
342
|
options: p.value,
|
|
341
343
|
"onOption:unselected": M
|
|
342
344
|
}, null, 8, ["options"]))
|
|
343
|
-
], 64)) : e.multiple ? (y(), S("span",
|
|
344
|
-
|
|
345
|
-
id:
|
|
346
|
-
key: `${
|
|
345
|
+
], 64)) : e.multiple ? (y(), S("span", Tt, ot(e.selectedLabelsFn ? e.selectedLabelsFn(p.value.length) : b(me)("select.multipleMaxReached", p.value.length)), 1)) : V("", !0),
|
|
346
|
+
tt((y(), S("input", {
|
|
347
|
+
id: b(j),
|
|
348
|
+
key: `${b(fe)}`,
|
|
347
349
|
ref_key: "input",
|
|
348
|
-
ref:
|
|
350
|
+
ref: E,
|
|
349
351
|
"onUpdate:modelValue": a[0] || (a[0] = (i) => o.value = i),
|
|
350
352
|
"aria-activedescendant": l.value ? q.value : void 0,
|
|
351
353
|
"aria-autocomplete": "list",
|
|
352
|
-
"aria-controls":
|
|
354
|
+
"aria-controls": b(Re) ? `${b(j)}_listbox` : void 0,
|
|
353
355
|
"aria-describedby": e.ariaDescribedby,
|
|
354
356
|
"aria-expanded": l.value,
|
|
355
357
|
autocomplete: e.autocomplete,
|
|
356
358
|
autofocus: e.autofocus,
|
|
357
359
|
class: ae("bb-base-select__text-input"),
|
|
358
360
|
disabled: e.disabled,
|
|
359
|
-
inputmode:
|
|
360
|
-
placeholder:
|
|
361
|
+
inputmode: ye.value,
|
|
362
|
+
placeholder: ze.value,
|
|
361
363
|
readonly: e.readonly || !e.allowWriting,
|
|
362
364
|
required: e.required && (!e.multiple || !e.modelValue.length),
|
|
363
365
|
role: "combobox",
|
|
364
366
|
size: "1",
|
|
365
367
|
style: ne({ "--characters": o.value.length }),
|
|
366
368
|
type: "text",
|
|
367
|
-
onBlur: f(
|
|
368
|
-
onChange: f(
|
|
369
|
-
onFocusOnce: f(
|
|
370
|
-
onFocus: f(
|
|
371
|
-
onInput: f(
|
|
369
|
+
onBlur: f(ke, ["stop"]),
|
|
370
|
+
onChange: f(Ie, ["stop"]),
|
|
371
|
+
onFocusOnce: f(Ve, ["stop"]),
|
|
372
|
+
onFocus: f(we, ["stop"]),
|
|
373
|
+
onInput: f(Se, ["stop"]),
|
|
372
374
|
onKeydown: [
|
|
373
|
-
B(f(
|
|
374
|
-
B(f(
|
|
375
|
-
B(f(
|
|
376
|
-
B(f(
|
|
377
|
-
B(f(
|
|
378
|
-
B(f(
|
|
379
|
-
B(f(
|
|
375
|
+
B(f(Te, ["stop"]), ["delete"]),
|
|
376
|
+
B(f(He, ["stop"]), ["left"]),
|
|
377
|
+
B(f(De, ["stop", "prevent"]), ["down"]),
|
|
378
|
+
B(f(Le, ["stop", "prevent"]), ["enter"]),
|
|
379
|
+
B(f(Fe, ["stop", "prevent"]), ["esc"]),
|
|
380
|
+
B(f(Ce, ["stop", "prevent"]), ["up"]),
|
|
381
|
+
B(f(Oe, ["stop"]), ["right"])
|
|
380
382
|
]
|
|
381
|
-
}, null, 44,
|
|
382
|
-
[
|
|
383
|
+
}, null, 44, At)), [
|
|
384
|
+
[at, o.value]
|
|
383
385
|
])
|
|
384
386
|
])
|
|
385
387
|
]),
|
|
@@ -387,7 +389,7 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
387
389
|
}),
|
|
388
390
|
e.showChevron ? s(e.$slots, "chevron", {
|
|
389
391
|
key: 0,
|
|
390
|
-
loading: !!
|
|
392
|
+
loading: !!b(J),
|
|
391
393
|
shown: l.value
|
|
392
394
|
}, () => [
|
|
393
395
|
a[2] || (a[2] = L("svg", {
|
|
@@ -405,7 +407,7 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
405
407
|
_: 3
|
|
406
408
|
}, 8, ["append:icon", "clearable", "prepend:icon"])
|
|
407
409
|
], 512),
|
|
408
|
-
F(
|
|
410
|
+
F($t, {
|
|
409
411
|
modelValue: l.value,
|
|
410
412
|
"onUpdate:modelValue": a[1] || (a[1] = (i) => l.value = i),
|
|
411
413
|
anchor: $.value,
|
|
@@ -417,7 +419,7 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
417
419
|
key: 0,
|
|
418
420
|
focus: h
|
|
419
421
|
}) : V("", !0),
|
|
420
|
-
F(
|
|
422
|
+
F(Ct, {
|
|
421
423
|
ref_key: "optionsContainer",
|
|
422
424
|
ref: r,
|
|
423
425
|
compact: e.compact,
|
|
@@ -427,12 +429,12 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
427
429
|
"no-data-text": e.noDataText,
|
|
428
430
|
open: l.value,
|
|
429
431
|
options: e.groupBy ? void 0 : oe.value,
|
|
430
|
-
groups: e.groupBy ?
|
|
432
|
+
groups: e.groupBy ? Ge.value : void 0,
|
|
431
433
|
"header-height": e.headerHeight,
|
|
432
|
-
style: ne(
|
|
434
|
+
style: ne(Be.value),
|
|
433
435
|
"option-height": e.itemHeight,
|
|
434
|
-
"onFocused:change":
|
|
435
|
-
"onOption:selected":
|
|
436
|
+
"onFocused:change": $e,
|
|
437
|
+
"onOption:selected": Ke,
|
|
436
438
|
"onOption:unselected": M
|
|
437
439
|
}, {
|
|
438
440
|
"options:prepend": n(() => [
|
|
@@ -463,7 +465,7 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
463
465
|
}, i))
|
|
464
466
|
]),
|
|
465
467
|
group: n((i) => [
|
|
466
|
-
s(e.$slots, "group",
|
|
468
|
+
s(e.$slots, "group", lt(nt(i)))
|
|
467
469
|
]),
|
|
468
470
|
_: 3
|
|
469
471
|
}, 8, ["compact", "loading", "loading-text", "multiple", "no-data-text", "open", "options", "groups", "header-height", "style", "option-height"]),
|
|
@@ -474,7 +476,7 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
474
476
|
]),
|
|
475
477
|
_: 3
|
|
476
478
|
}, 8, ["modelValue", "anchor", "transition-duration"]),
|
|
477
|
-
(y(!0), S(le, null,
|
|
479
|
+
(y(!0), S(le, null, ut(Ze.value, (i) => (y(), S("input", ue({
|
|
478
480
|
key: i.value,
|
|
479
481
|
ref_for: !0
|
|
480
482
|
}, i), null, 16))), 128))
|
|
@@ -484,5 +486,5 @@ const Ot = { class: "bb-base-select__input-container" }, Lt = {
|
|
|
484
486
|
}
|
|
485
487
|
});
|
|
486
488
|
export {
|
|
487
|
-
|
|
489
|
+
yo as default
|
|
488
490
|
};
|
package/dist/index40.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as ie, ref as d, computed as f, onMounted as se, watch as ue, createElementBlock as y, openBlock as g, normalizeProps as G, guardReactiveProps as O, renderSlot as p, createElementVNode as c, mergeProps as N, createCommentVNode as Y, Fragment as de, renderList as me, unref as b, normalizeStyle as j, normalizeClass as J } from "vue";
|
|
2
|
-
import { head as ce } from "./
|
|
3
|
-
import { isCssColor as K } from "./
|
|
4
|
-
import { isNil as x } from "./
|
|
2
|
+
import { head as ce } from "./index277.js";
|
|
3
|
+
import { isCssColor as K } from "./index232.js";
|
|
4
|
+
import { isNil as x } from "./index274.js";
|
|
5
5
|
import { getAsPercentageBetween as S, getAsPercentage as be, getValueFromPercentageInInterval as T } from "./index144.js";
|
|
6
|
-
import { snapToStep as ve } from "./
|
|
7
|
-
import { last as fe } from "./
|
|
8
|
-
import { transpose as Q } from "./
|
|
9
|
-
import { clamp as m } from "./
|
|
6
|
+
import { snapToStep as ve } from "./index278.js";
|
|
7
|
+
import { last as fe } from "./index255.js";
|
|
8
|
+
import { transpose as Q } from "./index279.js";
|
|
9
|
+
import { clamp as m } from "./index222.js";
|
|
10
10
|
const pe = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "bb-base-slider__ticks-container"
|
package/dist/index42.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as F, ref as b, computed as s, watch as S, createElementBlock as y, openBlock as V, normalizeProps as l, guardReactiveProps as m, createCommentVNode as A, createElementVNode as r, mergeProps as v, renderSlot as N } from "vue";
|
|
2
|
-
import { isCssColor as p } from "./
|
|
3
|
-
import { when as x } from "./
|
|
2
|
+
import { isCssColor as p } from "./index232.js";
|
|
3
|
+
import { when as x } from "./index233.js";
|
|
4
4
|
const M = { class: "bb-base-switch-container" }, $ = /* @__PURE__ */ F({
|
|
5
5
|
__name: "BaseSwitch",
|
|
6
6
|
props: {
|
package/dist/index44.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as j, ref as k, toRef as d, createBlock as z, openBlock as G, unref as B, withCtx as n, renderSlot as s, normalizeProps as v, guardReactiveProps as b, createVNode as R, mergeProps as w, createSlots as W } from "vue";
|
|
2
2
|
import K from "./index42.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import N from "./
|
|
4
|
+
import N from "./index234.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 "./index236.js";
|
|
7
|
+
import { useIndexById as T } from "./index237.js";
|
|
8
|
+
import { useBaseOptions as q } from "./index238.js";
|
|
9
|
+
import { useCoherence as J } from "./index239.js";
|
|
10
|
+
import { hash as Q } from "./index240.js";
|
|
11
|
+
import { useHashedWatcher as $ } from "./index241.js";
|
|
12
|
+
import { usePrefill as X } from "./index242.js";
|
|
13
13
|
const ue = /* @__PURE__ */ j({
|
|
14
14
|
__name: "BaseSwitchGroup",
|
|
15
15
|
props: {
|
|
@@ -30,6 +30,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
30
30
|
loadingText: {},
|
|
31
31
|
max: { default: 1 / 0 },
|
|
32
32
|
modelValue: {},
|
|
33
|
+
multiple: { type: Boolean },
|
|
33
34
|
modelValueDebounceTime: { default: 0 },
|
|
34
35
|
name: {},
|
|
35
36
|
noDataText: {},
|
|
@@ -40,7 +41,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
40
41
|
const o = E, a = C;
|
|
41
42
|
if (!Array.isArray(o.modelValue))
|
|
42
43
|
throw new Error("Model value must be an array in checkbox group.");
|
|
43
|
-
const u = k(),
|
|
44
|
+
const u = k(), r = k(!1), {
|
|
44
45
|
getter: c,
|
|
45
46
|
items: L,
|
|
46
47
|
loading: D
|
|
@@ -77,11 +78,11 @@ const ue = /* @__PURE__ */ j({
|
|
|
77
78
|
multiple: !0,
|
|
78
79
|
iteratee: (e) => !!P.value[Q(e)]
|
|
79
80
|
});
|
|
80
|
-
let
|
|
81
|
+
let l = 0;
|
|
81
82
|
$(
|
|
82
83
|
() => o.modelValue,
|
|
83
84
|
async () => {
|
|
84
|
-
|
|
85
|
+
l++, V.value || (await c(!1, o.modelValue), m()), l--;
|
|
85
86
|
},
|
|
86
87
|
{
|
|
87
88
|
debounce: o.modelValueDebounceTime
|
|
@@ -89,7 +90,7 @@ const ue = /* @__PURE__ */ j({
|
|
|
89
90
|
), $(
|
|
90
91
|
() => [o.dependencies, o.items],
|
|
91
92
|
async () => {
|
|
92
|
-
I.value && (
|
|
93
|
+
I.value && (l++, await c(!1, o.modelValue), l === 1 && m(), l--);
|
|
93
94
|
},
|
|
94
95
|
{
|
|
95
96
|
debounce: o.depsDebounceTime
|
|
@@ -104,16 +105,16 @@ const ue = /* @__PURE__ */ j({
|
|
|
104
105
|
onBlur: (e) => a("blur", e),
|
|
105
106
|
onClick: (e) => a("click", e),
|
|
106
107
|
onFocus: (e) => {
|
|
107
|
-
a("focus", e),
|
|
108
|
+
a("focus", e), r.value || (document.addEventListener("focusin", p, { passive: !0 }), document.addEventListener("click", f, { passive: !0 }), r.value = !0);
|
|
108
109
|
},
|
|
109
110
|
onInput: (e) => a("input", e),
|
|
110
111
|
onKeydown: (e) => a("keydown", e),
|
|
111
112
|
onMousedown: (e) => a("mousedown", e),
|
|
112
113
|
onMouseup: (e) => a("mouseup", e)
|
|
113
114
|
}, p = (e) => {
|
|
114
|
-
e.target instanceof HTMLElement && (u.value?.$el.contains(e.target) || (a("inactive"),
|
|
115
|
+
e.target instanceof HTMLElement && (u.value?.$el.contains(e.target) || (a("inactive"), r.value = !1, document.removeEventListener("focusin", p), document.removeEventListener("click", f)));
|
|
115
116
|
}, f = (e) => {
|
|
116
|
-
e.target instanceof HTMLElement && (u.value?.$el.contains(e.target) || (a("inactive"),
|
|
117
|
+
e.target instanceof HTMLElement && (u.value?.$el.contains(e.target) || (a("inactive"), r.value = !1, document.removeEventListener("focusin", p), document.removeEventListener("click", f)));
|
|
117
118
|
};
|
|
118
119
|
return (e, i) => (G(), z(N, {
|
|
119
120
|
ref_key: "container",
|
package/dist/index46.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { defineComponent as j, ref as u, computed as f, toRef as C, watch as Q, createBlock as h, openBlock as m, normalizeClass as Z, withCtx as l, createVNode as E, unref as G, createElementVNode as $, createElementBlock as J, createCommentVNode as W, withDirectives as X, Fragment as Y, mergeProps as ee, withModifiers as s, withKeys as v, vModelText as te, renderSlot as d, nextTick as oe } from "vue";
|
|
2
2
|
import ae from "./index116.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { last as le } from "./
|
|
5
|
-
import { useBaseOptions as ne } from "./
|
|
6
|
-
import { useIndexById as re } from "./
|
|
7
|
-
import ie from "./
|
|
4
|
+
import { last as le } from "./index255.js";
|
|
5
|
+
import { useBaseOptions as ne } from "./index238.js";
|
|
6
|
+
import { useIndexById as re } from "./index237.js";
|
|
7
|
+
import ie from "./index256.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import ue from "./
|
|
9
|
+
import ue from "./index258.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
import se from "./index140.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
import de from "./index142.js";
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { isEmpty as pe } from "./
|
|
15
|
+
import { isEmpty as pe } from "./index252.js";
|
|
16
16
|
const ce = { class: "bb-base-tag__input-container" }, fe = ["id", "aria-describedby", "autocomplete", "autofocus", "disabled", "placeholder", "readonly", "required", "onKeydown"], Oe = /* @__PURE__ */ j({
|
|
17
17
|
__name: "BaseTag",
|
|
18
18
|
props: {
|