@leaflink/stash 50.16.0 → 50.16.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/Select.js CHANGED
@@ -1,29 +1,29 @@
1
- import { defineComponent as Ce, useAttrs as Oe, useSlots as Ie, ref as c, computed as h, watch as U, nextTick as Y, onMounted as Me, onUnmounted as Fe, createBlock as V, openBlock as r, mergeProps as Re, unref as y, createSlots as $e, withCtx as k, createElementVNode as d, toDisplayString as g, withDirectives as M, createElementBlock as f, Fragment as K, renderList as G, withKeys as oe, normalizeClass as F, createCommentVNode as R, renderSlot as j, createTextVNode as $, withModifiers as P, createVNode as S, Teleport as Pe, Transition as ze, normalizeStyle as He, vModelText as Ne, vShow as J } from "vue";
2
- import { u as Ae, a as De, f as Le, o as Ue, s as Ve } from "./floating-ui.vue-pzUuloyX.js";
3
- import Ke from "@leaflink/snitch";
4
- import Ge from "lodash-es/debounce";
1
+ import { defineComponent as Oe, useAttrs as Ie, useSlots as Me, ref as c, computed as v, watch as U, nextTick as J, onMounted as Fe, onUnmounted as Re, createBlock as V, openBlock as r, mergeProps as $e, unref as y, createSlots as Pe, withCtx as k, createElementVNode as d, toDisplayString as _, withDirectives as M, createElementBlock as f, Fragment as K, renderList as G, withKeys as re, normalizeClass as F, createCommentVNode as R, renderSlot as q, createTextVNode as $, withModifiers as P, createVNode as S, Teleport as ze, Transition as He, normalizeStyle as Ne, vModelText as Ae, vShow as Q } from "vue";
2
+ import { u as De, a as Le, f as Ue, o as Ve, s as Ke } from "./floating-ui.vue-pzUuloyX.js";
3
+ import Ge from "@leaflink/snitch";
4
+ import qe from "lodash-es/debounce";
5
5
  import je from "lodash-es/isEmpty";
6
- import re from "lodash-es/isEqual";
7
- import qe from "lodash-es/isPlainObject";
8
- import We from "lodash-es/uniqueId";
9
- import Xe from "./useSearch.js";
10
- import { DEBOUNCE as Ye, KEY_CODES as E } from "./constants.js";
11
- import Je from "./directives/clickoutside.js";
12
- import { D as Qe } from "./MenusPlugin-Bk6UW6o9.js";
13
- import ie from "./Chip.js";
6
+ import ie from "lodash-es/isEqual";
7
+ import We from "lodash-es/isPlainObject";
8
+ import Xe from "lodash-es/uniqueId";
9
+ import Ye from "./useSearch.js";
10
+ import { DEBOUNCE as Je, KEY_CODES as E } from "./constants.js";
11
+ import Qe from "./directives/clickoutside.js";
12
+ import { D as Ze } from "./MenusPlugin-Bk6UW6o9.js";
13
+ import ce from "./Chip.js";
14
14
  import z from "./Icon.js";
15
- import { _ as Ze } from "./Field.vue_vue_type_script_setup_true_lang-DRaKs9Lm.js";
16
- import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
- const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id", "aria-labelledby"], at = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], st = ["selected", "value"], nt = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled"], ot = ["id"], rt = ["onKeypress", "onMousedown"], it = {
15
+ import { _ as et } from "./Field.vue_vue_type_script_setup_true_lang-DRaKs9Lm.js";
16
+ import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
+ const lt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, at = ["id", "aria-labelledby"], st = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], nt = ["selected", "value", "disabled"], ot = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled"], rt = ["id"], it = ["onKeypress", "onMousedown"], ct = {
18
18
  key: 0,
19
19
  class: "stash-select__total"
