@quidgest/ui 0.16.73 → 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.
Files changed (34) hide show
  1. package/dist/json/api.json +31 -1
  2. package/dist/ui.css +57 -11
  3. package/dist/ui.esm.js +6614 -6541
  4. package/dist/ui.js +25 -25
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +142 -137
  7. package/dist/ui.scss +52 -4
  8. package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
  9. package/esm/components/QCheckbox/QCheckbox.vue.js +18 -16
  10. package/esm/components/QCheckbox/index.d.ts +3 -0
  11. package/esm/components/QCheckbox/index.d.ts.map +1 -1
  12. package/esm/components/QCheckbox/types.d.ts +6 -0
  13. package/esm/components/QCheckbox/types.d.ts.map +1 -1
  14. package/esm/components/QCombobox/QCombobox.d.ts +2 -0
  15. package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
  16. package/esm/components/QCombobox/index.d.ts +1 -0
  17. package/esm/components/QCombobox/index.d.ts.map +1 -1
  18. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +2 -0
  19. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
  20. package/esm/components/QList/QList.d.ts +2 -0
  21. package/esm/components/QList/QList.d.ts.map +1 -1
  22. package/esm/components/QList/QList.vue.js +17 -16
  23. package/esm/components/QList/QListItem.d.ts.map +1 -1
  24. package/esm/components/QList/QListItem.vue.js +50 -49
  25. package/esm/components/QList/index.d.ts +1 -0
  26. package/esm/components/QList/index.d.ts.map +1 -1
  27. package/esm/components/QList/types.d.ts +6 -0
  28. package/esm/components/QList/types.d.ts.map +1 -1
  29. package/esm/components/QSelect/QSelect.d.ts +154 -2
  30. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  31. package/esm/components/QSelect/QSelect.vue.js +410 -310
  32. package/esm/components/QSelect/index.d.ts +77 -1
  33. package/esm/components/QSelect/index.d.ts.map +1 -1
  34. package/package.json +1 -1
