bitboss-ui 2.0.102 → 2.0.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +10 -16
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +109 -7
- package/dist/components/BbSelect/BbSelect.vue.d.ts +2 -16
- package/dist/composables/useBaseOptions.d.ts +31 -0
- package/dist/composables/useCoherence.d.ts +20 -0
- package/dist/composables/useHashedWatcher.d.ts +2 -0
- package/dist/composables/useIndexById.d.ts +11 -0
- package/dist/composables/useItemsGetter.d.ts +12 -0
- package/dist/composables/usePrefill.d.ts +12 -0
- package/dist/index100.js +88 -60
- package/dist/index101.js +10 -13
- package/dist/index111.js +154 -126
- package/dist/index119.js +2 -2
- package/dist/index121.js +5 -5
- package/dist/index123.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 +22 -22
- package/dist/index131.js +1 -1
- package/dist/index132.js +69 -65
- package/dist/index133.js +2 -2
- package/dist/index15.js +4 -4
- package/dist/index17.js +3 -3
- package/dist/index19.js +126 -82
- package/dist/index205.js +2 -81
- package/dist/index206.js +115 -2
- package/dist/index207.js +2 -2
- package/dist/index208.js +2 -2
- package/dist/index209.js +2 -2
- package/dist/index210.js +3 -3
- package/dist/index211.js +2 -2
- package/dist/index212.js +2 -2
- package/dist/index213.js +1 -1
- package/dist/index216.js +3 -3
- package/dist/index219.js +2 -2
- package/dist/index220.js +1 -1
- package/dist/index221.js +124 -51
- package/dist/{index235.js → index222.js} +1 -1
- package/dist/index223.js +2 -13
- package/dist/index224.js +41 -2
- package/dist/index225.js +20 -4
- package/dist/index226.js +6 -2
- package/dist/index227.js +51 -18
- package/dist/index229.js +12 -2
- package/dist/index23.js +11 -11
- package/dist/index230.js +5 -168
- package/dist/index231.js +10 -82
- package/dist/index232.js +371 -0
- package/dist/index233.js +4 -8
- package/dist/index234.js +83 -125
- package/dist/index236.js +8 -2
- package/dist/index237.js +24 -40
- package/dist/index238.js +17 -6
- package/dist/index239.js +48 -5
- package/dist/index240.js +15 -12
- package/dist/index241.js +11 -368
- package/dist/index242.js +16 -3
- package/dist/index243.js +2 -7
- package/dist/index244.js +4 -2
- package/dist/index245.js +2 -18
- package/dist/index246.js +3 -106
- package/dist/index247.js +9 -0
- package/dist/index248.js +2 -100
- package/dist/index249.js +20 -0
- package/dist/index25.js +5 -5
- package/dist/index250.js +106 -2
- package/dist/index252.js +100 -10
- package/dist/index254.js +11 -8
- package/dist/index255.js +2 -23
- package/dist/index256.js +3 -89
- package/dist/index257.js +4 -0
- package/dist/index258.js +10 -9
- package/dist/index259.js +3 -6
- package/dist/index260.js +8 -15
- package/dist/index261.js +23 -9
- package/dist/index262.js +88 -7
- package/dist/index264.js +8 -5
- package/dist/index265.js +6 -2
- package/dist/index266.js +16 -2
- package/dist/index267.js +281 -2
- package/dist/index268.js +6 -2
- package/dist/index269.js +2 -2
- package/dist/index27.js +1 -1
- package/dist/index271.js +2 -2
- package/dist/index272.js +2 -2
- package/dist/index273.js +2 -2
- package/dist/index274.js +2 -2
- package/dist/index275.js +2 -28
- package/dist/index276.js +1 -21
- package/dist/index277.js +4 -0
- package/dist/index278.js +2 -7
- package/dist/index279.js +28 -3
- package/dist/index280.js +24 -0
- package/dist/index282.js +7 -224
- package/dist/index283.js +3 -176
- package/dist/index284.js +7 -3
- package/dist/index285.js +11 -12
- package/dist/index286.js +16 -8
- package/dist/index287.js +7 -15
- package/dist/index288.js +3 -4
- package/dist/index29.js +3 -3
- package/dist/index290.js +174 -9
- package/dist/index293.js +1 -1
- package/dist/index296.js +1 -1
- package/dist/index297.js +3 -88
- package/dist/index298.js +8 -200
- package/dist/index301.js +200 -2
- package/dist/index302.js +89 -3
- package/dist/index303.js +1 -1
- package/dist/index304.js +3 -213
- package/dist/index305.js +206 -59
- package/dist/index306.js +224 -5
- package/dist/index307.js +5 -3
- package/dist/index308.js +2 -3
- package/dist/index309.js +66 -3
- package/dist/index31.js +2 -2
- package/dist/index310.js +3 -58
- package/dist/index311.js +6 -32
- package/dist/index312.js +18 -7
- package/dist/index313.js +5 -8
- package/dist/index314.js +7 -4
- package/dist/index315.js +3 -8
- package/dist/index316.js +3 -7
- package/dist/index317.js +56 -17
- package/dist/index318.js +8 -7
- package/dist/index319.js +8 -4
- package/dist/index320.js +7 -2
- package/dist/index321.js +3 -46
- package/dist/index322.js +33 -480
- package/dist/index323.js +49 -0
- package/dist/index324.js +2 -424
- package/dist/index325.js +479 -46
- package/dist/index327.js +426 -0
- package/dist/index328.js +49 -0
- package/dist/index33.js +102 -61
- package/dist/index35.js +3 -3
- package/dist/index37.js +284 -244
- package/dist/index39.js +4 -4
- package/dist/index41.js +2 -2
- package/dist/index43.js +129 -84
- package/dist/index45.js +122 -120
- package/dist/index47.js +2 -2
- package/dist/index49.js +2 -2
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +2 -2
- package/dist/index75.js +3 -3
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index84.js +3 -3
- package/dist/index86.js +1 -1
- package/dist/index88.js +4 -4
- package/dist/index90.js +1 -1
- package/package.json +1 -1
- package/dist/composables/useOptions.d.ts +0 -43
- package/dist/index228.js +0 -6
- package/dist/index251.js +0 -4
- package/dist/index253.js +0 -5
- package/dist/index263.js +0 -283
- package/dist/index281.js +0 -6
- package/dist/index289.js +0 -9
- /package/dist/{index326.js → index329.js} +0 -0
package/dist/index39.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { defineComponent as U, ref as d, computed as h, onMounted as W, watch as Z, openBlock as g, createElementBlock as w, mergeProps as T, renderSlot as f, createElementVNode as c, Fragment as ee, renderList as ae, createCommentVNode as H, normalizeProps as re, guardReactiveProps as te, unref as b, normalizeClass as F, normalizeStyle as I } from "vue";
|
2
|
-
import { clamp as le } from "./
|
3
|
-
import { head as O } from "./
|
4
|
-
import { isCssColor as Y } from "./
|
5
|
-
import { isNil as P } from "./
|
2
|
+
import { clamp as le } from "./index205.js";
|
3
|
+
import { head as O } from "./index257.js";
|
4
|
+
import { isCssColor as Y } from "./index243.js";
|
5
|
+
import { isNil as P } from "./index255.js";
|
6
6
|
import { isNotNil as ne } from "./index134.js";
|
7
7
|
import { transposeValue as y } from "./index131.js";
|
8
8
|
import { hash as J } from "./index213.js";
|
package/dist/index41.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { defineComponent as I, ref as f, computed as n, watch as S, openBlock as h, createElementBlock as y, normalizeProps as r, guardReactiveProps as d, mergeProps as V, createCommentVNode as A, createElementVNode as l, renderSlot as F } from "vue";
|
2
|
-
import { isCssColor as b } from "./
|
3
|
-
import { when as N } from "./
|
2
|
+
import { isCssColor as b } from "./index243.js";
|
3
|
+
import { when as N } from "./index244.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,10 +1,17 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import
|
3
|
-
import S from "./index41.js";
|
1
|
+
import { defineComponent as z, ref as B, toRef as d, openBlock as G, createBlock as R, unref as u, withCtx as s, renderSlot as l, normalizeProps as v, guardReactiveProps as b, createVNode as W, mergeProps as w, createSlots as K } from "vue";
|
2
|
+
import N from "./index41.js";
|
4
3
|
/* empty css */
|
5
|
-
import
|
4
|
+
import U from "./index234.js";
|
6
5
|
/* empty css */
|
7
|
-
|
6
|
+
import { useLocale as q } from "./index236.js";
|
7
|
+
import { useItemsGetter as J } from "./index237.js";
|
8
|
+
import { useIndexById as E } from "./index238.js";
|
9
|
+
import { useBaseOptions as Q } from "./index239.js";
|
10
|
+
import { useCoherence as X } from "./index240.js";
|
11
|
+
import { hash as Y } from "./index213.js";
|
12
|
+
import { useHashedWatcher as L } from "./index241.js";
|
13
|
+
import { usePrefill as Z } from "./index242.js";
|
14
|
+
const pe = /* @__PURE__ */ z({
|
8
15
|
__name: "BaseSwitchGroup",
|
9
16
|
props: {
|
10
17
|
ariaDescribedby: {},
|
@@ -21,122 +28,160 @@ const G = /* @__PURE__ */ B({
|
|
21
28
|
items: { type: [Array, Function], default: () => [] },
|
22
29
|
itemText: {},
|
23
30
|
itemValue: {},
|
24
|
-
loadingText: {
|
25
|
-
max: {},
|
31
|
+
loadingText: {},
|
32
|
+
max: { default: 1 / 0 },
|
26
33
|
modelValue: {},
|
27
34
|
modelValueDebounceTime: { default: 0 },
|
28
35
|
name: {},
|
29
|
-
noDataText: {
|
36
|
+
noDataText: {},
|
30
37
|
readonly: { type: Boolean }
|
31
38
|
},
|
32
39
|
emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
|
33
|
-
setup(
|
34
|
-
const
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
modelValue: l(n, "modelValue"),
|
50
|
-
modelValueDebounceTime: n.modelValueDebounceTime,
|
40
|
+
setup(C, { emit: D }) {
|
41
|
+
const o = C, t = D;
|
42
|
+
if (!Array.isArray(o.modelValue))
|
43
|
+
throw new Error("Model value must be an array in checkbox group.");
|
44
|
+
const { t: y } = q(), g = B(), r = B(!1), {
|
45
|
+
getter: c,
|
46
|
+
items: $,
|
47
|
+
loading: I
|
48
|
+
} = J({
|
49
|
+
items: d(o, "items"),
|
50
|
+
debounce: 0
|
51
|
+
}), m = () => {
|
52
|
+
o.enforceCoherence && !T.value && t("update:modelValue", P.value.coherent);
|
53
|
+
}, { hasPrefilled: H } = Z({
|
54
|
+
onStart: !0,
|
55
|
+
currentValue: o.modelValue,
|
51
56
|
multiple: !0,
|
52
|
-
prefill:
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
57
|
+
fn: async ({ prefill: e }) => {
|
58
|
+
await c(e, o.modelValue), m();
|
59
|
+
}
|
60
|
+
}), { data: V } = E({
|
61
|
+
items: d(o, "modelValue")
|
62
|
+
}), { options: k } = Q({
|
63
|
+
disabled: d(o, "disabled"),
|
64
|
+
items: $,
|
65
|
+
itemText: o.itemText,
|
66
|
+
itemValue: o.itemValue,
|
67
|
+
max: o.max,
|
68
|
+
selectable: !0,
|
69
|
+
selectedIndexedByHash: V
|
70
|
+
}), x = async (e) => {
|
71
|
+
t("update:modelValue", o.modelValue.concat(e.value));
|
72
|
+
}, S = async (e) => {
|
73
|
+
const a = { ...V.value };
|
74
|
+
delete a[e.valueHash], t("update:modelValue", Object.values(a));
|
75
|
+
}, { data: M } = E({
|
76
|
+
items: k,
|
77
|
+
key: "valueHash"
|
78
|
+
}), { coherent: T, status: P } = X({
|
79
|
+
modelValue: d(o, "modelValue"),
|
80
|
+
multiple: !0,
|
81
|
+
iteratee: (e) => !!M.value[Y(e)]
|
82
|
+
});
|
83
|
+
let i = 0;
|
84
|
+
L(
|
85
|
+
() => o.modelValue,
|
86
|
+
async () => {
|
87
|
+
i++, T.value || (await c(!1, o.modelValue), m()), i--;
|
88
|
+
},
|
89
|
+
{
|
90
|
+
debounce: o.modelValueDebounceTime
|
91
|
+
}
|
92
|
+
), L(
|
93
|
+
() => [o.dependencies, o.items],
|
94
|
+
async () => {
|
95
|
+
H.value && (i++, await c(!1, o.modelValue), i === 1 && m(), i--);
|
96
|
+
},
|
97
|
+
{
|
98
|
+
debounce: o.depsDebounceTime
|
99
|
+
}
|
100
|
+
);
|
101
|
+
const F = (e) => {
|
102
|
+
if (o.id)
|
103
|
+
return [o.id, e.valueHash].filter(Boolean).join("-");
|
104
|
+
}, O = (e, a) => {
|
105
|
+
t("change", e), a.selected ? S(a) : x(a);
|
106
|
+
}, A = {
|
107
|
+
onBlur: (e) => t("blur", e),
|
108
|
+
onClick: (e) => t("click", e),
|
64
109
|
onFocus: (e) => {
|
65
|
-
|
110
|
+
t("focus", e), r.value || (document.addEventListener("focusin", p, { passive: !0 }), document.addEventListener("click", f, { passive: !0 }), r.value = !0);
|
66
111
|
},
|
67
|
-
onInput: (e) =>
|
68
|
-
onKeydown: (e) =>
|
69
|
-
onMousedown: (e) =>
|
70
|
-
onMouseup: (e) =>
|
71
|
-
},
|
72
|
-
var
|
73
|
-
e.target instanceof HTMLElement && ((
|
74
|
-
},
|
75
|
-
var
|
76
|
-
e.target instanceof HTMLElement && ((
|
112
|
+
onInput: (e) => t("input", e),
|
113
|
+
onKeydown: (e) => t("keydown", e),
|
114
|
+
onMousedown: (e) => t("mousedown", e),
|
115
|
+
onMouseup: (e) => t("mouseup", e)
|
116
|
+
}, p = (e) => {
|
117
|
+
var a;
|
118
|
+
e.target instanceof HTMLElement && ((a = g.value) != null && a.contains(e.target) || (t("inactive"), r.value = !1, document.removeEventListener("focusin", p), document.removeEventListener("click", f)));
|
119
|
+
}, f = (e) => {
|
120
|
+
var a;
|
121
|
+
e.target instanceof HTMLElement && ((a = g.value) != null && a.contains(e.target) || (t("inactive"), r.value = !1, document.removeEventListener("focusin", p), document.removeEventListener("click", f)));
|
77
122
|
};
|
78
|
-
return (e,
|
123
|
+
return (e, a) => (G(), R(U, {
|
79
124
|
class: "bb-base-switch-group",
|
80
125
|
direction: e.direction,
|
81
126
|
"has-errors": e.hasErrors,
|
82
127
|
"hide-label": e.hideLabel,
|
83
|
-
loading: !!
|
84
|
-
"loading-text": e.loadingText,
|
85
|
-
"no-data-text": e.noDataText,
|
86
|
-
options:
|
128
|
+
loading: !!u(I),
|
129
|
+
"loading-text": e.loadingText || u(y)("common.loadingText"),
|
130
|
+
"no-data-text": e.noDataText || u(y)("common.noDataText"),
|
131
|
+
options: u(k)
|
87
132
|
}, {
|
88
|
-
prepend:
|
89
|
-
|
133
|
+
prepend: s(() => [
|
134
|
+
l(e.$slots, "prepend")
|
90
135
|
]),
|
91
|
-
loading:
|
92
|
-
|
136
|
+
loading: s(() => [
|
137
|
+
l(e.$slots, "loading")
|
93
138
|
]),
|
94
|
-
"no-data":
|
95
|
-
|
139
|
+
"no-data": s(() => [
|
140
|
+
l(e.$slots, "no-data")
|
96
141
|
]),
|
97
|
-
label:
|
98
|
-
|
142
|
+
label: s((n) => [
|
143
|
+
l(e.$slots, "label", v(b(n)))
|
99
144
|
]),
|
100
|
-
"option:prepend":
|
101
|
-
|
145
|
+
"option:prepend": s((n) => [
|
146
|
+
l(e.$slots, "option:prepend", v(b(n)))
|
102
147
|
]),
|
103
|
-
input:
|
104
|
-
|
105
|
-
id:
|
148
|
+
input: s(({ option: n, index: j }) => [
|
149
|
+
W(N, w({
|
150
|
+
id: F(n),
|
106
151
|
"aria-describedby": e.ariaDescribedby,
|
107
|
-
autofocus: e.autofocus &&
|
108
|
-
checked:
|
152
|
+
autofocus: e.autofocus && !j,
|
153
|
+
checked: n.selected,
|
109
154
|
color: e.color,
|
110
|
-
disabled:
|
155
|
+
disabled: n.disabled,
|
111
156
|
"has-errors": e.hasErrors,
|
112
157
|
name: e.name,
|
113
158
|
readonly: e.readonly,
|
114
|
-
"true-value":
|
115
|
-
},
|
116
|
-
onChange: (
|
117
|
-
}),
|
159
|
+
"true-value": n.value
|
160
|
+
}, A, {
|
161
|
+
onChange: (h) => O(h, n)
|
162
|
+
}), K({ _: 2 }, [
|
118
163
|
e.$slots.icon ? {
|
119
164
|
name: "icon",
|
120
|
-
fn:
|
121
|
-
|
122
|
-
item:
|
123
|
-
text:
|
124
|
-
},
|
165
|
+
fn: s((h) => [
|
166
|
+
l(e.$slots, "icon", w({
|
167
|
+
item: n.item,
|
168
|
+
text: n.text
|
169
|
+
}, h))
|
125
170
|
]),
|
126
171
|
key: "0"
|
127
172
|
} : void 0
|
128
173
|
]), 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "has-errors", "name", "readonly", "true-value", "onChange"])
|
129
174
|
]),
|
130
|
-
"option:append":
|
131
|
-
|
175
|
+
"option:append": s((n) => [
|
176
|
+
l(e.$slots, "option:append", v(b(n)))
|
132
177
|
]),
|
133
|
-
append:
|
134
|
-
|
178
|
+
append: s(() => [
|
179
|
+
l(e.$slots, "append")
|
135
180
|
]),
|
136
181
|
_: 3
|
137
182
|
}, 8, ["direction", "has-errors", "hide-label", "loading", "loading-text", "no-data-text", "options"]));
|
138
183
|
}
|
139
184
|
});
|
140
185
|
export {
|
141
|
-
|
186
|
+
pe as default
|
142
187
|
};
|
package/dist/index45.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
import { defineComponent as
|
1
|
+
import { defineComponent as R, ref as u, computed as f, toRef as E, watch as j, openBlock as v, createBlock as k, normalizeClass as Q, withCtx as l, renderSlot as s, createVNode as I, unref as Z, createElementVNode as $, createElementBlock as G, Fragment as J, createCommentVNode as W, withDirectives as X, mergeProps as Y, withModifiers as d, withKeys as y, vModelDynamic as ee, nextTick as te } from "vue";
|
2
2
|
/* empty css */
|
3
3
|
/* empty css */
|
4
|
-
import
|
4
|
+
import oe from "./index128.js";
|
5
5
|
/* empty css */
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import
|
6
|
+
import { last as ae } from "./index214.js";
|
7
|
+
import { useBaseOptions as ne } from "./index239.js";
|
8
|
+
import { useIndexById as le } from "./index238.js";
|
9
|
+
import re from "./index250.js";
|
10
10
|
/* empty css */
|
11
|
-
import
|
11
|
+
import ie from "./index252.js";
|
12
12
|
/* empty css */
|
13
|
-
import
|
13
|
+
import ue from "./index227.js";
|
14
14
|
/* empty css */
|
15
|
-
import
|
16
|
-
const
|
15
|
+
import se from "./index229.js";
|
16
|
+
const de = { class: "bb-base-tag__input-container" }, pe = ["id", "aria-describedby", "autocomplete", "autofocus", "disabled", "placeholder", "readonly", "required", "onKeydown"], $e = /* @__PURE__ */ R({
|
17
17
|
__name: "BaseTag",
|
18
18
|
props: {
|
19
19
|
"append:icon": {},
|
@@ -37,106 +37,108 @@ const ye = { class: "bb-base-tag__input-container" }, be = ["id", "aria-describe
|
|
37
37
|
required: { type: Boolean }
|
38
38
|
},
|
39
39
|
emits: ["blur", "change", "click", "duplicate", "focus", "inactive", "input", "keydown", "keyup", "update:modelValue"],
|
40
|
-
setup(
|
41
|
-
const
|
42
|
-
if (
|
40
|
+
setup(O, { emit: D }) {
|
41
|
+
const t = O, n = D;
|
42
|
+
if (t.multiple && !Array.isArray(t.modelValue))
|
43
43
|
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
44
|
-
const b =
|
45
|
-
() =>
|
46
|
-
), p =
|
44
|
+
const b = u(null), L = u(null), B = u(null), V = u(null), r = f(
|
45
|
+
() => t.comma ? B.value : V.value
|
46
|
+
), p = u(null), A = () => {
|
47
47
|
p.value instanceof HTMLInputElement && p.value.focus();
|
48
|
-
},
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
selectOption: M,
|
54
|
-
unselectOption: P,
|
55
|
-
valueIsSelected: S,
|
56
|
-
manualItems: _
|
57
|
-
} = pe({
|
58
|
-
emit: l,
|
48
|
+
}, o = u(""), i = f(() => K.value.filter((e) => e.selected)), { data: w, get: H } = le({
|
49
|
+
items: E(t, "modelValue")
|
50
|
+
}), { options: K } = ne({
|
51
|
+
disabled: E(t, "disabled"),
|
52
|
+
items: f(() => [].concat(t.modelValue)),
|
59
53
|
itemText: void 0,
|
60
54
|
itemValue: void 0,
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
55
|
+
max: t.max,
|
56
|
+
selectable: !0,
|
57
|
+
selectedIndexedByHash: w
|
58
|
+
}), C = () => {
|
59
|
+
if (t.multiple) {
|
60
|
+
o.value = "";
|
61
|
+
return;
|
62
|
+
}
|
63
|
+
let e;
|
64
|
+
i.value && (e = ae(i.value)), o.value = (e == null ? void 0 : e.text) || "";
|
65
|
+
}, T = async (e) => {
|
66
|
+
if (t.multiple) {
|
67
|
+
const a = { ...w.value };
|
68
|
+
delete a[e.valueHash], n("update:modelValue", Object.values(a));
|
69
|
+
} else
|
70
|
+
n("update:modelValue", null);
|
71
|
+
A();
|
72
|
+
};
|
73
|
+
j(
|
74
|
+
() => t.modelValue,
|
75
|
+
async () => {
|
76
|
+
C();
|
77
|
+
}
|
78
|
+
);
|
79
|
+
const g = u(!1), q = () => {
|
74
80
|
g.value = !0;
|
75
|
-
},
|
76
|
-
g.value = !1,
|
77
|
-
}, h =
|
78
|
-
var
|
79
|
-
h.value && (!
|
80
|
-
},
|
81
|
-
var
|
82
|
-
h.value && (!
|
83
|
-
},
|
84
|
-
var e,
|
85
|
-
!h.value ||
|
86
|
-
},
|
81
|
+
}, M = () => {
|
82
|
+
g.value = !1, n("inactive");
|
83
|
+
}, h = f(() => !(t.readonly || t.disabled || !r.value && t.multiple)), N = (e) => {
|
84
|
+
var a;
|
85
|
+
h.value && (!t.multiple || o.value || (e.preventDefault(), i.value.length && ((a = r.value) == null || a.focusPrevious())));
|
86
|
+
}, P = (e) => {
|
87
|
+
var a;
|
88
|
+
h.value && (!t.multiple || o.value || (e.preventDefault(), i.value.length && ((a = r.value) == null || a.focusNext())));
|
89
|
+
}, _ = async () => {
|
90
|
+
var e, a;
|
91
|
+
!h.value || o.value || !i.value.length || ((e = r.value) != null && e.getHighlighted() && r.value.confirmOption(), await te(), (a = r.value) == null || a.focusPrevious());
|
92
|
+
}, F = () => {
|
87
93
|
var e;
|
88
94
|
(e = r.value) == null || e.blur();
|
89
|
-
},
|
90
|
-
var
|
91
|
-
if (
|
95
|
+
}, S = async (e) => {
|
96
|
+
var a;
|
97
|
+
if (n("keydown", e), t.readonly || t.disabled) {
|
92
98
|
e.preventDefault();
|
93
99
|
return;
|
94
100
|
}
|
95
|
-
if (/^[A-Za-z0-9]$/.test(e.key) && ((
|
96
|
-
if (
|
97
|
-
const m =
|
101
|
+
if (/^[A-Za-z0-9]$/.test(e.key) && ((a = r.value) == null || a.blur()), e.key === t.divider || e.key === "Unidentified" && o.value.includes(t.divider)) {
|
102
|
+
if (t.divider.length === 1 && o.value.includes(t.divider)) {
|
103
|
+
const m = o.value.split(t.divider)[0];
|
98
104
|
if (m)
|
99
|
-
|
105
|
+
o.value = m;
|
100
106
|
else {
|
101
|
-
|
107
|
+
o.value = "";
|
102
108
|
return;
|
103
109
|
}
|
104
110
|
}
|
105
|
-
if (!
|
106
|
-
|
111
|
+
if (!o.value) {
|
112
|
+
n("keydown", e);
|
107
113
|
return;
|
108
114
|
}
|
109
|
-
if (e.preventDefault(),
|
110
|
-
|
115
|
+
if (e.preventDefault(), H(o.value))
|
116
|
+
n("duplicate", o.value), o.value = "";
|
111
117
|
else {
|
112
|
-
if (
|
118
|
+
if (t.max && i.value.length >= t.max)
|
113
119
|
return;
|
114
|
-
|
120
|
+
t.multiple ? n("update:modelValue", t.modelValue.concat(o.value)) : n("update:modelValue", o.value);
|
115
121
|
}
|
116
122
|
}
|
117
|
-
},
|
118
|
-
|
119
|
-
},
|
120
|
-
|
121
|
-
}, J = (e) => {
|
122
|
-
l("focus", e), F(), document.addEventListener("click", c), document.addEventListener("focusin", c);
|
123
|
-
}, W = (e) => {
|
124
|
-
l("click", e), !(o.disabled || o.readonly) && p.value instanceof HTMLElement && p.value.focus();
|
123
|
+
}, U = (e) => {
|
124
|
+
n("focus", e), q(), document.addEventListener("click", c), document.addEventListener("focusin", c);
|
125
|
+
}, x = (e) => {
|
126
|
+
n("click", e), !(t.disabled || t.readonly) && p.value instanceof HTMLElement && p.value.focus();
|
125
127
|
}, c = async (e) => {
|
126
128
|
if (e.target instanceof Node && b.value && !b.value.$el.contains(e.target)) {
|
127
|
-
|
129
|
+
M(), document.removeEventListener("click", c), document.removeEventListener("focusin", c), C();
|
128
130
|
return;
|
129
131
|
}
|
130
|
-
},
|
131
|
-
onBlur: (e) =>
|
132
|
-
onChange: (e) =>
|
133
|
-
onKeyup: (e) =>
|
134
|
-
onInput: (e) =>
|
132
|
+
}, z = {
|
133
|
+
onBlur: (e) => n("blur", e),
|
134
|
+
onChange: (e) => n("change", e),
|
135
|
+
onKeyup: (e) => n("keyup", e),
|
136
|
+
onInput: (e) => n("input", e)
|
135
137
|
};
|
136
|
-
return (e,
|
138
|
+
return (e, a) => (v(), k(se, {
|
137
139
|
ref_key: "outerContainer",
|
138
140
|
ref: b,
|
139
|
-
class:
|
141
|
+
class: Q({
|
140
142
|
"bb-base-tag": !0,
|
141
143
|
"bb-base-tag--active": g.value,
|
142
144
|
"bb-base-tag--disabled": e.disabled,
|
@@ -145,78 +147,78 @@ const ye = { class: "bb-base-tag__input-container" }, be = ["id", "aria-describe
|
|
145
147
|
"bb-base-tag--readonly": e.readonly,
|
146
148
|
"bb-base-tag--compact": e.compact
|
147
149
|
}),
|
148
|
-
onClick:
|
150
|
+
onClick: x
|
149
151
|
}, {
|
150
|
-
"prepend-outer":
|
152
|
+
"prepend-outer": l(() => [
|
151
153
|
s(e.$slots, "prepend-outer")
|
152
154
|
]),
|
153
|
-
"append-outer":
|
155
|
+
"append-outer": l(() => [
|
154
156
|
s(e.$slots, "append-outer")
|
155
157
|
]),
|
156
|
-
default:
|
157
|
-
|
158
|
+
default: l(() => [
|
159
|
+
I(ue, {
|
158
160
|
ref_key: "innerContainer",
|
159
|
-
ref:
|
160
|
-
"append:icon":
|
161
|
-
"prepend:icon":
|
161
|
+
ref: L,
|
162
|
+
"append:icon": t["append:icon"],
|
163
|
+
"prepend:icon": t["prepend:icon"],
|
162
164
|
"prevent-focus": !0
|
163
165
|
}, {
|
164
|
-
prepend:
|
166
|
+
prepend: l(() => [
|
165
167
|
s(e.$slots, "prepend")
|
166
168
|
]),
|
167
|
-
prefix:
|
169
|
+
prefix: l(() => [
|
168
170
|
s(e.$slots, "prefix")
|
169
171
|
]),
|
170
|
-
append:
|
172
|
+
append: l(() => [
|
171
173
|
s(e.$slots, "append")
|
172
174
|
]),
|
173
|
-
suffix:
|
175
|
+
suffix: l(() => [
|
174
176
|
s(e.$slots, "suffix")
|
175
177
|
]),
|
176
|
-
default:
|
177
|
-
|
178
|
-
default:
|
179
|
-
$("span",
|
180
|
-
e.multiple ? (
|
181
|
-
e.comma ? (
|
178
|
+
default: l(() => [
|
179
|
+
I(Z(oe), { tag: "span" }, {
|
180
|
+
default: l(() => [
|
181
|
+
$("span", de, [
|
182
|
+
e.multiple ? (v(), G(J, { key: 0 }, [
|
183
|
+
e.comma ? (v(), k(ie, {
|
182
184
|
key: 0,
|
183
185
|
ref_key: "commaBox",
|
184
|
-
ref:
|
185
|
-
options:
|
186
|
-
}, null, 8, ["options"])) : (
|
186
|
+
ref: B,
|
187
|
+
options: i.value
|
188
|
+
}, null, 8, ["options"])) : (v(), k(re, {
|
187
189
|
key: 1,
|
188
190
|
ref_key: "chipsBox",
|
189
|
-
ref:
|
190
|
-
options:
|
191
|
-
"onOption:unselected":
|
191
|
+
ref: V,
|
192
|
+
options: i.value,
|
193
|
+
"onOption:unselected": T
|
192
194
|
}, null, 8, ["options"]))
|
193
|
-
], 64)) :
|
194
|
-
|
195
|
+
], 64)) : W("", !0),
|
196
|
+
X($("input", Y({
|
195
197
|
id: e.id,
|
196
198
|
ref_key: "input",
|
197
199
|
ref: p
|
198
|
-
},
|
199
|
-
"onUpdate:modelValue":
|
200
|
+
}, z, {
|
201
|
+
"onUpdate:modelValue": a[0] || (a[0] = (m) => o.value = m),
|
200
202
|
"aria-describedby": e.ariaDescribedby,
|
201
203
|
autocomplete: e.autocomplete,
|
202
204
|
autofocus: e.autofocus,
|
203
205
|
class: "bb-base-tag__text-input",
|
204
206
|
disabled: e.disabled,
|
205
207
|
enterkeyhint: "done",
|
206
|
-
placeholder:
|
208
|
+
placeholder: e.placeholder,
|
207
209
|
readonly: e.readonly,
|
208
210
|
required: e.required && !e.multiple || e.multiple && !e.modelValue.length,
|
209
211
|
type: "text",
|
210
|
-
onFocus: d(
|
212
|
+
onFocus: d(U, ["stop"]),
|
211
213
|
onKeydown: [
|
212
|
-
d(
|
213
|
-
y(d(
|
214
|
-
y(d(
|
215
|
-
y(d(
|
216
|
-
y(d(
|
214
|
+
d(S, ["stop"]),
|
215
|
+
y(d(_, ["stop"]), ["delete"]),
|
216
|
+
y(d(N, ["stop"]), ["left"]),
|
217
|
+
y(d(F, ["stop", "prevent"]), ["esc"]),
|
218
|
+
y(d(P, ["stop"]), ["right"])
|
217
219
|
]
|
218
|
-
}), null, 16,
|
219
|
-
[
|
220
|
+
}), null, 16, pe), [
|
221
|
+
[ee, o.value]
|
220
222
|
])
|
221
223
|
])
|
222
224
|
]),
|
@@ -231,5 +233,5 @@ const ye = { class: "bb-base-tag__input-container" }, be = ["id", "aria-describe
|
|
231
233
|
}
|
232
234
|
});
|
233
235
|
export {
|
234
|
-
|
236
|
+
$e as default
|
235
237
|
};
|
package/dist/index47.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { defineComponent as w, ref as y, computed as u, onMounted as g, watch as B, nextTick as x, openBlock as V, createBlock as k, normalizeClass as $, withCtx as t, renderSlot as r, createVNode as i, createElementVNode as C, mergeProps as T } from "vue";
|
2
|
-
import v from "./
|
3
|
-
import E from "./
|
2
|
+
import v from "./index229.js";
|
3
|
+
import E from "./index227.js";
|
4
4
|
/* empty css */
|
5
5
|
import G from "./index128.js";
|
6
6
|
/* empty css */
|