@ac-design/design-system 2.2.1 → 2.4.0
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/lib/compat.css +421 -0
- package/dist/lib/components/AcAppSwitcher.vue.d.ts +1 -1
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/lib/components/AcAreaChart.vue.d.ts +1 -1
- package/dist/lib/components/AcBarChart.vue.d.ts +1 -1
- package/dist/lib/components/AcButton.vue.d.ts +25 -13
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +122 -71
- package/dist/lib/components/AcCard.vue.d.ts +11 -5
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +99 -51
- package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/lib/components/AcCheckBox.vue.d.ts +4 -1
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +50 -50
- package/dist/lib/components/AcCircularProgress.vue.d.ts +1 -1
- package/dist/lib/components/AcCodeEditor.vue.d.ts +12 -0
- package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +240 -207
- package/dist/lib/components/AcColorInput.vue.d.ts +4 -4
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +72 -66
- package/dist/lib/components/AcCostSummary.vue.d.ts +1 -1
- package/dist/lib/components/AcDatePicker.vue.d.ts +41 -10
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +554 -446
- package/dist/lib/components/AcDeleteModal.vue.d.ts +1 -1
- package/dist/lib/components/AcDonutChart.vue.d.ts +2 -2
- package/dist/lib/components/AcDropdown.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcErrorState.vue.d.ts +1 -1
- package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcGraphChart.vue.d.ts +2 -2
- package/dist/lib/components/AcHeader.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue.d.ts +86 -44
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +319 -86
- package/dist/lib/components/AcKeyValueInput.vue.d.ts +34 -54
- package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +134 -106
- package/dist/lib/components/AcLineChart.vue.d.ts +1 -1
- package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +6 -0
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +74 -58
- package/dist/lib/components/AcMapChart.vue.d.ts +2 -2
- package/dist/lib/components/AcModal.vue.d.ts +1 -1
- package/dist/lib/components/AcNavbar.vue.d.ts +2 -0
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +31 -25
- package/dist/lib/components/AcNotificationMenu.vue.d.ts +1 -1
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +24 -24
- package/dist/lib/components/AcNumberInput.vue.d.ts +55 -45
- package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +159 -99
- package/dist/lib/components/AcRadioCard.js +5 -0
- package/dist/lib/components/AcRadioCard.vue.d.ts +55 -0
- package/dist/lib/components/AcRadioCard.vue_vue_type_script_setup_true_lang.js +135 -0
- package/dist/lib/components/AcSelect.vue.d.ts +46 -6
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +309 -197
- package/dist/lib/components/AcSidePanel.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebar.vue.d.ts +9 -0
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +113 -94
- package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +19 -18
- package/dist/lib/components/AcSlider.vue.d.ts +2 -2
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/lib/components/AcTable.vue.d.ts +50 -5
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +257 -129
- package/dist/lib/components/AcTagInput.vue.d.ts +23 -4
- package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +126 -114
- package/dist/lib/components/AcTaintInput.js +5 -0
- package/dist/lib/components/AcTaintInput.vue.d.ts +44 -0
- package/dist/lib/components/AcTaintInput.vue_vue_type_script_setup_true_lang.js +208 -0
- package/dist/lib/components/AcTextarea.vue.d.ts +64 -4
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +159 -68
- package/dist/lib/components/AcThemeMode.vue.d.ts +10 -2
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +53 -42
- package/dist/lib/components/AcTimePicker.vue.d.ts +36 -11
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +232 -168
- package/dist/lib/components/AcTooltip.vue.d.ts +3 -3
- package/dist/lib/components/AcUserMenu.vue.d.ts +8 -0
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +126 -109
- package/dist/lib/components/index.d.ts +2 -0
- package/dist/lib/components/types.d.ts +2 -0
- package/dist/lib/composables/useToast.d.ts +2 -2
- package/dist/lib/index.d.ts +2 -1
- package/dist/lib/index.js +51 -49
- package/package.json +1 -1
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import e from "./AcSpinner.js";
|
|
2
2
|
import { fixedFrame as t } from "./fixedFrame.js";
|
|
3
|
-
import { Fragment as n, Teleport as r, Transition as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as ee, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as te, nextTick as ne, normalizeClass as p, normalizeStyle as re, onBeforeUnmount as ie, openBlock as m, ref as h, renderList as g, renderSlot as
|
|
3
|
+
import { Fragment as n, Teleport as r, Transition as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as ee, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as te, nextTick as ne, normalizeClass as p, normalizeStyle as re, onBeforeUnmount as ie, onMounted as ae, openBlock as m, ref as h, renderList as g, renderSlot as _, resolveDynamicComponent as oe, toDisplayString as v, unref as y, useAttrs as se, useId as ce, useModel as le, useSlots as ue, vModelText as de, watch as b, withCtx as fe, withDirectives as pe, withModifiers as x } from "vue";
|
|
4
4
|
import { Check as me, ChevronDown as he, ChevronUp as ge, Plus as _e, RefreshCw as ve, X as ye } from "@lucide/vue";
|
|
5
5
|
//#region src/lib/components/AcSelect.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var be = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
|
|
9
9
|
}, xe = {
|
|
10
|
-
key:
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "text-muted"
|
|
12
|
+
}, Se = {
|
|
13
|
+
key: 2,
|
|
11
14
|
class: "text-danger",
|
|
12
15
|
"aria-hidden": "true"
|
|
13
|
-
},
|
|
16
|
+
}, Ce = [
|
|
14
17
|
"id",
|
|
15
18
|
"tabindex",
|
|
16
19
|
"aria-expanded",
|
|
@@ -19,42 +22,44 @@ var be = {
|
|
|
19
22
|
"aria-describedby",
|
|
20
23
|
"aria-disabled",
|
|
21
24
|
"aria-invalid",
|
|
25
|
+
"aria-readonly",
|
|
22
26
|
"aria-required",
|
|
23
|
-
"aria-activedescendant"
|
|
24
|
-
|
|
27
|
+
"aria-activedescendant",
|
|
28
|
+
"aria-busy"
|
|
29
|
+
], we = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-2" }, Te = { class: "truncate" }, Ee = [
|
|
25
30
|
"aria-label",
|
|
26
31
|
"disabled",
|
|
27
32
|
"onClick"
|
|
28
|
-
],
|
|
29
|
-
key: 1,
|
|
30
|
-
class: "truncate"
|
|
31
|
-
}, De = {
|
|
33
|
+
], De = {
|
|
32
34
|
key: 2,
|
|
35
|
+
class: "truncate"
|
|
36
|
+
}, Oe = {
|
|
37
|
+
key: 3,
|
|
33
38
|
class: "truncate text-muted"
|
|
34
|
-
},
|
|
39
|
+
}, ke = { class: "flex shrink-0 items-center gap-1 text-muted" }, Ae = ["disabled"], je = {
|
|
35
40
|
class: "inline-flex rounded-full p-1 transition-colors hover:bg-accent-hover hover:text-primary",
|
|
36
41
|
"aria-hidden": "true"
|
|
37
|
-
},
|
|
42
|
+
}, Me = {
|
|
38
43
|
key: 0,
|
|
39
44
|
class: "border-b border-border p-3"
|
|
40
|
-
},
|
|
45
|
+
}, Ne = ["aria-activedescendant"], Pe = ["aria-multiselectable", "aria-labelledby"], Fe = {
|
|
41
46
|
key: 0,
|
|
42
47
|
role: "presentation",
|
|
43
48
|
class: "px-4 pt-2 pb-1 text-sm font-semibold tracking-[0.08em] text-muted uppercase"
|
|
44
|
-
},
|
|
49
|
+
}, Ie = [
|
|
45
50
|
"id",
|
|
46
51
|
"aria-selected",
|
|
47
52
|
"aria-disabled",
|
|
48
53
|
"onMouseenter",
|
|
49
54
|
"onClick"
|
|
50
|
-
],
|
|
55
|
+
], Le = { class: "min-w-0 flex-1" }, Re = { class: "block truncate" }, ze = {
|
|
51
56
|
key: 0,
|
|
52
57
|
class: "block truncate text-xs font-normal text-muted"
|
|
53
|
-
},
|
|
58
|
+
}, Be = ["id"], Ve = { class: "min-w-0 flex-1 truncate" }, He = {
|
|
54
59
|
key: 1,
|
|
55
60
|
role: "presentation",
|
|
56
61
|
class: "px-4 py-3 text-center text-base text-muted"
|
|
57
|
-
},
|
|
62
|
+
}, Ue = /*@__PURE__*/ d({
|
|
58
63
|
inheritAttrs: !1,
|
|
59
64
|
__name: "AcSelect",
|
|
60
65
|
props: /*@__PURE__*/ f({
|
|
@@ -90,6 +95,10 @@ var be = {
|
|
|
90
95
|
type: Boolean,
|
|
91
96
|
default: !1
|
|
92
97
|
},
|
|
98
|
+
refreshing: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: !1
|
|
101
|
+
},
|
|
93
102
|
disabled: {
|
|
94
103
|
type: Boolean,
|
|
95
104
|
default: !1
|
|
@@ -101,57 +110,137 @@ var be = {
|
|
|
101
110
|
errorMsg: { default: "" },
|
|
102
111
|
hint: { default: "" },
|
|
103
112
|
size: { default: "normal" },
|
|
104
|
-
|
|
113
|
+
variant: { default: "outline" },
|
|
114
|
+
highlight: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: !1
|
|
117
|
+
},
|
|
118
|
+
readonly: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: !1
|
|
121
|
+
},
|
|
122
|
+
validateRequired: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: !1
|
|
125
|
+
},
|
|
126
|
+
hideUnknownValues: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: !1
|
|
129
|
+
},
|
|
130
|
+
emptyValue: { default: null },
|
|
131
|
+
initEmptyArray: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: !1
|
|
134
|
+
},
|
|
135
|
+
emptyText: { default: "" },
|
|
136
|
+
hideRefreshWhenDisabled: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: !1
|
|
139
|
+
},
|
|
140
|
+
looseChips: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
default: !1
|
|
143
|
+
},
|
|
144
|
+
noResultText: { default: "No results" },
|
|
145
|
+
placement: { default: "bottom" }
|
|
105
146
|
}, {
|
|
106
147
|
modelValue: { default: null },
|
|
107
|
-
modelModifiers: {}
|
|
148
|
+
modelModifiers: {},
|
|
149
|
+
open: {
|
|
150
|
+
type: Boolean,
|
|
151
|
+
default: !1
|
|
152
|
+
},
|
|
153
|
+
openModifiers: {}
|
|
108
154
|
}),
|
|
109
155
|
emits: /*@__PURE__*/ f([
|
|
110
156
|
"select",
|
|
111
157
|
"create",
|
|
112
158
|
"remove",
|
|
113
159
|
"search",
|
|
114
|
-
"refresh"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
160
|
+
"refresh",
|
|
161
|
+
"change"
|
|
162
|
+
], ["update:modelValue", "update:open"]),
|
|
163
|
+
setup(d, { expose: f, emit: Ue }) {
|
|
164
|
+
let S = d, C = Ue, w = ue(), T = le(d, "modelValue"), E = (e) => T.value = e, D = le(d, "open"), We = {
|
|
165
|
+
xs: {
|
|
166
|
+
field: "min-h-[26px] pr-1 pl-2 text-xs",
|
|
167
|
+
chips: ["py-0", "py-1"],
|
|
168
|
+
custom: "py-1"
|
|
169
|
+
},
|
|
170
|
+
compact: {
|
|
171
|
+
field: "min-h-8 pr-1 pl-3 text-base",
|
|
172
|
+
chips: ["py-1", "py-1"],
|
|
173
|
+
custom: "py-[5px]"
|
|
174
|
+
},
|
|
175
|
+
xsmall: {
|
|
176
|
+
field: "min-h-[34px] pr-1 pl-3 text-base",
|
|
177
|
+
chips: ["py-1", "py-1.5"],
|
|
178
|
+
custom: "py-1.5"
|
|
179
|
+
},
|
|
180
|
+
small: {
|
|
181
|
+
field: "min-h-9 pr-1 pl-4 text-base",
|
|
182
|
+
chips: ["py-1", "py-1.5"],
|
|
183
|
+
custom: "py-[7px]"
|
|
184
|
+
},
|
|
185
|
+
medium: {
|
|
186
|
+
field: "min-h-[38px] pr-1 pl-4 text-base",
|
|
187
|
+
chips: ["py-1", "py-2"],
|
|
188
|
+
custom: "py-2"
|
|
189
|
+
},
|
|
190
|
+
normal: {
|
|
191
|
+
field: "min-h-10.5 pr-1 pl-5 text-base",
|
|
192
|
+
chips: ["py-1.5", "py-2.5"],
|
|
193
|
+
custom: "py-2.5"
|
|
194
|
+
},
|
|
195
|
+
large: {
|
|
196
|
+
field: "min-h-[50px] pr-1 pl-6 text-lg",
|
|
197
|
+
chips: ["py-1.5", "py-3"],
|
|
198
|
+
custom: "py-3"
|
|
199
|
+
}
|
|
200
|
+
}, O = ce(), k = se(), Ge = a(() => ({
|
|
201
|
+
class: k.class,
|
|
202
|
+
style: k.style
|
|
203
|
+
})), Ke = a(() => {
|
|
204
|
+
let { class: e, style: t, ...n } = k;
|
|
122
205
|
return n;
|
|
123
|
-
}),
|
|
206
|
+
}), A = `${O}-list`, qe = `${O}-label`, Je = `${O}-hint`, Ye = `${O}-msg`, Xe = h(null), j = h(null), M = h(null), Ze = h(null), N = h(""), P = h(-1), F = h({
|
|
124
207
|
left: 0,
|
|
125
208
|
width: 0,
|
|
126
209
|
maxHeight: 288
|
|
127
|
-
}),
|
|
128
|
-
let e =
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
210
|
+
}), I = a(() => {
|
|
211
|
+
let e = T.value;
|
|
212
|
+
if (e == null || e === "") return [];
|
|
213
|
+
let t = Array.isArray(e) ? e : [e];
|
|
214
|
+
return S.hideUnknownValues ? t.filter((e) => S.options.some((t) => L(t.value, e))) : t;
|
|
215
|
+
}), L = (e, t) => {
|
|
216
|
+
let n = S.by;
|
|
132
217
|
return typeof n == "function" ? n(e, t) : n && e && t && typeof e == "object" && typeof t == "object" ? e[n] === t[n] : e === t;
|
|
133
|
-
},
|
|
134
|
-
let t =
|
|
218
|
+
}, R = (e) => {
|
|
219
|
+
let t = S.by;
|
|
135
220
|
return String(typeof t == "string" && e && typeof e == "object" ? e[t] : e);
|
|
136
|
-
},
|
|
137
|
-
let n =
|
|
221
|
+
}, Qe = (e, t) => {
|
|
222
|
+
let n = S.by;
|
|
138
223
|
return e && typeof e == "object" ? typeof n == "string" ? String(e[n]) : `i${t}` : String(e);
|
|
139
|
-
},
|
|
224
|
+
}, z = (e) => I.value.some((t) => L(t, e.value)), B = a(() => I.value.map((e) => S.options.find((t) => L(t.value, e)) ?? {
|
|
140
225
|
value: e,
|
|
141
|
-
label:
|
|
142
|
-
})),
|
|
226
|
+
label: R(e)
|
|
227
|
+
})), V = a(() => I.value.length > 0), H = h(""), U = a(() => H.value || S.errorMsg);
|
|
228
|
+
function $e() {
|
|
229
|
+
S.validateRequired && S.required && !V.value ? H.value = `This field is required. Please select ${S.multiple ? "at least one option" : "an option"}.` : H.value = "";
|
|
230
|
+
}
|
|
231
|
+
let et = (e) => {
|
|
143
232
|
if (!e.some((e) => e.group)) return e;
|
|
144
233
|
let t = [];
|
|
145
234
|
return e.forEach((e) => {
|
|
146
235
|
let n = e.group ?? "";
|
|
147
236
|
t.includes(n) || t.push(n);
|
|
148
237
|
}), [...e].sort((e, n) => t.indexOf(e.group ?? "") - t.indexOf(n.group ?? ""));
|
|
149
|
-
},
|
|
150
|
-
let e =
|
|
151
|
-
return
|
|
152
|
-
}),
|
|
238
|
+
}, W = a(() => {
|
|
239
|
+
let e = N.value.trim().toLowerCase();
|
|
240
|
+
return et(e ? S.options.filter((t) => t.label.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e) || t.group?.toLowerCase().includes(e)) : S.options);
|
|
241
|
+
}), tt = a(() => {
|
|
153
242
|
let e = [];
|
|
154
|
-
return
|
|
243
|
+
return W.value.forEach((t, n) => {
|
|
155
244
|
let r = t.group ?? "", i = e.find((e) => e.name === r);
|
|
156
245
|
i || e.push(i = {
|
|
157
246
|
name: r,
|
|
@@ -161,16 +250,16 @@ var be = {
|
|
|
161
250
|
index: n
|
|
162
251
|
});
|
|
163
252
|
}), e;
|
|
164
|
-
}),
|
|
165
|
-
let e =
|
|
166
|
-
if (!
|
|
167
|
-
let t =
|
|
253
|
+
}), G = (e) => `${O}-opt-${e}`, K = a(() => N.value.trim()), q = a(() => {
|
|
254
|
+
let e = K.value.toLowerCase();
|
|
255
|
+
if (!S.creatable || !S.searchable || !e) return !1;
|
|
256
|
+
let t = S.options.some((t) => t.label.toLowerCase() === e || R(t.value).toLowerCase() === e), n = I.value.some((t) => R(t).toLowerCase() === e);
|
|
168
257
|
return !t && !n;
|
|
169
|
-
}),
|
|
170
|
-
let e =
|
|
258
|
+
}), J = a(() => W.value.length + +!!q.value - 1), Y = a(() => W.value.length), nt = () => {
|
|
259
|
+
let e = j.value;
|
|
171
260
|
if (!e) return;
|
|
172
|
-
let n = e.getBoundingClientRect(), r = t(), i = r.bottom - n.bottom - 4 - 8, a = n.top - r.top - 4 - 8;
|
|
173
|
-
|
|
261
|
+
let n = e.getBoundingClientRect(), r = t(), i = r.bottom - n.bottom - 4 - 8, a = n.top - r.top - 4 - 8, [o, s] = S.placement === "top" ? [a, i] : [i, a], c = o < 180 && s > o, l = S.placement === "top" ? !c : c;
|
|
262
|
+
F.value = l ? {
|
|
174
263
|
bottom: r.bottom - n.top + 4,
|
|
175
264
|
left: n.left - r.left,
|
|
176
265
|
width: n.width,
|
|
@@ -181,254 +270,277 @@ var be = {
|
|
|
181
270
|
width: n.width,
|
|
182
271
|
maxHeight: Math.min(288, i)
|
|
183
272
|
};
|
|
184
|
-
},
|
|
185
|
-
for (let n = e; n >= 0 && n <=
|
|
273
|
+
}, X = (e = 0, t = 1) => {
|
|
274
|
+
for (let n = e; n >= 0 && n <= J.value; n += t) if (!W.value[n]?.disabled) return n;
|
|
186
275
|
return -1;
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
276
|
+
}, rt = () => {
|
|
277
|
+
S.disabled || S.loading || S.readonly || D.value || (D.value = !0);
|
|
278
|
+
}, it = async () => {
|
|
279
|
+
N.value = "", nt();
|
|
280
|
+
let e = W.value.findIndex((e) => z(e));
|
|
281
|
+
P.value = e >= 0 ? e : X(), document.addEventListener("pointerdown", mt, !0), window.addEventListener("scroll", $, !0), window.addEventListener("resize", $), await ne(), S.searchable && Ze.value?.focus(), Q();
|
|
282
|
+
}, Z = (e = !0) => {
|
|
283
|
+
D.value && (D.value = !1, P.value = -1, e && j.value?.focus());
|
|
284
|
+
}, at = () => D.value ? Z() : rt(), ot = (e) => {
|
|
195
285
|
if (!e.disabled) {
|
|
196
|
-
if (
|
|
197
|
-
let t = [...
|
|
198
|
-
n >= 0 ? (t.splice(n, 1),
|
|
199
|
-
} else
|
|
286
|
+
if (S.multiple) {
|
|
287
|
+
let t = [...I.value], n = t.findIndex((t) => L(t, e.value));
|
|
288
|
+
n >= 0 ? (t.splice(n, 1), C("remove", e)) : (t.push(e.value), C("select", e)), E(t);
|
|
289
|
+
} else E(e.value), C("select", e), Z();
|
|
200
290
|
}
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
},
|
|
204
|
-
let e =
|
|
205
|
-
if (!
|
|
291
|
+
}, st = (e) => {
|
|
292
|
+
E(S.multiple ? I.value.filter((t) => !L(t, e.value)) : S.emptyValue), C("remove", e);
|
|
293
|
+
}, ct = () => {
|
|
294
|
+
let e = K.value;
|
|
295
|
+
if (!q.value || !e) return;
|
|
206
296
|
let t = e, n = {
|
|
207
297
|
value: t,
|
|
208
298
|
label: e
|
|
209
299
|
};
|
|
210
|
-
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
},
|
|
214
|
-
let t =
|
|
300
|
+
S.multiple ? (E([...I.value, t]), N.value = "") : (E(t), Z()), C("select", n), C("create", e);
|
|
301
|
+
}, lt = () => {
|
|
302
|
+
B.value.forEach((e) => C("remove", e)), E(S.multiple ? [] : S.emptyValue), j.value?.focus();
|
|
303
|
+
}, ut = "", dt, Q = () => ne(() => M.value?.querySelector(`#${CSS.escape(G(P.value))}`)?.scrollIntoView({ block: "nearest" })), ft = (e) => {
|
|
304
|
+
let t = J.value + 1;
|
|
215
305
|
if (!t) return;
|
|
216
|
-
let n =
|
|
217
|
-
for (let r = 0; r < t && (n = (n + e + t) % t,
|
|
218
|
-
|
|
219
|
-
},
|
|
220
|
-
if (
|
|
306
|
+
let n = P.value;
|
|
307
|
+
for (let r = 0; r < t && (n = (n + e + t) % t, W.value[n]?.disabled); r++);
|
|
308
|
+
P.value = n, Q();
|
|
309
|
+
}, pt = (e) => {
|
|
310
|
+
if (S.disabled || S.readonly) return;
|
|
221
311
|
let t = e.key;
|
|
222
|
-
if (!
|
|
312
|
+
if (!D.value) {
|
|
223
313
|
[
|
|
224
314
|
"Enter",
|
|
225
315
|
" ",
|
|
226
316
|
"ArrowDown",
|
|
227
317
|
"ArrowUp"
|
|
228
|
-
].includes(t) ? (e.preventDefault(),
|
|
318
|
+
].includes(t) ? (e.preventDefault(), rt()) : t === "Backspace" && S.multiple && V.value && e.target === j.value && st(B.value[B.value.length - 1]);
|
|
229
319
|
return;
|
|
230
320
|
}
|
|
231
|
-
if (t === "ArrowDown") e.preventDefault(),
|
|
232
|
-
else if (t === "ArrowUp") e.preventDefault(),
|
|
233
|
-
else if (t === "Home") e.preventDefault(),
|
|
234
|
-
else if (t === "End") e.preventDefault(),
|
|
235
|
-
else if (t === "Enter" || t === " " && !
|
|
321
|
+
if (t === "ArrowDown") e.preventDefault(), ft(1);
|
|
322
|
+
else if (t === "ArrowUp") e.preventDefault(), ft(-1);
|
|
323
|
+
else if (t === "Home") e.preventDefault(), P.value = X(), Q();
|
|
324
|
+
else if (t === "End") e.preventDefault(), P.value = X(J.value, -1), Q();
|
|
325
|
+
else if (t === "Enter" || t === " " && !S.searchable) {
|
|
236
326
|
e.preventDefault();
|
|
237
|
-
let t =
|
|
238
|
-
t ?
|
|
239
|
-
} else if (t === "Escape") e.preventDefault(),
|
|
240
|
-
else if (t === "Tab")
|
|
241
|
-
else if (!
|
|
242
|
-
|
|
243
|
-
let e =
|
|
244
|
-
e >= 0 && (
|
|
327
|
+
let t = W.value[P.value];
|
|
328
|
+
t ? ot(t) : q.value && ct();
|
|
329
|
+
} else if (t === "Escape") e.preventDefault(), Z();
|
|
330
|
+
else if (t === "Tab") Z(!1);
|
|
331
|
+
else if (!S.searchable && t.length === 1 && !e.metaKey && !e.ctrlKey) {
|
|
332
|
+
ut += t.toLowerCase(), clearTimeout(dt), dt = setTimeout(() => ut = "", 500);
|
|
333
|
+
let e = W.value.findIndex((e) => !e.disabled && e.label.toLowerCase().startsWith(ut));
|
|
334
|
+
e >= 0 && (P.value = e, Q());
|
|
245
335
|
}
|
|
246
|
-
},
|
|
336
|
+
}, mt = (e) => {
|
|
247
337
|
let t = e.target;
|
|
248
|
-
|
|
249
|
-
},
|
|
250
|
-
e?.target instanceof Node &&
|
|
251
|
-
},
|
|
252
|
-
document.removeEventListener("pointerdown",
|
|
338
|
+
Xe.value?.contains(t) || M.value?.contains(t) || Z(!1);
|
|
339
|
+
}, $ = (e) => {
|
|
340
|
+
e?.target instanceof Node && M.value?.contains(e.target) || nt();
|
|
341
|
+
}, ht = () => {
|
|
342
|
+
document.removeEventListener("pointerdown", mt, !0), window.removeEventListener("scroll", $, !0), window.removeEventListener("resize", $);
|
|
253
343
|
};
|
|
254
|
-
|
|
255
|
-
if (
|
|
256
|
-
|
|
257
|
-
}),
|
|
258
|
-
|
|
259
|
-
}),
|
|
260
|
-
|
|
261
|
-
|
|
344
|
+
b(D, (e) => {
|
|
345
|
+
if (e) return it();
|
|
346
|
+
P.value = -1, ht(), $e();
|
|
347
|
+
}), b(() => T.value, (e) => {
|
|
348
|
+
$e(), C("change", e);
|
|
349
|
+
}), b(N, (e) => {
|
|
350
|
+
C("search", e), P.value = X();
|
|
351
|
+
}), ae(() => {
|
|
352
|
+
S.initEmptyArray && S.multiple && !T.value && E([]), D.value && it();
|
|
353
|
+
}), ie(ht);
|
|
354
|
+
let gt = h(!1), _t = a(() => D.value || gt.value), vt = a(() => [S.hint && Je, U.value && Ye].filter(Boolean).join(" ") || void 0), yt = a(() => !S.multiple && B.value[0]?.label || ""), bt = a(() => !S.multiple && (w.selected || w.content) && B.value[0] || null), xt = a(() => !!(S.label || S.readonly || w["label-icon"] || w["label-extra"])), St = a(() => We[S.size] ?? We.normal), Ct = a(() => S.readonly ? "bg-surface-muted" : S.variant === "soft" ? "bg-accent" : S.variant === "ghost" ? "bg-transparent" : "bg-background"), wt = a(() => S.variant !== "outline");
|
|
355
|
+
return f({ focus: () => j.value?.focus() }), (t, a) => (m(), c("div", te({
|
|
262
356
|
ref_key: "root",
|
|
263
|
-
ref:
|
|
264
|
-
},
|
|
357
|
+
ref: Xe
|
|
358
|
+
}, Ge.value, {
|
|
265
359
|
class: ["w-full", d.disabled && "opacity-50"],
|
|
266
360
|
"data-ac-ds": "",
|
|
267
361
|
"data-testid": "ac-select"
|
|
268
362
|
}), [
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
363
|
+
xt.value ? (m(), c("div", be, [
|
|
364
|
+
_(t.$slots, "label-icon"),
|
|
365
|
+
d.label ? (m(), c("label", {
|
|
366
|
+
key: 0,
|
|
367
|
+
id: qe,
|
|
368
|
+
onClick: a[0] ||= (e) => j.value?.focus()
|
|
369
|
+
}, v(d.label), 1)) : s("", !0),
|
|
370
|
+
d.readonly ? (m(), c("span", xe, "(read only)")) : s("", !0),
|
|
371
|
+
_(t.$slots, "label-extra"),
|
|
372
|
+
d.required ? (m(), c("span", Se, "*")) : s("", !0)
|
|
373
|
+
])) : s("", !0),
|
|
273
374
|
d.hint ? (m(), c("p", {
|
|
274
375
|
key: 1,
|
|
275
|
-
id:
|
|
376
|
+
id: Je,
|
|
276
377
|
class: "mb-2 text-base text-muted"
|
|
277
|
-
},
|
|
378
|
+
}, v(d.hint), 1)) : s("", !0),
|
|
278
379
|
l("div", te({
|
|
279
|
-
id: `${
|
|
380
|
+
id: `${y(O)}-trigger`,
|
|
280
381
|
ref_key: "trigger",
|
|
281
|
-
ref:
|
|
282
|
-
},
|
|
382
|
+
ref: j
|
|
383
|
+
}, Ke.value, {
|
|
283
384
|
role: "combobox",
|
|
284
385
|
tabindex: d.disabled ? -1 : 0,
|
|
285
386
|
"aria-haspopup": "listbox",
|
|
286
|
-
"aria-expanded":
|
|
287
|
-
"aria-controls":
|
|
288
|
-
"aria-labelledby": d.label ?
|
|
289
|
-
"aria-label": d.label ? void 0 :
|
|
290
|
-
"aria-describedby":
|
|
387
|
+
"aria-expanded": D.value,
|
|
388
|
+
"aria-controls": A,
|
|
389
|
+
"aria-labelledby": d.label ? qe : void 0,
|
|
390
|
+
"aria-label": d.label ? void 0 : y(k)["aria-label"] ?? d.placeholder,
|
|
391
|
+
"aria-describedby": vt.value,
|
|
291
392
|
"aria-disabled": d.disabled || void 0,
|
|
292
|
-
"aria-invalid": !!
|
|
393
|
+
"aria-invalid": !!U.value || void 0,
|
|
394
|
+
"aria-readonly": d.readonly || void 0,
|
|
293
395
|
"aria-required": d.required || void 0,
|
|
294
|
-
"aria-activedescendant":
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
d.
|
|
396
|
+
"aria-activedescendant": D.value && !d.searchable && P.value >= 0 ? G(P.value) : void 0,
|
|
397
|
+
"aria-busy": d.refreshing || void 0,
|
|
398
|
+
class: ["group flex w-full items-center gap-2 rounded-10 border text-left font-medium text-heading transition-[color,background-color,border-color,box-shadow] duration-200 outline-none", [
|
|
399
|
+
St.value.field,
|
|
400
|
+
Ct.value,
|
|
401
|
+
d.multiple && V.value && St.value.chips[+!!d.looseChips],
|
|
402
|
+
d.disabled || d.loading || d.readonly ? "cursor-not-allowed" : "cursor-pointer",
|
|
403
|
+
d.highlight && "ring-2 ring-primary/20 ring-offset-2 ring-offset-surface",
|
|
404
|
+
U.value ? ["border-danger/50", _t.value && "border-danger shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]"] : wt.value ? [
|
|
405
|
+
"border-transparent",
|
|
406
|
+
_t.value && "shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-primary)_20%,transparent)]",
|
|
407
|
+
d.variant === "soft" && !d.disabled && "hover:bg-accent-hover"
|
|
408
|
+
] : _t.value ? "focus-ring" : ["border-border", !d.disabled && !d.readonly && "hover:border-accent-active"]
|
|
300
409
|
]],
|
|
301
|
-
onClick:
|
|
302
|
-
onKeydown:
|
|
303
|
-
onFocus: a[2] ||= (e) =>
|
|
304
|
-
onBlur: a[3] ||= (e) =>
|
|
305
|
-
}), [l("div",
|
|
306
|
-
key:
|
|
410
|
+
onClick: at,
|
|
411
|
+
onKeydown: pt,
|
|
412
|
+
onFocus: a[2] ||= (e) => gt.value = !0,
|
|
413
|
+
onBlur: a[3] ||= (e) => gt.value = !1
|
|
414
|
+
}), [l("div", we, [d.multiple && V.value ? (m(!0), c(n, { key: 0 }, g(B.value, (e, t) => (m(), c("span", {
|
|
415
|
+
key: Qe(e.value, t),
|
|
307
416
|
class: "inline-flex max-w-full items-center gap-2 rounded-10 bg-accent px-2 text-xs text-heading"
|
|
308
|
-
}, [l("span",
|
|
417
|
+
}, [l("span", Te, v(e.label), 1), l("button", {
|
|
309
418
|
type: "button",
|
|
310
419
|
class: "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full p-1 transition-colors hover:bg-accent-hover hover:text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
311
420
|
"aria-label": `Remove ${e.label}`,
|
|
312
421
|
disabled: d.disabled,
|
|
313
|
-
onClick:
|
|
314
|
-
}, [u(
|
|
422
|
+
onClick: x((t) => st(e), ["stop"])
|
|
423
|
+
}, [u(y(ye), {
|
|
315
424
|
class: "size-4",
|
|
316
425
|
"aria-hidden": "true"
|
|
317
|
-
})], 8,
|
|
426
|
+
})], 8, Ee)]))), 128)) : bt.value ? (m(), c("span", {
|
|
427
|
+
key: 1,
|
|
428
|
+
class: p(["min-w-0 flex-1", St.value.custom])
|
|
429
|
+
}, [_(t.$slots, "selected", { option: bt.value }, () => [_(t.$slots, "content", { option: bt.value })])], 2)) : yt.value ? (m(), c("span", De, v(yt.value), 1)) : (m(), c("span", Oe, v(d.placeholder), 1))]), l("span", ke, [
|
|
318
430
|
d.loading ? (m(), o(e, {
|
|
319
431
|
key: 0,
|
|
320
432
|
class: "text-primary"
|
|
321
|
-
})) : d.refreshable ? (m(), c("button", {
|
|
433
|
+
})) : d.refreshable && !(d.disabled && d.hideRefreshWhenDisabled) ? (m(), c("button", {
|
|
322
434
|
key: 1,
|
|
323
435
|
type: "button",
|
|
324
436
|
class: "inline-flex size-6 cursor-pointer items-center justify-center rounded-full transition-colors hover:bg-accent-hover hover:text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
325
437
|
"aria-label": "Refresh options",
|
|
326
438
|
disabled: d.disabled,
|
|
327
|
-
onClick: a[1] ||=
|
|
328
|
-
}, [u(
|
|
329
|
-
class: "size-4",
|
|
439
|
+
onClick: a[1] ||= x((e) => C("refresh"), ["stop"])
|
|
440
|
+
}, [u(y(ve), {
|
|
441
|
+
class: p(["size-4", d.refreshing && "motion-safe:animate-spin"]),
|
|
330
442
|
"aria-hidden": "true"
|
|
331
|
-
})], 8,
|
|
332
|
-
d.clearable &&
|
|
443
|
+
}, null, 8, ["class"])], 8, Ae)) : s("", !0),
|
|
444
|
+
d.clearable && V.value && !d.disabled && !d.loading && !d.readonly ? (m(), c("button", {
|
|
333
445
|
key: 2,
|
|
334
446
|
type: "button",
|
|
335
447
|
class: "inline-flex size-6 cursor-pointer items-center justify-center rounded-full transition-colors hover:bg-accent-hover hover:text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
336
448
|
"aria-label": "Clear selection",
|
|
337
|
-
onClick:
|
|
338
|
-
}, [u(
|
|
449
|
+
onClick: x(lt, ["stop"])
|
|
450
|
+
}, [u(y(ye), {
|
|
339
451
|
class: "size-4",
|
|
340
452
|
"aria-hidden": "true"
|
|
341
453
|
})])) : s("", !0),
|
|
342
|
-
l("span",
|
|
343
|
-
])], 16,
|
|
344
|
-
|
|
454
|
+
l("span", je, [(m(), o(oe(D.value ? y(ge) : y(he)), { class: "size-4" }))])
|
|
455
|
+
])], 16, Ce),
|
|
456
|
+
U.value ? (m(), c("p", {
|
|
345
457
|
key: 2,
|
|
346
|
-
id:
|
|
458
|
+
id: Ye,
|
|
347
459
|
class: "mt-1 text-base text-danger-strong",
|
|
348
460
|
role: "alert"
|
|
349
|
-
},
|
|
461
|
+
}, v(U.value), 1)) : s("", !0),
|
|
350
462
|
(m(), o(r, { to: "body" }, [u(i, {
|
|
351
463
|
"enter-active-class": "transition-opacity duration-100 ease-out motion-reduce:transition-none",
|
|
352
464
|
"enter-from-class": "opacity-0",
|
|
353
465
|
"leave-active-class": "transition-opacity duration-75 ease-in motion-reduce:transition-none",
|
|
354
466
|
"leave-to-class": "opacity-0"
|
|
355
467
|
}, {
|
|
356
|
-
default: fe(() => [
|
|
468
|
+
default: fe(() => [D.value ? (m(), c("div", {
|
|
357
469
|
key: 0,
|
|
358
470
|
ref_key: "panel",
|
|
359
|
-
ref:
|
|
471
|
+
ref: M,
|
|
360
472
|
class: "fixed z-[90] flex flex-col overflow-hidden rounded-10 border border-border bg-background shadow-lg",
|
|
361
473
|
style: re({
|
|
362
|
-
top:
|
|
363
|
-
bottom:
|
|
364
|
-
left: `${
|
|
365
|
-
width: `${
|
|
366
|
-
maxHeight: `${
|
|
474
|
+
top: F.value.top === void 0 ? void 0 : `${F.value.top}px`,
|
|
475
|
+
bottom: F.value.bottom === void 0 ? void 0 : `${F.value.bottom}px`,
|
|
476
|
+
left: `${F.value.left}px`,
|
|
477
|
+
width: `${F.value.width}px`,
|
|
478
|
+
maxHeight: `${F.value.maxHeight}px`
|
|
367
479
|
}),
|
|
368
480
|
"data-ac-ds": "",
|
|
369
481
|
"data-testid": "ac-select-panel"
|
|
370
|
-
}, [d.searchable ? (m(), c("div",
|
|
482
|
+
}, [d.searchable ? (m(), c("div", Me, [pe(l("input", {
|
|
371
483
|
ref_key: "searchInput",
|
|
372
|
-
ref:
|
|
373
|
-
"onUpdate:modelValue": a[4] ||= (e) =>
|
|
484
|
+
ref: Ze,
|
|
485
|
+
"onUpdate:modelValue": a[4] ||= (e) => N.value = e,
|
|
374
486
|
type: "text",
|
|
375
487
|
placeholder: "Search…",
|
|
376
488
|
"aria-label": "Search options",
|
|
377
|
-
"aria-controls":
|
|
378
|
-
"aria-activedescendant":
|
|
489
|
+
"aria-controls": A,
|
|
490
|
+
"aria-activedescendant": P.value >= 0 ? G(P.value) : void 0,
|
|
379
491
|
class: "h-9.5 w-full rounded-10 border border-border bg-background px-3 text-base text-heading transition-[border-color,box-shadow] duration-200 outline-none placeholder:text-muted/80 hover:border-accent-active focus:focus-ring",
|
|
380
|
-
onKeydown:
|
|
381
|
-
}, null, 40,
|
|
382
|
-
id:
|
|
492
|
+
onKeydown: pt
|
|
493
|
+
}, null, 40, Ne), [[de, N.value]])])) : s("", !0), l("ul", {
|
|
494
|
+
id: A,
|
|
383
495
|
role: "listbox",
|
|
384
496
|
"aria-multiselectable": d.multiple || void 0,
|
|
385
|
-
"aria-labelledby": d.label ?
|
|
497
|
+
"aria-labelledby": d.label ? qe : void 0,
|
|
386
498
|
class: "ac-scrollbar max-h-60 min-h-0 flex-1 p-1"
|
|
387
499
|
}, [
|
|
388
|
-
(m(!0), c(n, null, g(
|
|
389
|
-
id:
|
|
390
|
-
key:
|
|
500
|
+
(m(!0), c(n, null, g(tt.value, (e) => (m(), c(n, { key: e.name }, [e.name ? (m(), c("li", Fe, v(e.name), 1)) : s("", !0), (m(!0), c(n, null, g(e.items, ({ option: e, index: n }) => (m(), c("li", {
|
|
501
|
+
id: G(n),
|
|
502
|
+
key: Qe(e.value, n),
|
|
391
503
|
role: "option",
|
|
392
|
-
"aria-selected":
|
|
504
|
+
"aria-selected": z(e),
|
|
393
505
|
"aria-disabled": e.disabled || void 0,
|
|
394
|
-
class: p(["flex cursor-pointer items-start gap-2.5 rounded-6 px-4 py-2 text-base text-heading transition-colors", [e.disabled && "cursor-not-allowed opacity-50", n ===
|
|
395
|
-
onMouseenter: (t) => !e.disabled && (
|
|
396
|
-
onMousedown: a[5] ||=
|
|
397
|
-
onClick: (t) =>
|
|
506
|
+
class: p(["flex cursor-pointer items-start gap-2.5 rounded-6 px-4 py-2 text-base text-heading transition-colors", [e.disabled && "cursor-not-allowed opacity-50", n === P.value ? "bg-accent-hover" : z(e) && "bg-accent"]]),
|
|
507
|
+
onMouseenter: (t) => !e.disabled && (P.value = n),
|
|
508
|
+
onMousedown: a[5] ||= x(() => {}, ["prevent"]),
|
|
509
|
+
onClick: (t) => ot(e)
|
|
398
510
|
}, [d.multiple ? (m(), c("span", {
|
|
399
511
|
key: 0,
|
|
400
|
-
class: p(["mt-0.5 inline-flex size-4 shrink-0 items-center justify-center rounded-4 border transition-colors",
|
|
512
|
+
class: p(["mt-0.5 inline-flex size-4 shrink-0 items-center justify-center rounded-4 border transition-colors", z(e) ? "border-primary bg-primary text-white" : "border-muted/70 bg-surface"]),
|
|
401
513
|
"aria-hidden": "true"
|
|
402
|
-
}, [
|
|
514
|
+
}, [z(e) ? (m(), o(y(me), {
|
|
403
515
|
key: 0,
|
|
404
516
|
class: "size-3",
|
|
405
517
|
"stroke-width": 3,
|
|
406
518
|
"aria-hidden": "true"
|
|
407
|
-
})) : s("", !0)], 2)) : s("", !0), l("span",
|
|
519
|
+
})) : s("", !0)], 2)) : s("", !0), l("span", Le, [_(t.$slots, "option", {
|
|
408
520
|
option: e,
|
|
409
|
-
selected:
|
|
410
|
-
active: n ===
|
|
411
|
-
}, () => [l("span",
|
|
412
|
-
|
|
521
|
+
selected: z(e),
|
|
522
|
+
active: n === P.value
|
|
523
|
+
}, () => [_(t.$slots, "content", { option: e }, () => [l("span", Re, v(e.label), 1), e.description ? (m(), c("span", ze, v(e.description), 1)) : s("", !0)])])])], 42, Ie))), 128))], 64))), 128)),
|
|
524
|
+
q.value ? (m(), c("li", {
|
|
413
525
|
key: 0,
|
|
414
|
-
id:
|
|
526
|
+
id: G(Y.value),
|
|
415
527
|
role: "option",
|
|
416
528
|
"aria-selected": "false",
|
|
417
|
-
class: p(["flex cursor-pointer items-center gap-2.5 rounded-6 px-4 py-2 text-base text-heading transition-colors",
|
|
529
|
+
class: p(["flex cursor-pointer items-center gap-2.5 rounded-6 px-4 py-2 text-base text-heading transition-colors", Y.value === P.value && "bg-accent-hover"]),
|
|
418
530
|
"data-testid": "ac-select-create",
|
|
419
|
-
onMouseenter: a[6] ||= (e) =>
|
|
420
|
-
onMousedown: a[7] ||=
|
|
421
|
-
onClick:
|
|
422
|
-
}, [u(
|
|
531
|
+
onMouseenter: a[6] ||= (e) => P.value = Y.value,
|
|
532
|
+
onMousedown: a[7] ||= x(() => {}, ["prevent"]),
|
|
533
|
+
onClick: ct
|
|
534
|
+
}, [u(y(_e), {
|
|
423
535
|
class: "size-4 shrink-0 text-primary-strong",
|
|
424
536
|
"aria-hidden": "true"
|
|
425
|
-
}), l("span",
|
|
426
|
-
!
|
|
427
|
-
], 8,
|
|
537
|
+
}), l("span", Ve, v(d.createText) + " “" + v(K.value) + "”", 1)], 42, Be)) : s("", !0),
|
|
538
|
+
!W.value.length && !q.value ? (m(), c("li", He, [_(t.$slots, "empty", { query: N.value }, () => [ee(v(d.emptyText || (N.value ? `${d.noResultText} for “${N.value}”` : "No options")), 1)])])) : s("", !0)
|
|
539
|
+
], 8, Pe)], 4)) : s("", !0)]),
|
|
428
540
|
_: 3
|
|
429
541
|
})]))
|
|
430
542
|
], 16));
|
|
431
543
|
}
|
|
432
544
|
});
|
|
433
545
|
//#endregion
|
|
434
|
-
export {
|
|
546
|
+
export { Ue as default };
|