@quidgest/ui 0.16.74 → 0.16.75
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/json/api.json +31 -1
- package/dist/ui.css +45 -5
- package/dist/ui.esm.js +6614 -6541
- package/dist/ui.js +25 -25
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +142 -137
- package/dist/ui.scss +50 -3
- package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.vue.js +18 -16
- package/esm/components/QCheckbox/index.d.ts +3 -0
- package/esm/components/QCheckbox/index.d.ts.map +1 -1
- package/esm/components/QCheckbox/types.d.ts +6 -0
- package/esm/components/QCheckbox/types.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +2 -0
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/index.d.ts +1 -0
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +2 -0
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QList/QList.d.ts +2 -0
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +17 -16
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +50 -49
- package/esm/components/QList/index.d.ts +1 -0
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QList/types.d.ts +6 -0
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.d.ts +154 -2
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +410 -310
- package/esm/components/QSelect/index.d.ts +77 -1
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DEFAULT_TEXTS as
|
|
3
|
-
import { QBadge as
|
|
4
|
-
import { QButton as
|
|
5
|
-
import { QField as
|
|
6
|
-
import { QIcon as
|
|
7
|
-
import { QList as
|
|
8
|
-
import { QOverlay as
|
|
9
|
-
import { QSpinnerLoader as
|
|
10
|
-
import { QChevron as
|
|
11
|
-
import { QClearButton as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
1
|
+
import { defineComponent as Be, mergeModels as de, useModel as Ce, toRef as K, ref as ue, useTemplateRef as g, onMounted as we, onBeforeUnmount as Te, computed as V, nextTick as M, watch as $, createElementBlock as r, openBlock as t, Fragment as m, createVNode as E, unref as n, normalizeClass as ce, createSlots as Ie, withCtx as u, withDirectives as Ve, createBlock as p, createCommentVNode as c, renderList as fe, createTextVNode as _, mergeProps as R, toDisplayString as y, normalizeProps as pe, createElementVNode as ve, vModelText as $e, renderSlot as q, withModifiers as Ee } from "vue";
|
|
2
|
+
import { DEFAULT_TEXTS as Re, DEFAULT_ICONS as Le } from "./constants.js";
|
|
3
|
+
import { QBadge as P } from "../QBadge/index.js";
|
|
4
|
+
import { QButton as De } from "../QButton/index.js";
|
|
5
|
+
import { QField as Qe } from "../QField/index.js";
|
|
6
|
+
import { QIcon as S } from "../QIcon/index.js";
|
|
7
|
+
import { QList as Me } from "../QList/index.js";
|
|
8
|
+
import { QOverlay as Pe } from "../QOverlay/index.js";
|
|
9
|
+
import { QSpinnerLoader as Se } from "../QSpinnerLoader/index.js";
|
|
10
|
+
import { QChevron as We } from "../__internal__/QChevron/index.js";
|
|
11
|
+
import { QClearButton as ze } from "../__internal__/QClearButton/index.js";
|
|
12
|
+
import { QPopover as Ae } from "../QPopover/index.js";
|
|
13
|
+
import { useId as Oe } from "../../composables/uid.js";
|
|
14
|
+
import { useGroup as Ue } from "../../composables/useGroup/index.js";
|
|
15
|
+
const Fe = {
|
|
15
16
|
key: 0,
|
|
16
|
-
ref: "
|
|
17
|
-
class: "q-
|
|
18
|
-
},
|
|
17
|
+
ref: "valueContainer",
|
|
18
|
+
class: "q-select__value-container"
|
|
19
|
+
}, Ke = {
|
|
20
|
+
key: 1,
|
|
21
|
+
class: "q-select__multi-value"
|
|
22
|
+
}, Ne = {
|
|
19
23
|
key: 1,
|
|
20
24
|
class: "q-select__value"
|
|
21
|
-
},
|
|
25
|
+
}, He = {
|
|
22
26
|
key: 1,
|
|
23
27
|
class: "q-select__placeholder"
|
|
24
|
-
},
|
|
28
|
+
}, je = ["id", "tabindex", "aria-expanded", "aria-keyshortcuts"], Ge = ["data-key"], Xe = {
|
|
25
29
|
key: 0,
|
|
26
30
|
class: "q-select__loader"
|
|
27
|
-
},
|
|
31
|
+
}, cl = /* @__PURE__ */ Be({
|
|
28
32
|
inheritAttrs: !1,
|
|
29
33
|
__name: "QSelect",
|
|
30
|
-
props: /* @__PURE__ */
|
|
34
|
+
props: /* @__PURE__ */ de({
|
|
31
35
|
id: {},
|
|
32
36
|
class: {},
|
|
33
37
|
label: {},
|
|
@@ -48,118 +52,150 @@ const De = {
|
|
|
48
52
|
emptyValue: {},
|
|
49
53
|
itemValue: { default: "key" },
|
|
50
54
|
itemLabel: { default: "label" },
|
|
51
|
-
icons: { default: () =>
|
|
52
|
-
texts: { default: () =>
|
|
55
|
+
icons: { default: () => Le },
|
|
56
|
+
texts: { default: () => Re }
|
|
53
57
|
}, {
|
|
54
58
|
modelValue: {},
|
|
55
59
|
modelModifiers: {}
|
|
56
60
|
}),
|
|
57
|
-
emits: /* @__PURE__ */
|
|
58
|
-
setup(
|
|
59
|
-
const e =
|
|
60
|
-
active:
|
|
61
|
-
required:
|
|
62
|
-
multiple:
|
|
63
|
-
}),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
emits: /* @__PURE__ */ de(["before-show", "before-hide", "show", "hide"], ["update:modelValue"]),
|
|
62
|
+
setup(N, { emit: me }) {
|
|
63
|
+
const e = N, L = me, v = Ce(N, "modelValue"), W = Oe(K(e, "id")), { active: H } = Ue({
|
|
64
|
+
active: v,
|
|
65
|
+
required: K(e, "required"),
|
|
66
|
+
multiple: K(e, "multiple")
|
|
67
|
+
}), f = ue(!1), h = ue(0), z = g("trigger"), be = g("input"), ye = g("list"), j = g("content"), G = g("valueContainer"), X = g("allBadges"), J = g("allPlainTexts"), Y = g("hiddenItemsCountBadge");
|
|
68
|
+
let x = null, B = null;
|
|
69
|
+
function ge() {
|
|
70
|
+
B && clearTimeout(B), B = setTimeout(() => {
|
|
71
|
+
T();
|
|
72
|
+
}, 120);
|
|
73
|
+
}
|
|
74
|
+
we(() => {
|
|
75
|
+
var a;
|
|
76
|
+
T();
|
|
77
|
+
const l = (a = z.value) == null ? void 0 : a.fieldRef;
|
|
78
|
+
l && (x = new ResizeObserver(() => {
|
|
79
|
+
ge();
|
|
80
|
+
}), x.observe(l));
|
|
81
|
+
}), Te(() => {
|
|
82
|
+
x == null || x.disconnect(), B && clearTimeout(B);
|
|
83
|
+
});
|
|
84
|
+
const A = V(() => i.value.length === 0), i = V(() => {
|
|
67
85
|
if (e.multiple)
|
|
68
|
-
return (
|
|
69
|
-
const l = typeof
|
|
86
|
+
return (v.value ?? []).map((a) => ee(a)).filter((a) => !!a);
|
|
87
|
+
const l = typeof v.value < "u" ? ee(v.value) : void 0;
|
|
70
88
|
return l ? [l] : [];
|
|
71
|
-
}),
|
|
72
|
-
var
|
|
89
|
+
}), Z = V(() => {
|
|
90
|
+
var a;
|
|
73
91
|
const l = /* @__PURE__ */ new Map();
|
|
74
|
-
return (
|
|
75
|
-
l.set(d.key,
|
|
92
|
+
return (a = e.items) == null || a.forEach((d, s) => {
|
|
93
|
+
l.set(d.key, s);
|
|
76
94
|
}), l;
|
|
77
|
-
}),
|
|
95
|
+
}), C = V(
|
|
78
96
|
() => {
|
|
79
97
|
var l;
|
|
80
|
-
return (l =
|
|
98
|
+
return (l = i.value) == null ? void 0 : l.map(k).filter(Boolean).join(", ");
|
|
81
99
|
}
|
|
82
|
-
),
|
|
83
|
-
() => e.clearable && !e.readonly && !e.disabled && !e.loading && !
|
|
100
|
+
), D = V(
|
|
101
|
+
() => e.clearable && !e.readonly && !e.disabled && !e.loading && !A.value
|
|
84
102
|
);
|
|
85
|
-
function
|
|
86
|
-
var
|
|
87
|
-
return (
|
|
103
|
+
function ee(l) {
|
|
104
|
+
var a;
|
|
105
|
+
return (a = e.items) == null ? void 0 : a.find((d) => d[e.itemValue] === l);
|
|
106
|
+
}
|
|
107
|
+
function he(l) {
|
|
108
|
+
e.multiple && l < v.value.length && (!e.required || v.value.length > 1) ? H.value = v.value.toSpliced(l, 1) : w();
|
|
88
109
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
110
|
+
function k(l) {
|
|
111
|
+
return (l == null ? void 0 : l[e.itemLabel]) ?? "";
|
|
91
112
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
113
|
+
function le(l) {
|
|
114
|
+
return l + 1 < i.value.length - h.value ? ", " : "";
|
|
94
115
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
116
|
+
function O(l) {
|
|
117
|
+
Array.isArray(l) ? v.value = l.sort((a, d) => Z.value.get(a) - Z.value.get(d)) : (v.value = l, Q());
|
|
97
118
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
100
|
-
!((t = U.value) != null && t.contains(l.relatedTarget)) && !((i = (d = K.value) == null ? void 0 : d.fieldRef) != null && i.contains(l.relatedTarget)) && E();
|
|
119
|
+
function w() {
|
|
120
|
+
O(e.emptyValue), oe();
|
|
101
121
|
}
|
|
102
|
-
function
|
|
103
|
-
|
|
122
|
+
function ke(l) {
|
|
123
|
+
var a, d, s;
|
|
124
|
+
!((a = j.value) != null && a.contains(l.relatedTarget)) && !((s = (d = z.value) == null ? void 0 : d.fieldRef) != null && s.contains(l.relatedTarget)) && Q();
|
|
104
125
|
}
|
|
105
|
-
function
|
|
106
|
-
|
|
126
|
+
function te() {
|
|
127
|
+
f.value || (L("before-show"), f.value = !0);
|
|
107
128
|
}
|
|
108
|
-
function
|
|
109
|
-
|
|
129
|
+
function Q() {
|
|
130
|
+
f.value && (L("before-hide"), f.value = !1);
|
|
110
131
|
}
|
|
111
|
-
function
|
|
112
|
-
|
|
132
|
+
function ae() {
|
|
133
|
+
e.readonly || e.disabled || (f.value ? Q() : te());
|
|
113
134
|
}
|
|
114
|
-
function
|
|
115
|
-
l.key.
|
|
135
|
+
function U(l) {
|
|
136
|
+
!l.key || e.readonly || e.disabled || (["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End", "Delete"].includes(l.key) && (l.preventDefault(), l.stopPropagation()), ["Enter", " ", "ArrowDown"].includes(l.key) && te(), ["Escape", "Tab"].includes(l.key) && (f.value ? Q() : D.value && l.key === "Escape" && w()), D.value && l.key === "Delete" && w());
|
|
116
137
|
}
|
|
117
|
-
|
|
138
|
+
function _e(l) {
|
|
139
|
+
l.key.length === 1 && l.preventDefault(), U(l);
|
|
140
|
+
}
|
|
141
|
+
async function qe() {
|
|
118
142
|
var l;
|
|
119
|
-
await
|
|
143
|
+
await M(), e.loading ? (l = j.value) == null || l.focus() : ne(), L("show");
|
|
120
144
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
145
|
+
function xe() {
|
|
146
|
+
oe(), L("hide");
|
|
123
147
|
}
|
|
124
|
-
function
|
|
148
|
+
function oe() {
|
|
125
149
|
var l;
|
|
126
|
-
(l =
|
|
150
|
+
(l = be.value) == null || l.focus();
|
|
127
151
|
}
|
|
128
|
-
function
|
|
152
|
+
function ne() {
|
|
129
153
|
var l;
|
|
130
|
-
(l =
|
|
154
|
+
(l = ye.value) == null || l.$el.focus();
|
|
131
155
|
}
|
|
132
|
-
async function
|
|
133
|
-
var
|
|
134
|
-
if (await
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
for (const b of P.value ?? []) {
|
|
138
|
-
const v = b.$el.scrollWidth + i;
|
|
139
|
-
if (l + v <= d)
|
|
140
|
-
l += v, t++;
|
|
141
|
-
else break;
|
|
156
|
+
async function T() {
|
|
157
|
+
var ie, se, re;
|
|
158
|
+
if (await M(), await M(), !e.multiple || !G.value || A.value) {
|
|
159
|
+
h.value = 0;
|
|
160
|
+
return;
|
|
142
161
|
}
|
|
143
|
-
|
|
162
|
+
const l = G.value.offsetWidth, a = 4, d = ((ie = Y.value) == null ? void 0 : ie.$el.scrollWidth) ?? 30;
|
|
163
|
+
let s = d, o = 0;
|
|
164
|
+
if (e.badges)
|
|
165
|
+
for (const F of X.value ?? []) {
|
|
166
|
+
const I = F.$el.scrollWidth + a;
|
|
167
|
+
if (s + d + I <= l)
|
|
168
|
+
s += I, o++;
|
|
169
|
+
else break;
|
|
170
|
+
}
|
|
171
|
+
else
|
|
172
|
+
for (const F of J.value ?? []) {
|
|
173
|
+
const I = F.scrollWidth + a;
|
|
174
|
+
if (s + d + I <= l)
|
|
175
|
+
s += I, o++;
|
|
176
|
+
else break;
|
|
177
|
+
}
|
|
178
|
+
const b = e.badges ? ((se = X.value) == null ? void 0 : se.length) ?? 0 : ((re = J.value) == null ? void 0 : re.length) ?? 0;
|
|
179
|
+
h.value = b - o;
|
|
144
180
|
}
|
|
145
|
-
return
|
|
181
|
+
return $(
|
|
146
182
|
() => e.loading,
|
|
147
183
|
(l) => {
|
|
148
|
-
!l &&
|
|
184
|
+
!l && f.value && M(ne);
|
|
149
185
|
}
|
|
150
|
-
),
|
|
186
|
+
), $(() => e.badges, T), $(i, T, { deep: !0 }), $(() => e.clearable, T), $(H, O), (l, a) => {
|
|
151
187
|
var d;
|
|
152
|
-
return
|
|
153
|
-
|
|
188
|
+
return t(), r(
|
|
189
|
+
m,
|
|
154
190
|
null,
|
|
155
191
|
[
|
|
156
|
-
|
|
157
|
-
id:
|
|
192
|
+
E(n(Qe), {
|
|
193
|
+
id: n(W),
|
|
158
194
|
ref: "trigger",
|
|
159
195
|
label: e.label,
|
|
160
196
|
"label-position": e.labelPosition,
|
|
161
197
|
required: e.required,
|
|
162
|
-
class:
|
|
198
|
+
class: ce([
|
|
163
199
|
"q-select",
|
|
164
200
|
{
|
|
165
201
|
"q-select--readonly": e.readonly,
|
|
@@ -172,18 +208,18 @@ const De = {
|
|
|
172
208
|
"data-loading": e.loading,
|
|
173
209
|
size: e.size,
|
|
174
210
|
invalid: e.invalid,
|
|
175
|
-
onClick:
|
|
176
|
-
onKeydown:
|
|
177
|
-
},
|
|
178
|
-
append:
|
|
179
|
-
|
|
180
|
-
|
|
211
|
+
onClick: ae,
|
|
212
|
+
onKeydown: U
|
|
213
|
+
}, Ie({
|
|
214
|
+
append: u(() => [
|
|
215
|
+
q(l.$slots, "append"),
|
|
216
|
+
D.value ? (t(), p(n(ze), {
|
|
181
217
|
key: 0,
|
|
182
218
|
icons: e.icons,
|
|
183
219
|
texts: e.texts,
|
|
184
|
-
onClick:
|
|
185
|
-
}, null, 8, ["icons", "texts"])) :
|
|
186
|
-
e.readonly ?
|
|
220
|
+
onClick: w
|
|
221
|
+
}, null, 8, ["icons", "texts"])) : c("v-if", !0),
|
|
222
|
+
e.readonly ? c("v-if", !0) : (t(), p(n(De), {
|
|
187
223
|
key: 1,
|
|
188
224
|
class: "q-select__chevron",
|
|
189
225
|
"aria-label": e.texts.showOptions,
|
|
@@ -192,11 +228,11 @@ const De = {
|
|
|
192
228
|
borderless: "",
|
|
193
229
|
tabindex: "-1",
|
|
194
230
|
disabled: e.disabled,
|
|
195
|
-
onClick:
|
|
231
|
+
onClick: ae
|
|
196
232
|
}, {
|
|
197
|
-
default:
|
|
198
|
-
|
|
199
|
-
"model-value":
|
|
233
|
+
default: u(() => [
|
|
234
|
+
E(n(We), {
|
|
235
|
+
"model-value": f.value,
|
|
200
236
|
icons: e.icons
|
|
201
237
|
}, null, 8, ["model-value", "icons"])
|
|
202
238
|
]),
|
|
@@ -204,270 +240,334 @@ const De = {
|
|
|
204
240
|
/* STABLE */
|
|
205
241
|
}, 8, ["aria-label", "disabled"]))
|
|
206
242
|
]),
|
|
207
|
-
default:
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
243
|
+
default: u(() => {
|
|
244
|
+
var s;
|
|
245
|
+
return [
|
|
246
|
+
A.value ? (t(), r("span", He, [
|
|
247
|
+
!e.readonly && !e.disabled ? (t(), r(
|
|
248
|
+
m,
|
|
249
|
+
{ key: 0 },
|
|
250
|
+
[
|
|
251
|
+
_(
|
|
252
|
+
y(e.texts.placeholder),
|
|
253
|
+
1
|
|
254
|
+
/* TEXT */
|
|
255
|
+
)
|
|
256
|
+
],
|
|
257
|
+
64
|
|
258
|
+
/* STABLE_FRAGMENT */
|
|
259
|
+
)) : c("v-if", !0)
|
|
260
|
+
])) : (t(), r(
|
|
261
|
+
m,
|
|
211
262
|
{ key: 0 },
|
|
212
263
|
[
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
264
|
+
e.badges || e.multiple ? (t(), r(
|
|
265
|
+
"span",
|
|
266
|
+
Fe,
|
|
267
|
+
[
|
|
268
|
+
e.multiple ? (t(), r(
|
|
269
|
+
m,
|
|
270
|
+
{ key: 0 },
|
|
271
|
+
[
|
|
272
|
+
(t(!0), r(
|
|
273
|
+
m,
|
|
274
|
+
null,
|
|
275
|
+
fe(i.value, (o, b) => (t(), r(
|
|
276
|
+
m,
|
|
277
|
+
{
|
|
278
|
+
key: `visible-${b}`
|
|
279
|
+
},
|
|
280
|
+
[
|
|
281
|
+
b < i.value.length - h.value ? (t(), r(
|
|
282
|
+
m,
|
|
283
|
+
{ key: 0 },
|
|
284
|
+
[
|
|
285
|
+
e.badges ? (t(), p(n(P), {
|
|
286
|
+
key: 0,
|
|
287
|
+
pill: "",
|
|
288
|
+
color: e.readonly || e.disabled ? "neutral" : void 0,
|
|
289
|
+
disabled: e.readonly || e.disabled,
|
|
290
|
+
removable: !e.readonly && !e.disabled && (!e.required || i.value.length > 1),
|
|
291
|
+
texts: e.texts,
|
|
292
|
+
"onClick:remove": () => he(b)
|
|
293
|
+
}, {
|
|
294
|
+
default: u(() => [
|
|
295
|
+
o != null && o.icon ? (t(), p(
|
|
296
|
+
n(S),
|
|
297
|
+
R({
|
|
298
|
+
key: 0,
|
|
299
|
+
ref_for: !0
|
|
300
|
+
}, o.icon),
|
|
301
|
+
null,
|
|
302
|
+
16
|
|
303
|
+
/* FULL_PROPS */
|
|
304
|
+
)) : c("v-if", !0),
|
|
305
|
+
_(
|
|
306
|
+
" " + y(k(o)),
|
|
307
|
+
1
|
|
308
|
+
/* TEXT */
|
|
309
|
+
)
|
|
310
|
+
]),
|
|
311
|
+
_: 2
|
|
312
|
+
/* DYNAMIC */
|
|
313
|
+
}, 1032, ["color", "disabled", "removable", "texts", "onClick:remove"])) : e.multiple ? (t(), r(
|
|
314
|
+
"span",
|
|
315
|
+
Ke,
|
|
316
|
+
y(k(o) + le(b)),
|
|
317
|
+
1
|
|
318
|
+
/* TEXT */
|
|
319
|
+
)) : c("v-if", !0)
|
|
320
|
+
],
|
|
321
|
+
64
|
|
322
|
+
/* STABLE_FRAGMENT */
|
|
323
|
+
)) : c("v-if", !0)
|
|
324
|
+
],
|
|
325
|
+
64
|
|
326
|
+
/* STABLE_FRAGMENT */
|
|
327
|
+
))),
|
|
328
|
+
128
|
|
329
|
+
/* KEYED_FRAGMENT */
|
|
330
|
+
)),
|
|
331
|
+
h.value > 0 ? (t(), r(
|
|
332
|
+
m,
|
|
333
|
+
{ key: 0 },
|
|
240
334
|
[
|
|
241
|
-
n
|
|
242
|
-
|
|
335
|
+
E(n(P), {
|
|
336
|
+
ref: "hiddenItemsCountBadge",
|
|
243
337
|
pill: "",
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
338
|
+
class: ce([
|
|
339
|
+
"q-select__badge-count",
|
|
340
|
+
{
|
|
341
|
+
"q-select__badge-count--clickable": e.readonly || e.disabled
|
|
342
|
+
}
|
|
343
|
+
])
|
|
248
344
|
}, {
|
|
249
|
-
default:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
345
|
+
default: u(() => [
|
|
346
|
+
_(
|
|
347
|
+
" +" + y(h.value),
|
|
348
|
+
1
|
|
349
|
+
/* TEXT */
|
|
350
|
+
)
|
|
351
|
+
]),
|
|
352
|
+
_: 1
|
|
353
|
+
/* STABLE */
|
|
354
|
+
}, 8, ["class"]),
|
|
355
|
+
e.readonly || e.disabled ? (t(), p(n(Ae), {
|
|
356
|
+
key: 0,
|
|
357
|
+
anchor: (s = n(Y)) == null ? void 0 : s.$el,
|
|
358
|
+
text: C.value,
|
|
359
|
+
placement: "bottom-start"
|
|
360
|
+
}, {
|
|
361
|
+
default: u(() => [
|
|
362
|
+
_(
|
|
363
|
+
y(C.value),
|
|
364
|
+
1
|
|
365
|
+
/* TEXT */
|
|
366
|
+
)
|
|
367
|
+
]),
|
|
368
|
+
_: 1
|
|
369
|
+
/* STABLE */
|
|
370
|
+
}, 8, ["anchor", "text"])) : c("v-if", !0)
|
|
371
|
+
],
|
|
372
|
+
64
|
|
373
|
+
/* STABLE_FRAGMENT */
|
|
374
|
+
)) : c("v-if", !0),
|
|
375
|
+
(t(!0), r(
|
|
376
|
+
m,
|
|
377
|
+
null,
|
|
378
|
+
fe(i.value, (o, b) => (t(), r(
|
|
379
|
+
m,
|
|
380
|
+
{
|
|
381
|
+
key: `measure-${b}`
|
|
382
|
+
},
|
|
383
|
+
[
|
|
384
|
+
e.badges ? (t(), p(n(P), {
|
|
385
|
+
key: 0,
|
|
386
|
+
ref_for: !0,
|
|
387
|
+
ref: "allBadges",
|
|
388
|
+
pill: "",
|
|
389
|
+
color: e.readonly || e.disabled ? "neutral" : void 0,
|
|
390
|
+
disabled: "",
|
|
391
|
+
class: "q-select__badge-hidden",
|
|
392
|
+
removable: !e.readonly && !e.disabled && (!e.required || i.value.length > 1)
|
|
393
|
+
}, {
|
|
394
|
+
default: u(() => [
|
|
395
|
+
o != null && o.icon ? (t(), p(
|
|
396
|
+
n(S),
|
|
397
|
+
R({
|
|
255
398
|
key: 0,
|
|
256
399
|
ref_for: !0
|
|
257
|
-
},
|
|
400
|
+
}, o.icon),
|
|
258
401
|
null,
|
|
259
402
|
16
|
|
260
403
|
/* FULL_PROPS */
|
|
261
|
-
)) :
|
|
262
|
-
|
|
263
|
-
" " +
|
|
404
|
+
)) : c("v-if", !0),
|
|
405
|
+
_(
|
|
406
|
+
" " + y(k(o)),
|
|
264
407
|
1
|
|
265
408
|
/* TEXT */
|
|
266
409
|
)
|
|
267
|
-
]
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
410
|
+
]),
|
|
411
|
+
_: 2
|
|
412
|
+
/* DYNAMIC */
|
|
413
|
+
}, 1032, ["color", "removable"])) : e.multiple ? (t(), r(
|
|
414
|
+
"span",
|
|
415
|
+
{
|
|
416
|
+
key: 1,
|
|
417
|
+
ref_for: !0,
|
|
418
|
+
ref: "allPlainTexts",
|
|
419
|
+
class: "q-select__multi-value--hidden"
|
|
420
|
+
},
|
|
421
|
+
y(k(o) + le(b)),
|
|
422
|
+
513
|
|
423
|
+
/* TEXT, NEED_PATCH */
|
|
424
|
+
)) : c("v-if", !0)
|
|
425
|
+
],
|
|
426
|
+
64
|
|
427
|
+
/* STABLE_FRAGMENT */
|
|
428
|
+
))),
|
|
429
|
+
128
|
|
430
|
+
/* KEYED_FRAGMENT */
|
|
431
|
+
))
|
|
432
|
+
],
|
|
433
|
+
64
|
|
434
|
+
/* STABLE_FRAGMENT */
|
|
435
|
+
)) : (t(), p(n(P), {
|
|
436
|
+
key: 1,
|
|
437
|
+
pill: "",
|
|
438
|
+
disabled: e.readonly || e.disabled,
|
|
439
|
+
removable: !e.readonly && !e.disabled && !e.required,
|
|
440
|
+
texts: e.texts,
|
|
441
|
+
"onClick:remove": w
|
|
442
|
+
}, {
|
|
443
|
+
default: u(() => {
|
|
444
|
+
var o;
|
|
445
|
+
return [
|
|
446
|
+
(o = i.value[0]) != null && o.icon ? (t(), p(
|
|
447
|
+
n(S),
|
|
448
|
+
pe(R({ key: 0 }, i.value[0].icon)),
|
|
449
|
+
null,
|
|
450
|
+
16
|
|
451
|
+
/* FULL_PROPS */
|
|
452
|
+
)) : c("v-if", !0),
|
|
453
|
+
_(
|
|
454
|
+
" " + y(k(i.value[0])),
|
|
288
455
|
1
|
|
289
456
|
/* TEXT */
|
|
290
457
|
)
|
|
291
|
-
]
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
128
|
|
331
|
-
/* KEYED_FRAGMENT */
|
|
332
|
-
))
|
|
333
|
-
],
|
|
334
|
-
64
|
|
335
|
-
/* STABLE_FRAGMENT */
|
|
336
|
-
)) : (a(), m(o(M), {
|
|
337
|
-
key: 1,
|
|
338
|
-
pill: "",
|
|
339
|
-
disabled: e.readonly || e.disabled,
|
|
340
|
-
removable: !e.required,
|
|
341
|
-
texts: e.texts,
|
|
342
|
-
"onClick:remove": _
|
|
343
|
-
}, {
|
|
344
|
-
default: f(() => {
|
|
345
|
-
var i, n;
|
|
346
|
-
return [
|
|
347
|
-
(i = s.value[0]) != null && i.icon ? (a(), m(
|
|
348
|
-
o(Q),
|
|
349
|
-
te(B({ key: 0 }, s.value[0].icon)),
|
|
350
|
-
null,
|
|
351
|
-
16
|
|
352
|
-
/* FULL_PROPS */
|
|
353
|
-
)) : p("v-if", !0),
|
|
354
|
-
w(
|
|
355
|
-
" " + h((n = s.value[0]) == null ? void 0 : n[e.itemLabel]),
|
|
356
|
-
1
|
|
357
|
-
/* TEXT */
|
|
358
|
-
)
|
|
359
|
-
];
|
|
360
|
-
}),
|
|
361
|
-
_: 1
|
|
362
|
-
/* STABLE */
|
|
363
|
-
}, 8, ["disabled", "removable", "texts"]))
|
|
364
|
-
],
|
|
365
|
-
512
|
|
366
|
-
/* NEED_PATCH */
|
|
367
|
-
)) : (a(), c(
|
|
368
|
-
"span",
|
|
369
|
-
Te,
|
|
370
|
-
h(S.value),
|
|
371
|
-
1
|
|
372
|
-
/* TEXT */
|
|
373
|
-
))
|
|
374
|
-
],
|
|
375
|
-
64
|
|
376
|
-
/* STABLE_FRAGMENT */
|
|
377
|
-
)),
|
|
378
|
-
ye(ae("input", B({
|
|
379
|
-
id: `${o(R)}_input`,
|
|
380
|
-
ref: "input"
|
|
381
|
-
}, l.$attrs, {
|
|
382
|
-
"onUpdate:modelValue": t[0] || (t[0] = (i) => S.value = i),
|
|
383
|
-
class: "q-select__input",
|
|
384
|
-
inputmode: "none",
|
|
385
|
-
type: "text",
|
|
386
|
-
autocomplete: "off",
|
|
387
|
-
tabindex: e.disabled ? -1 : 0,
|
|
388
|
-
role: "combobox",
|
|
389
|
-
"aria-expanded": u.value,
|
|
390
|
-
"aria-haspopup": "listbox",
|
|
391
|
-
"aria-keyshortcuts": L.value ? "Delete" : void 0,
|
|
392
|
-
onKeydown: de
|
|
393
|
-
}), null, 16, Qe), [
|
|
394
|
-
[ge, S.value]
|
|
395
|
-
])
|
|
396
|
-
]),
|
|
458
|
+
];
|
|
459
|
+
}),
|
|
460
|
+
_: 1
|
|
461
|
+
/* STABLE */
|
|
462
|
+
}, 8, ["disabled", "removable", "texts"]))
|
|
463
|
+
],
|
|
464
|
+
512
|
|
465
|
+
/* NEED_PATCH */
|
|
466
|
+
)) : (t(), r(
|
|
467
|
+
"span",
|
|
468
|
+
Ne,
|
|
469
|
+
y(C.value),
|
|
470
|
+
1
|
|
471
|
+
/* TEXT */
|
|
472
|
+
))
|
|
473
|
+
],
|
|
474
|
+
64
|
|
475
|
+
/* STABLE_FRAGMENT */
|
|
476
|
+
)),
|
|
477
|
+
Ve(ve("input", R({
|
|
478
|
+
id: `${n(W)}_input`,
|
|
479
|
+
ref: "input"
|
|
480
|
+
}, l.$attrs, {
|
|
481
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => C.value = o),
|
|
482
|
+
class: "q-select__input",
|
|
483
|
+
inputmode: "none",
|
|
484
|
+
type: "text",
|
|
485
|
+
autocomplete: "off",
|
|
486
|
+
tabindex: e.disabled ? -1 : 0,
|
|
487
|
+
role: "combobox",
|
|
488
|
+
"aria-expanded": f.value,
|
|
489
|
+
"aria-haspopup": "listbox",
|
|
490
|
+
"aria-keyshortcuts": D.value ? "Delete" : void 0,
|
|
491
|
+
onKeydown: _e
|
|
492
|
+
}), null, 16, je), [
|
|
493
|
+
[$e, C.value]
|
|
494
|
+
])
|
|
495
|
+
];
|
|
496
|
+
}),
|
|
397
497
|
_: 2
|
|
398
498
|
/* DYNAMIC */
|
|
399
499
|
}, [
|
|
400
|
-
|
|
500
|
+
i.value.length === 1 && i.value[0].icon && !e.badges || l.$slots.prepend ? {
|
|
401
501
|
name: "prepend",
|
|
402
|
-
fn:
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
502
|
+
fn: u(() => [
|
|
503
|
+
q(l.$slots, "prepend"),
|
|
504
|
+
i.value.length === 1 && i.value[0].icon && !e.badges ? (t(), p(
|
|
505
|
+
n(S),
|
|
506
|
+
pe(R({ key: 0 }, i.value[0].icon)),
|
|
407
507
|
null,
|
|
408
508
|
16
|
|
409
509
|
/* FULL_PROPS */
|
|
410
|
-
)) :
|
|
510
|
+
)) : c("v-if", !0)
|
|
411
511
|
]),
|
|
412
512
|
key: "0"
|
|
413
513
|
} : void 0,
|
|
414
514
|
l.$slots.extras ? {
|
|
415
515
|
name: "extras",
|
|
416
|
-
fn:
|
|
417
|
-
|
|
516
|
+
fn: u(() => [
|
|
517
|
+
q(l.$slots, "extras")
|
|
418
518
|
]),
|
|
419
519
|
key: "1"
|
|
420
520
|
} : void 0
|
|
421
521
|
]), 1032, ["id", "label", "label-position", "required", "class", "readonly", "disabled", "data-loading", "size", "invalid"]),
|
|
422
|
-
|
|
423
|
-
modelValue:
|
|
424
|
-
"onUpdate:modelValue":
|
|
522
|
+
E(n(Pe), {
|
|
523
|
+
modelValue: f.value,
|
|
524
|
+
"onUpdate:modelValue": a[1] || (a[1] = (s) => f.value = s),
|
|
425
525
|
spy: "",
|
|
426
526
|
trigger: "manual",
|
|
427
527
|
placement: "bottom-start",
|
|
428
528
|
width: "anchor",
|
|
429
529
|
"scroll-lock": "",
|
|
430
530
|
inline: e.inline,
|
|
431
|
-
anchor: (d =
|
|
531
|
+
anchor: (d = n(z)) == null ? void 0 : d.fieldRef,
|
|
432
532
|
offset: 2,
|
|
433
|
-
onEnter:
|
|
434
|
-
onLeave:
|
|
533
|
+
onEnter: qe,
|
|
534
|
+
onLeave: xe
|
|
435
535
|
}, {
|
|
436
|
-
default:
|
|
437
|
-
|
|
536
|
+
default: u(() => [
|
|
537
|
+
ve("div", {
|
|
438
538
|
ref: "content",
|
|
439
539
|
"data-testid": "combobox-dropdown",
|
|
440
|
-
"data-key":
|
|
540
|
+
"data-key": n(W),
|
|
441
541
|
class: "q-select__body",
|
|
442
542
|
tabindex: "-1",
|
|
443
|
-
onFocusout:
|
|
444
|
-
onKeydown:
|
|
543
|
+
onFocusout: ke,
|
|
544
|
+
onKeydown: Ee(U, ["stop"])
|
|
445
545
|
}, [
|
|
446
|
-
|
|
447
|
-
e.loading ? (
|
|
448
|
-
|
|
449
|
-
])) : (
|
|
546
|
+
q(l.$slots, "body.prepend"),
|
|
547
|
+
e.loading ? (t(), r("div", Xe, [
|
|
548
|
+
E(n(Se), { size: 24 })
|
|
549
|
+
])) : (t(), p(n(Me), {
|
|
450
550
|
key: 1,
|
|
451
551
|
ref: "list",
|
|
452
552
|
class: "q-select__items",
|
|
453
553
|
selectable: "",
|
|
454
554
|
required: e.required,
|
|
455
555
|
multiple: e.multiple,
|
|
456
|
-
"model-value":
|
|
556
|
+
"model-value": v.value,
|
|
457
557
|
items: e.items,
|
|
458
558
|
groups: l.groups,
|
|
459
559
|
"item-label": e.itemLabel,
|
|
460
560
|
"item-value": e.itemValue,
|
|
461
|
-
"onUpdate:modelValue":
|
|
561
|
+
"onUpdate:modelValue": O
|
|
462
562
|
}, {
|
|
463
|
-
item:
|
|
464
|
-
|
|
563
|
+
item: u(({ item: s }) => [
|
|
564
|
+
q(l.$slots, "item", { item: s })
|
|
465
565
|
]),
|
|
466
566
|
_: 3
|
|
467
567
|
/* FORWARDED */
|
|
468
568
|
}, 8, ["required", "multiple", "model-value", "items", "groups", "item-label", "item-value"])),
|
|
469
|
-
|
|
470
|
-
], 40,
|
|
569
|
+
q(l.$slots, "body.append")
|
|
570
|
+
], 40, Ge)
|
|
471
571
|
]),
|
|
472
572
|
_: 3
|
|
473
573
|
/* FORWARDED */
|
|
@@ -480,5 +580,5 @@ const De = {
|
|
|
480
580
|
}
|
|
481
581
|
});
|
|
482
582
|
export {
|
|
483
|
-
|
|
583
|
+
cl as default
|
|
484
584
|
};
|