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