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