@quidgest/ui 0.5.19 → 0.6.1

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/ui.esm.js CHANGED
@@ -1,54 +1,54 @@
1
- import { getCurrentInstance as he, computed as v, ref as I, provide as Le, inject as ye, watch as C, defineComponent as k, openBlock as r, createElementBlock as f, normalizeStyle as K, createElementVNode as N, normalizeClass as V, withModifiers as R, createVNode as H, unref as g, createCommentVNode as b, Fragment as O, createTextVNode as X, toDisplayString as A, renderSlot as x, toRef as ee, createBlock as $, withCtx as T, renderList as ne, resolveDynamicComponent as ve, h as re, normalizeProps as ge, mergeProps as Z, reactive as xe, onBeforeUnmount as qe, onMounted as Ie, Teleport as De, Transition as Te, nextTick as ie, useAttrs as Ee, createSlots as Ce, guardReactiveProps as Ve, withDirectives as Ae } from "vue";
2
- function oe(t) {
1
+ import { getCurrentInstance as be, computed as y, ref as B, provide as De, inject as ge, watch as I, defineComponent as w, openBlock as r, createElementBlock as f, normalizeStyle as Y, createElementVNode as V, normalizeClass as Q, withModifiers as K, createVNode as J, unref as b, createCommentVNode as g, Fragment as F, createTextVNode as P, toDisplayString as C, renderSlot as q, toRef as oe, createBlock as k, withCtx as D, renderList as le, mergeProps as G, resolveDynamicComponent as _e, h as ue, normalizeProps as ke, reactive as Ee, onBeforeUnmount as Ie, onMounted as Ve, Teleport as Ce, Transition as ze, nextTick as se, useAttrs as Ae, createSlots as Qe, guardReactiveProps as Fe, withDirectives as Oe, vModelText as Re } from "vue";
2
+ function re(t) {
3
3
  return t == null ? !0 : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : !1;
4
4
  }
5
- function ce(t) {
5
+ function fe(t) {
6
6
  return t !== null && typeof t == "object" && !Array.isArray(t);
7
7
  }
8
- function be(t = {}, n = {}) {
8
+ function we(t = {}, n = {}) {
9
9
  const e = {};
10
10
  for (const o in t)
11
11
  e[o] = t[o];
12
12
  for (const o in n) {
13
- const s = t[o], a = n[o];
14
- if (ce(s) && ce(a)) {
15
- e[o] = be(
16
- s,
17
- a
13
+ const a = t[o], l = n[o];
14
+ if (fe(a) && fe(l)) {
15
+ e[o] = we(
16
+ a,
17
+ l
18
18
  );
19
19
  continue;
20
20
  }
21
- e[o] = a;
21
+ e[o] = l;
22
22
  }
23
23
  return e;
24
24
  }
25
- const se = "q-defaults";
26
- function ze() {
27
- const t = he();
25
+ const ie = "q-defaults";
26
+ function Me() {
27
+ const t = be();
28
28
  if (!t)
29
29
  throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
30
30
  const n = t.type.name ?? t.type.__name;
31
31
  if (!n)
32
32
  throw new Error("[Quidgest UI] Could not determine component name");
33
- const e = _e();
34
- return v(() => {
33
+ const e = $e();
34
+ return y(() => {
35
35
  var o;
36
36
  return (o = e.value) == null ? void 0 : o[n];
37
37
  });
38
38
  }
39
- function Qe(t) {
40
- if (oe(t))
39
+ function He(t) {
40
+ if (re(t))
41
41
  return;
42
- const n = _e(), e = I(t), o = v(() => oe(e.value) ? n.value : be(n.value, e.value));
43
- Le(se, o);
42
+ const n = $e(), e = B(t), o = y(() => re(e.value) ? n.value : we(n.value, e.value));
43
+ De(ie, o);
44
44
  }
45
- function _e() {
46
- const t = ye(se, void 0);
45
+ function $e() {
46
+ const t = ge(ie, void 0);
47
47
  if (!t)
48
48
  throw new Error("[Quidgest UI] Could not find defaults instance");
49
49
  return t;
50
50
  }
51
- const ue = {
51
+ const pe = {
52
52
  primary: "#00a1f8",
53
53
  primaryLight: "#e5f6ff",
54
54
  primaryDark: "#0079ba",
@@ -78,7 +78,7 @@ const ue = {
78
78
  onWarning: "#fff",
79
79
  onDanger: "#fff",
80
80
  onInfo: "#fff"
81
- }, Oe = {
81
+ }, Ue = {
82
82
  primary: "#018BD2",
83
83
  primaryLight: "#cce7f6",
84
84
  primaryDark: "#006fac",
@@ -109,167 +109,167 @@ const ue = {
109
109
  onDanger: "#fff",
110
110
  onInfo: "#fff"
111
111
  };
112
- function ke(t) {
112
+ function Se(t) {
113
113
  if (!/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t))
114
114
  throw new Error("Invalid color format");
115
115
  t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
116
116
  const n = parseInt(t.slice(1, 3), 16), e = parseInt(t.slice(3, 5), 16), o = parseInt(t.slice(5, 7), 16);
117
117
  return { r: n, g: e, b: o };
118
118
  }
119
- function Fe(t, n) {
119
+ function Ne(t, n) {
120
120
  if (n < 0 || n > 100)
121
121
  throw new Error("Amount must be in the range [0, 100]");
122
122
  if (n === 0)
123
123
  return t;
124
- const e = we(t), o = n / 100;
125
- return e.l = e.l + o * (100 - e.l), $e(e);
124
+ const e = qe(t), o = n / 100;
125
+ return e.l = e.l + o * (100 - e.l), xe(e);
126
126
  }
127
- function Me(t, n) {
127
+ function Ke(t, n) {
128
128
  if (n < 0 || n > 100)
129
129
  throw new Error("Amount must be in the range [0, 100]");
130
130
  if (n === 0)
131
131
  return t;
132
- const e = we(t), o = n / 100;
133
- return e.l = e.l - o * e.l, $e(e);
132
+ const e = qe(t), o = n / 100;
133
+ return e.l = e.l - o * e.l, xe(e);
134
134
  }
135
- function de(t) {
135
+ function me(t) {
136
136
  const n = t.r.toString(16).padStart(2, "0"), e = t.g.toString(16).padStart(2, "0"), o = t.b.toString(16).padStart(2, "0");
137
137
  return `#${n}${e}${o}`;
138
138
  }
139
- function we(t) {
140
- const n = t.r / 255, e = t.g / 255, o = t.b / 255, s = Math.max(n, e, o), a = Math.min(n, e, o);
141
- let l = 0, c;
142
- const i = (s + a) / 2;
143
- if (s === a)
144
- l = c = 0;
139
+ function qe(t) {
140
+ const n = t.r / 255, e = t.g / 255, o = t.b / 255, a = Math.max(n, e, o), l = Math.min(n, e, o);
141
+ let s = 0, d;
142
+ const i = (a + l) / 2;
143
+ if (a === l)
144
+ s = d = 0;
145
145
  else {
146
- const h = s - a;
147
- switch (c = i > 0.5 ? h / (2 - s - a) : h / (s + a), s) {
146
+ const p = a - l;
147
+ switch (d = i > 0.5 ? p / (2 - a - l) : p / (a + l), a) {
148
148
  case n:
149
- l = (e - o) / h + (e < o ? 6 : 0);
149
+ s = (e - o) / p + (e < o ? 6 : 0);
150
150
  break;
151
151
  case e:
152
- l = (o - n) / h + 2;
152
+ s = (o - n) / p + 2;
153
153
  break;
154
154
  case o:
155
- l = (n - e) / h + 4;
155
+ s = (n - e) / p + 4;
156
156
  break;
157
157
  }
158
- l /= 6;
158
+ s /= 6;
159
159
  }
160
160
  return {
161
- h: Math.round(l * 360),
162
- s: Math.round(c * 100),
161
+ h: Math.round(s * 360),
162
+ s: Math.round(d * 100),
163
163
  l: Math.round(i * 100)
164
164
  };
165
165
  }
166
- function $e(t) {
166
+ function xe(t) {
167
167
  const n = t.h / 360, e = t.s / 100, o = t.l / 100;
168
- let s, a, l;
168
+ let a, l, s;
169
169
  if (e === 0)
170
- s = a = l = o;
170
+ a = l = s = o;
171
171
  else {
172
- const c = o < 0.5 ? o * (1 + e) : o + e - o * e, i = 2 * o - c;
173
- s = te(i, c, n + 1 / 3), a = te(i, c, n), l = te(i, c, n - 1 / 3);
172
+ const d = o < 0.5 ? o * (1 + e) : o + e - o * e, i = 2 * o - d;
173
+ a = ae(i, d, n + 1 / 3), l = ae(i, d, n), s = ae(i, d, n - 1 / 3);
174
174
  }
175
175
  return {
176
- r: Math.round(s * 255),
177
- g: Math.round(a * 255),
178
- b: Math.round(l * 255)
176
+ r: Math.round(a * 255),
177
+ g: Math.round(l * 255),
178
+ b: Math.round(s * 255)
179
179
  };
180
180
  }
181
- function te(t, n, e) {
181
+ function ae(t, n, e) {
182
182
  return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? t + (n - t) * 6 * e : e < 1 / 2 ? n : e < 2 / 3 ? t + (n - t) * (2 / 3 - e) * 6 : t;
183
183
  }
184
- const j = "q-theme";
185
- function tn() {
186
- const t = ye(j);
184
+ const ee = "q-theme";
185
+ function un() {
186
+ const t = ge(ee);
187
187
  if (!t)
188
188
  throw new Error("[Quidgest UI] Could not find theme instance");
189
189
  return t;
190
190
  }
191
- function Re(t, n) {
191
+ function We(t, n) {
192
192
  let e = null;
193
193
  if (n)
194
194
  for (const o of n.themes) {
195
- const s = o.mode === "light" ? ue : Oe;
195
+ const a = o.mode === "light" ? pe : Ue;
196
196
  if (o.colors) {
197
- let a;
198
- for (a in o.colors) {
199
- const l = o.colors[a];
200
- if (l && !a.startsWith("on") && !a.endsWith("Light") && !a.endsWith("Dark")) {
201
- const c = ke(l), i = `${a}Light`, h = `${a}Dark`;
202
- i in o.colors || (o.colors[i] = de(Fe(c, 85))), h in o.colors || (o.colors[h] = de(Me(c, 25)));
197
+ let l;
198
+ for (l in o.colors) {
199
+ const s = o.colors[l];
200
+ if (s && !l.startsWith("on") && !l.endsWith("Light") && !l.endsWith("Dark")) {
201
+ const d = Se(s), i = `${l}Light`, p = `${l}Dark`;
202
+ i in o.colors || (o.colors[i] = me(Ne(d, 85))), p in o.colors || (o.colors[p] = me(Ke(d, 25)));
203
203
  }
204
204
  }
205
205
  }
206
- o.colors = He(s, o.colors), o.name === n.defaultTheme && (e = o);
206
+ o.colors = Ge(a, o.colors), o.name === n.defaultTheme && (e = o);
207
207
  }
208
208
  else {
209
209
  const o = "default";
210
210
  e = {
211
211
  name: o,
212
212
  mode: "light",
213
- colors: ue
213
+ colors: pe
214
214
  }, n = {
215
215
  defaultTheme: o,
216
216
  themes: [e]
217
217
  };
218
218
  }
219
219
  if (e) {
220
- const o = I({
220
+ const o = B({
221
221
  activeTheme: e.name,
222
222
  themes: n.themes
223
223
  });
224
- C(
224
+ I(
225
225
  () => o.value.activeTheme,
226
- (s) => {
227
- const a = o.value.themes.find((l) => l.name === s);
228
- a && Ue(a.colors);
226
+ (a) => {
227
+ const l = o.value.themes.find((s) => s.name === a);
228
+ l && Ye(l.colors);
229
229
  },
230
230
  { immediate: !0 }
231
- ), t.provide(j, o);
231
+ ), t.provide(ee, o);
232
232
  }
233
233
  }
234
- function He(t, n = {}) {
234
+ function Ge(t, n = {}) {
235
235
  return { ...t, ...n };
236
236
  }
237
- function Ue(t) {
237
+ function Ye(t) {
238
238
  let n = document.getElementById(
239
- j
239
+ ee
240
240
  );
241
- n || (n = document.createElement("style"), n.type = "text/css", n.id = j, document.head.appendChild(n));
241
+ n || (n = document.createElement("style"), n.type = "text/css", n.id = ee, document.head.appendChild(n));
242
242
  let e = `:root {
243
243
  `, o;
244
244
  for (o in t) {
245
- const s = t[o];
246
- if (s) {
247
- e += ` ${fe(o)}: ${s};
245
+ const a = t[o];
246
+ if (a) {
247
+ e += ` ${he(o)}: ${a};
248
248
  `;
249
- const a = ke(s);
250
- e += ` ${fe(o)}-rgb: ${a.r} ${a.g} ${a.b};
249
+ const l = Se(a);
250
+ e += ` ${he(o)}-rgb: ${l.r} ${l.g} ${l.b};
251
251
  `;
252
252
  }
253
253
  }
254
254
  e += "}", n.textContent = e;
255
255
  }
256
- function fe(t) {
256
+ function he(t) {
257
257
  return t ? `--q-theme-${t.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase()}` : "";
258
258
  }
259
- function nn(t = {}) {
259
+ function fn(t = {}) {
260
260
  return { install: (e) => {
261
261
  const o = t.components || {};
262
- for (const l in o)
263
- e.component(l, o[l]);
264
- const s = t.directives || {};
265
- for (const l in s)
266
- e.directive(l, s[l]);
267
- const a = t.defaults || {};
268
- e.provide(se, I(a)), Re(e, t.themes);
262
+ for (const s in o)
263
+ e.component(s, o[s]);
264
+ const a = t.directives || {};
265
+ for (const s in a)
266
+ e.directive(s, a[s]);
267
+ const l = t.defaults || {};
268
+ e.provide(ie, B(l)), We(e, t.themes);
269
269
  } };
270
270
  }
271
- const Ne = /* @__PURE__ */ N("svg", { viewBox: "25 25 50 50" }, [
272
- /* @__PURE__ */ N("circle", {
271
+ const Xe = /* @__PURE__ */ V("svg", { viewBox: "25 25 50 50" }, [
272
+ /* @__PURE__ */ V("circle", {
273
273
  class: "path",
274
274
  cx: "50",
275
275
  cy: "50",
@@ -279,50 +279,50 @@ const Ne = /* @__PURE__ */ N("svg", { viewBox: "25 25 50 50" }, [
279
279
  "stroke-width": "5",
280
280
  "stroke-miterlimit": "10"
281
281
  })
282
- ], -1), Ke = [
283
- Ne
284
- ], We = /* @__PURE__ */ k({
282
+ ], -1), Ze = [
283
+ Xe
284
+ ], je = /* @__PURE__ */ w({
285
285
  __name: "QSpinnerLoader",
286
286
  props: {
287
287
  size: { default: 48 }
288
288
  },
289
289
  setup(t) {
290
- const n = t, e = v(() => ({
290
+ const n = t, e = y(() => ({
291
291
  "font-size": n.size !== 48 ? `${n.size}px` : void 0
292
292
  }));
293
- return (o, s) => (r(), f("div", {
293
+ return (o, a) => (r(), f("div", {
294
294
  class: "q-spinner-loader",
295
- style: K(e.value)
296
- }, Ke, 4));
295
+ style: Y(e.value)
296
+ }, Ze, 4));
297
297
  }
298
298
  });
299
- function Ge(t, n) {
299
+ function Je(t, n) {
300
300
  var e;
301
301
  return typeof ((e = t.props) == null ? void 0 : e[n]) < "u";
302
302
  }
303
- function w(t) {
303
+ function $(t) {
304
304
  const n = t.setup;
305
305
  return n && (t.setup = (e, o) => {
306
- const s = ze();
307
- if (oe(s.value))
306
+ const a = Me();
307
+ if (re(a.value))
308
308
  return n(e, o);
309
- const a = he();
310
- if (a === null)
309
+ const l = be();
310
+ if (l === null)
311
311
  return n(e, o);
312
- const l = new Proxy(e, {
313
- get(c, i) {
314
- var p;
315
- const h = Reflect.get(c, i), _ = (p = s.value) == null ? void 0 : p[i];
316
- return typeof i == "string" && !Ge(a.vnode, i) ? _ ?? h : h;
312
+ const s = new Proxy(e, {
313
+ get(d, i) {
314
+ var m;
315
+ const p = Reflect.get(d, i), S = (m = a.value) == null ? void 0 : m[i];
316
+ return typeof i == "string" && !Je(l.vnode, i) ? S ?? p : p;
317
317
  }
318
318
  });
319
- return n(l, o);
319
+ return n(s, o);
320
320
  }), t;
321
321
  }
322
- const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
322
+ const Be = $(je), Pe = ["disabled", "onClick"], et = {
323
323
  key: 0,
324
324
  class: "q-btn__spinner"
325
- }, Ze = { class: "q-btn__content" }, je = /* @__PURE__ */ k({
325
+ }, tt = { class: "q-btn__content" }, nt = /* @__PURE__ */ w({
326
326
  __name: "QButton",
327
327
  props: {
328
328
  active: { type: Boolean },
@@ -338,16 +338,16 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
338
338
  },
339
339
  emits: ["click"],
340
340
  setup(t, { emit: n }) {
341
- const e = t, o = v(() => e.disabled || e.loading);
342
- function s(l) {
343
- o.value || n("click", l);
341
+ const e = t, o = y(() => e.disabled || e.loading);
342
+ function a(s) {
343
+ o.value || n("click", s);
344
344
  }
345
- const a = v(() => {
346
- const l = v(() => e.bStyle ? `q-btn--${e.bStyle}` : void 0), c = v(() => e.size !== "regular" ? `q-btn--${e.size}` : void 0);
345
+ const l = y(() => {
346
+ const s = y(() => e.bStyle ? `q-btn--${e.bStyle}` : void 0), d = y(() => e.size !== "regular" ? `q-btn--${e.size}` : void 0);
347
347
  return [
348
348
  "q-btn",
349
- l.value,
350
- c.value,
349
+ s.value,
350
+ d.value,
351
351
  {
352
352
  "q-btn--active": e.active,
353
353
  "q-btn--borderless": e.borderless,
@@ -357,27 +357,27 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
357
357
  }
358
358
  ];
359
359
  });
360
- return (l, c) => (r(), f("button", {
360
+ return (s, d) => (r(), f("button", {
361
361
  type: "button",
362
- class: V(a.value),
362
+ class: Q(l.value),
363
363
  disabled: o.value,
364
- onClick: R(s, ["stop", "prevent"])
364
+ onClick: K(a, ["stop", "prevent"])
365
365
  }, [
366
- l.loading ? (r(), f("div", Xe, [
367
- H(g(Se), { size: 23 })
368
- ])) : b("", !0),
369
- N("span", Ze, [
370
- l.iconOnRight ? (r(), f(O, { key: 0 }, [
371
- X(A(e.label), 1)
372
- ], 64)) : b("", !0),
373
- x(l.$slots, "default"),
374
- l.iconOnRight ? b("", !0) : (r(), f(O, { key: 1 }, [
375
- X(A(e.label), 1)
366
+ s.loading ? (r(), f("div", et, [
367
+ J(b(Be), { size: 23 })
368
+ ])) : g("", !0),
369
+ V("span", tt, [
370
+ s.iconOnRight ? (r(), f(F, { key: 0 }, [
371
+ P(C(e.label), 1)
372
+ ], 64)) : g("", !0),
373
+ q(s.$slots, "default"),
374
+ s.iconOnRight ? g("", !0) : (r(), f(F, { key: 1 }, [
375
+ P(C(e.label), 1)
376
376
  ], 64))
377
377
  ])
378
- ], 10, Ye));
378
+ ], 10, Pe));
379
379
  }
380
- }), Je = w(je), Pe = /* @__PURE__ */ k({
380
+ }), ot = $(nt), at = /* @__PURE__ */ w({
381
381
  __name: "QButtonGroup",
382
382
  props: {
383
383
  bStyle: {},
@@ -387,27 +387,27 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
387
387
  },
388
388
  setup(t) {
389
389
  const n = t;
390
- Qe({
390
+ He({
391
391
  QButton: {
392
- bStyle: ee(n, "bStyle"),
393
- disabled: ee(n, "disabled"),
394
- borderless: ee(n, "borderless"),
392
+ bStyle: oe(n, "bStyle"),
393
+ disabled: oe(n, "disabled"),
394
+ borderless: oe(n, "borderless"),
395
395
  elevated: !1
396
396
  }
397
397
  });
398
- const e = v(() => [
398
+ const e = y(() => [
399
399
  "q-btn-group",
400
400
  {
401
401
  "q-btn-group--elevated": n.elevated
402
402
  }
403
403
  ]);
404
- return (o, s) => (r(), f("div", {
405
- class: V(e.value)
404
+ return (o, a) => (r(), f("div", {
405
+ class: Q(e.value)
406
406
  }, [
407
- x(o.$slots, "default")
407
+ q(o.$slots, "default")
408
408
  ], 2));
409
409
  }
410
- }), et = w(Pe), tt = /* @__PURE__ */ k({
410
+ }), lt = $(at), st = /* @__PURE__ */ w({
411
411
  __name: "QButtonToggle",
412
412
  props: {
413
413
  modelValue: {},
@@ -419,38 +419,38 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
419
419
  },
420
420
  emits: ["update:modelValue"],
421
421
  setup(t, { emit: n }) {
422
- const e = t, o = I(e.modelValue);
423
- C(
422
+ const e = t, o = B(e.modelValue);
423
+ I(
424
424
  () => e.modelValue,
425
- (l) => o.value = l
425
+ (s) => o.value = s
426
426
  );
427
- const s = v({
427
+ const a = y({
428
428
  get() {
429
429
  return o.value;
430
430
  },
431
- set(l) {
432
- o.value = l, n("update:modelValue", l);
431
+ set(s) {
432
+ o.value = s, n("update:modelValue", s);
433
433
  }
434
434
  });
435
- function a(l) {
436
- s.value === l.key && !e.mandatory ? s.value = void 0 : s.value = l.key;
435
+ function l(s) {
436
+ a.value === s.key && !e.mandatory ? a.value = void 0 : a.value = s.key;
437
437
  }
438
- return (l, c) => (r(), $(g(et), {
438
+ return (s, d) => (r(), k(b(lt), {
439
439
  "b-style": "secondary",
440
440
  disabled: e.disabled,
441
441
  borderless: e.borderless,
442
442
  elevated: e.elevated
443
443
  }, {
444
- default: T(() => [
445
- (r(!0), f(O, null, ne(e.options, (i) => (r(), $(g(Je), {
444
+ default: D(() => [
445
+ (r(!0), f(F, null, le(e.options, (i) => (r(), k(b(ot), {
446
446
  key: i.key,
447
447
  title: i.title,
448
448
  label: i.label,
449
- active: s.value === i.key,
450
- onClick: (h) => a(i)
449
+ active: a.value === i.key,
450
+ onClick: (p) => l(i)
451
451
  }, {
452
- default: T(() => [
453
- x(l.$slots, i.key)
452
+ default: D(() => [
453
+ q(s.$slots, i.key)
454
454
  ]),
455
455
  _: 2
456
456
  }, 1032, ["title", "label", "active", "onClick"]))), 128))
@@ -458,7 +458,68 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
458
458
  _: 3
459
459
  }, 8, ["disabled", "borderless", "elevated"]));
460
460
  }
461
- }), on = w(tt), nt = /* @__PURE__ */ k({
461
+ }), pn = $(st);
462
+ let rt = 0;
463
+ function te() {
464
+ return `uid-${++rt}`;
465
+ }
466
+ const it = ["for", "data-val-required"], dt = ["id"], ct = { class: "q-field__control" }, ut = {
467
+ key: 0,
468
+ class: "q-field__prepend"
469
+ }, ft = {
470
+ key: 1,
471
+ class: "q-field__append"
472
+ }, pt = {
473
+ key: 0,
474
+ class: "q-field__extras"
475
+ }, mt = /* @__PURE__ */ w({
476
+ __name: "QField",
477
+ props: {
478
+ id: { default: () => te() },
479
+ label: { default: "" },
480
+ size: { default: "medium" },
481
+ readonly: { type: Boolean, default: !1 },
482
+ disabled: { type: Boolean, default: !1 },
483
+ required: { type: Boolean, default: !1 }
484
+ },
485
+ setup(t, { expose: n }) {
486
+ const e = t, o = B(null), a = y(() => e.required && !e.readonly && !e.disabled);
487
+ return n({
488
+ fieldRef: o
489
+ }), (l, s) => (r(), f(F, null, [
490
+ q(l.$slots, "label.prepend"),
491
+ V("label", {
492
+ class: "q-field__label",
493
+ for: e.id,
494
+ "data-val-required": a.value
495
+ }, C(e.label), 9, it),
496
+ q(l.$slots, "label.append"),
497
+ V("div", G({
498
+ ref_key: "fieldRef",
499
+ ref: o,
500
+ id: e.id,
501
+ class: [
502
+ "q-field",
503
+ `q-field--${e.size}`,
504
+ { "q-field--readonly": e.readonly, "q-field--disabled": e.disabled }
505
+ ]
506
+ }, l.$attrs), [
507
+ V("div", ct, [
508
+ l.$slots.prepend ? (r(), f("div", ut, [
509
+ q(l.$slots, "prepend")
510
+ ])) : g("", !0),
511
+ q(l.$slots, "default"),
512
+ l.$slots.append ? (r(), f("div", ft, [
513
+ q(l.$slots, "append")
514
+ ])) : g("", !0)
515
+ ]),
516
+ l.$slots.extras ? (r(), f("div", pt, [
517
+ q(l.$slots, "extras")
518
+ ])) : g("", !0)
519
+ ], 16, dt)
520
+ ], 64));
521
+ }
522
+ }), Le = $(mt), ht = /* @__PURE__ */ w({
462
523
  __name: "QIcon",
463
524
  props: {
464
525
  icon: {},
@@ -466,25 +527,25 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
466
527
  size: { default: void 0 }
467
528
  },
468
529
  setup(t) {
469
- const n = t, e = v(() => {
530
+ const n = t, e = y(() => {
470
531
  switch (n.type) {
471
532
  case "svg":
472
- return ft;
533
+ return qt;
473
534
  case "font":
474
- return ut;
535
+ return $t;
475
536
  case "img":
476
- return dt;
537
+ return St;
477
538
  default:
478
539
  return;
479
540
  }
480
541
  });
481
- return (o, s) => n.icon ? (r(), $(ve(e.value), {
542
+ return (o, a) => n.icon ? (r(), k(_e(e.value), {
482
543
  key: 0,
483
544
  icon: n.icon,
484
545
  size: n.size
485
- }, null, 8, ["icon", "size"])) : b("", !0);
546
+ }, null, 8, ["icon", "size"])) : g("", !0);
486
547
  }
487
- }), ot = /* @__PURE__ */ k({
548
+ }), yt = /* @__PURE__ */ w({
488
549
  __name: "QIconFont",
489
550
  props: {
490
551
  icon: {},
@@ -493,33 +554,33 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
493
554
  size: { default: void 0 }
494
555
  },
495
556
  setup(t) {
496
- const n = t, e = v(() => n.variant ? `${n.library}-${n.variant}` : n.library), o = v(() => n.library && n.icon ? `${n.library}-${n.icon}` : n.icon), s = v(() => ({
557
+ const n = t, e = y(() => n.variant ? `${n.library}-${n.variant}` : n.library), o = y(() => n.library && n.icon ? `${n.library}-${n.icon}` : n.icon), a = y(() => ({
497
558
  "font-size": n.size !== void 0 ? `${n.size}px` : void 0
498
559
  }));
499
- return (a, l) => o.value ? (r(), f("i", {
560
+ return (l, s) => o.value ? (r(), f("i", {
500
561
  key: 0,
501
- class: V(["q-icon", "q-icon__font", e.value, o.value]),
502
- style: K(s.value)
503
- }, null, 6)) : b("", !0);
562
+ class: Q(["q-icon", "q-icon__font", e.value, o.value]),
563
+ style: Y(a.value)
564
+ }, null, 6)) : g("", !0);
504
565
  }
505
- }), st = ["src"], at = /* @__PURE__ */ k({
566
+ }), vt = ["src"], bt = /* @__PURE__ */ w({
506
567
  __name: "QIconImg",
507
568
  props: {
508
569
  icon: {},
509
570
  size: {}
510
571
  },
511
572
  setup(t) {
512
- const n = t, e = v(() => ({
573
+ const n = t, e = y(() => ({
513
574
  "font-size": n.size !== void 0 ? `${n.size}px` : void 0
514
575
  }));
515
- return (o, s) => n.icon ? (r(), f("img", {
576
+ return (o, a) => n.icon ? (r(), f("img", {
516
577
  key: 0,
517
578
  src: n.icon,
518
579
  class: "q-icon q-icon__img",
519
- style: K(e.value)
520
- }, null, 12, st)) : b("", !0);
580
+ style: Y(e.value)
581
+ }, null, 12, vt)) : g("", !0);
521
582
  }
522
- }), M = {}, lt = k({
583
+ }), N = {}, gt = w({
523
584
  name: "InlineSvg",
524
585
  emits: ["loaded", "unloaded", "error"],
525
586
  inheritAttrs: !1,
@@ -528,9 +589,9 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
528
589
  return null;
529
590
  const t = this.getSvgContent(this.svgElSource);
530
591
  if (!t)
531
- return re("div", this.$attrs);
592
+ return ue("div", this.$attrs);
532
593
  const n = {};
533
- return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, t), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = t.innerHTML, re("svg", n);
594
+ return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, t), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = t.innerHTML, ue("svg", n);
534
595
  },
535
596
  props: {
536
597
  src: {
@@ -575,7 +636,7 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
575
636
  o !== !1 && o !== null && o !== void 0 && (t[e] = o);
576
637
  },
577
638
  getSvgContent(t) {
578
- return this.symbol && (t = t.getElementById(this.symbol), !t) ? null : (this.transformSource && (t = t.cloneNode(!0), t = this.transformSource(t)), this.title && (this.transformSource || (t = t.cloneNode(!0)), rt(t, this.title)), t);
639
+ return this.symbol && (t = t.getElementById(this.symbol), !t) ? null : (this.transformSource && (t = t.cloneNode(!0), t = this.transformSource(t)), this.title && (this.transformSource || (t = t.cloneNode(!0)), _t(t, this.title)), t);
579
640
  },
580
641
  /**
581
642
  * Get svgElSource
@@ -583,11 +644,11 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
583
644
  */
584
645
  async getSource(t) {
585
646
  try {
586
- M[t] || (M[t] = it(this.download(t))), this.svgElSource && M[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
587
- const n = await M[t];
647
+ N[t] || (N[t] = kt(this.download(t))), this.svgElSource && N[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
648
+ const n = await N[t];
588
649
  this.svgElSource = n, await this.$nextTick(), this.$emit("loaded", this.$el);
589
650
  } catch (n) {
590
- this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete M[t], this.$emit("error", n);
651
+ this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete N[t], this.$emit("error", n);
591
652
  }
592
653
  },
593
654
  /**
@@ -599,10 +660,10 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
599
660
  const n = await fetch(t);
600
661
  if (!n.ok)
601
662
  throw new Error("Error loading SVG");
602
- const e = await n.text(), a = new DOMParser().parseFromString(e, "text/xml").getElementsByTagName("svg")[0];
603
- if (!a)
663
+ const e = await n.text(), l = new DOMParser().parseFromString(e, "text/xml").getElementsByTagName("svg")[0];
664
+ if (!l)
604
665
  throw new Error("Loaded file is not a valid SVG");
605
- return a;
666
+ return l;
606
667
  }
607
668
  },
608
669
  watch: {
@@ -611,7 +672,7 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
611
672
  }
612
673
  }
613
674
  });
614
- function rt(t, n) {
675
+ function _t(t, n) {
615
676
  const e = t.getElementsByTagName("title");
616
677
  if (e.length)
617
678
  e[0].textContent = n;
@@ -620,7 +681,7 @@ function rt(t, n) {
620
681
  o.textContent = n, t.insertBefore(o, t.firstChild);
621
682
  }
622
683
  }
623
- function it(t) {
684
+ function kt(t) {
624
685
  if (t.getIsPending)
625
686
  return t;
626
687
  let n = !0;
@@ -632,7 +693,7 @@ function it(t) {
632
693
  );
633
694
  return e.getIsPending = () => n, e;
634
695
  }
635
- const ct = /* @__PURE__ */ k({
696
+ const wt = /* @__PURE__ */ w({
636
697
  __name: "QIconSvg",
637
698
  props: {
638
699
  icon: {},
@@ -641,60 +702,29 @@ const ct = /* @__PURE__ */ k({
641
702
  },
642
703
  emits: ["loaded", "unloaded"],
643
704
  setup(t, { emit: n }) {
644
- const e = t, o = v(() => ({
705
+ const e = t, o = y(() => ({
645
706
  "font-size": e.size !== void 0 ? `${e.size}px` : void 0
646
707
  }));
647
- return (s, a) => e.icon ? (r(), $(g(lt), {
708
+ return (a, l) => e.icon ? (r(), k(b(gt), {
648
709
  key: 0,
649
710
  class: "q-icon q-icon__svg",
650
711
  src: e.bundle,
651
712
  symbol: e.icon,
652
- style: K(o.value),
653
- onLoaded: a[0] || (a[0] = (l) => n("loaded", l)),
654
- onUnloaded: a[1] || (a[1] = (l) => n("unloaded", l))
655
- }, null, 8, ["src", "symbol", "style"])) : b("", !0);
656
- }
657
- }), U = w(nt), ut = w(ot), dt = w(at), ft = w(ct), pt = {
658
- key: 0,
659
- class: "q-input__prepend"
660
- }, mt = {
661
- key: 1,
662
- class: "q-input__append"
663
- }, ht = /* @__PURE__ */ k({
664
- __name: "QInput",
665
- props: {
666
- size: { default: "medium" },
667
- readonly: { type: Boolean, default: !1 },
668
- disabled: { type: Boolean, default: !1 }
669
- },
670
- setup(t) {
671
- const n = t;
672
- return (e, o) => (r(), f("div", {
673
- class: V([
674
- "q-input",
675
- `q-input--${n.size}`,
676
- { "q-input--readonly": n.readonly, "q-input--disabled": n.disabled }
677
- ])
678
- }, [
679
- e.$slots.prepend ? (r(), f("div", pt, [
680
- x(e.$slots, "prepend")
681
- ])) : b("", !0),
682
- x(e.$slots, "default"),
683
- e.$slots.append ? (r(), f("div", mt, [
684
- x(e.$slots, "append")
685
- ])) : b("", !0)
686
- ], 2));
713
+ style: Y(o.value),
714
+ onLoaded: l[0] || (l[0] = (s) => n("loaded", s)),
715
+ onUnloaded: l[1] || (l[1] = (s) => n("unloaded", s))
716
+ }, null, 8, ["src", "symbol", "style"])) : g("", !0);
687
717
  }
688
- }), yt = w(ht), vt = (t, n) => {
718
+ }), W = $(ht), $t = $(yt), St = $(bt), qt = $(wt), xt = (t, n) => {
689
719
  const e = t.__vccOpts || t;
690
- for (const [o, s] of n)
691
- e[o] = s;
720
+ for (const [o, a] of n)
721
+ e[o] = a;
692
722
  return e;
693
- }, gt = {}, bt = { class: "q-line-loader" };
694
- function _t(t, n) {
695
- return r(), f("div", bt);
723
+ }, Bt = {}, Lt = { class: "q-line-loader" };
724
+ function Tt(t, n) {
725
+ return r(), f("div", Lt);
696
726
  }
697
- const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE__ */ k({
727
+ const Dt = /* @__PURE__ */ xt(Bt, [["render", Tt]]), mn = $(Dt), Et = /* @__PURE__ */ w({
698
728
  __name: "QList",
699
729
  props: {
700
730
  modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
@@ -706,91 +736,91 @@ const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE
706
736
  },
707
737
  emits: ["update:modelValue"],
708
738
  setup(t, { expose: n, emit: e }) {
709
- const o = t, s = I(o.modelValue), a = v(() => l.value.length > 1 ? "div" : "ul"), l = v(() => o.groups.length ? o.groups : [{ title: "" }]), c = I(null);
710
- function i(d) {
711
- s.value = d, e("update:modelValue", d);
739
+ const o = t, a = B(o.modelValue), l = y(() => s.value.length > 1 ? "div" : "ul"), s = y(() => o.groups.length ? o.groups : [{ title: "" }]), d = B(null);
740
+ function i(u) {
741
+ a.value = u, e("update:modelValue", u);
712
742
  }
713
- function h() {
714
- let d = 0;
715
- s.value && (d = o.items.findIndex((S) => S[o.itemValue] === s.value)), D(d);
743
+ function p() {
744
+ let u = 0;
745
+ a.value && (u = o.items.findIndex((x) => x[o.itemValue] === a.value)), E(u);
716
746
  }
717
- function _(d) {
718
- switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(d.key) && d.preventDefault(), d.key) {
747
+ function S(u) {
748
+ switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(u.key) && u.preventDefault(), u.key) {
719
749
  case "ArrowDown":
720
- p("next");
750
+ m("next");
721
751
  break;
722
752
  case "ArrowUp":
723
- p("prev");
753
+ m("prev");
724
754
  break;
725
755
  case "Home":
726
- p("first");
756
+ m("first");
727
757
  break;
728
758
  case "End":
729
- p("last");
759
+ m("last");
730
760
  break;
731
761
  }
732
762
  }
733
- function p(d) {
734
- switch (d) {
763
+ function m(u) {
764
+ switch (u) {
735
765
  case "next":
736
766
  case "prev":
737
- D(E(d));
767
+ E(z(u));
738
768
  break;
739
769
  case "first":
740
- D(0);
770
+ E(0);
741
771
  break;
742
772
  case "last":
743
- D(-1);
773
+ E(-1);
744
774
  break;
745
775
  }
746
776
  }
747
- function D(d) {
748
- var y;
749
- (y = z().at(d)) == null || y.focus();
777
+ function E(u) {
778
+ var v;
779
+ (v = A().at(u)) == null || v.focus();
750
780
  }
751
- function z() {
752
- var y;
753
- const d = (y = c.value) == null ? void 0 : y.querySelectorAll("li");
754
- return d ? Array.from(d).filter((L) => L.tabIndex !== -1) : [];
781
+ function A() {
782
+ var v;
783
+ const u = (v = d.value) == null ? void 0 : v.querySelectorAll("li");
784
+ return u ? Array.from(u).filter((L) => L.tabIndex !== -1) : [];
755
785
  }
756
- function Q(d) {
757
- return d.indexOf(document.activeElement);
786
+ function O(u) {
787
+ return u.indexOf(document.activeElement);
758
788
  }
759
- function E(d) {
760
- const S = z(), y = Q(S);
761
- return d === "next" ? y === S.length - 1 ? y : y + 1 : y === 0 ? 0 : y - 1;
789
+ function z(u) {
790
+ const x = A(), v = O(x);
791
+ return u === "next" ? v === x.length - 1 ? v : v + 1 : v === 0 ? 0 : v - 1;
762
792
  }
763
- function F(d) {
764
- return d ? o.items.filter((S) => S.group === d) : o.items;
793
+ function M(u) {
794
+ return u ? o.items.filter((x) => x.group === u) : o.items;
765
795
  }
766
- return C(
796
+ return I(
767
797
  () => o.modelValue,
768
- (d) => {
769
- s.value = d;
798
+ (u) => {
799
+ a.value = u;
770
800
  }
771
- ), n({ focusItem: D }), (d, S) => (r(), $(ve(a.value), {
801
+ ), n({ focusItem: E }), (u, x) => (r(), k(_e(l.value), {
772
802
  ref_key: "listRef",
773
- ref: c,
774
- class: V(["q-list", { "q-list--disabled": o.disabled }]),
803
+ ref: d,
804
+ class: Q(["q-list", { "q-list--disabled": o.disabled }]),
775
805
  role: "listbox",
776
806
  tabindex: o.disabled ? -1 : 0,
777
- onFocus: h,
778
- onKeydown: _
807
+ onFocus: p,
808
+ onKeydown: S
779
809
  }, {
780
- default: T(() => [
781
- (r(!0), f(O, null, ne(l.value, (y) => (r(), $(g(Vt), {
782
- key: y.id,
783
- title: y.title,
784
- disabled: y.disabled
810
+ default: D(() => [
811
+ (r(!0), f(F, null, le(s.value, (v) => (r(), k(b(Mt), {
812
+ key: v.id,
813
+ title: v.title,
814
+ disabled: v.disabled
785
815
  }, {
786
- default: T(() => [
787
- (r(!0), f(O, null, ne(F(y.id), (L) => (r(), $(g(Ct), {
816
+ default: D(() => [
817
+ (r(!0), f(F, null, le(M(v.id), (L) => (r(), k(b(Rt), {
788
818
  key: L[o.itemValue],
789
819
  value: L[o.itemValue],
790
820
  label: L[o.itemLabel],
791
821
  icon: L.icon,
792
822
  disabled: o.disabled || L.disabled,
793
- selected: s.value === L[o.itemValue],
823
+ selected: a.value === L[o.itemValue],
794
824
  onSelect: i
795
825
  }, null, 8, ["value", "label", "icon", "disabled", "selected"]))), 128))
796
826
  ]),
@@ -800,11 +830,11 @@ const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE
800
830
  _: 1
801
831
  }, 40, ["class", "tabindex"]));
802
832
  }
803
- }), $t = ["tabindex", "aria-label", "aria-selected", "onClick"], St = { class: "q-list-item__check-container" }, Bt = {
833
+ }), It = ["tabindex", "aria-label", "aria-selected", "onClick"], Vt = { class: "q-list-item__check-container" }, Ct = {
804
834
  check: {
805
835
  icon: "check"
806
836
  }
807
- }, Lt = /* @__PURE__ */ k({
837
+ }, zt = /* @__PURE__ */ w({
808
838
  __name: "QListItem",
809
839
  props: {
810
840
  value: { type: [String, Number, Boolean, Symbol] },
@@ -812,7 +842,7 @@ const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE
812
842
  icon: { default: void 0 },
813
843
  selected: { type: Boolean, default: !1 },
814
844
  highlighted: { type: Boolean, default: !1 },
815
- icons: { default: () => Bt },
845
+ icons: { default: () => Ct },
816
846
  disabled: { type: Boolean, default: !1 }
817
847
  },
818
848
  emits: ["select"],
@@ -821,13 +851,13 @@ const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE
821
851
  function o() {
822
852
  e.disabled || n("select", e.value);
823
853
  }
824
- function s(a) {
825
- a.key === "Tab" && o(), (a.key === "Enter" || a.key === " ") && (a.preventDefault(), a.stopPropagation(), o());
854
+ function a(l) {
855
+ l.key === "Tab" && o(), (l.key === "Enter" || l.key === " ") && (l.preventDefault(), l.stopPropagation(), o());
826
856
  }
827
- return (a, l) => (r(), f("li", {
857
+ return (l, s) => (r(), f("li", {
828
858
  role: "option",
829
859
  tabindex: e.disabled ? void 0 : -2,
830
- class: V([
860
+ class: Q([
831
861
  "q-list-item",
832
862
  {
833
863
  "q-list-item--disabled": e.disabled,
@@ -837,109 +867,104 @@ const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE
837
867
  ]),
838
868
  "aria-label": e.label,
839
869
  "aria-selected": e.disabled ? void 0 : e.selected,
840
- onKeydown: s,
841
- onClick: R(o, ["stop", "prevent"])
870
+ onKeydown: a,
871
+ onClick: K(o, ["stop", "prevent"])
842
872
  }, [
843
- e.icon ? (r(), $(g(U), ge(Z({ key: 0 }, e.icon)), null, 16)) : b("", !0),
844
- X(" " + A(e.label) + " ", 1),
845
- N("div", St, [
846
- e.selected ? (r(), $(g(U), Z({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : b("", !0)
873
+ e.icon ? (r(), k(b(W), ke(G({ key: 0 }, e.icon)), null, 16)) : g("", !0),
874
+ P(" " + C(e.label) + " ", 1),
875
+ V("div", Vt, [
876
+ e.selected ? (r(), k(b(W), G({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : g("", !0)
847
877
  ])
848
- ], 42, $t));
878
+ ], 42, It));
849
879
  }
850
- });
851
- let xt = 0;
852
- function qt() {
853
- return `uid-${++xt}`;
854
- }
855
- const It = ["aria-labelledby"], Dt = ["id"], Tt = /* @__PURE__ */ k({
880
+ }), At = ["aria-labelledby"], Qt = ["id"], Ft = /* @__PURE__ */ w({
856
881
  __name: "QListItemGroup",
857
882
  props: {
858
883
  title: { default: "" },
859
884
  disabled: { type: Boolean, default: !1 }
860
885
  },
861
886
  setup(t) {
862
- const n = t, e = qt();
863
- return (o, s) => n.title ? (r(), f("ul", {
887
+ const n = t, e = te();
888
+ return (o, a) => n.title ? (r(), f("ul", {
864
889
  key: 1,
865
890
  class: "q-list-item-group",
866
891
  role: "group",
867
- "aria-labelledby": g(e)
892
+ "aria-labelledby": b(e)
868
893
  }, [
869
894
  n.title ? (r(), f("li", {
870
895
  key: 0,
871
- id: g(e),
896
+ id: b(e),
872
897
  class: "q-list-item-group__title",
873
898
  role: "presentation"
874
- }, A(n.title), 9, Dt)) : b("", !0),
875
- x(o.$slots, "default")
876
- ], 8, It)) : x(o.$slots, "default", { key: 0 });
899
+ }, C(n.title), 9, Qt)) : g("", !0),
900
+ q(o.$slots, "default")
901
+ ], 8, At)) : q(o.$slots, "default", { key: 0 });
877
902
  }
878
- }), Et = w(wt), Ct = w(Lt), Vt = w(Tt);
879
- function At(t, n, e = "right", o) {
880
- const s = t.getBoundingClientRect(), a = s.x + window.scrollX, l = s.y + window.scrollY, c = n == null ? void 0 : n.getBoundingClientRect(), i = (c == null ? void 0 : c.width) ?? 0, h = (c == null ? void 0 : c.height) ?? 0;
881
- let _ = e;
882
- c && !Be(s, c, _) && (_ = zt(s, c, _));
883
- const p = { x: 0, y: 0, placement: _ };
884
- switch (_) {
903
+ }), Ot = $(Et), Rt = $(zt), Mt = $(Ft);
904
+ function Ht(t, n, e = "right", o) {
905
+ const a = t.getBoundingClientRect(), l = a.x + window.scrollX, s = a.y + window.scrollY, d = n == null ? void 0 : n.getBoundingClientRect(), i = (d == null ? void 0 : d.width) ?? 0, p = (d == null ? void 0 : d.height) ?? 0;
906
+ let S = e;
907
+ d && !Te(a, d, S) && (S = Ut(a, d, S));
908
+ const m = { x: 0, y: 0, placement: S };
909
+ switch (S) {
885
910
  case "top":
886
- o === "anchor" ? p.x = a : p.x = a + (s.width - i) / 2, p.y = l - h;
911
+ o === "anchor" ? m.x = l : m.x = l + (a.width - i) / 2, m.y = s - p;
887
912
  break;
888
913
  case "bottom":
889
- o === "anchor" ? p.x = a : p.x = a + (s.width - i) / 2, p.y = l + s.height;
914
+ o === "anchor" ? m.x = l : m.x = l + (a.width - i) / 2, m.y = s + a.height;
890
915
  break;
891
916
  case "left":
892
- p.x = a - i, p.y = l + s.height / 2 - h / 2;
917
+ m.x = l - i, m.y = s + a.height / 2 - p / 2;
893
918
  break;
894
919
  case "right":
895
- p.x = a + s.width, p.y = l + s.height / 2 - h / 2;
920
+ m.x = l + a.width, m.y = s + a.height / 2 - p / 2;
896
921
  break;
897
922
  }
898
- return o === "anchor" && s.width >= i && (p.width = s.width), p;
923
+ return o === "anchor" && a.width >= i && (m.width = a.width), m;
899
924
  }
900
- function Be(t, n, e) {
901
- let o = !1, s = !1;
925
+ function Te(t, n, e) {
926
+ let o = !1, a = !1;
902
927
  switch (e) {
903
928
  case "top":
904
- o = me(t, n), s = t.top > n.height;
929
+ o = ve(t, n), a = t.top > n.height;
905
930
  break;
906
931
  case "bottom":
907
- o = me(t, n), s = window.innerHeight - t.top - t.height > n.height;
932
+ o = ve(t, n), a = window.innerHeight - t.top - t.height > n.height;
908
933
  break;
909
934
  case "left":
910
- o = t.left > n.width, s = pe(t, n);
935
+ o = t.left > n.width, a = ye(t, n);
911
936
  break;
912
937
  case "right":
913
- o = window.innerWidth - t.left - t.width > n.width, s = pe(t, n);
938
+ o = window.innerWidth - t.left - t.width > n.width, a = ye(t, n);
914
939
  break;
915
940
  }
916
- return o && s;
941
+ return o && a;
917
942
  }
918
- function pe(t, n) {
943
+ function ye(t, n) {
919
944
  return window.innerHeight - t.top - t.height / 2 > n.height / 2 && t.top + t.height / 2 > n.height / 2;
920
945
  }
921
- function me(t, n) {
946
+ function ve(t, n) {
922
947
  return window.innerWidth - t.left - t.width / 2 > n.width / 2 && t.left + t.width / 2 > n.width / 2;
923
948
  }
924
- function zt(t, n, e) {
949
+ function Ut(t, n, e) {
925
950
  const o = {
926
951
  top: ["bottom", "left", "right"],
927
952
  bottom: ["top", "left", "right"],
928
953
  left: ["right", "top", "bottom"],
929
954
  right: ["left", "top", "bottom"]
930
955
  };
931
- for (const s of o[e])
932
- if (Be(t, n, s))
933
- return s;
956
+ for (const a of o[e])
957
+ if (Te(t, n, a))
958
+ return a;
934
959
  return e;
935
960
  }
936
- function Y(t) {
961
+ function j(t) {
937
962
  return typeof t == "string" ? document.querySelector(t) : t && "$el" in t ? t.$el : t;
938
963
  }
939
- const Qt = {
964
+ const Nt = {
940
965
  key: 0,
941
966
  class: "q-overlay__arrow"
942
- }, Ot = /* @__PURE__ */ k({
967
+ }, Kt = /* @__PURE__ */ w({
943
968
  inheritAttrs: !1,
944
969
  __name: "QOverlay",
945
970
  props: {
@@ -960,90 +985,90 @@ const Qt = {
960
985
  },
961
986
  emits: ["enter", "leave"],
962
987
  setup(t, { emit: n }) {
963
- const e = t, o = v(() => [
988
+ const e = t, o = y(() => [
964
989
  "q-overlay",
965
- `q-overlay--${s.placement}`,
990
+ `q-overlay--${a.placement}`,
966
991
  { "q-overlay--inverted": e.appearance === "inverted" },
967
992
  ...e.contentClasses
968
- ]), s = xe({
993
+ ]), a = Ee({
969
994
  visible: e.modelValue,
970
995
  animating: !1,
971
996
  top: 0,
972
997
  left: 0,
973
998
  width: 0,
974
999
  placement: e.placement
975
- }), a = v(() => s.visible && !e.disabled);
976
- C(
1000
+ }), l = y(() => a.visible && !e.disabled);
1001
+ I(
977
1002
  () => e.modelValue,
978
- () => s.visible = e.modelValue
979
- ), C(
980
- () => s.visible,
981
- () => s.animating = !0
1003
+ () => a.visible = e.modelValue
1004
+ ), I(
1005
+ () => a.visible,
1006
+ () => a.animating = !0
982
1007
  );
983
- const l = v(() => {
984
- let m = 0, q = 0;
985
- switch (s.placement) {
1008
+ const s = y(() => {
1009
+ let h = 0, T = 0;
1010
+ switch (a.placement) {
986
1011
  case "top":
987
- q = -(e.offset || 0);
1012
+ T = -(e.offset || 0);
988
1013
  break;
989
1014
  case "bottom":
990
- q = e.offset || 0;
1015
+ T = e.offset || 0;
991
1016
  break;
992
1017
  case "left":
993
- m = -(e.offset || 0);
1018
+ h = -(e.offset || 0);
994
1019
  break;
995
1020
  case "right":
996
- m = e.offset || 0;
1021
+ h = e.offset || 0;
997
1022
  break;
998
1023
  }
999
- const u = {
1000
- top: `${s.top + q}px`,
1001
- left: `${s.left + m}px`
1024
+ const H = {
1025
+ top: `${a.top + T}px`,
1026
+ left: `${a.left + h}px`
1002
1027
  };
1003
- return s.width !== void 0 && ["top", "bottom"].includes(s.placement) && (u.width = `${s.width}px`), u;
1004
- }), c = I(null);
1028
+ return a.width !== void 0 && ["top", "bottom"].includes(a.placement) && (H.width = `${a.width}px`), H;
1029
+ }), d = B(null);
1005
1030
  function i() {
1006
- const m = Y(e.anchor);
1007
- if (m) {
1008
- const q = At(m, c.value, e.placement, e.width);
1009
- s.left = q.x, s.top = q.y, s.width = q.width, s.placement = q.placement;
1031
+ const h = j(e.anchor);
1032
+ if (h) {
1033
+ const T = Ht(h, d.value, e.placement, e.width);
1034
+ a.left = T.x, a.top = T.y, a.width = T.width, a.placement = T.placement;
1010
1035
  }
1011
1036
  }
1012
- C([() => a.value, () => e.placement], i);
1013
- let h;
1014
- function _() {
1015
- const m = e.trigger === "hover" ? e.delay : 0;
1016
- h || (h = window.setTimeout(() => s.visible = !0, m));
1037
+ I([() => l.value, () => e.placement], i);
1038
+ let p;
1039
+ function S() {
1040
+ const h = e.trigger === "hover" ? e.delay : 0;
1041
+ p || (p = window.setTimeout(() => a.visible = !0, h));
1017
1042
  }
1018
- function p() {
1019
- clearTimeout(h), h = void 0, s.visible = !1;
1043
+ function m() {
1044
+ clearTimeout(p), p = void 0, a.visible = !1;
1020
1045
  }
1021
- function D() {
1022
- a.value ? p() : _();
1046
+ function E() {
1047
+ l.value ? m() : S();
1023
1048
  }
1024
- let z;
1025
- function Q() {
1026
- window.clearTimeout(z), z = window.setTimeout(() => s.animating = !1, 200), n("leave");
1049
+ let A;
1050
+ function O() {
1051
+ window.clearTimeout(A), A = window.setTimeout(() => a.animating = !1, 200), n("leave");
1027
1052
  }
1028
- let E;
1029
- function F() {
1030
- ie(() => {
1031
- const m = Y(e.anchor);
1032
- if (m)
1053
+ let z;
1054
+ function M() {
1055
+ se(() => {
1056
+ const h = j(e.anchor);
1057
+ if (h)
1033
1058
  switch (e.trigger) {
1034
1059
  case "click":
1035
- m.addEventListener("click", D);
1060
+ h.addEventListener("click", E);
1036
1061
  break;
1037
1062
  case "hover":
1038
- m.addEventListener("mouseenter", _), m.addEventListener("mouseleave", p);
1063
+ h.addEventListener("mouseenter", S), h.addEventListener("mouseleave", m);
1039
1064
  break;
1040
1065
  }
1041
1066
  });
1042
1067
  }
1043
- function d() {
1044
- ie(() => {
1045
- const m = Y(e.anchor);
1046
- m && (window.addEventListener("scroll", i), window.addEventListener("resize", i), E = new MutationObserver(i), E.observe(m, {
1068
+ function u() {
1069
+ se(() => {
1070
+ const h = j(e.anchor);
1071
+ h && (window.addEventListener("scroll", i), window.addEventListener("resize", i), z = new MutationObserver(i), z.observe(h, {
1047
1072
  attributes: !1,
1048
1073
  childList: !0,
1049
1074
  characterData: !0,
@@ -1051,72 +1076,72 @@ const Qt = {
1051
1076
  }), i());
1052
1077
  });
1053
1078
  }
1054
- function S() {
1055
- window.removeEventListener("scroll", i), window.removeEventListener("resize", i), E == null || E.disconnect();
1079
+ function x() {
1080
+ window.removeEventListener("scroll", i), window.removeEventListener("resize", i), z == null || z.disconnect();
1056
1081
  }
1057
- let y;
1082
+ let v;
1058
1083
  function L() {
1059
- Y(e.anchor) ? (i(), y = window.setTimeout(L, 100)) : p();
1084
+ j(e.anchor) ? (i(), v = window.setTimeout(L, 100)) : m();
1060
1085
  }
1061
- function J() {
1062
- d(), e.spy && L();
1086
+ function ne() {
1087
+ u(), e.spy && L();
1063
1088
  }
1064
- function W() {
1065
- S(), e.spy && (clearTimeout(y), y = void 0);
1089
+ function X() {
1090
+ x(), e.spy && (clearTimeout(v), v = void 0);
1066
1091
  }
1067
- return qe(W), Ie(i), C(
1092
+ return Ie(X), Ve(i), I(
1068
1093
  () => e.disabled,
1069
- (m) => {
1070
- m || F();
1094
+ (h) => {
1095
+ h || M();
1071
1096
  },
1072
1097
  { immediate: !0 }
1073
- ), C(
1074
- () => a.value,
1075
- (m) => {
1076
- m ? J() : W();
1098
+ ), I(
1099
+ () => l.value,
1100
+ (h) => {
1101
+ h ? ne() : X();
1077
1102
  },
1078
1103
  { immediate: !0 }
1079
- ), (m, q) => (r(), f(O, null, [
1080
- x(m.$slots, "trigger", { open: a.value }),
1081
- a.value || s.animating ? (r(), $(De, {
1104
+ ), (h, T) => (r(), f(F, null, [
1105
+ q(h.$slots, "trigger", { open: l.value }),
1106
+ l.value || a.animating ? (r(), k(Ce, {
1082
1107
  key: 0,
1083
1108
  disabled: !e.attach,
1084
1109
  to: e.attach
1085
1110
  }, [
1086
- H(Te, {
1111
+ J(ze, {
1087
1112
  name: e.transition,
1088
1113
  appear: "",
1089
- onEnter: q[0] || (q[0] = (u) => n("enter")),
1090
- onLeave: Q
1114
+ onEnter: T[0] || (T[0] = (H) => n("enter")),
1115
+ onLeave: O
1091
1116
  }, {
1092
- default: T(() => [
1093
- a.value ? (r(), f("div", {
1117
+ default: D(() => [
1118
+ l.value ? (r(), f("div", {
1094
1119
  key: 0,
1095
- class: V(o.value),
1096
- style: K(l.value)
1120
+ class: Q(o.value),
1121
+ style: Y(s.value)
1097
1122
  }, [
1098
- N("div", {
1099
- class: V(["q-overlay__content"]),
1123
+ V("div", {
1124
+ class: Q(["q-overlay__content"]),
1100
1125
  ref_key: "overlay",
1101
- ref: c
1126
+ ref: d
1102
1127
  }, [
1103
- e.arrow ? (r(), f("div", Qt)) : b("", !0),
1104
- x(m.$slots, "default")
1128
+ e.arrow ? (r(), f("div", Nt)) : g("", !0),
1129
+ q(h.$slots, "default")
1105
1130
  ], 512)
1106
- ], 6)) : b("", !0)
1131
+ ], 6)) : g("", !0)
1107
1132
  ]),
1108
1133
  _: 3
1109
1134
  }, 8, ["name"])
1110
- ], 8, ["disabled", "to"])) : b("", !0)
1135
+ ], 8, ["disabled", "to"])) : g("", !0)
1111
1136
  ], 64));
1112
1137
  }
1113
- }), ae = w(Ot), Ft = {
1138
+ }), de = $(Kt), Wt = {
1114
1139
  key: 0,
1115
1140
  class: "q-popover__header"
1116
- }, Mt = {
1141
+ }, Gt = {
1117
1142
  key: 1,
1118
1143
  class: "q-popover__body"
1119
- }, Rt = ["innerHTML"], Ht = { key: 1 }, Ut = /* @__PURE__ */ k({
1144
+ }, Yt = ["innerHTML"], Xt = { key: 1 }, Zt = /* @__PURE__ */ w({
1120
1145
  inheritAttrs: !1,
1121
1146
  __name: "QPopover",
1122
1147
  props: {
@@ -1133,7 +1158,7 @@ const Qt = {
1133
1158
  },
1134
1159
  setup(t) {
1135
1160
  const n = t;
1136
- return (e, o) => (r(), $(g(ae), {
1161
+ return (e, o) => (r(), k(b(de), {
1137
1162
  "model-value": n.modelValue,
1138
1163
  trigger: "click",
1139
1164
  anchor: n.anchor,
@@ -1144,233 +1169,296 @@ const Qt = {
1144
1169
  placement: n.placement,
1145
1170
  spy: n.spy
1146
1171
  }, {
1147
- default: T(() => [
1148
- n.title || e.$slots.header ? (r(), f("h3", Ft, [
1149
- X(A(n.title) + " ", 1),
1150
- x(e.$slots, "header")
1151
- ])) : b("", !0),
1152
- n.text || e.$slots.body ? (r(), f("div", Mt, [
1172
+ default: D(() => [
1173
+ n.title || e.$slots.header ? (r(), f("h3", Wt, [
1174
+ P(C(n.title) + " ", 1),
1175
+ q(e.$slots, "header")
1176
+ ])) : g("", !0),
1177
+ n.text || e.$slots.body ? (r(), f("div", Gt, [
1153
1178
  n.html ? (r(), f("span", {
1154
1179
  key: 0,
1155
1180
  innerHTML: n.text
1156
- }, null, 8, Rt)) : (r(), f("span", Ht, A(n.text), 1)),
1157
- x(e.$slots, "body")
1158
- ])) : b("", !0)
1181
+ }, null, 8, Yt)) : (r(), f("span", Xt, C(n.text), 1)),
1182
+ q(e.$slots, "body")
1183
+ ])) : g("", !0)
1159
1184
  ]),
1160
1185
  _: 3
1161
1186
  }, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement", "spy"]));
1162
1187
  }
1163
- }), an = w(Ut);
1164
- function Nt() {
1165
- const t = Ee(), n = {};
1188
+ }), hn = $(Zt);
1189
+ function jt() {
1190
+ const t = Ae(), n = {};
1166
1191
  return typeof t.class == "string" ? n.class = t.class.split(" ") : Array.isArray(t.class) ? n.class = t.class : n.class = [], n;
1167
1192
  }
1168
- const Kt = {
1169
- mounted(t, n) {
1170
- t.clickOutsideEvent = function(e) {
1171
- const o = e.target;
1172
- n.arg ? t === o || t.contains(o) || o.closest(n.arg) || n.value(e, t) : t === o || t.contains(o) || n.value(e, t);
1173
- }, document.addEventListener("click", t.clickOutsideEvent);
1174
- },
1175
- unmounted(t) {
1176
- document.removeEventListener("click", t.clickOutsideEvent);
1177
- }
1178
- }, Wt = {
1193
+ const Jt = {
1179
1194
  key: 0,
1180
1195
  class: "q-select__value"
1181
- }, Gt = {
1196
+ }, Pt = {
1182
1197
  key: 1,
1183
1198
  class: "q-select__placeholder"
1184
- }, Yt = {
1199
+ }, en = ["onKeydown"], tn = {
1185
1200
  placeholder: "Choose..."
1186
- }, Xt = {
1201
+ }, nn = {
1187
1202
  chevron: {
1188
1203
  icon: "chevron-down"
1189
1204
  },
1190
1205
  clear: {
1191
1206
  icon: "close"
1192
1207
  }
1193
- }, Zt = /* @__PURE__ */ k({
1208
+ }, on = /* @__PURE__ */ w({
1194
1209
  inheritAttrs: !1,
1195
1210
  __name: "QSelect",
1196
1211
  props: {
1197
1212
  modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
1213
+ id: { default: () => te() },
1214
+ label: { default: "" },
1198
1215
  clearable: { type: Boolean, default: !1 },
1199
1216
  readonly: { type: Boolean },
1200
1217
  disabled: { type: Boolean, default: !1 },
1218
+ required: { type: Boolean, default: !1 },
1201
1219
  loading: { type: Boolean, default: !1 },
1202
- icons: { default: () => Xt },
1220
+ icons: { default: () => nn },
1203
1221
  items: {},
1204
1222
  groups: { default: () => [] },
1205
1223
  itemValue: { default: "key" },
1206
1224
  itemLabel: { default: "label" },
1207
1225
  size: { default: "medium" },
1208
- texts: { default: () => Yt }
1226
+ texts: { default: () => tn }
1209
1227
  },
1210
1228
  emits: ["update:modelValue", "before-show", "before-hide", "show", "hide"],
1211
1229
  setup(t, { emit: n }) {
1212
- const e = t, o = Nt(), s = I(e.modelValue), a = I(!1), l = I(""), c = I(null), i = I(null), h = I(null), _ = v(
1230
+ const e = t, o = jt(), a = B(e.modelValue), l = B(!1), s = B(""), d = B(null), i = B(null), p = B(null), S = y(
1213
1231
  () => {
1214
- var u;
1215
- return (u = e.items) == null ? void 0 : u.find((B) => B[e.itemValue] === s.value);
1232
+ var c;
1233
+ return (c = e.items) == null ? void 0 : c.find((_) => _[e.itemValue] === a.value);
1216
1234
  }
1217
- ), p = v(
1218
- () => _.value ? _.value[e.itemLabel] : ""
1219
- ), D = v(
1235
+ ), m = y(
1236
+ () => S.value ? S.value[e.itemLabel] : ""
1237
+ ), E = y(
1220
1238
  () => e.clearable && !e.readonly && !e.disabled && !e.loading
1221
1239
  );
1222
- function z(u) {
1223
- s.value = u, n("update:modelValue", u), S();
1240
+ function A(c) {
1241
+ a.value = c, n("update:modelValue", c), x();
1224
1242
  }
1225
- function Q() {
1226
- D.value && z(void 0);
1243
+ function O() {
1244
+ E.value && A(void 0);
1227
1245
  }
1228
- function E() {
1229
- e.readonly || e.disabled || (a.value ? S() : d());
1246
+ function z() {
1247
+ e.readonly || e.disabled || (l.value ? x() : u());
1230
1248
  }
1231
- function F(u) {
1232
- var B;
1233
- (B = c.value) != null && B.$el.contains(u.target) || S();
1249
+ function M(c) {
1250
+ var _, R, U;
1251
+ !((_ = p.value) != null && _.contains(c.relatedTarget)) && !((U = (R = d.value) == null ? void 0 : R.fieldRef) != null && U.contains(c.relatedTarget)) && x();
1234
1252
  }
1235
- function d() {
1236
- a.value || (n("before-show"), a.value = !0);
1253
+ function u() {
1254
+ l.value || (n("before-show"), l.value = !0);
1237
1255
  }
1238
- function S() {
1239
- a.value && (n("before-hide"), a.value = !1);
1256
+ function x() {
1257
+ l.value && (n("before-hide"), l.value = !1);
1240
1258
  }
1241
- let y;
1242
- function L(u) {
1243
- if (!(!u.key || e.readonly || e.disabled)) {
1244
- if (window.clearTimeout(y), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(u.key) && (u.preventDefault(), u.stopPropagation()), ["Enter", " "].includes(u.key) && (a.value = !0), ["Escape", "Tab"].includes(u.key) && (a.value ? a.value = !1 : e.clearable && u.key === "Escape" && Q()), u.key === "Delete" && e.clearable && Q(), /^[a-z]$/i.test(u.key)) {
1245
- l.value += u.key.toLowerCase();
1246
- for (let B = 0; B < e.items.length; B++)
1247
- if (e.items[B][e.itemLabel].toLowerCase().startsWith(l.value)) {
1248
- q(B);
1259
+ let v;
1260
+ function L(c) {
1261
+ if (!(!c.key || e.readonly || e.disabled)) {
1262
+ if (window.clearTimeout(v), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(c.key) && (c.preventDefault(), c.stopPropagation()), ["Enter", " "].includes(c.key) && (l.value = !0), ["Escape", "Tab"].includes(c.key) && (l.value ? l.value = !1 : e.clearable && c.key === "Escape" && O()), c.key === "Delete" && e.clearable && O(), /^[a-z]$/i.test(c.key)) {
1263
+ s.value += c.key.toLowerCase();
1264
+ for (let _ = 0; _ < e.items.length; _++)
1265
+ if (e.items[_][e.itemLabel].toLowerCase().startsWith(s.value)) {
1266
+ H(_);
1249
1267
  break;
1250
1268
  }
1251
1269
  }
1252
- y = window.setTimeout(function() {
1253
- l.value = "";
1270
+ v = window.setTimeout(function() {
1271
+ s.value = "";
1254
1272
  }, 500);
1255
1273
  }
1256
1274
  }
1257
- function J() {
1258
- var u;
1259
- (u = i.value) == null || u.$el.focus(), n("show");
1275
+ function ne() {
1276
+ var c;
1277
+ e.loading ? (c = p.value) == null || c.focus() : T(), n("show");
1260
1278
  }
1261
- function W() {
1262
- m(), n("hide");
1279
+ function X() {
1280
+ h(), n("hide");
1263
1281
  }
1264
- function m() {
1265
- var u;
1266
- (u = c.value) == null || u.$el.focus();
1282
+ function h() {
1283
+ var c, _;
1284
+ (_ = (c = d.value) == null ? void 0 : c.fieldRef) == null || _.focus();
1267
1285
  }
1268
- function q(u) {
1269
- var B;
1270
- (B = i.value) == null || B.focusItem(u);
1286
+ function T() {
1287
+ var c;
1288
+ (c = i.value) == null || c.$el.focus();
1271
1289
  }
1272
- return C(
1290
+ function H(c) {
1291
+ var _;
1292
+ (_ = i.value) == null || _.focusItem(c);
1293
+ }
1294
+ return I(
1273
1295
  () => e.modelValue,
1274
- (u) => {
1275
- s.value = u;
1296
+ (c) => {
1297
+ a.value = c;
1276
1298
  }
1277
- ), (u, B) => {
1278
- var P, le;
1279
- return r(), f(O, null, [
1280
- H(g(yt), {
1281
- ref_key: "inputRef",
1282
- ref: c,
1299
+ ), I(
1300
+ () => e.loading,
1301
+ (c) => {
1302
+ !c && l.value && se(T);
1303
+ }
1304
+ ), (c, _) => {
1305
+ var R, U, ce;
1306
+ return r(), f(F, null, [
1307
+ J(b(Le), {
1308
+ id: e.id,
1309
+ label: e.label,
1310
+ required: e.required,
1311
+ ref_key: "triggerEl",
1312
+ ref: d,
1283
1313
  role: "combobox",
1284
1314
  tabindex: "0",
1285
- class: V([
1315
+ class: Q([
1286
1316
  "q-select",
1287
1317
  {
1288
1318
  "q-select--readonly": e.readonly,
1289
1319
  "q-select--disabled": e.disabled,
1290
- "q-select--expanded": a.value
1320
+ "q-select--expanded": l.value
1291
1321
  },
1292
- ...g(o).class
1322
+ ...b(o).class
1293
1323
  ]),
1294
- readonly: "",
1324
+ readonly: e.readonly,
1295
1325
  disabled: e.disabled,
1296
- "aria-expanded": a.value,
1326
+ "aria-expanded": l.value,
1297
1327
  "aria-haspopup": "listbox",
1298
1328
  size: e.size,
1299
- onClick: E,
1300
- onKeydown: R(L, ["stop"])
1301
- }, Ce({
1302
- append: T(() => [
1303
- D.value && s.value ? (r(), $(g(U), Z({ key: 0 }, e.icons.clear, {
1329
+ onClick: z,
1330
+ onKeydown: K(L, ["stop"])
1331
+ }, Qe({
1332
+ append: D(() => [
1333
+ E.value && a.value ? (r(), k(b(W), G({ key: 0 }, e.icons.clear, {
1304
1334
  class: "q-select__clear",
1305
- onClick: R(Q, ["stop", "prevent"])
1306
- }), null, 16, ["onClick"])) : b("", !0),
1307
- !e.readonly && !e.disabled ? (r(), $(g(U), Z({ key: 1 }, e.icons.chevron, { class: "q-select__chevron" }), null, 16)) : b("", !0)
1335
+ onClick: K(O, ["stop", "prevent"])
1336
+ }), null, 16, ["onClick"])) : g("", !0),
1337
+ !e.readonly && !e.disabled ? (r(), k(b(W), G({ key: 1 }, e.icons.chevron, { class: "q-select__chevron" }), null, 16)) : g("", !0)
1308
1338
  ]),
1309
- default: T(() => [
1310
- s.value ? (r(), f("span", Wt, A(p.value), 1)) : (r(), f("span", Gt, A(u.texts.placeholder), 1))
1339
+ default: D(() => [
1340
+ a.value ? (r(), f("span", Jt, C(m.value), 1)) : (r(), f("span", Pt, C(c.texts.placeholder), 1))
1311
1341
  ]),
1312
1342
  _: 2
1313
1343
  }, [
1314
- (P = _.value) != null && P.icon ? {
1344
+ (R = S.value) != null && R.icon ? {
1315
1345
  name: "prepend",
1316
- fn: T(() => {
1317
- var G;
1346
+ fn: D(() => {
1347
+ var Z;
1318
1348
  return [
1319
- H(g(U), ge(Ve((G = _.value) == null ? void 0 : G.icon)), null, 16)
1349
+ J(b(W), ke(Fe((Z = S.value) == null ? void 0 : Z.icon)), null, 16)
1320
1350
  ];
1321
1351
  }),
1322
1352
  key: "0"
1323
1353
  } : void 0
1324
- ]), 1032, ["class", "disabled", "aria-expanded", "size", "onKeydown"]),
1325
- H(g(ae), {
1326
- "model-value": a.value,
1354
+ ]), 1032, ["id", "label", "required", "class", "readonly", "disabled", "aria-expanded", "size", "onKeydown"]),
1355
+ (U = d.value) != null && U.fieldRef ? (r(), k(b(de), {
1356
+ key: 0,
1357
+ "model-value": l.value,
1327
1358
  spy: "",
1328
1359
  trigger: "manual",
1329
1360
  placement: "bottom",
1330
1361
  width: "anchor",
1331
1362
  offset: 2,
1332
- anchor: (le = c.value) == null ? void 0 : le.$el,
1333
- onEnter: J,
1334
- onLeave: W
1363
+ anchor: (ce = d.value) == null ? void 0 : ce.fieldRef,
1364
+ onEnter: ne,
1365
+ onLeave: X
1335
1366
  }, {
1336
- default: T(() => [
1337
- Ae((r(), f("div", {
1367
+ default: D(() => [
1368
+ V("div", {
1338
1369
  ref_key: "contentRef",
1339
- ref: h,
1340
- class: "q-select__body"
1370
+ ref: p,
1371
+ class: "q-select__body",
1372
+ tabindex: "-1",
1373
+ onFocusout: M,
1374
+ onKeydown: K(L, ["stop"])
1341
1375
  }, [
1342
- x(u.$slots, "body.prepend"),
1343
- e.loading ? (r(), $(g(Se), {
1376
+ q(c.$slots, "body.prepend"),
1377
+ e.loading ? (r(), k(b(Be), {
1344
1378
  key: 0,
1345
1379
  class: "q-select__loader",
1346
1380
  size: 24
1347
- })) : (r(), $(g(Et), {
1381
+ })) : (r(), k(b(Ot), {
1348
1382
  key: 1,
1349
1383
  ref_key: "listRef",
1350
1384
  ref: i,
1351
1385
  class: "q-select__items",
1352
- modelValue: s.value,
1386
+ modelValue: a.value,
1353
1387
  "onUpdate:modelValue": [
1354
- B[0] || (B[0] = (G) => s.value = G),
1355
- z
1388
+ _[0] || (_[0] = (Z) => a.value = Z),
1389
+ A
1356
1390
  ],
1357
1391
  items: e.items,
1358
- groups: u.groups,
1392
+ groups: c.groups,
1359
1393
  "item-label": e.itemLabel,
1360
- "item-value": e.itemValue,
1361
- onKeydown: R(L, ["stop"])
1362
- }, null, 8, ["modelValue", "items", "groups", "item-label", "item-value", "onKeydown"])),
1363
- x(u.$slots, "body.append")
1364
- ])), [
1365
- [g(Kt), F]
1366
- ])
1394
+ "item-value": e.itemValue
1395
+ }, null, 8, ["modelValue", "items", "groups", "item-label", "item-value"])),
1396
+ q(c.$slots, "body.append")
1397
+ ], 40, en)
1367
1398
  ]),
1368
1399
  _: 3
1369
- }, 8, ["model-value", "anchor"])
1400
+ }, 8, ["model-value", "anchor"])) : g("", !0)
1370
1401
  ], 64);
1371
1402
  };
1372
1403
  }
1373
- }), ln = w(Zt), jt = ["innerHTML"], Jt = { key: 1 }, Pt = /* @__PURE__ */ k({
1404
+ }), yn = $(on), an = ["required", "placeholder", "readonly", "disabled", "maxlength"], ln = /* @__PURE__ */ w({
1405
+ __name: "QTextField",
1406
+ props: {
1407
+ modelValue: { default: "" },
1408
+ id: { default: () => te() },
1409
+ placeholder: { default: "" },
1410
+ label: { default: "" },
1411
+ size: { default: "medium" },
1412
+ maxLength: { default: void 0 },
1413
+ readonly: { type: Boolean, default: !1 },
1414
+ disabled: { type: Boolean, default: !1 },
1415
+ required: { type: Boolean, default: !1 }
1416
+ },
1417
+ emits: ["update:modelValue"],
1418
+ setup(t, { emit: n }) {
1419
+ const e = t, o = B(e.modelValue), a = y({
1420
+ get() {
1421
+ return o.value;
1422
+ },
1423
+ set(l) {
1424
+ o.value = l, n("update:modelValue", l);
1425
+ }
1426
+ });
1427
+ return I(
1428
+ () => e.modelValue,
1429
+ (l) => o.value = l
1430
+ ), (l, s) => (r(), k(b(Le), {
1431
+ class: "q-text-field",
1432
+ id: l.id,
1433
+ label: e.label,
1434
+ size: e.size,
1435
+ readonly: e.readonly,
1436
+ disabled: e.disabled,
1437
+ required: e.required
1438
+ }, {
1439
+ default: D(() => [
1440
+ Oe(V("input", {
1441
+ "onUpdate:modelValue": s[0] || (s[0] = (d) => a.value = d),
1442
+ class: "q-text-field__input",
1443
+ type: "text",
1444
+ required: e.required,
1445
+ placeholder: e.placeholder,
1446
+ readonly: e.readonly,
1447
+ disabled: e.disabled,
1448
+ maxlength: e.maxLength
1449
+ }, null, 8, an), [
1450
+ [
1451
+ Re,
1452
+ a.value,
1453
+ void 0,
1454
+ { lazy: !0 }
1455
+ ]
1456
+ ])
1457
+ ]),
1458
+ _: 1
1459
+ }, 8, ["id", "label", "size", "readonly", "disabled", "required"]));
1460
+ }
1461
+ }), vn = $(ln), sn = ["innerHTML"], rn = { key: 1 }, dn = /* @__PURE__ */ w({
1374
1462
  inheritAttrs: !1,
1375
1463
  __name: "QTooltip",
1376
1464
  props: {
@@ -1388,7 +1476,7 @@ const Kt = {
1388
1476
  },
1389
1477
  setup(t) {
1390
1478
  const n = t;
1391
- return (e, o) => (r(), $(g(ae), {
1479
+ return (e, o) => (r(), k(b(de), {
1392
1480
  "model-value": n.modelValue,
1393
1481
  anchor: n.anchor,
1394
1482
  appearance: n.appearance,
@@ -1400,38 +1488,49 @@ const Kt = {
1400
1488
  placement: n.placement,
1401
1489
  trigger: n.trigger
1402
1490
  }, {
1403
- default: T(() => [
1491
+ default: D(() => [
1404
1492
  n.html ? (r(), f("span", {
1405
1493
  key: 0,
1406
1494
  innerHTML: n.text
1407
- }, null, 8, jt)) : (r(), f("span", Jt, A(n.text), 1))
1495
+ }, null, 8, sn)) : (r(), f("span", rn, C(n.text), 1))
1408
1496
  ]),
1409
1497
  _: 1
1410
1498
  }, 8, ["model-value", "anchor", "appearance", "arrow", "attach", "delay", "disabled", "placement", "trigger"]));
1411
1499
  }
1412
- }), rn = w(Pt);
1500
+ }), bn = $(dn), gn = {
1501
+ mounted(t, n) {
1502
+ t.clickOutsideEvent = function(e) {
1503
+ const o = e.target;
1504
+ n.arg ? t === o || t.contains(o) || o.closest(n.arg) || n.value(e, t) : t === o || t.contains(o) || n.value(e, t);
1505
+ }, document.addEventListener("click", t.clickOutsideEvent);
1506
+ },
1507
+ unmounted(t) {
1508
+ document.removeEventListener("click", t.clickOutsideEvent);
1509
+ }
1510
+ };
1413
1511
  export {
1414
- Je as QButton,
1415
- et as QButtonGroup,
1416
- on as QButtonToggle,
1417
- U as QIcon,
1418
- ut as QIconFont,
1419
- dt as QIconImg,
1420
- ft as QIconSvg,
1421
- yt as QInput,
1422
- sn as QLineLoader,
1423
- Et as QList,
1424
- Ct as QListItem,
1425
- Vt as QListItemGroup,
1426
- ae as QOverlay,
1427
- an as QPopover,
1428
- ln as QSelect,
1429
- Se as QSpinnerLoader,
1430
- rn as QTooltip,
1431
- Kt as clickOutside,
1432
- nn as createFramework,
1433
- Oe as defaultDarkColorScheme,
1434
- ue as defaultLightColorScheme,
1435
- tn as useTheme
1512
+ ot as QButton,
1513
+ lt as QButtonGroup,
1514
+ pn as QButtonToggle,
1515
+ Le as QField,
1516
+ W as QIcon,
1517
+ $t as QIconFont,
1518
+ St as QIconImg,
1519
+ qt as QIconSvg,
1520
+ mn as QLineLoader,
1521
+ Ot as QList,
1522
+ Rt as QListItem,
1523
+ Mt as QListItemGroup,
1524
+ de as QOverlay,
1525
+ hn as QPopover,
1526
+ yn as QSelect,
1527
+ Be as QSpinnerLoader,
1528
+ vn as QTextField,
1529
+ bn as QTooltip,
1530
+ gn as clickOutside,
1531
+ fn as createFramework,
1532
+ Ue as defaultDarkColorScheme,
1533
+ pe as defaultLightColorScheme,
1534
+ un as useTheme
1436
1535
  };
1437
1536
  //# sourceMappingURL=ui.esm.js.map