@jblehm/super-list 1.0.26 → 1.0.27

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as Z, ref as f, computed as O, createElementBlock as M, openBlock as I, normalizeClass as R, withKeys as m, createElementVNode as S, useTemplateRef as Ee, watch as F, Fragment as ce, createCommentVNode as $, renderList as Ae, withModifiers as oe, createBlock as fe, toDisplayString as me, useCssVars as Fe, onMounted as Le, onUnmounted as Ne, renderSlot as xe, createVNode as Q, nextTick as Se, resolveDynamicComponent as Be, withCtx as be } from "vue";
1
+ import { defineComponent as Y, ref as f, computed as O, createElementBlock as M, openBlock as D, normalizeClass as R, withKeys as b, createElementVNode as N, useTemplateRef as Ee, watch as F, Fragment as ce, createCommentVNode as $, renderList as Ae, withModifiers as oe, createBlock as fe, toDisplayString as me, useCssVars as Fe, onMounted as Le, onUnmounted as Se, renderSlot as xe, createVNode as Z, nextTick as Ne, resolveDynamicComponent as Be, withCtx as be } from "vue";
2
2
  import './index.css';class He {
3
3
  eventsTypes = ["resize", "load", "scroll", "wheel", "touchmove"];
4
4
  config = {
@@ -79,7 +79,7 @@ class qe {
79
79
  return this.abort("New Request From Controller."), this.setFunc(i), this.setThen(a), this.execute();
80
80
  }
81
81
  }
82
- const je = ["tabindex", "placeholder", "size"], $e = /* @__PURE__ */ Z({
82
+ const je = ["tabindex", "placeholder", "size"], $e = /* @__PURE__ */ Y({
83
83
  __name: "ListTextInput",
84
84
  props: {
85
85
  enableTextFilter: {
@@ -110,42 +110,42 @@ const je = ["tabindex", "placeholder", "size"], $e = /* @__PURE__ */ Z({
110
110
  },
111
111
  setup(e, { expose: i, emit: a }) {
112
112
  const v = a, o = e, d = f(null);
113
- function w() {
114
- o.parentMethods.openList();
113
+ function w(h) {
114
+ "sourceCapabilities" in h && h.sourceCapabilities == null ? o.parentMethods.closeList() : o.parentMethods.openList();
115
115
  }
116
- function t(y) {
117
- o.parentMethods.unfocus(y);
116
+ function t(h) {
117
+ o.parentMethods.unfocus(h);
118
118
  }
119
- function s(y) {
120
- y?.target?.value != null && v("update:query", y.target.value);
119
+ function s(h) {
120
+ h?.target?.value != null && v("update:query", h.target.value);
121
121
  }
122
122
  const c = O(() => {
123
- const y = d?.value ? d.value.length : 0, b = o.placeholder?.length || 0;
124
- return y > 0 ? y : b > 0 ? b : 5;
125
- }), l = O(() => o.enableButtonClick === !0 && o.enableTextFilter === !0 ? "" : "click-through"), g = O(() => o.showDropDown && !o.enableTextFilter || !o.showDropDown ? "dark-placeholder-text" : "light-placeholder-text");
123
+ const h = d?.value ? d.value.length : 0, g = o.placeholder?.length || 0;
124
+ return h > 0 ? h : g > 0 ? g : 5;
125
+ }), l = O(() => o.enableButtonClick === !0 && o.enableTextFilter === !0 ? "" : "click-through"), y = O(() => o.showDropDown && !o.enableTextFilter || !o.showDropDown ? "dark-placeholder-text" : "light-placeholder-text");
126
126
  function k() {
127
127
  if (d?.value) {
128
- const y = d.value;
129
- y.blur(), y.value = "";
128
+ const h = d.value;
129
+ h.blur(), h.value = "";
130
130
  }
131
131
  }
132
- function D() {
132
+ function I() {
133
133
  d?.value && d.value.focus();
134
134
  }
135
- return i({ blurInput: k, focusInput: D, textInputRef: d }), (y, b) => (I(), M("input", {
135
+ return i({ blurInput: k, focusInput: I, textInputRef: d }), (h, g) => (D(), M("input", {
136
136
  ref_key: "textInputRef",
137
137
  ref: d,
138
138
  tabindex: e.enableTextFilter ? 0 : -1,
139
139
  onKeydown: [
140
- b[0] || (b[0] = m((h) => e.parentMethods.press(h), ["enter"])),
141
- b[1] || (b[1] = m((h) => e.parentMethods.press(), ["space"])),
142
- b[2] || (b[2] = m((h) => e.parentMethods.press(h), ["esc"])),
143
- b[3] || (b[3] = m((h) => e.parentMethods.press(h), ["up"])),
144
- b[4] || (b[4] = m((h) => e.parentMethods.press(h), ["down"]))
140
+ g[0] || (g[0] = b((m) => e.parentMethods.press(m), ["enter"])),
141
+ g[1] || (g[1] = b((m) => e.parentMethods.press(), ["space"])),
142
+ g[2] || (g[2] = b((m) => e.parentMethods.press(m), ["esc"])),
143
+ g[3] || (g[3] = b((m) => e.parentMethods.press(m), ["up"])),
144
+ g[4] || (g[4] = b((m) => e.parentMethods.press(m), ["down"]))
145
145
  ],
146
- onFocusin: b[5] || (b[5] = (h) => w()),
147
- onFocusout: b[6] || (b[6] = (h) => t(h)),
148
- onInput: b[7] || (b[7] = (h) => s(h)),
146
+ onFocusin: g[5] || (g[5] = (m) => w(m)),
147
+ onFocusout: g[6] || (g[6] = (m) => t(m)),
148
+ onInput: g[7] || (g[7] = (m) => s(m)),
149
149
  type: "text",
150
150
  "aria-autocomplete": "none",
151
151
  autocomplete: "off",
@@ -153,7 +153,7 @@ const je = ["tabindex", "placeholder", "size"], $e = /* @__PURE__ */ Z({
153
153
  size: c.value,
154
154
  class: R([[
155
155
  l.value,
156
- g.value,
156
+ y.value,
157
157
  { "text-filter-disabled": !e.enableTextFilter }
158
158
  ], "list-filter-text-input"])
159
159
  }, null, 42, je));
@@ -163,7 +163,7 @@ const je = ["tabindex", "placeholder", "size"], $e = /* @__PURE__ */ Z({
163
163
  for (const [v, o] of i)
164
164
  a[v] = o;
165
165
  return a;
166
- }, he = /* @__PURE__ */ K($e, [["__scopeId", "data-v-5cd54d87"]]), Ke = {}, Ve = {
166
+ }, he = /* @__PURE__ */ K($e, [["__scopeId", "data-v-acc7ac24"]]), Ke = {}, Ve = {
167
167
  xmlns: "http://www.w3.org/2000/svg",
168
168
  fill: "currentColor",
169
169
  "aria-hidden": "true",
@@ -171,14 +171,14 @@ const je = ["tabindex", "placeholder", "size"], $e = /* @__PURE__ */ Z({
171
171
  viewBox: "0 -16 16 17"
172
172
  };
173
173
  function ze(e, i) {
174
- return I(), M("svg", Ve, i[0] || (i[0] = [
175
- S("path", {
174
+ return D(), M("svg", Ve, i[0] || (i[0] = [
175
+ N("path", {
176
176
  "shape-rendering": "geometricPrecision",
177
177
  d: "M 6 -2.25 L 13.75 -14 A 0.5 0.5 90 0 1 15 -13 L 6.5 -0.5 A 2 1 90 0 1 5.5 -0.5 L 1 -6 A 0.5 0.5 90 0 1 2.25 -7 Z"
178
178
  }, null, -1)
179
179
  ]));
180
180
  }
181
- const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = { class: "list-item-span" }, We = { class: "list-item-span" }, Qe = /* @__PURE__ */ Z({
181
+ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = { class: "list-item-span" }, We = { class: "list-item-span" }, Qe = /* @__PURE__ */ Y({
182
182
  __name: "ListItem",
183
183
  props: {
184
184
  mouseHoveringOnList: {
@@ -239,19 +239,19 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
239
239
  const s = w.offsetTop - t.scrollTop < 0, c = w.offsetTop + w.offsetHeight - t.scrollTop > t.clientHeight;
240
240
  s && (t.scrollTop = w.offsetTop), c && (t.scrollTop = w.offsetTop + w.clientHeight - t.clientHeight);
241
241
  }
242
- return (w, t) => (I(), M(ce, null, [
243
- (I(!0), M(ce, null, Ae(e.filteredListItems, (s, c) => (I(), M("li", {
242
+ return (w, t) => (D(), M(ce, null, [
243
+ (D(!0), M(ce, null, Ae(e.filteredListItems, (s, c) => (D(), M("li", {
244
244
  key: c,
245
245
  ref_for: !0,
246
246
  ref: "items",
247
247
  onKeyup: [
248
- t[0] || (t[0] = m((l) => e.parentMethods.press(l), ["enter"])),
249
- t[1] || (t[1] = m((l) => e.parentMethods.press(l), ["space"])),
250
- t[2] || (t[2] = m((l) => e.parentMethods.press(l), ["esc"]))
248
+ t[0] || (t[0] = b((l) => e.parentMethods.press(l), ["enter"])),
249
+ t[1] || (t[1] = b((l) => e.parentMethods.press(l), ["space"])),
250
+ t[2] || (t[2] = b((l) => e.parentMethods.press(l), ["esc"]))
251
251
  ],
252
252
  onKeydown: [
253
- t[3] || (t[3] = m((l) => e.parentMethods.press(l), ["up"])),
254
- t[4] || (t[4] = m((l) => e.parentMethods.press(l), ["down"]))
253
+ t[3] || (t[3] = b((l) => e.parentMethods.press(l), ["up"])),
254
+ t[4] || (t[4] = b((l) => e.parentMethods.press(l), ["down"]))
255
255
  ],
256
256
  onFocusout: t[5] || (t[5] = (l) => e.parentMethods.unfocus(l)),
257
257
  tabindex: "-1",
@@ -264,52 +264,52 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
264
264
  "list-option"
265
265
  ])
266
266
  }, [
267
- S("span", Je, me(e.parentMethods.getLabel(s)), 1),
268
- e.selectedIndex === c ? (I(), fe(Xe, {
267
+ N("span", Je, me(e.parentMethods.getLabel(s)), 1),
268
+ e.selectedIndex === c ? (D(), fe(Xe, {
269
269
  key: 0,
270
270
  class: "list-item-icon",
271
271
  "aria-hidden": "true"
272
272
  })) : $("", !0)
273
273
  ], 42, Ue))), 128)),
274
- e.filteredListItems.length === 0 ? (I(), M("li", {
274
+ e.filteredListItems.length === 0 ? (D(), M("li", {
275
275
  key: 0,
276
276
  onKeyup: [
277
- t[6] || (t[6] = m((s) => e.parentMethods.press(s), ["enter"])),
278
- t[7] || (t[7] = m((s) => e.parentMethods.press(s), ["space"])),
279
- t[8] || (t[8] = m((s) => e.parentMethods.press(s), ["esc"]))
277
+ t[6] || (t[6] = b((s) => e.parentMethods.press(s), ["enter"])),
278
+ t[7] || (t[7] = b((s) => e.parentMethods.press(s), ["space"])),
279
+ t[8] || (t[8] = b((s) => e.parentMethods.press(s), ["esc"]))
280
280
  ],
281
281
  onKeydown: [
282
- t[9] || (t[9] = m((s) => e.parentMethods.press(s), ["up"])),
283
- t[10] || (t[10] = m((s) => e.parentMethods.press(s), ["down"]))
282
+ t[9] || (t[9] = b((s) => e.parentMethods.press(s), ["up"])),
283
+ t[10] || (t[10] = b((s) => e.parentMethods.press(s), ["down"]))
284
284
  ],
285
285
  onFocusout: t[11] || (t[11] = (s) => e.parentMethods.unfocus(s)),
286
286
  onMousedown: t[12] || (t[12] = oe((s) => e.parentMethods.closeList(s), ["left"])),
287
287
  tabindex: "-1",
288
288
  class: "list-option-message"
289
289
  }, t[20] || (t[20] = [
290
- S("span", { class: "list-item-span" }, "No Items To Display.", -1)
290
+ N("span", { class: "list-item-span" }, "No Items To Display.", -1)
291
291
  ]), 32)) : $("", !0),
292
- e.totalOptionsCount && e.totalOptionsCount > (e.filteredListItems?.length || 0) ? (I(), M("li", {
292
+ e.totalOptionsCount && e.totalOptionsCount > (e.filteredListItems?.length || 0) ? (D(), M("li", {
293
293
  key: 1,
294
294
  onKeyup: [
295
- t[13] || (t[13] = m((s) => e.parentMethods.press(s), ["enter"])),
296
- t[14] || (t[14] = m((s) => e.parentMethods.press(s), ["space"])),
297
- t[15] || (t[15] = m((s) => e.parentMethods.press(s), ["esc"]))
295
+ t[13] || (t[13] = b((s) => e.parentMethods.press(s), ["enter"])),
296
+ t[14] || (t[14] = b((s) => e.parentMethods.press(s), ["space"])),
297
+ t[15] || (t[15] = b((s) => e.parentMethods.press(s), ["esc"]))
298
298
  ],
299
299
  onKeydown: [
300
- t[16] || (t[16] = m((s) => e.parentMethods.press(s), ["up"])),
301
- t[17] || (t[17] = m((s) => e.parentMethods.press(s), ["down"]))
300
+ t[16] || (t[16] = b((s) => e.parentMethods.press(s), ["up"])),
301
+ t[17] || (t[17] = b((s) => e.parentMethods.press(s), ["down"]))
302
302
  ],
303
303
  onFocusout: t[18] || (t[18] = (s) => e.parentMethods.unfocus(s)),
304
304
  onMousedown: t[19] || (t[19] = oe((s) => e.parentMethods.closeList(s), ["left"])),
305
305
  tabindex: "-1",
306
306
  class: "list-option-message"
307
307
  }, [
308
- S("span", We, " +" + me(e.totalOptionsCount - e.filteredListItems?.length || 0) + " More Items...", 1)
308
+ N("span", We, " +" + me(e.totalOptionsCount - e.filteredListItems?.length || 0) + " More Items...", 1)
309
309
  ], 32)) : $("", !0)
310
310
  ], 64));
311
311
  }
312
- }), Ze = /* @__PURE__ */ K(Qe, [["__scopeId", "data-v-e4eeb2f7"]]), Ye = /* @__PURE__ */ Z({
312
+ }), Ze = /* @__PURE__ */ K(Qe, [["__scopeId", "data-v-e4eeb2f7"]]), Ye = /* @__PURE__ */ Y({
313
313
  __name: "ItemList",
314
314
  props: {
315
315
  mouseHoveringOnList: {
@@ -364,19 +364,19 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
364
364
  emits: ["reverseDropDownList"],
365
365
  setup(e, { expose: i, emit: a }) {
366
366
  Fe((r) => ({
367
- "583c4ee4": k.value,
368
- "19dae816": N.value,
369
- "19daebd7": se.value,
370
- "20dfddb8": q.value,
371
- "9ebd075e": Y.value
367
+ e88f8fc8: k.value,
368
+ "2e6c2d4e": S.value,
369
+ "2e6c310f": se.value,
370
+ "15572a20": q.value,
371
+ "167010ee": G.value
372
372
  }));
373
- const v = a, o = e, d = f(null), w = f(null), t = f(null), s = f(0), c = f(0), l = f(0), g = f(0), k = f("0px"), D = f(!1), y = f([]), b = f(0), h = O(() => !D.value || window?.innerHeight == null ? !1 : X() && le()), V = O(() => o.maxListHeightPX >= b.value);
373
+ const v = a, o = e, d = f(null), w = f(null), t = f(null), s = f(0), c = f(0), l = f(0), y = f(0), k = f("0px"), I = f(!1), h = f([]), g = f(0), m = O(() => !I.value || window?.innerHeight == null ? !1 : X() && le()), V = O(() => o.maxListHeightPX >= g.value);
374
374
  F(
375
- () => h.value,
375
+ () => m.value,
376
376
  (r) => v("reverseDropDownList", r),
377
377
  { immediate: !0 }
378
378
  );
379
- const N = O(() => s.value + "px"), se = O(() => g.value + "px");
379
+ const S = O(() => s.value + "px"), se = O(() => y.value + "px");
380
380
  i({ listContainerRef: t });
381
381
  const P = (r) => {
382
382
  r?.key && r.key === " " && r.preventDefault();
@@ -388,7 +388,7 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
388
388
  return w?.value ? (w?.value).clientHeight : 0;
389
389
  }
390
390
  function E() {
391
- if (!o.showDropDown || B() === 0) return o.maxListHeightPX;
391
+ if (!I.value || B() === 0) return o.maxListHeightPX;
392
392
  const r = B() === 0 ? o.maxListHeightPX : +B();
393
393
  return o.maxListHeightPX && o.maxListHeightPX > r ? r : o.maxListHeightPX;
394
394
  }
@@ -398,55 +398,55 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
398
398
  function le() {
399
399
  return l.value < E();
400
400
  }
401
- const Y = O(() => (o.maxListHeightPX || 0) + "px"), q = O(() => (o.listAnimationDurationMs || 0) + "ms"), G = O(() => o.blockListChange ? y.value : o.filteredListItems);
401
+ const G = O(() => (o.maxListHeightPX || 0) + "px"), q = O(() => (o.listAnimationDurationMs || 0) + "ms"), _ = O(() => o.blockListChange ? h.value : o.filteredListItems);
402
402
  F(
403
- () => G,
403
+ () => _,
404
404
  (r) => {
405
- r && (y.value = r.value);
405
+ r && (h.value = r.value);
406
406
  },
407
407
  { immediate: !1, deep: !0 }
408
408
  );
409
409
  let C = setTimeout(() => {
410
410
  }, 0), A = null;
411
411
  function j() {
412
- b.value = B(), clearTimeout(C), A && A.observe(), D.value = !0, z(void 0);
412
+ g.value = B(), clearTimeout(C), A && A.observe(), I.value = !0, z(void 0);
413
413
  }
414
414
  function re() {
415
415
  clearTimeout(C), C = setTimeout(() => {
416
- o.showDropDown || (D.value = !1, A && A.unobserve());
416
+ o.showDropDown || (I.value = !1, A && A.unobserve());
417
417
  }, o.listAnimationDurationMs + 50);
418
418
  }
419
419
  F(
420
420
  () => o.showDropDown,
421
421
  (r, L) => {
422
- r !== L && (r ? j() : re());
422
+ r !== L && (U(), r ? j() : re());
423
423
  },
424
424
  { immediate: !0 }
425
425
  );
426
426
  function z(r) {
427
- te(), Se(() => te()), _(r);
427
+ U(), Ne(() => U()), ee(r);
428
428
  }
429
- function _(r) {
430
- if (typeof t?.value?.contains != "function" || r?.target?.nodeType == null || ee(r)) return;
429
+ function ee(r) {
430
+ if (!o.enableScrollClose || !o.showDropDown || typeof t?.value?.contains != "function" || r?.target?.nodeType == null || te(r)) return;
431
431
  const x = ["scroll", "wheel", "touchmove"].includes(r?.type);
432
432
  o.showDropDown && x && o.parentMethods.closeList();
433
433
  }
434
- function ee(r) {
435
- const L = !!d.value?.contains(r?.target), x = !!t.value?.contains(r.target), W = [r?.srcElement?.id, r?.target?.id].includes("super-list-select-list");
436
- return L || x || W;
437
- }
438
- function te() {
439
- U(), J();
434
+ function te(r) {
435
+ const L = !!d.value?.contains(r?.target), x = !!t.value?.contains(r.target), Q = [r?.srcElement?.id, r?.target?.id].includes("super-list-select-list");
436
+ return L || x || Q;
440
437
  }
441
438
  function U() {
439
+ J(), W();
440
+ }
441
+ function J() {
442
442
  if (d?.value == null) return;
443
443
  const r = d.value.getBoundingClientRect();
444
444
  c.value = r.top, l.value = window.innerHeight - r.bottom, k.value = r.width + "px";
445
445
  }
446
- function J() {
446
+ function W() {
447
447
  if (d?.value == null || t?.value == null) return;
448
- const r = ne().getBoundingClientRect(), L = t.value.getBoundingClientRect(), x = g.value, W = s.value;
449
- h.value ? g.value = x - (r.top - L.bottom) : g.value = x - (L.top - r.bottom), s.value = W - (L.left - r.left);
448
+ const r = ne().getBoundingClientRect(), L = t.value.getBoundingClientRect(), x = y.value, Q = s.value;
449
+ m.value ? y.value = x - (r.top - L.bottom) : y.value = x - (L.top - r.bottom), s.value = Q - (L.left - r.left);
450
450
  }
451
451
  function ue() {
452
452
  return (d?.value).getElementsByTagName("button")[0];
@@ -456,17 +456,17 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
456
456
  }
457
457
  return Le(() => {
458
458
  A = new He(z, ue()), setTimeout(() => z(void 0), 250);
459
- }), Ne(() => {
459
+ }), Se(() => {
460
460
  A?.unobserve();
461
- }), (r, L) => (I(), M(ce, null, [
462
- S("div", {
461
+ }), (r, L) => (D(), M(ce, null, [
462
+ N("div", {
463
463
  ref_key: "dropDownButtonContainer",
464
464
  ref: d,
465
465
  class: "super-list-button-container"
466
466
  }, [
467
467
  xe(r.$slots, "default", {}, void 0, !0)
468
468
  ], 512),
469
- S("div", {
469
+ N("div", {
470
470
  id: "super-list-select-list",
471
471
  ref_key: "listContainerRef",
472
472
  ref: t,
@@ -474,27 +474,27 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
474
474
  tabindex: "-1",
475
475
  class: R([
476
476
  "select-list",
477
- h.value ? "list-reverse" : "list-normal",
477
+ m.value ? "list-reverse" : "list-normal",
478
478
  { "select-list-open": e.showDropDown },
479
- { "no-scroll": V.value && D.value },
480
- { "select-list-fixed": D.value },
479
+ { "no-scroll": V.value && I.value },
480
+ { "select-list-fixed": I.value },
481
481
  { "select-list-scrollable": !V.value }
482
482
  ]),
483
- onKeydown: L[1] || (L[1] = m((x) => P(x), ["space"])),
483
+ onKeydown: L[1] || (L[1] = b((x) => P(x), ["space"])),
484
484
  onMouseup: L[2] || (L[2] = oe((x) => ie(x), ["left"]))
485
485
  }, [
486
- S("ul", {
486
+ N("ul", {
487
487
  tabindex: "-1",
488
488
  ref_key: "dropDownListUL",
489
489
  ref: w,
490
490
  class: "list-content"
491
491
  }, [
492
- Q(Ze, {
493
- filteredListItems: y.value,
492
+ Z(Ze, {
493
+ filteredListItems: h.value,
494
494
  mouseHoveringOnList: e.mouseHoveringOnList,
495
495
  focusedIndex: e.focusedIndex,
496
496
  selectedIndex: e.selectedIndex,
497
- listElementOpenAndVisible: D.value,
497
+ listElementOpenAndVisible: I.value,
498
498
  "parent-methods": e.parentMethods,
499
499
  "show-drop-down": e.showDropDown,
500
500
  "total-options-count": e.totalOptionsCount
@@ -503,7 +503,7 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
503
503
  ], 34)
504
504
  ], 64));
505
505
  }
506
- }), ge = /* @__PURE__ */ K(Ye, [["__scopeId", "data-v-36d8d106"]]), Ge = {}, _e = {
506
+ }), ge = /* @__PURE__ */ K(Ye, [["__scopeId", "data-v-8cb5b4bd"]]), Ge = {}, _e = {
507
507
  xmlns: "http://www.w3.org/2000/svg",
508
508
  fill: "currentColor",
509
509
  "aria-hidden": "true",
@@ -511,8 +511,8 @@ const Xe = /* @__PURE__ */ K(Ke, [["render", ze]]), Ue = ["onMousedown"], Je = {
511
511
  viewBox: "0 0 12 6"
512
512
  };
513
513
  function et(e, i) {
514
- return I(), M("svg", _e, i[0] || (i[0] = [
515
- S("path", {
514
+ return D(), M("svg", _e, i[0] || (i[0] = [
515
+ N("path", {
516
516
  "shape-rendering": "geometricPrecision",
517
517
  d: "M 6 4 L 10 0.25 A 0.5 0.5 90 0 1 11 1.25 L 6.5 5.75 A 15 3 90 0 1 5.5 5.75 L 1 1.25 A 0.5 0.5 90 0 1 2 0.25 Z"
518
518
  }, null, -1)
@@ -521,7 +521,7 @@ function et(e, i) {
521
521
  const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
522
522
  key: 2,
523
523
  class: "list-button-icon custom-icon"
524
- }, ot = /* @__PURE__ */ Z({
524
+ }, ot = /* @__PURE__ */ Y({
525
525
  __name: "ListButton",
526
526
  props: {
527
527
  // eslint-disable-line
@@ -563,48 +563,48 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
563
563
  function s() {
564
564
  v?.value && v.value.focus();
565
565
  }
566
- return i({ blurInput: t, focusInput: s, buttonRef: v }), (c, l) => (I(), M("button", {
566
+ return i({ blurInput: t, focusInput: s, buttonRef: v }), (c, l) => (D(), M("button", {
567
567
  ref_key: "buttonRef",
568
568
  ref: v,
569
569
  tabindex: e.enableTextFilter ? -1 : 0,
570
570
  onKeydown: [
571
- l[0] || (l[0] = m((g) => d(g), ["enter"])),
572
- l[1] || (l[1] = m((g) => w(g), ["space"])),
573
- l[2] || (l[2] = m((g) => e.parentMethods.press(g), ["esc"])),
574
- l[3] || (l[3] = m((g) => e.parentMethods.press(g), ["up"])),
575
- l[4] || (l[4] = m((g) => e.parentMethods.press(g), ["down"]))
571
+ l[0] || (l[0] = b((y) => d(y), ["enter"])),
572
+ l[1] || (l[1] = b((y) => w(y), ["space"])),
573
+ l[2] || (l[2] = b((y) => e.parentMethods.press(y), ["esc"])),
574
+ l[3] || (l[3] = b((y) => e.parentMethods.press(y), ["up"])),
575
+ l[4] || (l[4] = b((y) => e.parentMethods.press(y), ["down"]))
576
576
  ],
577
- onFocusout: l[5] || (l[5] = (g) => e.parentMethods.unfocus(g)),
578
- onClick: l[6] || (l[6] = (g) => o()),
577
+ onFocusout: l[5] || (l[5] = (y) => e.parentMethods.unfocus(y)),
578
+ onClick: l[6] || (l[6] = (y) => o()),
579
579
  type: "button",
580
580
  class: R([[{ "click-through": a.enableTextFilter || a.showDropDown }], "list-button"])
581
581
  }, [
582
582
  xe(c.$slots, "default", {}, void 0, !0),
583
- S("span", {
583
+ N("span", {
584
584
  class: R(["list-button-icon-div", { "bigger-gap": a.showDropDown }])
585
585
  }, [
586
- e.customIcon ? $("", !0) : (I(), M("span", {
586
+ e.customIcon ? $("", !0) : (D(), M("span", {
587
587
  key: 0,
588
588
  class: R(["list-button-icon", [{ "rotate-180": !a.showDropDown }]])
589
589
  }, [
590
- Q(ye, { "aria-hidden": "true" })
590
+ Z(ye, { "aria-hidden": "true" })
591
591
  ], 2)),
592
- e.customIcon ? $("", !0) : (I(), M("span", {
592
+ e.customIcon ? $("", !0) : (D(), M("span", {
593
593
  key: 1,
594
594
  class: R(["list-button-icon", [{ "rotate-180": a.showDropDown }]])
595
595
  }, [
596
- e.customIcon == null ? (I(), fe(ye, {
596
+ e.customIcon == null ? (D(), fe(ye, {
597
597
  key: 0,
598
598
  "aria-hidden": "true"
599
599
  })) : $("", !0)
600
600
  ], 2)),
601
- e.customIcon ? (I(), M("span", nt, [
602
- (I(), fe(Be(e.customIcon), { "aria-hidden": "true" }))
601
+ e.customIcon ? (D(), M("span", nt, [
602
+ (D(), fe(Be(e.customIcon), { "aria-hidden": "true" }))
603
603
  ])) : $("", !0)
604
604
  ], 2)
605
605
  ], 42, tt));
606
606
  }
607
- }), we = /* @__PURE__ */ K(ot, [["__scopeId", "data-v-01ef8e37"]]), st = /* @__PURE__ */ Z({
607
+ }), we = /* @__PURE__ */ K(ot, [["__scopeId", "data-v-01ef8e37"]]), st = /* @__PURE__ */ Y({
608
608
  __name: "super-list",
609
609
  props: {
610
610
  selected: {
@@ -657,18 +657,18 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
657
657
  },
658
658
  emits: { "update:selected": null },
659
659
  setup(e, { expose: i, emit: a }) {
660
- const v = a, o = e, d = f([]), w = new qe(), t = f(0), s = O(() => o.forceTextFilterVisibilityTo != null ? o.forceTextFilterVisibilityTo : t.value > o.maxListOptions), c = f(!1), l = f(!1), g = f(!1), k = f(!0), D = f(!1), y = f(!1), b = f(ge), h = f(he), V = f(we), N = f("");
660
+ const v = a, o = e, d = f([]), w = new qe(), t = f(0), s = O(() => o.forceTextFilterVisibilityTo != null ? o.forceTextFilterVisibilityTo : t.value > o.maxListOptions), c = f(!1), l = f(!1), y = f(!1), k = f(!0), I = f(!1), h = f(!1), g = f(ge), m = f(he), V = f(we), S = f("");
661
661
  F(
662
- () => N.value,
662
+ () => S.value,
663
663
  (n, u) => {
664
664
  n !== u && typeof o.options == "function" && x(n);
665
665
  }
666
666
  );
667
667
  const se = () => {
668
- s.value && h?.value?.blurInput();
668
+ s.value && m?.value?.blurInput();
669
669
  }, P = () => {
670
- clearTimeout(J), se(), N.value = "", c.value = !1, k.value = !0;
671
- }, ie = O(() => y?.value === !0 ? "Error loading data" : D?.value === !0 ? "Loading..." : E(o.selected)), B = (n) => {
670
+ clearTimeout(W), se(), S.value = "", c.value = !1, k.value = !0;
671
+ }, ie = O(() => h?.value === !0 ? "Error loading data" : I?.value === !0 ? "Loading..." : E(o.selected)), B = (n) => {
672
672
  n && v("update:selected", n), P();
673
673
  }, E = (n) => Re(
674
674
  n,
@@ -677,18 +677,18 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
677
677
  o.enumKeyToLabelObjectArray
678
678
  );
679
679
  function X() {
680
- throw D.value = !0, y.value = !0, new Error("Invalid options argument provided to ListInputComponent");
680
+ throw I.value = !0, h.value = !0, new Error("Invalid options argument provided to ListInputComponent");
681
681
  }
682
682
  function le() {
683
- throw D.value = !0, y.value = !0, new Error("Invalid response provided to ListInputComponent, no total count key found");
683
+ throw I.value = !0, h.value = !0, new Error("Invalid response provided to ListInputComponent, no total count key found");
684
684
  }
685
- function Y() {
686
- throw D.value = !0, y.value = !0, new Error("Invalid objectLabelKeyName for provided Dropdown list value.");
685
+ function G() {
686
+ throw I.value = !0, h.value = !0, new Error("Invalid objectLabelKeyName for provided Dropdown list value.");
687
687
  }
688
688
  Le(() => {
689
689
  typeof o.options != "function" && !Array.isArray(o.options) ? X() : r();
690
690
  });
691
- const q = f(!1), G = f(0), C = f(0), A = f(0);
691
+ const q = f(!1), _ = f(0), C = f(0), A = f(0);
692
692
  F(
693
693
  () => C.value,
694
694
  (n, u) => {
@@ -704,7 +704,7 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
704
704
  );
705
705
  const j = O(() => {
706
706
  if (typeof o.options == "function" && !Array.isArray(o.options)) return d.value;
707
- const n = N.value, u = d.value;
707
+ const n = S.value, u = d.value;
708
708
  return n === "" ? u : u.filter((p) => E(p).toLowerCase().includes(n.toLowerCase()));
709
709
  });
710
710
  F(
@@ -717,10 +717,10 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
717
717
  const re = () => {
718
718
  q.value = !0;
719
719
  }, z = () => {
720
- const n = _();
721
- G.value = n, C.value = n > -1 ? n : 0;
720
+ const n = ee();
721
+ _.value = n, C.value = n > -1 ? n : 0;
722
722
  };
723
- function _() {
723
+ function ee() {
724
724
  if (o.selected == null) return -1;
725
725
  const n = d.value.map((p) => E(p)), u = n.filter((p) => p === E(o.selected));
726
726
  if (u.length > 1) {
@@ -733,46 +733,46 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
733
733
  }
734
734
  return n.indexOf(E(o.selected));
735
735
  }
736
- const ee = () => {
737
- D.value || (c.value || (l.value = !1, z(), te(), c.value = !0), q.value = !1, k.value = !1);
738
- }, te = () => {
739
- const n = window?.innerWidth != null && window.innerWidth < 640, u = screen?.width != null && screen.width < 640, p = h.value.textInputRef;
740
- (n || u) && s.value && (ue(), p?.scrollIntoView({ block: "start" }));
741
- }, U = f(!0);
742
- let J = setTimeout(() => {
736
+ const te = () => {
737
+ I.value || (c.value || (l.value = !1, z(), U(), c.value = !0), q.value = !1, k.value = !1);
738
+ }, U = () => {
739
+ const n = window?.innerWidth != null && window.innerWidth < 640, u = screen?.width != null && screen.width < 640, p = m.value.textInputRef;
740
+ (n || u) && s.value && (ue(), p?.scrollIntoView({ block: "start", inline: "center" }));
741
+ }, J = f(!0);
742
+ let W = setTimeout(() => {
743
743
  }, 0);
744
744
  function ue() {
745
- h.value.textInputRef && (clearTimeout(J), U.value = !1, J = setTimeout(() => {
746
- U.value = !0;
745
+ m.value.textInputRef && (clearTimeout(W), J.value = !1, W = setTimeout(() => {
746
+ J.value = !0;
747
747
  }, 300));
748
748
  }
749
749
  const ne = () => {
750
- s?.value == !0 ? h.value.focusInput() : V?.value?.focusInput && V?.value?.focusInput();
750
+ s?.value == !0 ? m.value.focusInput() : V?.value?.focusInput && V?.value?.focusInput();
751
751
  };
752
752
  async function r() {
753
- typeof o.options == "function" ? await x(N.value ? N.value : void 0, !0) : (ve(o.options), t.value = d.value.length), L();
753
+ typeof o.options == "function" ? await x(S.value ? S.value : void 0, !0) : (ve(o.options), t.value = d.value.length), L();
754
754
  }
755
755
  i({ initializeOptions: r, getLabel: E });
756
756
  function L() {
757
- _() == -1 && d.value && !!d.value[0] && B(d.value[0]);
757
+ ee() == -1 && d.value && !!d.value[0] && B(d.value[0]);
758
758
  }
759
759
  async function x(n, u = !0) {
760
- D.value = u;
760
+ I.value = u;
761
761
  const p = async () => o.options(o.maxListOptions, n || ""), T = (H) => {
762
- (!H || !("data" in H)) && X(), ve(H.data), W(H?.data?.length ?? 0).then(() => {
763
- D.value = !1;
762
+ (!H || !("data" in H)) && X(), ve(H.data), Q(H?.data?.length ?? 0).then(() => {
763
+ I.value = !1;
764
764
  });
765
765
  };
766
766
  await w.resetAndExecute(p, T);
767
767
  }
768
- async function W(n) {
768
+ async function Q(n) {
769
769
  const u = async () => o.options(1, ""), p = (T) => {
770
770
  (!T || !("totalNum" in T)) && le(), t.value = T.totalNum ?? n;
771
771
  };
772
772
  await w.resetAndExecute(u, p);
773
773
  }
774
- const pe = () => h?.value?.textInputRef?.getElementsByTagName("li")[C.value] ?? null, Ie = (n) => {
775
- c.value == !1 ? ee() : n && De(n);
774
+ const pe = () => m?.value?.textInputRef?.getElementsByTagName("li")[C.value] ?? null, Ie = (n) => {
775
+ c.value == !1 ? te() : n && De(n);
776
776
  }, De = (n) => {
777
777
  const u = n.key || n.code;
778
778
  (u === "Tab" || u === "Escape") && P(), u === "ArrowDown" && Oe(n), u === "ArrowUp" && Me(n), (u === "Enter" || u === " ") && Te(), n.preventDefault(), n.stopPropagation();
@@ -784,8 +784,8 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
784
784
  k.value = !0, C.value > 0 && (n.preventDefault(), q.value = !1, C.value--, pe()?.focus());
785
785
  }, Ce = (n) => {
786
786
  if (c?.value === !1) return;
787
- N.value.length > 0 && (l.value = !0);
788
- const u = b?.value?.listContainerRef, p = h?.value?.textInputRef, T = n?.relatedTarget && p?.isEqualNode(n?.relatedTarget), H = n?.relatedTarget && u && u.contains(n?.relatedTarget), de = n?.relatedTarget && u && u.isEqualNode(n?.relatedTarget);
787
+ S.value.length > 0 && (l.value = !0);
788
+ const u = g?.value?.listContainerRef, p = m?.value?.textInputRef, T = n?.relatedTarget && p?.isEqualNode(n?.relatedTarget), H = n?.relatedTarget && u && u.contains(n?.relatedTarget), de = n?.relatedTarget && u && u.isEqualNode(n?.relatedTarget);
789
789
  if (!(H || T)) {
790
790
  if (de) {
791
791
  ne();
@@ -798,13 +798,13 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
798
798
  Array.isArray(n) || X(), n.length > 0 && typeof n[0] == "object" && ke(n), d.value = n;
799
799
  }
800
800
  function ke(n) {
801
- (!o.objectLabelKeyName || o.objectLabelKeyName.length === 0) && Y();
801
+ (!o.objectLabelKeyName || o.objectLabelKeyName.length === 0) && G();
802
802
  const u = o.objectLabelKeyName;
803
803
  for (let p = 0; p < n.length; p++)
804
- (typeof n[p] != "object" || !(u in n[p])) && Y();
804
+ (typeof n[p] != "object" || !(u in n[p])) && G();
805
805
  }
806
806
  const ae = {
807
- openList: ee,
807
+ openList: te,
808
808
  unfocus: Ce,
809
809
  press: Ie,
810
810
  mouseOverList: re,
@@ -813,48 +813,48 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
813
813
  focusInput: ne,
814
814
  closeList: P
815
815
  };
816
- return (n, u) => (I(), M("div", {
816
+ return (n, u) => (D(), M("div", {
817
817
  style: { position: "relative" },
818
818
  class: R(n.$attrs.class)
819
819
  }, [
820
- Q(ge, {
820
+ Z(ge, {
821
821
  ref_key: "itemListRef",
822
- ref: b,
822
+ ref: g,
823
823
  "show-drop-down": c.value,
824
824
  filteredListItems: j.value,
825
825
  mouseHoveringOnList: q.value,
826
826
  focusedIndex: A.value,
827
- selectedIndex: G.value,
827
+ selectedIndex: _.value,
828
828
  "max-list-height-p-x": e.maxListHeightPX,
829
829
  "list-animation-duration-ms": e.listAnimationDurationMs,
830
830
  "parent-methods": ae,
831
831
  blockListChange: l.value,
832
832
  "onUpdate:blockListChange": u[1] || (u[1] = (p) => l.value = p),
833
833
  "total-options-count": t.value,
834
- onReverseDropDownList: u[2] || (u[2] = (p) => g.value = p),
835
- enableScrollClose: U.value,
834
+ onReverseDropDownList: u[2] || (u[2] = (p) => y.value = p),
835
+ enableScrollClose: J.value,
836
836
  "enable-text-filter": s.value
837
837
  }, {
838
838
  default: be(() => [
839
- Q(we, {
839
+ Z(we, {
840
840
  ref_key: "dropDownButtonInput",
841
841
  ref: V,
842
842
  "parent-methods": ae,
843
843
  "show-drop-down": c.value,
844
844
  "enable-text-filter": s.value,
845
845
  "custom-icon": e.customIcon,
846
- "reverse-drop-down-list": g.value
846
+ "reverse-drop-down-list": y.value
847
847
  }, {
848
848
  default: be(() => [
849
- Q(he, {
849
+ Z(he, {
850
850
  ref_key: "dropDownTextInput",
851
- ref: h,
851
+ ref: m,
852
852
  "enable-text-filter": s.value,
853
853
  "show-drop-down": c.value,
854
854
  placeholder: ie.value,
855
855
  "enable-button-click": k.value,
856
856
  "parent-methods": ae,
857
- "onUpdate:query": u[0] || (u[0] = (p) => N.value = p)
857
+ "onUpdate:query": u[0] || (u[0] = (p) => S.value = p)
858
858
  }, null, 8, ["enable-text-filter", "show-drop-down", "placeholder", "enable-button-click"])
859
859
  ]),
860
860
  _: 1
@@ -864,7 +864,7 @@ const ye = /* @__PURE__ */ K(Ge, [["render", et]]), tt = ["tabindex"], nt = {
864
864
  }, 8, ["show-drop-down", "filteredListItems", "mouseHoveringOnList", "focusedIndex", "selectedIndex", "max-list-height-p-x", "list-animation-duration-ms", "blockListChange", "total-options-count", "enableScrollClose", "enable-text-filter"])
865
865
  ], 2));
866
866
  }
867
- }), lt = /* @__PURE__ */ K(st, [["__scopeId", "data-v-e1f079fa"]]);
867
+ }), lt = /* @__PURE__ */ K(st, [["__scopeId", "data-v-a644fb2e"]]);
868
868
  export {
869
869
  lt as default
870
870
  };