20
- }, ct = {
20
+ }, ut = {
21
21
  key: 0,
22
22
  class: "tw-flex tw-items-center tw-border-b tw-border-blue-500 tw-pr-1.5"
23
- }, ut = ["data-test", "placeholder"], dt = { class: "stash-select__options options tw-my-1.5 tw-w-full tw-border-white tw-bg-white" }, ft = ["data-test", "onClick", "onMouseenter"], vt = { class: "tw-m-1.5 tw-cursor-default tw-p-1.5" }, ht = {
23
+ }, dt = ["data-test", "placeholder"], ft = { class: "stash-select__options options tw-my-1.5 tw-w-full tw-border-white tw-bg-white" }, pt = ["data-test", "onClick", "onMouseenter"], vt = { class: "tw-m-1.5 tw-cursor-default tw-p-1.5" }, ht = {
24
24
  class: "tw-m-1.5 tw-cursor-default tw-p-1.5",
25
25
  "data-test": "stash-select|no-options"
26
- }, pt = /* @__PURE__ */ Ce({
26
+ }, mt = /* @__PURE__ */ Oe({
27
27
  name: "ll-select",
28
28
  __name: "Select",
29
29
  props: {
@@ -56,7 +56,7 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
56
56
  useFuzzySearch: { type: Boolean, default: !1 },
57
57
  menuPlacement: { default: "bottom-start" },
58
58
  enableTeleport: { type: Boolean, default: !1 },
59
- teleportTo: { default: `#${Qe}` },
59
+ teleportTo: { default: `#${Ze}` },
60
60
  addBottomSpace: { type: Boolean },
61
61
  errorText: {},
62
62
  hintText: {},
@@ -71,14 +71,14 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
71
71
  disabled: { type: Boolean }
72
72
  },
73
73
  emits: ["update:model-value", "clear", "add", "remove", "opened", "closed"],
74
- setup(ce, { emit: ue }) {
75
- const t = ce, p = ue, H = Oe(), de = Ie(), Q = c(null), m = c(null), x = c(null), q = c(null), Z = c(null), N = c(0), T = c(0), n = c([]), ee = c(() => []), w = c(""), v = c(-1), u = c(!1), W = c({}), te = c(!1), { floatingStyles: fe } = Ae(Q, x, {
76
- whileElementsMounted: De,
74
+ setup(ue, { emit: de }) {
75
+ const t = ue, h = de, H = Ie(), fe = Me(), Z = c(null), m = c(null), x = c(null), j = c(null), ee = c(null), N = c(0), T = c(0), n = c([]), te = c(() => []), w = c(""), p = c(-1), u = c(!1), W = c({}), le = c(!1), { floatingStyles: pe } = De(Z, x, {
76
+ whileElementsMounted: Le,
77
77
  placement: t.menuPlacement,
78
78
  middleware: [
79
- Le(),
80
- Ue(({ rects: e, placement: l }) => l.split("-")[0] === "bottom" && N.value > T.value ? N.value - e.reference.height + 6 : 6),
81
- Ve({
79
+ Ue(),
80
+ Ve(({ rects: e, placement: l }) => l.split("-")[0] === "bottom" && N.value > T.value ? N.value - e.reference.height + 6 : 6),
81
+ Ke({
82
82
  apply({ availableHeight: e, elements: l, rects: s }) {
83
83
  t.enableTeleport && Object.assign(l.floating.style, {
84
84
  maxWidth: `${s.reference.width}px`,
@@ -87,22 +87,22 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
87
87
  }
88
88
  })
89
89
  ]
90
- }), X = h(() => !t.hideSearch && t.searchable !== "false" && t.searchable !== !1), A = h(() => {
91
- let e = (te.value && t.lazy ? t.lazy() : t.options).filter(Boolean);
92
- return qe(e[0]) || (e = e.map((l, s) => ({ name: l, id: s }))), e;
93
- }), ve = h(() => n.value.length ? n.value.map((e) => e[t.displayBy] || e).join(", ") : ""), le = h(() => t.searchLoading || Object.keys(W.value).length > 0), C = h(() => t.disableFiltering || !(w.value || "").trim() ? A.value : ee.value(w.value)), he = h(() => N.value <= T.value), pe = h(
90
+ }), X = v(() => !t.hideSearch && t.searchable !== "false" && t.searchable !== !1), A = v(() => {
91
+ let e = (le.value && t.lazy ? t.lazy() : t.options).filter(Boolean);
92
+ return We(e[0]) || (e = e.map((l, s) => ({ name: l, id: s }))), e;
93
+ }), ve = v(() => n.value.length ? n.value.map((e) => e[t.displayBy] || e).join(", ") : ""), ae = v(() => t.searchLoading || Object.keys(W.value).length > 0), C = v(() => t.disableFiltering || !(w.value || "").trim() ? A.value : te.value(w.value)), he = v(() => N.value <= T.value), me = v(
94
94
  () => !u.value && !t.single && !he.value && n.value.length
95
- ), me = h(() => [n.value.length, t.selectItemType, "selected"].filter(Boolean).join(" ")), ye = h(() => t.preventEmpty || t.allowEmpty === "false" || t.allowEmpty === !1);
95
+ ), ye = v(() => [n.value.length, t.selectItemType, "selected"].filter(Boolean).join(" ")), we = v(() => t.preventEmpty || t.allowEmpty === "false" || t.allowEmpty === !1);
96
96
  U(w, (e, l) => l !== e && L(-1)), U(n, () => I(), { deep: !0 }), U(
97
97
  () => t.modelValue,
98
98
  (e) => {
99
99
  if (Array.isArray(e)) {
100
100
  const l = e.filter(Boolean);
101
- re(l, n.value) || (n.value = l);
101
+ ie(l, n.value) || (n.value = l);
102
102
  return;
103
103
  }
104
104
  if (!je(e)) {
105
- re(e, n.value[0]) || (n.value[0] = e);
105
+ ie(e, n.value[0]) || (n.value[0] = e);
106
106
  return;
107
107
  }
108
108
  n.value = [];
@@ -111,19 +111,19 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
111
111
  ), U(
112
112
  () => t.options,
113
113
  () => {
114
- const { searchFor: e } = Xe({
115
- items: h(() => A.value),
114
+ const { searchFor: e } = Ye({
115
+ items: v(() => A.value),
116
116
  fieldNames: t.searchBy.length ? t.searchBy : [t.displayBy],
117
117
  trackBy: t.trackBy
118
118
  });
119
- ee.value = (l) => e(l, { fuzzy: t.useFuzzySearch });
119
+ te.value = (l) => e(l, { fuzzy: t.useFuzzySearch });
120
120
  },
121
121
  { immediate: !0 }
122
122
  );
123
- const we = () => {
124
- n.value = [], p("update:model-value", t.single ? void 0 : n.value), p("clear");
123
+ const Y = (e) => e && typeof e == "object" && "disabled" in e && (e == null ? void 0 : e.disabled), ge = () => {
124
+ n.value = [], h("update:model-value", t.single ? void 0 : n.value), h("clear");
125
125
  }, D = (e) => {
126
- t.disabled || !e || typeof e == "object" && "disabled" in e && (e != null && e.disabled) || (B(e) ? O(e) : (t.single && (n.value = []), n.value.push(e), p("update:model-value", t.single ? n.value[0] : n.value), p("add", e)), t.single && b());
126
+ t.disabled || !e || Y(e) || (B(e) ? O(e) : (t.single && (n.value = []), n.value.push(e), h("update:model-value", t.single ? n.value[0] : n.value), h("add", e)), t.single && b());
127
127
  }, _e = (e) => {
128
128
  if (t.single) {
129
129
  const s = A.value.find((o) => {
@@ -149,24 +149,24 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
149
149
  B(o) || D(o);
150
150
  }
151
151
  }, O = (e) => {
152
- if (t.disabled || ye.value && n.value.length === 1)
152
+ if (t.disabled || we.value && n.value.length === 1)
153
153
  return;
154
154
  const l = n.value.findIndex((s) => s[t.trackBy] === e[t.trackBy]);
155
155
  if (l === -1) {
156
- Ke.warn("ll-select: could not find option to remove", e);
156
+ Ge.warn("ll-select: could not find option to remove", e);
157
157
  return;
158
158
  }
159
- n.value.splice(l, 1), p("update:model-value", t.single ? n.value[0] : n.value), p("remove", e, l);
160
- }, ae = () => {
161
- u.value || (I(), u.value = !0, p("opened"), X.value && Y(() => {
159
+ n.value.splice(l, 1), h("update:model-value", t.single ? n.value[0] : n.value), h("remove", e, l);
160
+ }, se = () => {
161
+ u.value || (I(), u.value = !0, h("opened"), X.value && J(() => {
162
162
  var e;
163
- (e = Z.value) == null || e.focus({ preventScroll: !0 });
163
+ (e = ee.value) == null || e.focus({ preventScroll: !0 });
164
164
  }));
165
165
  }, b = () => {
166
166
  var e;
167
- u.value && p("closed", n.value), L(-1), u.value = !1, t.preserveSearchTerm || (w.value = ""), (e = m.value) == null || e.blur();
168
- }, ge = async (e) => {
169
- if (await Y(), !m.value)
167
+ u.value && h("closed", n.value), L(-1), u.value = !1, t.preserveSearchTerm || (w.value = ""), (e = m.value) == null || e.blur();
168
+ }, be = async (e) => {
169
+ if (await J(), !m.value)
170
170
  return;
171
171
  if (![E.ENTER, E.ESCAPE].includes(e.keyCode)) {
172
172
  const s = m.value.querySelector(".stash-select__option--highlighted"), o = s == null ? void 0 : s.getBoundingClientRect(), i = m.value.getBoundingClientRect();
@@ -175,84 +175,86 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
175
175
  (o.bottom >= i.bottom || o.top <= i.top + o.height) && (s == null || s.scrollIntoView({ block: "nearest", inline: "nearest" }));
176
176
  }
177
177
  }, L = (e) => {
178
- v.value = e;
179
- }, be = (e) => {
178
+ p.value = e;
179
+ }, Be = (e) => {
180
180
  if (e.keyCode === E.ESCAPE)
181
181
  b();
182
- else if (e.keyCode === E.DOWN && v.value < C.value.length - 1 && u.value)
183
- v.value++;
184
- else if (e.keyCode === E.UP && v.value > 0)
185
- u.value && v.value--, x.value && X.value && v.value === 0 && (x.value.scrollTop -= 100);
186
- else if (e.keyCode === E.ENTER && v.value !== -1 && u.value)
187
- D(C.value[v.value]);
182
+ else if (e.keyCode === E.DOWN && p.value < C.value.length - 1 && u.value)
183
+ p.value++;
184
+ else if (e.keyCode === E.UP && p.value > 0)
185
+ u.value && p.value--, x.value && X.value && p.value === 0 && (x.value.scrollTop -= 100);
186
+ else if (e.keyCode === E.ENTER && p.value !== -1 && u.value)
187
+ D(C.value[p.value]);
188
188
  else
189
189
  return;
190
- e.preventDefault(), ge(e);
191
- }, se = Ge(function() {
192
- Be();
193
- }, Ye.FAST), Be = async function() {
190
+ e.preventDefault(), be(e);
191
+ }, ne = qe(function() {
192
+ ke();
193
+ }, Je.FAST), ke = async function() {
194
194
  if (!t.onSearch)
195
195
  return;
196
- const e = We("search-request-");
196
+ const e = Xe("search-request-");
197
197
  try {
198
198
  W.value[e] = !0, await t.onSearch(w.value);
199
199
  } finally {
200
200
  delete W.value[e];
201
201
  }
202
- }, ke = (e, l) => [
202
+ }, Se = (e, l) => [
203
203
  {
204
204
  "stash-select__option": !0,
205
- "stash-select__option--disabled": e && typeof e == "object" && "disabled" in e && (e == null ? void 0 : e.disabled),
206
- "stash-select__option--highlighted": v.value === l,
205
+ "stash-select__option--disabled": Y(e),
206
+ "stash-select__option--highlighted": p.value === l,
207
207
  "stash-select__option--selected": B(e)
208
208
  },
209
209
  // @deprecated
210
+ // backwards compatibility
210
211
  {
211
- "tw-bg-ice-200": v.value === l,
212
+ "is-selected": p.value === l,
213
+ "tw-bg-ice-200": p.value === l,
212
214
  "tw-bg-blue-100 tw-text-ice-700": B(e)
213
215
  }
214
216
  ], B = (e) => e == null ? !1 : n.value.some((l) => (l == null ? void 0 : l[t.trackBy]) === e[t.trackBy]);
215
- function ne(e) {
217
+ function oe(e) {
216
218
  var o, i;
217
219
  if (!e)
218
220
  return !1;
219
221
  const l = (o = m.value) == null ? void 0 : o.contains(e), s = (i = x.value) == null ? void 0 : i.contains(e);
220
222
  return l || s;
221
223
  }
222
- function Se(e) {
224
+ function Ee(e) {
223
225
  const l = e.relatedTarget;
224
- !ne(l) && l && b();
226
+ !oe(l) && l && b();
225
227
  }
226
- function Ee(e) {
228
+ function xe(e) {
227
229
  const l = e.target;
228
- ne(l) || b();
230
+ oe(l) || b();
229
231
  }
230
- const xe = () => {
232
+ const Te = () => {
231
233
  L(-1);
232
234
  }, I = async () => {
233
- await Y(), q.value && m.value && (T.value = T.value === 0 ? m.value.clientHeight : T.value, N.value = q.value.clientHeight);
235
+ await J(), j.value && m.value && (T.value = T.value === 0 ? m.value.clientHeight : T.value, N.value = j.value.clientHeight);
234
236
  };
235
- return Me(() => {
237
+ return Fe(() => {
236
238
  if (H.onInput)
237
239
  throw new Error("ll-select: use the @update:model-value event instead of @input.");
238
240
  window.addEventListener("resize", I), I();
239
- }), Fe(() => {
241
+ }), Re(() => {
240
242
  window.removeEventListener("resize", I);
241
- }), (e, l) => (r(), V(Ze, Re(t, {
243
+ }), (e, l) => (r(), V(et, $e(t, {
242
244
  class: ["input ll-select stash-select", y(H).class],
243
245
  "data-test": "stash-select",
244
246
  "error-text": t.errorText || t.error,
245
247
  "hint-text": t.hintText || t.hint
246
- }), $e({ _: 2 }, [
248
+ }), Pe({ _: 2 }, [
247
249
  t.isReadOnly ? {
248
250
  name: "default",
249
251
  fn: k(({ fieldId: s, labelId: o }) => [
250
- d("div", tt, [
252
+ d("div", lt, [
251
253
  d("span", {
252
254
  id: s,
253
255
  "aria-labelledby": o,
254
256
  class: "show-empty tw-h-min"
255
- }, g(ve.value), 9, lt)
257
+ }, _(ve.value), 9, at)
256
258
  ])
257
259
  ]),
258
260
  key: "0"
@@ -269,16 +271,17 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
269
271
  name: t.name,
270
272
  onChange: _e
271
273
  }, [
272
- (r(!0), f(K, null, G(C.value, (a, _) => (r(), f("option", {
273
- key: `srOnlyOption-${_}`,
274
+ (r(!0), f(K, null, G(C.value, (a, g) => (r(), f("option", {
275
+ key: `srOnlyOption-${g}`,
274
276
  selected: B(a),
275
- value: a[t.trackBy]
276
- }, g(a[t.displayBy] || ""), 9, st))), 128)),
277
+ value: a[t.trackBy],
278
+ disabled: Y(a)
279
+ }, _(a[t.displayBy] || ""), 9, nt))), 128)),
277
280
  l[5] || (l[5] = d("option", { value: "" }, null, -1))
278
- ], 40, at),
281
+ ], 40, st),
279
282
  M((r(), f("div", {
280
283
  ref_key: "selectRef",
281
- ref: Q,
284
+ ref: Z,
282
285
  role: "listbox",
283
286
  "aria-hidden": "true",
284
287
  class: F(["stash-select__content-wrapper", [
@@ -289,6 +292,7 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
289
292
  "stash-select--single": t.single
290
293
  },
291
294
  // @deprecated
295
+ // backwards compatibility
292
296
  {
293
297
  "is-active": u.value,
294
298
  "is-single": t.single,
@@ -299,8 +303,8 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
299
303
  "aria-expanded": u.value,
300
304
  "aria-label": t.placeholder,
301
305
  "aria-disabled": t.disabled || void 0,
302
- onKeydown: be,
303
- onKeyup: oe(b, ["esc"])
306
+ onKeydown: Be,
307
+ onKeyup: re(b, ["esc"])
304
308
  }, [
305
309
  d("div", {
306
310
  id: "listbox-" + s,
@@ -308,68 +312,69 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
308
312
  ref: m,
309
313
  class: "input-field stash-select__content",
310
314
  tabindex: "0",
311
- onFocusin: ae,
312
- onFocusinOnce: l[4] || (l[4] = (a) => te.value = !0),
313
- onFocusout: Se,
314
- onKeydown: ae,
315
- onMouseleave: xe
315
+ "data-test": "stash-select|dropdown-trigger",
316
+ onFocusin: se,
317
+ onFocusinOnce: l[4] || (l[4] = (a) => le.value = !0),
318
+ onFocusout: Ee,
319
+ onKeydown: se,
320
+ onMouseleave: Te
316
321
  }, [
317
322
  d("ul", {
318
323
  ref_key: "chipsRef",
319
- ref: q,
324
+ ref: j,
320
325
  class: "stash-select__chips"
321
326
  }, [
322
327
  n.value.length ? R("", !0) : (r(), f("li", {
323
328
  key: 0,
324
329
  class: F(["stash-select__placeholder tw-mr-0 tw-pl-1.5", { "tw-truncate": !t.noTruncate }])
325
- }, g(t.placeholder), 3)),
330
+ }, _(t.placeholder), 3)),
326
331
  t.single ? (r(!0), f(K, { key: 1 }, G(n.value, (a) => (r(), f("li", {
327
332
  key: `chip-${a[t.trackBy]}`,
328
333
  class: F(["stash-select__selected tw-mr-0 tw-pl-1.5", { "tw-truncate": !t.noTruncate }])
329
334
  }, [
330
- j(e.$slots, "selected", { option: a }, () => [
331
- $(g(a[t.displayBy] || a) + " ", 1),
335
+ q(e.$slots, "selected", { option: a }, () => [
336
+ $(_(a[t.displayBy] || a) + " ", 1),
332
337
  d("button", {
333
338
  tabindex: "-1",
334
339
  class: "stash-select__remove",
335
- onKeypress: oe(P((_) => O(a), ["prevent"]), ["enter"]),
336
- onMousedown: P((_) => O(a), ["prevent", "stop"])
340
+ onKeypress: re(P((g) => O(a), ["prevent"]), ["enter"]),
341
+ onMousedown: P((g) => O(a), ["prevent", "stop"])
337
342
  }, [
338
343
  S(z, {
339
344
  icon: "close",
340
345
  name: "close",
341
346
  size: "small"
342
347
  })
343
- ], 40, rt)
348
+ ], 40, it)
344
349
  ], !0)
345
350
  ], 2))), 128)) : (r(!0), f(K, { key: 2 }, G(n.value, (a) => (r(), f("li", {
346
351
  key: `chip-${a[t.trackBy]}`,
347
352
  class: "tw-inline-block"
348
353
  }, [
349
- S(ie, {
354
+ S(ce, {
350
355
  "bg-color": "blue-500",
351
356
  "is-removable": "",
352
357
  "text-color": "white",
353
358
  class: "stash-select__chip",
354
- onRemove: (_) => O(a)
359
+ onRemove: (g) => O(a)
355
360
  }, {
356
361
  default: k(() => [
357
- $(g(a[t.displayBy] || a), 1)
362
+ $(_(a[t.displayBy] || a), 1)
358
363
  ]),
359
364
  _: 2
360
365
  }, 1032, ["onRemove"])
361
366
  ]))), 128))
362
367
  ], 512),
363
- pe.value ? (r(), f("div", it, [
364
- S(ie, {
368
+ me.value ? (r(), f("div", ct, [
369
+ S(ce, {
365
370
  "bg-color": "blue-500",
366
371
  "is-removable": "",
367
372
  "text-color": "white",
368
373
  class: "stash-select__chip",
369
- onRemove: we
374
+ onRemove: ge
370
375
  }, {
371
376
  default: k(() => [
372
- $(g(me.value), 1)
377
+ $(_(ye.value), 1)
373
378
  ]),
374
379
  _: 1
375
380
  })
@@ -381,24 +386,24 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
381
386
  name: t.icon,
382
387
  onMousedown: l[0] || (l[0] = P((a) => u.value && b(), ["prevent"]))
383
388
  }, null, 8, ["name", "class"])) : R("", !0),
384
- (r(), V(Pe, {
389
+ (r(), V(ze, {
385
390
  to: t.teleportTo,
386
391
  disabled: !t.enableTeleport
387
392
  }, [
388
- S(ze, { name: "fade" }, {
393
+ S(He, { name: "fade" }, {
389
394
  default: k(() => [
390
395
  M(d("div", {
391
396
  ref_key: "optionsWrapperRef",
392
397
  ref: x,
393
398
  class: "stash-select__border-selector tw-w-full tw-shadow-2xl",
394
- style: He(y(fe)),
399
+ style: Ne(y(pe)),
395
400
  onClick: l[3] || (l[3] = P(() => {
396
401
  }, ["stop"]))
397
402
  }, [
398
- X.value ? (r(), f("div", ct, [
403
+ X.value ? (r(), f("div", ut, [
399
404
  M(d("input", {
400
405
  ref_key: "searchRef",
401
- ref: Z,
406
+ ref: ee,
402
407
  "onUpdate:modelValue": l[1] || (l[1] = (a) => w.value = a),
403
408
  type: "text",
404
409
  autocomplete: "off",
@@ -407,32 +412,32 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
407
412
  placeholder: t.searchPlaceholder,
408
413
  spellcheck: !1,
409
414
  onInput: l[2] || (l[2] = //@ts-ignore
410
- (...a) => y(se) && y(se)(...a))
411
- }, null, 40, ut), [
412
- [Ne, w.value]
415
+ (...a) => y(ne) && y(ne)(...a))
416
+ }, null, 40, dt), [
417
+ [Ae, w.value]
413
418
  ]),
414
419
  S(z, {
415
420
  name: "search",
416
421
  class: "tw-text-ice-500"
417
422
  })
418
423
  ])) : R("", !0),
419
- d("ul", dt, [
420
- (r(!0), f(K, null, G(C.value, (a, _) => (r(), f("li", {
424
+ d("ul", ft, [
425
+ (r(!0), f(K, null, G(C.value, (a, g) => (r(), f("li", {
421
426
  key: `option-${a[t.trackBy]}`,
422
427
  "data-test": a[t.trackBy],
423
- class: F(ke(a, _)),
424
- onClick: (Te) => D(a),
425
- onMouseenter: P((Te) => L(_), ["self"])
428
+ class: F(Se(a, g)),
429
+ onClick: (Ce) => D(a),
430
+ onMouseenter: P((Ce) => L(g), ["self"])
426
431
  }, [
427
- j(e.$slots, "option", { option: a }, () => [
428
- $(g(a[t.displayBy] || a), 1)
432
+ q(e.$slots, "option", { option: a }, () => [
433
+ $(_(a[t.displayBy] || a), 1)
429
434
  ], !0),
430
435
  B(a) && !t.hideCheck ? (r(), V(z, {
431
436
  key: 0,
432
437
  class: "tw-ml-auto tw-text-blue-500",
433
438
  name: "check"
434
439
  })) : R("", !0)
435
- ], 42, ft))), 128)),
440
+ ], 42, pt))), 128)),
436
441
  M(d("li", vt, [
437
442
  S(z, {
438
443
  "data-test": "stash-select|options-loading",
@@ -440,41 +445,41 @@ const tt = { class: "tw-flex tw-h-input tw-items-center tw-text-sm" }, lt = ["id
440
445
  class: "tw-animate-spin tw-text-ice-500"
441
446
  })
442
447
  ], 512), [
443
- [J, t.loading || le.value]
448
+ [Q, t.loading || ae.value]
444
449
  ]),
445
450
  M(d("li", ht, [
446
- j(e.$slots, "no-options", {}, () => [
451
+ q(e.$slots, "no-options", {}, () => [
447
452
  l[6] || (l[6] = $(" No options "))
448
453
  ], !0)
449
454
  ], 512), [
450
- [J, !t.loading && !le.value && !C.value.length]
455
+ [Q, !t.loading && !ae.value && !C.value.length]
451
456
  ])
452
457
  ])
453
458
  ], 4), [
454
- [J, u.value && !t.disabled]
459
+ [Q, u.value && !t.disabled]
455
460
  ])
456
461
  ]),
457
462
  _: 3
458
463
  })
459
464
  ], 8, ["to", "disabled"]))
460
- ], 40, ot)
461
- ], 42, nt)), [
462
- [y(Je), Ee]
465
+ ], 40, rt)
466
+ ], 42, ot)), [
467
+ [y(Qe), xe]
463
468
  ])
464
469
  ]),
465
470
  key: "1"
466
471
  },
467
- y(de).hint ? {
472
+ y(fe).hint ? {
468
473
  name: "hint",
469
474
  fn: k(() => [
470
- j(e.$slots, "hint", {}, void 0, !0)
475
+ q(e.$slots, "hint", {}, void 0, !0)
471
476
  ]),
472
477
  key: "2"
473
478
  } : void 0
474
479
  ]), 1040, ["class", "error-text", "hint-text"]));
475
480
  }
476
- }), $t = /* @__PURE__ */ et(pt, [["__scopeId", "data-v-ddb2d6a8"]]);
481
+ }), Pt = /* @__PURE__ */ tt(mt, [["__scopeId", "data-v-f49a04ce"]]);
477
482
  export {
478
- $t as default
483
+ Pt as default
479
484
  };
480
485
  //# sourceMappingURL=Select.js.map