@@ -1,33 +1,37 @@
1
- import { defineComponent as fe, mergeModels as Z, useModel as me, toRef as z, ref as ee, useTemplateRef as g, onMounted as pe, computed as q, nextTick as $, watch as D, createElementBlock as c, openBlock as a, Fragment as y, createVNode as T, unref as o, normalizeClass as ve, createSlots as be, withCtx as f, withDirectives as ye, createBlock as m, createCommentVNode as p, renderList as le, createTextVNode as w, mergeProps as B, toDisplayString as h, normalizeProps as te, createElementVNode as ae, vModelText as ge, renderSlot as k, withModifiers as he } from "vue";
2
- import { DEFAULT_TEXTS as ke, DEFAULT_ICONS as _e } from "./constants.js";
3
- import { QBadge as M } from "../QBadge/index.js";
4
- import { QButton as qe } from "../QButton/index.js";
5
- import { QField as we } from "../QField/index.js";
6
- import { QIcon as Q } from "../QIcon/index.js";
7
- import { QList as Be } from "../QList/index.js";
8
- import { QOverlay as Ce } from "../QOverlay/index.js";
9
- import { QSpinnerLoader as Ve } from "../QSpinnerLoader/index.js";
10
- import { QChevron as Le } from "../__internal__/QChevron/index.js";
11
- import { QClearButton as Ee } from "../__internal__/QClearButton/index.js";
12
- import { useId as xe } from "../../composables/uid.js";
13
- import { useGroup as $e } from "../../composables/useGroup/index.js";
14
- const De = {
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: "badgesContainer",
17
- class: "q-select__badge-container"
18
- }, Te = {
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
- }, Me = {
25
+ }, He = {
22
26
  key: 1,
23
27
  class: "q-select__placeholder"
24
- }, Qe = ["id", "tabindex", "aria-expanded", "aria-keyshortcuts"], Re = ["data-key"], Se = {
28
+ }, je = ["id", "tabindex", "aria-expanded", "aria-keyshortcuts"], Ge = ["data-key"], Xe = {
25
29
  key: 0,
26
30
  class: "q-select__loader"
27
- }, Xe = /* @__PURE__ */ fe({
31
+ }, cl = /* @__PURE__ */ Be({
28
32
  inheritAttrs: !1,
29
33
  __name: "QSelect",
30
- props: /* @__PURE__ */ Z({
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: () => _e },
52
- texts: { default: () => ke }
55
+ icons: { default: () => Le },
56
+ texts: { default: () => Re }
53
57
  }, {
54
58
  modelValue: {},
55
59
  modelModifiers: {}
56
60
  }),
57
- emits: /* @__PURE__ */ Z(["before-show", "before-hide", "show", "hide"], ["update:modelValue"]),
58
- setup(O, { emit: oe }) {
59
- const e = O, C = oe, r = me(O, "modelValue"), R = xe(z(e, "id")), { active: F } = $e({
60
- active: r,
61
- required: z(e, "required"),
62
- multiple: z(e, "multiple")
63
- }), u = ee(!1), V = ee(0), K = g("trigger"), ie = g("input"), ne = g("list"), U = g("content"), N = g("badgesContainer"), P = g("allBadges");
64
- pe(x);
65
- const W = q(() => s.value.length === 0), s = q(() => {
66
- var t;
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 ((t = r.value) == null ? void 0 : t.map((d) => j(d))) ?? [];
69
- const l = typeof r.value < "u" ? j(r.value) : void 0;
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
- }), H = q(() => {
72
- var t;
89
+ }), Z = V(() => {
90
+ var a;
73
91
  const l = /* @__PURE__ */ new Map();
74
- return (t = e.items) == null || t.forEach((d, i) => {
75
- l.set(d.key, i);
92
+ return (a = e.items) == null || a.forEach((d, s) => {
93
+ l.set(d.key, s);
76
94
  }), l;
77
- }), S = q(
95
+ }), C = V(
78
96
  () => {
79
97
  var l;
80
- return (l = s.value) == null ? void 0 : l.map((t) => t[e.itemLabel]).join(", ");
98
+ return (l = i.value) == null ? void 0 : l.map(k).filter(Boolean).join(", ");
81
99
  }
82
- ), L = q(
83
- () => e.clearable && !e.readonly && !e.disabled && !e.loading && !W.value
100
+ ), D = V(
101
+ () => e.clearable && !e.readonly && !e.disabled && !e.loading && !A.value
84
102
  );
85
- function j(l) {
86
- var t;
87
- return (t = e.items) == null ? void 0 : t.find((d) => d[e.itemValue] === l);
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 se(l) {
90
- e.multiple && l < r.value.length && (!e.required || r.value.length > 1) ? F.value = r.value.toSpliced(l, 1) : _();
110
+ function k(l) {
111
+ return (l == null ? void 0 : l[e.itemLabel]) ?? "";
91
112
  }
92
- function A(l) {
93
- Array.isArray(l) ? (r.value = l.sort((t, d) => H.value.get(t) - H.value.get(d)), x()) : (r.value = l, E());
113
+ function le(l) {
114
+ return l + 1 < i.value.length - h.value ? ", " : "";
94
115
  }
95
- function _() {
96
- A(e.emptyValue), J();
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 re(l) {
99
- var t, d, i;
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 G() {
103
- u.value || (C("before-show"), u.value = !0);
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 E() {
106
- u.value && (C("before-hide"), u.value = !1);
126
+ function te() {
127
+ f.value || (L("before-show"), f.value = !0);
107
128
  }
108
- function X() {
109
- e.readonly || e.disabled || (u.value ? E() : G());
129
+ function Q() {
130
+ f.value && (L("before-hide"), f.value = !1);
110
131
  }
111
- function I(l) {
112
- !l.key || e.readonly || e.disabled || (["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End", "Delete"].includes(l.key) && (l.preventDefault(), l.stopPropagation()), ["Enter", " ", "ArrowDown"].includes(l.key) && G(), ["Escape", "Tab"].includes(l.key) && (u.value ? E() : L.value && l.key === "Escape" && _()), L.value && l.key === "Delete" && _());
132
+ function ae() {
133
+ e.readonly || e.disabled || (f.value ? Q() : te());
113
134
  }
114
- function de(l) {
115
- l.key.length === 1 && l.preventDefault(), I(l);
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
- async function ue() {
138
+ function _e(l) {
139
+ l.key.length === 1 && l.preventDefault(), U(l);
140
+ }
141
+ async function qe() {
118
142
  var l;
119
- await $(), e.loading ? (l = U.value) == null || l.focus() : Y(), C("show");
143
+ await M(), e.loading ? (l = j.value) == null || l.focus() : ne(), L("show");
120
144
  }
121
- function ce() {
122
- J(), C("hide");
145
+ function xe() {
146
+ oe(), L("hide");
123
147
  }
124
- function J() {
148
+ function oe() {
125
149
  var l;
126
- (l = ie.value) == null || l.focus();
150
+ (l = be.value) == null || l.focus();
127
151
  }
128
- function Y() {
152
+ function ne() {
129
153
  var l;
130
- (l = ne.value) == null || l.$el.focus();
154
+ (l = ye.value) == null || l.$el.focus();
131
155
  }
132
- async function x() {
133
- var n;
134
- if (await $(), await $(), !e.multiple || !e.badges || !N.value) return;
135
- let l = 0, t = 0;
136
- const d = N.value.offsetWidth, i = 4;
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
- V.value = (((n = P.value) == null ? void 0 : n.length) ?? 0) - t;
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 D(
181
+ return $(
146
182
  () => e.loading,
147
183
  (l) => {
148
- !l && u.value && $(Y);
184
+ !l && f.value && M(ne);
149
185
  }
150
- ), D(() => e.badges, x), D(() => e.clearable, x), D(F, A), (l, t) => {
186
+ ), $(() => e.badges, T), $(i, T, { deep: !0 }), $(() => e.clearable, T), $(H, O), (l, a) => {
151
187
  var d;
152
- return a(), c(
153
- y,
188
+ return t(), r(
189
+ m,
154
190
  null,
155
191
  [
156
- T(o(we), {
157
- id: o(R),
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: ve([
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: X,
176
- onKeydown: I
177
- }, be({
178
- append: f(() => [
179
- k(l.$slots, "append"),
180
- L.value ? (a(), m(o(Ee), {
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"])) : p("v-if", !0),
186
- e.readonly ? p("v-if", !0) : (a(), m(o(qe), {
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: X
231
+ onClick: ae
196
232
  }, {
197
- default: f(() => [
198
- T(o(Le), {
199
- "model-value": u.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: f(() => [
208
- W.value ? (a(), c("span", Me, [
209
- !e.readonly && !e.disabled ? (a(), c(
210
- y,
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
- w(
214
- h(e.texts.placeholder),
215
- 1
216
- /* TEXT */
217
- )
218
- ],
219
- 64
220
- /* STABLE_FRAGMENT */
221
- )) : p("v-if", !0)
222
- ])) : (a(), c(
223
- y,
224
- { key: 0 },
225
- [
226
- e.badges ? (a(), c(
227
- "span",
228
- De,
229
- [
230
- e.multiple ? (a(), c(
231
- y,
232
- { key: 0 },
233
- [
234
- (a(!0), c(
235
- y,
236
- null,
237
- le(r.value, (i, n) => (a(), c(
238
- y,
239
- { key: n },
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 < r.value.length - V.value ? (a(), m(o(M), {
242
- key: 0,
335
+ E(n(P), {
336
+ ref: "hiddenItemsCountBadge",
243
337
  pill: "",
244
- disabled: e.readonly || e.disabled,
245
- removable: !e.required || r.value.length > 1,
246
- texts: e.texts,
247
- "onClick:remove": () => se(n)
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: f(() => {
250
- var b, v;
251
- return [
252
- (b = s.value[n]) != null && b.icon ? (a(), m(
253
- o(Q),
254
- B({
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
- }, s.value[n].icon),
400
+ }, o.icon),
258
401
  null,
259
402
  16
260
403
  /* FULL_PROPS */
261
- )) : p("v-if", !0),
262
- w(
263
- " " + h((v = s.value[n]) == null ? void 0 : v[e.itemLabel]),
404
+ )) : c("v-if", !0),
405
+ _(
406
+ " " + y(k(o)),
264
407
  1
265
408
  /* TEXT */
266
409
  )
267
- ];
268
- }),
269
- _: 2
270
- /* DYNAMIC */
271
- }, 1032, ["disabled", "removable", "texts", "onClick:remove"])) : p("v-if", !0)
272
- ],
273
- 64
274
- /* STABLE_FRAGMENT */
275
- ))),
276
- 128
277
- /* KEYED_FRAGMENT */
278
- )),
279
- V.value > 0 ? (a(), m(o(M), {
280
- key: 0,
281
- pill: "",
282
- class: "q-select__badge-count",
283
- disabled: e.readonly || e.disabled
284
- }, {
285
- default: f(() => [
286
- w(
287
- " +" + h(V.value),
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
- _: 1
293
- /* STABLE */
294
- }, 8, ["disabled"])) : p("v-if", !0),
295
- (a(!0), c(
296
- y,
297
- null,
298
- le(r.value, (i, n) => (a(), m(o(M), {
299
- key: n,
300
- ref_for: !0,
301
- ref: "allBadges",
302
- pill: "",
303
- disabled: "",
304
- class: "q-select__badge-hidden",
305
- removable: !e.required || r.value.length > 1
306
- }, {
307
- default: f(() => {
308
- var b, v;
309
- return [
310
- (b = s.value[n]) != null && b.icon ? (a(), m(
311
- o(Q),
312
- B({
313
- key: 0,
314
- ref_for: !0
315
- }, s.value[n].icon),
316
- null,
317
- 16
318
- /* FULL_PROPS */
319
- )) : p("v-if", !0),
320
- w(
321
- " " + h((v = s.value[n]) == null ? void 0 : v[e.itemLabel]),
322
- 1
323
- /* TEXT */
324
- )
325
- ];
326
- }),
327
- _: 2
328
- /* DYNAMIC */
329
- }, 1032, ["removable"]))),
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
- s.value.length === 1 && s.value[0].icon && !e.badges || l.$slots.prepend ? {
500
+ i.value.length === 1 && i.value[0].icon && !e.badges || l.$slots.prepend ? {
401
501
  name: "prepend",
402
- fn: f(() => [
403
- k(l.$slots, "prepend"),
404
- s.value.length === 1 && s.value[0].icon && !e.badges ? (a(), m(
405
- o(Q),
406
- te(B({ key: 0 }, s.value[0].icon)),
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
- )) : p("v-if", !0)
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: f(() => [
417
- k(l.$slots, "extras")
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
- T(o(Ce), {
423
- modelValue: u.value,
424
- "onUpdate:modelValue": t[1] || (t[1] = (i) => u.value = i),
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 = o(K)) == null ? void 0 : d.fieldRef,
531
+ anchor: (d = n(z)) == null ? void 0 : d.fieldRef,
432
532
  offset: 2,
433
- onEnter: ue,
434
- onLeave: ce
533
+ onEnter: qe,
534
+ onLeave: xe
435
535
  }, {
436
- default: f(() => [
437
- ae("div", {
536
+ default: u(() => [
537
+ ve("div", {
438
538
  ref: "content",
439
539
  "data-testid": "combobox-dropdown",
440
- "data-key": o(R),
540
+ "data-key": n(W),
441
541
  class: "q-select__body",
442
542
  tabindex: "-1",
443
- onFocusout: re,
444
- onKeydown: he(I, ["stop"])
543
+ onFocusout: ke,
544
+ onKeydown: Ee(U, ["stop"])
445
545
  }, [
446
- k(l.$slots, "body.prepend"),
447
- e.loading ? (a(), c("div", Se, [
448
- T(o(Ve), { size: 24 })
449
- ])) : (a(), m(o(Be), {
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": r.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": A
561
+ "onUpdate:modelValue": O
462
562
  }, {
463
- item: f(({ item: i }) => [
464
- k(l.$slots, "item", { item: i })
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
- k(l.$slots, "body.append")
470
- ], 40, Re)
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
- Xe as default
583
+ cl as default
484
584
  };