@leaflink/stash 53.4.6 → 53.4.8
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/AppSidebar.js +56 -52
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppTopbar.js +1 -1
- package/dist/Copy.js +1 -1
- package/dist/DataViewFilters.js +1 -1
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewToolbar.js +139 -125
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DatePicker.js +1114 -1113
- package/dist/DatePicker.js.map +1 -1
- package/dist/Modal.js +105 -89
- package/dist/Modal.js.map +1 -1
- package/dist/Modals.js +30 -26
- package/dist/Modals.js.map +1 -1
- package/dist/MoreActions.js +294 -288
- package/dist/MoreActions.js.map +1 -1
- package/dist/PageNavigation.js +1 -1
- package/dist/RadioGroup.js +69 -62
- package/dist/RadioGroup.js.map +1 -1
- package/dist/SearchBar.js +27 -25
- package/dist/SearchBar.js.map +1 -1
- package/dist/Select.js +103 -101
- package/dist/Select.js.map +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/Tab.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/Tabs.js +2 -2
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-DEopbeSY.js +131 -0
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-DEopbeSY.js.map +1 -0
- package/dist/Thumbnail.js +42 -42
- package/dist/Thumbnail.js.map +1 -1
- package/dist/ThumbnailGroup.js +24 -22
- package/dist/ThumbnailGroup.js.map +1 -1
- package/dist/Timeline.js +15 -13
- package/dist/Timeline.js.map +1 -1
- package/dist/Toast.vue.d.ts +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-CFpM7Ldj.js → Tooltip.vue_vue_type_script_setup_true_lang-UUjw5O1x.js} +2 -2
- package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-CFpM7Ldj.js.map → Tooltip.vue_vue_type_script_setup_true_lang-UUjw5O1x.js.map} +1 -1
- package/dist/components.css +1 -1
- package/dist/getContrastingTextColor.d.ts +8 -0
- package/dist/index-t9tXBnql.js +469 -0
- package/dist/{index-DA70nQCT.js.map → index-t9tXBnql.js.map} +1 -1
- package/dist/templateRefNarrowing-CeANDylX.js +22 -0
- package/dist/templateRefNarrowing-CeANDylX.js.map +1 -0
- package/dist/useMediaQuery.d.ts +12 -10
- package/dist/useMediaQuery.js +7 -29
- package/dist/useMediaQuery.js.map +1 -1
- package/dist/useSortable.js +1 -1
- package/dist/useValidation.d.ts +11 -1
- package/dist/useValidation.js +240 -198
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/getContrastingTextColor.js +36 -24
- package/dist/utils/getContrastingTextColor.js.map +1 -1
- package/package.json +1 -2
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3FBaVP5.js +0 -130
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3FBaVP5.js.map +0 -1
- package/dist/index-DA70nQCT.js +0 -424
package/dist/Select.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as ze, useAttrs as He, useSlots as Pe, ref as c, computed as h, watch as
|
|
1
|
+
import { defineComponent as ze, useAttrs as He, useSlots as Pe, ref as c, computed as h, watch as z, nextTick as Z, onMounted as Ne, onUnmounted as Ae, createBlock as ee, openBlock as i, mergeProps as De, unref as B, createSlots as Ue, withCtx as x, createElementVNode as f, toDisplayString as k, withDirectives as H, createElementBlock as d, Fragment as j, renderList as W, withKeys as fe, normalizeClass as P, createCommentVNode as N, renderSlot as A, createTextVNode as D, withModifiers as U, createVNode as S, Teleport as Le, Transition as Ve, normalizeStyle as Ke, vModelText as Ge, vShow as te } from "vue";
|
|
2
2
|
import { u as qe, a as je, f as We, o as Xe, c as Ye } from "./floating-ui.vue-CuGrC-z8.js";
|
|
3
3
|
import Je from "@leaflink/snitch";
|
|
4
|
-
import
|
|
4
|
+
import le from "lodash-es/debounce";
|
|
5
5
|
import Qe from "lodash-es/isEmpty";
|
|
6
6
|
import pe from "lodash-es/isEqual";
|
|
7
7
|
import Ze from "lodash-es/isPlainObject";
|
|
@@ -12,7 +12,7 @@ import st from "./directives/clickoutside.js";
|
|
|
12
12
|
import { D as at } from "./MenusPlugin-Bk6UW6o9.js";
|
|
13
13
|
import he from "./Chip.js";
|
|
14
14
|
import { _ as nt } from "./Field.vue_vue_type_script_setup_true_lang-D2I8xDEW.js";
|
|
15
|
-
import
|
|
15
|
+
import L from "./Icon.js";
|
|
16
16
|
import { _ as ot } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-labelledby"], ct = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], ut = ["selected", "value", "disabled"], dt = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled"], ft = ["id"], pt = ["onKeypress", "onMousedown"], ht = {
|
|
18
18
|
key: 0,
|
|
@@ -76,12 +76,12 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
76
76
|
},
|
|
77
77
|
emits: ["update:model-value", "clear", "add", "remove", "opened", "closed"],
|
|
78
78
|
setup(ve, { emit: me }) {
|
|
79
|
-
const t = ve, v = me,
|
|
79
|
+
const t = ve, v = me, V = He(), X = Pe(), se = c(null), m = c(null), O = c(null), I = c(null), ae = c(null), R = c(0), M = c(0), a = c([]), ne = c(() => []), y = c(""), p = c(-1), u = c(!1), Y = c({}), oe = c(!1), { floatingStyles: ye, update: _e } = qe(se, O, {
|
|
80
80
|
whileElementsMounted: je,
|
|
81
81
|
placement: t.menuPlacement,
|
|
82
82
|
middleware: [
|
|
83
83
|
We(),
|
|
84
|
-
Xe(({ rects: e, placement: l }) => l.split("-")[0] === "bottom" && R.value >
|
|
84
|
+
Xe(({ rects: e, placement: l }) => l.split("-")[0] === "bottom" && R.value > M.value ? R.value - e.reference.height + 6 : 6),
|
|
85
85
|
Ye({
|
|
86
86
|
apply({ availableHeight: e, elements: l, rects: n }) {
|
|
87
87
|
t.enableTeleport && Object.assign(l.floating.style, {
|
|
@@ -91,13 +91,13 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
91
91
|
}
|
|
92
92
|
})
|
|
93
93
|
]
|
|
94
|
-
}),
|
|
95
|
-
let e = (
|
|
94
|
+
}), F = typeof ResizeObserver < "u" ? new ResizeObserver(() => w()) : null, J = h(() => !t.hideSearch && t.searchable !== "false" && t.searchable !== !1), K = h(() => {
|
|
95
|
+
let e = (oe.value && t.lazy ? t.lazy() : t.options).filter(Boolean);
|
|
96
96
|
return Ze(e[0]) || (e = e.map((l, n) => ({ name: l, id: n }))), e;
|
|
97
|
-
}), ge = h(() => a.value.length ? a.value.map((e) => e[t.displayBy] || e).join(", ") : ""), re = h(() => t.searchLoading || Object.keys(
|
|
97
|
+
}), ge = h(() => a.value.length ? a.value.map((e) => e[t.displayBy] || e).join(", ") : ""), re = h(() => t.searchLoading || Object.keys(Y.value).length > 0), $ = h(() => t.disableFiltering || !(y.value || "").trim() ? K.value : ne.value(y.value)), be = h(() => R.value <= M.value), Be = h(
|
|
98
98
|
() => !u.value && !t.single && !be.value && a.value.length
|
|
99
99
|
), ke = h(() => [a.value.length, t.selectItemType, "selected"].filter(Boolean).join(" ")), Se = h(() => t.preventEmpty || t.allowEmpty === "false" || t.allowEmpty === !1);
|
|
100
|
-
|
|
100
|
+
z(y, (e, l) => l !== e && q(-1)), z(a, () => w(), { deep: !0 }), z(
|
|
101
101
|
() => t.modelValue,
|
|
102
102
|
(e) => {
|
|
103
103
|
if (Array.isArray(e)) {
|
|
@@ -112,29 +112,29 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
112
112
|
a.value = [];
|
|
113
113
|
},
|
|
114
114
|
{ immediate: !0 }
|
|
115
|
-
),
|
|
115
|
+
), z(
|
|
116
116
|
() => t.options,
|
|
117
117
|
() => {
|
|
118
118
|
const { searchFor: e } = tt({
|
|
119
|
-
items: h(() =>
|
|
119
|
+
items: h(() => K.value),
|
|
120
120
|
fieldNames: t.searchBy.length ? t.searchBy : [t.displayBy],
|
|
121
121
|
trackBy: t.trackBy
|
|
122
122
|
});
|
|
123
|
-
|
|
123
|
+
ne.value = (l) => e(l, { fuzzy: t.useFuzzySearch });
|
|
124
124
|
},
|
|
125
125
|
{ immediate: !0 }
|
|
126
|
-
),
|
|
127
|
-
const we =
|
|
126
|
+
), z(R, () => we());
|
|
127
|
+
const we = le(() => _e(), 50), w = le(() => de(), 50), Q = (e) => e && typeof e == "object" && "disabled" in e && (e == null ? void 0 : e.disabled), Ee = () => {
|
|
128
128
|
a.value = [], v("update:model-value", t.single ? void 0 : a.value), v("clear");
|
|
129
|
-
},
|
|
130
|
-
t.disabled || !e ||
|
|
129
|
+
}, G = (e) => {
|
|
130
|
+
t.disabled || !e || Q(e) || (T(e) ? _(e) : (t.single && (a.value = []), a.value.push(e), v("update:model-value", t.single ? a.value[0] : a.value), v("add", e)), t.single && E());
|
|
131
131
|
}, Te = (e) => {
|
|
132
132
|
if (t.single) {
|
|
133
|
-
const n =
|
|
133
|
+
const n = K.value.find((o) => {
|
|
134
134
|
var r;
|
|
135
135
|
return ((r = o[t.trackBy]) == null ? void 0 : r.toString()) === e.target.value;
|
|
136
136
|
});
|
|
137
|
-
|
|
137
|
+
G(n);
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
140
|
const l = [...e.target.selectedOptions];
|
|
@@ -144,13 +144,13 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
144
144
|
return r.value === ((g = n[t.trackBy]) == null ? void 0 : g.toString());
|
|
145
145
|
}) || _(n);
|
|
146
146
|
for (const n of l) {
|
|
147
|
-
const o =
|
|
147
|
+
const o = K.value.find(
|
|
148
148
|
(r) => {
|
|
149
149
|
var g;
|
|
150
150
|
return ((g = r[t.trackBy]) == null ? void 0 : g.toString()) === n.value;
|
|
151
151
|
}
|
|
152
152
|
);
|
|
153
|
-
T(o) ||
|
|
153
|
+
T(o) || G(o);
|
|
154
154
|
}
|
|
155
155
|
}, _ = (e) => {
|
|
156
156
|
if (t.disabled || Se.value && a.value.length === 1)
|
|
@@ -162,15 +162,15 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
162
162
|
}
|
|
163
163
|
a.value.splice(l, 1), v("update:model-value", t.single ? a.value[0] : a.value), v("remove", e, l);
|
|
164
164
|
}, ie = () => {
|
|
165
|
-
u.value || (w(), u.value = !0, v("opened"),
|
|
165
|
+
u.value || (w(), u.value = !0, v("opened"), J.value && Z(() => {
|
|
166
166
|
var e;
|
|
167
|
-
(e =
|
|
167
|
+
(e = ae.value) == null || e.focus({ preventScroll: !0 });
|
|
168
168
|
}));
|
|
169
169
|
}, E = () => {
|
|
170
170
|
var e;
|
|
171
|
-
u.value && v("closed", a.value),
|
|
171
|
+
u.value && v("closed", a.value), q(-1), u.value = !1, t.preserveSearchTerm || (y.value = ""), (e = m.value) == null || e.blur();
|
|
172
172
|
}, xe = async (e) => {
|
|
173
|
-
if (await
|
|
173
|
+
if (await Z(), !m.value)
|
|
174
174
|
return;
|
|
175
175
|
if (![C.ENTER, C.ESCAPE].includes(e.keyCode)) {
|
|
176
176
|
const n = m.value.querySelector(".stash-select__option--highlighted"), o = n == null ? void 0 : n.getBoundingClientRect(), r = m.value.getBoundingClientRect();
|
|
@@ -178,35 +178,35 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
178
178
|
return;
|
|
179
179
|
(o.bottom >= r.bottom || o.top <= r.top + o.height) && (n == null || n.scrollIntoView({ block: "nearest", inline: "nearest" }));
|
|
180
180
|
}
|
|
181
|
-
},
|
|
181
|
+
}, q = (e) => {
|
|
182
182
|
p.value = e;
|
|
183
183
|
}, Ce = (e) => {
|
|
184
184
|
if (e.keyCode === C.ESCAPE)
|
|
185
185
|
E();
|
|
186
|
-
else if (e.keyCode === C.DOWN && p.value <
|
|
186
|
+
else if (e.keyCode === C.DOWN && p.value < $.value.length - 1 && u.value)
|
|
187
187
|
p.value++;
|
|
188
188
|
else if (e.keyCode === C.UP && p.value > 0)
|
|
189
|
-
u.value && p.value--, O.value &&
|
|
189
|
+
u.value && p.value--, O.value && J.value && p.value === 0 && (O.value.scrollTop -= 100);
|
|
190
190
|
else if (e.keyCode === C.ENTER && p.value !== -1 && u.value)
|
|
191
|
-
|
|
191
|
+
G($.value[p.value]);
|
|
192
192
|
else
|
|
193
193
|
return;
|
|
194
194
|
e.preventDefault(), xe(e);
|
|
195
|
-
}, ce =
|
|
195
|
+
}, ce = le(function() {
|
|
196
196
|
Oe();
|
|
197
197
|
}, lt.FAST), Oe = async function() {
|
|
198
198
|
if (!t.onSearch)
|
|
199
199
|
return;
|
|
200
200
|
const e = et("search-request-");
|
|
201
201
|
try {
|
|
202
|
-
|
|
202
|
+
Y.value[e] = !0, await t.onSearch(y.value);
|
|
203
203
|
} finally {
|
|
204
|
-
delete
|
|
204
|
+
delete Y.value[e];
|
|
205
205
|
}
|
|
206
206
|
}, Ie = (e, l) => [
|
|
207
207
|
{
|
|
208
208
|
"stash-select__option": !0,
|
|
209
|
-
"stash-select__option--disabled":
|
|
209
|
+
"stash-select__option--disabled": Q(e),
|
|
210
210
|
"stash-select__option--highlighted": p.value === l,
|
|
211
211
|
"stash-select__option--selected": T(e)
|
|
212
212
|
},
|
|
@@ -229,25 +229,25 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
229
229
|
const l = e.relatedTarget;
|
|
230
230
|
!ue(l) && l && E();
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Me(e) {
|
|
233
233
|
const l = e.target;
|
|
234
234
|
ue(l) || E();
|
|
235
235
|
}
|
|
236
|
-
const
|
|
237
|
-
|
|
236
|
+
const Fe = () => {
|
|
237
|
+
q(-1);
|
|
238
238
|
}, de = async () => {
|
|
239
|
-
await
|
|
239
|
+
await Z(), I.value && m.value && (M.value = M.value === 0 ? m.value.clientHeight : M.value, R.value = I.value.clientHeight);
|
|
240
240
|
};
|
|
241
241
|
return Ne(() => {
|
|
242
|
-
if (
|
|
242
|
+
if (V.onInput)
|
|
243
243
|
throw new Error("ll-select: use the @update:model-value event instead of @input.");
|
|
244
|
-
I.value &&
|
|
244
|
+
F && I.value && F.observe(I.value), window.addEventListener("resize", w), w();
|
|
245
245
|
}), Ae(() => {
|
|
246
|
-
window.removeEventListener("resize", de),
|
|
246
|
+
window.removeEventListener("resize", de), F == null || F.disconnect(), w.cancel();
|
|
247
247
|
}), (e, l) => {
|
|
248
248
|
var n;
|
|
249
|
-
return i(),
|
|
250
|
-
class: ["input ll-select stash-select", B(
|
|
249
|
+
return i(), ee(nt, De(t, {
|
|
250
|
+
class: ["input ll-select stash-select relative", B(V).class],
|
|
251
251
|
"data-test": "stash-select",
|
|
252
252
|
"error-text": t.errorText || t.error,
|
|
253
253
|
"hint-text": t.hintText || t.hint
|
|
@@ -277,20 +277,20 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
277
277
|
name: t.name,
|
|
278
278
|
onChange: Te
|
|
279
279
|
}, [
|
|
280
|
-
(i(!0), d(
|
|
280
|
+
(i(!0), d(j, null, W($.value, (s, b) => (i(), d("option", {
|
|
281
281
|
key: `srOnlyOption-${b}`,
|
|
282
282
|
selected: T(s),
|
|
283
283
|
value: s[t.trackBy],
|
|
284
|
-
disabled:
|
|
284
|
+
disabled: Q(s)
|
|
285
285
|
}, k(s[t.displayBy] || ""), 9, ut))), 128)),
|
|
286
286
|
l[5] || (l[5] = f("option", { value: "" }, null, -1))
|
|
287
287
|
], 40, ct),
|
|
288
|
-
|
|
288
|
+
H((i(), d("div", {
|
|
289
289
|
ref_key: "selectRef",
|
|
290
|
-
ref:
|
|
290
|
+
ref: se,
|
|
291
291
|
role: "listbox",
|
|
292
292
|
"aria-hidden": "true",
|
|
293
|
-
class:
|
|
293
|
+
class: P(["stash-select__content-wrapper", [
|
|
294
294
|
{
|
|
295
295
|
"stash-select--disabled": !!t.disabled,
|
|
296
296
|
"stash-select--error": !!(t.errorText || t.error),
|
|
@@ -320,48 +320,48 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
320
320
|
tabindex: "0",
|
|
321
321
|
"data-test": "stash-select|dropdown-trigger",
|
|
322
322
|
onFocusin: ie,
|
|
323
|
-
onFocusinOnce: l[4] || (l[4] = (s) =>
|
|
323
|
+
onFocusinOnce: l[4] || (l[4] = (s) => oe.value = !0),
|
|
324
324
|
onFocusout: Re,
|
|
325
325
|
onKeydown: ie,
|
|
326
|
-
onMouseleave:
|
|
326
|
+
onMouseleave: Fe
|
|
327
327
|
}, [
|
|
328
328
|
f("ul", {
|
|
329
329
|
ref_key: "chipsRef",
|
|
330
330
|
ref: I,
|
|
331
331
|
class: "stash-select__chips"
|
|
332
332
|
}, [
|
|
333
|
-
a.value.length ?
|
|
333
|
+
a.value.length ? N("", !0) : (i(), d("li", {
|
|
334
334
|
key: 0,
|
|
335
|
-
class:
|
|
335
|
+
class: P(["stash-select__placeholder mr-0 pl-1.5", { truncate: !t.noTruncate }])
|
|
336
336
|
}, k(t.placeholder), 3)),
|
|
337
|
-
t.single ? (i(!0), d(
|
|
337
|
+
t.single ? (i(!0), d(j, { key: 1 }, W(a.value, (s) => (i(), d("li", {
|
|
338
338
|
key: `chip-${s[t.trackBy]}`,
|
|
339
|
-
class:
|
|
339
|
+
class: P(["stash-select__selected mr-0 pl-1.5", { truncate: !t.noTruncate }])
|
|
340
340
|
}, [
|
|
341
|
-
|
|
341
|
+
A(e.$slots, "selected", {
|
|
342
342
|
option: s,
|
|
343
343
|
onRemove: () => _(s),
|
|
344
344
|
chipSelectedClass: "stash-select__chip"
|
|
345
345
|
}, () => [
|
|
346
|
-
|
|
346
|
+
D(k(s[t.displayBy] || s) + " ", 1),
|
|
347
347
|
f("button", {
|
|
348
348
|
tabindex: "-1",
|
|
349
349
|
class: "stash-select__remove",
|
|
350
|
-
onKeypress: fe(
|
|
351
|
-
onMousedown:
|
|
350
|
+
onKeypress: fe(U((b) => _(s), ["prevent"]), ["enter"]),
|
|
351
|
+
onMousedown: U((b) => _(s), ["prevent", "stop"])
|
|
352
352
|
}, [
|
|
353
|
-
S(
|
|
353
|
+
S(L, {
|
|
354
354
|
icon: "close",
|
|
355
355
|
name: "close",
|
|
356
356
|
size: "small"
|
|
357
357
|
})
|
|
358
358
|
], 40, pt)
|
|
359
|
-
]
|
|
360
|
-
], 2))), 128)) : (i(!0), d(
|
|
359
|
+
])
|
|
360
|
+
], 2))), 128)) : (i(!0), d(j, { key: 2 }, W(a.value, (s) => (i(), d("li", {
|
|
361
361
|
key: `chip-${s[t.trackBy]}`,
|
|
362
362
|
class: "inline-block"
|
|
363
363
|
}, [
|
|
364
|
-
|
|
364
|
+
A(e.$slots, "selected", {
|
|
365
365
|
option: s,
|
|
366
366
|
onRemove: () => _(s),
|
|
367
367
|
chipSelectedClass: "stash-select__chip"
|
|
@@ -374,11 +374,11 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
374
374
|
onRemove: (b) => _(s)
|
|
375
375
|
}, {
|
|
376
376
|
default: x(() => [
|
|
377
|
-
|
|
377
|
+
D(k(s[t.displayBy] || s), 1)
|
|
378
378
|
]),
|
|
379
379
|
_: 2
|
|
380
380
|
}, 1032, ["onRemove"])
|
|
381
|
-
]
|
|
381
|
+
])
|
|
382
382
|
]))), 128))
|
|
383
383
|
], 512),
|
|
384
384
|
Be.value ? (i(), d("div", ht, [
|
|
@@ -390,41 +390,41 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
390
390
|
onRemove: Ee
|
|
391
391
|
}, {
|
|
392
392
|
default: x(() => [
|
|
393
|
-
|
|
393
|
+
D(k(ke.value), 1)
|
|
394
394
|
]),
|
|
395
395
|
_: 1
|
|
396
396
|
})
|
|
397
|
-
])) :
|
|
398
|
-
t.icon ? (i(),
|
|
397
|
+
])) : N("", !0),
|
|
398
|
+
t.icon ? (i(), ee(L, {
|
|
399
399
|
key: 1,
|
|
400
|
-
class:
|
|
400
|
+
class: P(["stash-select__icon", { "text-ice-500": t.disabled }]),
|
|
401
401
|
"data-test": "stash-select|toggle-icon",
|
|
402
402
|
name: t.icon,
|
|
403
|
-
onMousedown: l[0] || (l[0] =
|
|
404
|
-
}, null, 8, ["name", "class"])) :
|
|
405
|
-
(i(),
|
|
403
|
+
onMousedown: l[0] || (l[0] = U((s) => u.value && E(), ["prevent"]))
|
|
404
|
+
}, null, 8, ["name", "class"])) : N("", !0),
|
|
405
|
+
(i(), ee(Le, {
|
|
406
406
|
to: t.teleportTo,
|
|
407
407
|
disabled: !t.enableTeleport
|
|
408
408
|
}, [
|
|
409
409
|
S(Ve, { name: "fade" }, {
|
|
410
410
|
default: x(() => [
|
|
411
|
-
|
|
411
|
+
H(f("div", {
|
|
412
412
|
ref_key: "optionsWrapperRef",
|
|
413
413
|
ref: O,
|
|
414
|
-
class: "stash-select__border-selector w-full shadow-2xl",
|
|
414
|
+
class: "stash-select stash-select__border-selector w-full shadow-2xl",
|
|
415
415
|
style: Ke(B(ye)),
|
|
416
|
-
onClick: l[3] || (l[3] =
|
|
416
|
+
onClick: l[3] || (l[3] = U(() => {
|
|
417
417
|
}, ["stop"]))
|
|
418
418
|
}, [
|
|
419
|
-
|
|
420
|
-
|
|
419
|
+
J.value ? (i(), d("div", vt, [
|
|
420
|
+
H(f("input", {
|
|
421
421
|
ref_key: "searchRef",
|
|
422
|
-
ref:
|
|
422
|
+
ref: ae,
|
|
423
423
|
"onUpdate:modelValue": l[1] || (l[1] = (s) => y.value = s),
|
|
424
424
|
type: "text",
|
|
425
425
|
autocomplete: "off",
|
|
426
426
|
class: "stash-select__search",
|
|
427
|
-
"data-test": B(
|
|
427
|
+
"data-test": B(V)["data-test"] ? B(V)["data-test"] + "-search" : "stash-select|search",
|
|
428
428
|
placeholder: t.searchPlaceholder,
|
|
429
429
|
spellcheck: !1,
|
|
430
430
|
onInput: l[2] || (l[2] = //@ts-ignore
|
|
@@ -432,48 +432,48 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
432
432
|
}, null, 40, mt), [
|
|
433
433
|
[Ge, y.value]
|
|
434
434
|
]),
|
|
435
|
-
S(
|
|
435
|
+
S(L, {
|
|
436
436
|
name: "search",
|
|
437
437
|
class: "text-ice-500"
|
|
438
438
|
})
|
|
439
|
-
])) :
|
|
439
|
+
])) : N("", !0),
|
|
440
440
|
f("ul", yt, [
|
|
441
|
-
(i(!0), d(
|
|
441
|
+
(i(!0), d(j, null, W($.value, (s, b) => (i(), d("li", {
|
|
442
442
|
key: `option-${s[t.trackBy]}`,
|
|
443
443
|
"data-test": s[t.trackBy],
|
|
444
|
-
class:
|
|
445
|
-
onClick: ($e) =>
|
|
446
|
-
onMouseenter:
|
|
444
|
+
class: P(Ie(s, b)),
|
|
445
|
+
onClick: ($e) => G(s),
|
|
446
|
+
onMouseenter: U(($e) => q(b), ["self"])
|
|
447
447
|
}, [
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
]
|
|
448
|
+
A(e.$slots, "option", { option: s }, () => [
|
|
449
|
+
D(k(s[t.displayBy] || s), 1)
|
|
450
|
+
]),
|
|
451
451
|
T(s) && !t.hideCheck ? (i(), d("span", gt, [
|
|
452
|
-
S(
|
|
452
|
+
S(L, {
|
|
453
453
|
class: "text-blue-500",
|
|
454
454
|
name: "check"
|
|
455
455
|
})
|
|
456
|
-
])) :
|
|
456
|
+
])) : N("", !0)
|
|
457
457
|
], 42, _t))), 128)),
|
|
458
|
-
|
|
459
|
-
S(
|
|
458
|
+
H(f("li", bt, [
|
|
459
|
+
S(L, {
|
|
460
460
|
"data-test": "stash-select|options-loading",
|
|
461
461
|
name: "working",
|
|
462
462
|
class: "animate-spin text-ice-500"
|
|
463
463
|
})
|
|
464
464
|
], 512), [
|
|
465
|
-
[
|
|
465
|
+
[te, t.loading || re.value]
|
|
466
466
|
]),
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
l[6] || (l[6] =
|
|
470
|
-
]
|
|
467
|
+
H(f("li", Bt, [
|
|
468
|
+
A(e.$slots, "no-options", {}, () => [
|
|
469
|
+
l[6] || (l[6] = D(" No options ", -1))
|
|
470
|
+
])
|
|
471
471
|
], 512), [
|
|
472
|
-
[
|
|
472
|
+
[te, !t.loading && !re.value && !$.value.length]
|
|
473
473
|
])
|
|
474
474
|
])
|
|
475
475
|
], 4), [
|
|
476
|
-
[
|
|
476
|
+
[te, u.value && !t.disabled]
|
|
477
477
|
])
|
|
478
478
|
]),
|
|
479
479
|
_: 3
|
|
@@ -481,23 +481,25 @@ const rt = { class: "flex h-input items-center text-sm" }, it = ["id", "aria-lab
|
|
|
481
481
|
], 8, ["to", "disabled"]))
|
|
482
482
|
], 40, ft)
|
|
483
483
|
], 42, dt)), [
|
|
484
|
-
[B(st),
|
|
484
|
+
[B(st), Me]
|
|
485
485
|
])
|
|
486
486
|
]),
|
|
487
487
|
key: "1"
|
|
488
488
|
},
|
|
489
|
-
(n =
|
|
489
|
+
(n = X.hint) != null && n.call(X) ? {
|
|
490
490
|
name: "hint",
|
|
491
491
|
fn: x(() => [
|
|
492
|
-
|
|
492
|
+
A(e.$slots, "hint")
|
|
493
493
|
]),
|
|
494
494
|
key: "2"
|
|
495
495
|
} : void 0
|
|
496
496
|
]), 1040, ["class", "error-text", "hint-text"]);
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
|
-
}),
|
|
499
|
+
}), St = {}, wt = {
|
|
500
|
+
$style: St
|
|
501
|
+
}, Vt = /* @__PURE__ */ ot(kt, [["__cssModules", wt]]);
|
|
500
502
|
export {
|
|
501
|
-
|
|
503
|
+
Vt as default
|
|
502
504
|
};
|
|
503
505
|
//# sourceMappingURL=Select.js.map
|