@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.
Files changed (77) hide show
  1. package/dist/lib/compat.css +421 -0
  2. package/dist/lib/components/AcAppSwitcher.vue.d.ts +1 -1
  3. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +23 -23
  4. package/dist/lib/components/AcAreaChart.vue.d.ts +1 -1
  5. package/dist/lib/components/AcBarChart.vue.d.ts +1 -1
  6. package/dist/lib/components/AcButton.vue.d.ts +25 -13
  7. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +122 -71
  8. package/dist/lib/components/AcCard.vue.d.ts +11 -5
  9. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +99 -51
  10. package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
  11. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +20 -20
  12. package/dist/lib/components/AcCheckBox.vue.d.ts +4 -1
  13. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +50 -50
  14. package/dist/lib/components/AcCircularProgress.vue.d.ts +1 -1
  15. package/dist/lib/components/AcCodeEditor.vue.d.ts +12 -0
  16. package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +240 -207
  17. package/dist/lib/components/AcColorInput.vue.d.ts +4 -4
  18. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +72 -66
  19. package/dist/lib/components/AcCostSummary.vue.d.ts +1 -1
  20. package/dist/lib/components/AcDatePicker.vue.d.ts +41 -10
  21. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +554 -446
  22. package/dist/lib/components/AcDeleteModal.vue.d.ts +1 -1
  23. package/dist/lib/components/AcDonutChart.vue.d.ts +2 -2
  24. package/dist/lib/components/AcDropdown.vue.d.ts +1 -1
  25. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +8 -8
  26. package/dist/lib/components/AcErrorState.vue.d.ts +1 -1
  27. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +8 -8
  28. package/dist/lib/components/AcGraphChart.vue.d.ts +2 -2
  29. package/dist/lib/components/AcHeader.vue.d.ts +1 -1
  30. package/dist/lib/components/AcInput.vue.d.ts +86 -44
  31. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +319 -86
  32. package/dist/lib/components/AcKeyValueInput.vue.d.ts +34 -54
  33. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +134 -106
  34. package/dist/lib/components/AcLineChart.vue.d.ts +1 -1
  35. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +6 -0
  36. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +74 -58
  37. package/dist/lib/components/AcMapChart.vue.d.ts +2 -2
  38. package/dist/lib/components/AcModal.vue.d.ts +1 -1
  39. package/dist/lib/components/AcNavbar.vue.d.ts +2 -0
  40. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +31 -25
  41. package/dist/lib/components/AcNotificationMenu.vue.d.ts +1 -1
  42. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +24 -24
  43. package/dist/lib/components/AcNumberInput.vue.d.ts +55 -45
  44. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +159 -99
  45. package/dist/lib/components/AcRadioCard.js +5 -0
  46. package/dist/lib/components/AcRadioCard.vue.d.ts +55 -0
  47. package/dist/lib/components/AcRadioCard.vue_vue_type_script_setup_true_lang.js +135 -0
  48. package/dist/lib/components/AcSelect.vue.d.ts +46 -6
  49. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +309 -197
  50. package/dist/lib/components/AcSidePanel.vue.d.ts +1 -1
  51. package/dist/lib/components/AcSidebar.vue.d.ts +9 -0
  52. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +113 -94
  53. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +19 -18
  54. package/dist/lib/components/AcSlider.vue.d.ts +2 -2
  55. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +23 -23
  56. package/dist/lib/components/AcTable.vue.d.ts +50 -5
  57. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +257 -129
  58. package/dist/lib/components/AcTagInput.vue.d.ts +23 -4
  59. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +126 -114
  60. package/dist/lib/components/AcTaintInput.js +5 -0
  61. package/dist/lib/components/AcTaintInput.vue.d.ts +44 -0
  62. package/dist/lib/components/AcTaintInput.vue_vue_type_script_setup_true_lang.js +208 -0
  63. package/dist/lib/components/AcTextarea.vue.d.ts +64 -4
  64. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +159 -68
  65. package/dist/lib/components/AcThemeMode.vue.d.ts +10 -2
  66. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +53 -42
  67. package/dist/lib/components/AcTimePicker.vue.d.ts +36 -11
  68. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +232 -168
  69. package/dist/lib/components/AcTooltip.vue.d.ts +3 -3
  70. package/dist/lib/components/AcUserMenu.vue.d.ts +8 -0
  71. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +126 -109
  72. package/dist/lib/components/index.d.ts +2 -0
  73. package/dist/lib/components/types.d.ts +2 -0
  74. package/dist/lib/composables/useToast.d.ts +2 -2
  75. package/dist/lib/index.d.ts +2 -1
  76. package/dist/lib/index.js +51 -49
  77. 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 ae, resolveDynamicComponent as oe, toDisplayString as _, unref as v, useAttrs as se, useId as ce, useModel as le, vModelText as ue, watch as de, withCtx as fe, withDirectives as pe, withModifiers as y } from "vue";
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: 0,
10
+ key: 1,
11
+ class: "text-muted"
12
+ }, Se = {
13
+ key: 2,
11
14
  class: "text-danger",
12
15
  "aria-hidden": "true"
13
- }, Se = [
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
- ], Ce = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-2" }, we = { class: "truncate" }, Te = [
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
- ], Ee = {
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
- }, Oe = { class: "flex shrink-0 items-center gap-1 text-muted" }, ke = ["disabled"], Ae = {
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
- }, je = {
42
+ }, Me = {
38
43
  key: 0,
39
44
  class: "border-b border-border p-3"
40
- }, Me = ["aria-activedescendant"], Ne = ["aria-multiselectable", "aria-labelledby"], Pe = {
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
- }, Fe = [
49
+ }, Ie = [
45
50
  "id",
46
51
  "aria-selected",
47
52
  "aria-disabled",
48
53
  "onMouseenter",
49
54
  "onClick"
50
- ], Ie = { class: "min-w-0 flex-1" }, Le = { class: "block truncate" }, Re = {
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
- }, ze = ["id"], Be = { class: "min-w-0 flex-1 truncate" }, Ve = {
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
- }, b = /*@__PURE__*/ d({
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
- noResultText: { default: "No results" }
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
- ], ["update:modelValue"]),
116
- setup(d, { expose: f, emit: b }) {
117
- let x = d, S = b, C = le(d, "modelValue"), w = ce(), T = se(), He = a(() => ({
118
- class: T.class,
119
- style: T.style
120
- })), Ue = a(() => {
121
- let { class: e, style: t, ...n } = T;
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
- }), E = `${w}-list`, D = `${w}-label`, We = `${w}-hint`, Ge = `${w}-msg`, Ke = h(null), O = h(null), k = h(null), qe = h(null), A = h(!1), j = h(""), M = h(-1), N = h({
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
- }), P = a(() => {
128
- let e = C.value;
129
- return e == null || e === "" ? [] : Array.isArray(e) ? e : [e];
130
- }), F = (e, t) => {
131
- let n = x.by;
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
- }, I = (e) => {
134
- let t = x.by;
218
+ }, R = (e) => {
219
+ let t = S.by;
135
220
  return String(typeof t == "string" && e && typeof e == "object" ? e[t] : e);
136
- }, Je = (e, t) => {
137
- let n = x.by;
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
- }, L = (e) => P.value.some((t) => F(t, e.value)), R = a(() => P.value.map((e) => x.options.find((t) => F(t.value, e)) ?? {
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: I(e)
142
- })), z = a(() => P.value.length > 0), Ye = (e) => {
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
- }, B = a(() => {
150
- let e = j.value.trim().toLowerCase();
151
- return Ye(e ? x.options.filter((t) => t.label.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e) || t.group?.toLowerCase().includes(e)) : x.options);
152
- }), Xe = a(() => {
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 B.value.forEach((t, n) => {
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
- }), V = (e) => `${w}-opt-${e}`, H = a(() => j.value.trim()), U = a(() => {
165
- let e = H.value.toLowerCase();
166
- if (!x.creatable || !x.searchable || !e) return !1;
167
- let t = x.options.some((t) => t.label.toLowerCase() === e || I(t.value).toLowerCase() === e), n = P.value.some((t) => I(t).toLowerCase() === e);
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
- }), W = a(() => B.value.length + +!!U.value - 1), G = a(() => B.value.length), Ze = () => {
170
- let e = O.value;
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
- N.value = i < 180 && a > i ? {
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
- }, K = (e = 0, t = 1) => {
185
- for (let n = e; n >= 0 && n <= W.value; n += t) if (!B.value[n]?.disabled) return 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
- }, Qe = async () => {
188
- if (x.disabled || x.loading || A.value) return;
189
- A.value = !0, j.value = "", Ze();
190
- let e = B.value.findIndex((e) => L(e));
191
- M.value = e >= 0 ? e : K(), await ne(), x.searchable && qe.value?.focus(), X();
192
- }, q = (e = !0) => {
193
- A.value && (A.value = !1, M.value = -1, e && O.value?.focus());
194
- }, $e = () => A.value ? q() : Qe(), J = (e) => {
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 (x.multiple) {
197
- let t = [...P.value], n = t.findIndex((t) => F(t, e.value));
198
- n >= 0 ? (t.splice(n, 1), S("remove", e)) : (t.push(e.value), S("select", e)), C.value = t;
199
- } else C.value = e.value, S("select", e), q();
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
- }, et = (e) => {
202
- C.value = x.multiple ? P.value.filter((t) => !F(t, e.value)) : null, S("remove", e);
203
- }, tt = () => {
204
- let e = H.value;
205
- if (!U.value || !e) return;
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
- x.multiple ? (C.value = [...P.value, t], j.value = "") : (C.value = t, q()), S("select", n), S("create", e);
211
- }, nt = () => {
212
- R.value.forEach((e) => S("remove", e)), C.value = x.multiple ? [] : null, O.value?.focus();
213
- }, Y = "", rt, X = () => ne(() => k.value?.querySelector(`#${CSS.escape(V(M.value))}`)?.scrollIntoView({ block: "nearest" })), it = (e) => {
214
- let t = W.value + 1;
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 = M.value;
217
- for (let r = 0; r < t && (n = (n + e + t) % t, B.value[n]?.disabled); r++);
218
- M.value = n, X();
219
- }, at = (e) => {
220
- if (x.disabled) return;
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 (!A.value) {
312
+ if (!D.value) {
223
313
  [
224
314
  "Enter",
225
315
  " ",
226
316
  "ArrowDown",
227
317
  "ArrowUp"
228
- ].includes(t) ? (e.preventDefault(), Qe()) : t === "Backspace" && x.multiple && z.value && e.target === O.value && et(R.value[R.value.length - 1]);
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(), it(1);
232
- else if (t === "ArrowUp") e.preventDefault(), it(-1);
233
- else if (t === "Home") e.preventDefault(), M.value = K(), X();
234
- else if (t === "End") e.preventDefault(), M.value = K(W.value, -1), X();
235
- else if (t === "Enter" || t === " " && !x.searchable) {
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 = B.value[M.value];
238
- t ? J(t) : U.value && tt();
239
- } else if (t === "Escape") e.preventDefault(), q();
240
- else if (t === "Tab") q(!1);
241
- else if (!x.searchable && t.length === 1 && !e.metaKey && !e.ctrlKey) {
242
- Y += t.toLowerCase(), clearTimeout(rt), rt = setTimeout(() => Y = "", 500);
243
- let e = B.value.findIndex((e) => !e.disabled && e.label.toLowerCase().startsWith(Y));
244
- e >= 0 && (M.value = e, X());
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
- }, ot = (e) => {
336
+ }, mt = (e) => {
247
337
  let t = e.target;
248
- Ke.value?.contains(t) || k.value?.contains(t) || q(!1);
249
- }, Z = (e) => {
250
- e?.target instanceof Node && k.value?.contains(e.target) || Ze();
251
- }, st = () => {
252
- document.removeEventListener("pointerdown", ot, !0), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z);
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
- de(A, (e) => {
255
- if (!e) return st();
256
- document.addEventListener("pointerdown", ot, !0), window.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z);
257
- }), de(j, (e) => {
258
- S("search", e), M.value = K();
259
- }), ie(st);
260
- let Q = h(!1), ct = a(() => A.value || Q.value), lt = a(() => [x.hint && We, x.errorMsg && Ge].filter(Boolean).join(" ") || void 0), $ = a(() => !x.multiple && R.value[0]?.label || "");
261
- return f({ focus: () => O.value?.focus() }), (t, a) => (m(), c("div", te({
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: Ke
264
- }, He.value, {
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
- d.label ? (m(), c("div", be, [l("label", {
270
- id: D,
271
- onClick: a[0] ||= (e) => O.value?.focus()
272
- }, _(d.label), 1), d.required ? (m(), c("span", xe, "*")) : s("", !0)])) : s("", !0),
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: We,
376
+ id: Je,
276
377
  class: "mb-2 text-base text-muted"
277
- }, _(d.hint), 1)) : s("", !0),
378
+ }, v(d.hint), 1)) : s("", !0),
278
379
  l("div", te({
279
- id: `${v(w)}-trigger`,
380
+ id: `${y(O)}-trigger`,
280
381
  ref_key: "trigger",
281
- ref: O
282
- }, Ue.value, {
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": A.value,
287
- "aria-controls": E,
288
- "aria-labelledby": d.label ? D : void 0,
289
- "aria-label": d.label ? void 0 : v(T)["aria-label"] ?? d.placeholder,
290
- "aria-describedby": lt.value,
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": !!d.errorMsg || void 0,
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": A.value && !d.searchable && M.value >= 0 ? V(M.value) : void 0,
295
- class: ["group flex w-full items-center gap-2 rounded-10 border bg-background text-left text-base font-medium text-heading transition-[color,background-color,border-color,box-shadow] duration-200 outline-none", [
296
- d.size === "compact" ? "min-h-8 pr-1 pl-3" : d.size === "small" ? "min-h-9 pr-1 pl-4" : "min-h-10.5 pr-1 pl-5",
297
- d.multiple && z.value && (d.size === "normal" ? "py-1.5" : "py-1"),
298
- d.disabled || d.loading ? "cursor-not-allowed" : "cursor-pointer",
299
- d.errorMsg ? ["border-danger/50", ct.value && "border-danger shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]"] : ct.value ? "focus-ring" : ["border-border", !d.disabled && "hover:border-accent-active"]
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: $e,
302
- onKeydown: at,
303
- onFocus: a[2] ||= (e) => Q.value = !0,
304
- onBlur: a[3] ||= (e) => Q.value = !1
305
- }), [l("div", Ce, [d.multiple && z.value ? (m(!0), c(n, { key: 0 }, g(R.value, (e, t) => (m(), c("span", {
306
- key: Je(e.value, t),
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", we, _(e.label), 1), l("button", {
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: y((t) => et(e), ["stop"])
314
- }, [u(v(ye), {
422
+ onClick: x((t) => st(e), ["stop"])
423
+ }, [u(y(ye), {
315
424
  class: "size-4",
316
425
  "aria-hidden": "true"
317
- })], 8, Te)]))), 128)) : $.value ? (m(), c("span", Ee, _($.value), 1)) : (m(), c("span", De, _(d.placeholder), 1))]), l("span", Oe, [
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] ||= y((e) => S("refresh"), ["stop"])
328
- }, [u(v(ve), {
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, ke)) : s("", !0),
332
- d.clearable && z.value && !d.disabled && !d.loading ? (m(), c("button", {
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: y(nt, ["stop"])
338
- }, [u(v(ye), {
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", Ae, [(m(), o(oe(A.value ? v(ge) : v(he)), { class: "size-4" }))])
343
- ])], 16, Se),
344
- d.errorMsg ? (m(), c("p", {
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: Ge,
458
+ id: Ye,
347
459
  class: "mt-1 text-base text-danger-strong",
348
460
  role: "alert"
349
- }, _(d.errorMsg), 1)) : s("", !0),
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(() => [A.value ? (m(), c("div", {
468
+ default: fe(() => [D.value ? (m(), c("div", {
357
469
  key: 0,
358
470
  ref_key: "panel",
359
- ref: k,
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: N.value.top === void 0 ? void 0 : `${N.value.top}px`,
363
- bottom: N.value.bottom === void 0 ? void 0 : `${N.value.bottom}px`,
364
- left: `${N.value.left}px`,
365
- width: `${N.value.width}px`,
366
- maxHeight: `${N.value.maxHeight}px`
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", je, [pe(l("input", {
482
+ }, [d.searchable ? (m(), c("div", Me, [pe(l("input", {
371
483
  ref_key: "searchInput",
372
- ref: qe,
373
- "onUpdate:modelValue": a[4] ||= (e) => j.value = 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": E,
378
- "aria-activedescendant": M.value >= 0 ? V(M.value) : void 0,
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: at
381
- }, null, 40, Me), [[ue, j.value]])])) : s("", !0), l("ul", {
382
- id: E,
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 ? D : void 0,
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(Xe.value, (e) => (m(), c(n, { key: e.name }, [e.name ? (m(), c("li", Pe, _(e.name), 1)) : s("", !0), (m(!0), c(n, null, g(e.items, ({ option: e, index: n }) => (m(), c("li", {
389
- id: V(n),
390
- key: Je(e.value, n),
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": L(e),
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 === M.value ? "bg-accent-hover" : L(e) && "bg-accent"]]),
395
- onMouseenter: (t) => !e.disabled && (M.value = n),
396
- onMousedown: a[5] ||= y(() => {}, ["prevent"]),
397
- onClick: (t) => J(e)
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", L(e) ? "border-primary bg-primary text-white" : "border-muted/70 bg-surface"]),
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
- }, [L(e) ? (m(), o(v(me), {
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", Ie, [ae(t.$slots, "option", {
519
+ })) : s("", !0)], 2)) : s("", !0), l("span", Le, [_(t.$slots, "option", {
408
520
  option: e,
409
- selected: L(e),
410
- active: n === M.value
411
- }, () => [l("span", Le, _(e.label), 1), e.description ? (m(), c("span", Re, _(e.description), 1)) : s("", !0)])])], 42, Fe))), 128))], 64))), 128)),
412
- U.value ? (m(), c("li", {
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: V(G.value),
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", G.value === M.value && "bg-accent-hover"]),
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) => M.value = G.value,
420
- onMousedown: a[7] ||= y(() => {}, ["prevent"]),
421
- onClick: tt
422
- }, [u(v(_e), {
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", Be, _(d.createText) + " “" + _(H.value) + "”", 1)], 42, ze)) : s("", !0),
426
- !B.value.length && !U.value ? (m(), c("li", Ve, [ae(t.$slots, "empty", { query: j.value }, () => [ee(_(j.value ? `${d.noResultText} for “${j.value}”` : "No options"), 1)])])) : s("", !0)
427
- ], 8, Ne)], 4)) : s("", !0)]),
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 { b as default };
546
+ export { Ue as default };