vlite3 1.3.10 → 1.3.11

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.
@@ -14,6 +14,26 @@ export interface SelectOption<T = unknown> {
14
14
  data?: T;
15
15
  }
16
16
  export type OptionsMapper<T> = (item: T) => SelectOption<T> | null | undefined;
17
+ /**
18
+ * A static filter object, or a function that derives the filter from the
19
+ * surrounding form state. Returning `undefined` clears the filter.
20
+ *
21
+ * When a function is used, the function is only re-invoked when one of the
22
+ * keys it actually *reads* changes. Reading `values.quotationType` will not
23
+ * cause the function to re-run on changes to `values.cargoQuantityDelivered`.
24
+ *
25
+ * @example
26
+ * // Static
27
+ * filter: { status: 'ACTIVE' }
28
+ *
29
+ * // Dynamic — reactive against the parent form's values
30
+ * filter: ({ values }) => values.quotationType === 'WATER_DELIVERY'
31
+ * ? { isTanker: true }
32
+ * : undefined
33
+ */
34
+ export type AsyncSelectFilter = Record<string, any> | ((ctx: {
35
+ values: Record<string, any>;
36
+ }) => Record<string, any> | undefined | void);
17
37
  export interface CreateSelectConfig<T = any> {
18
38
  name: string;
19
39
  useQuery: any;
@@ -46,7 +66,17 @@ export declare const createAsyncSelect: <T extends {
46
66
  default: string;
47
67
  };
48
68
  filter: {
49
- type: ObjectConstructor;
69
+ type: PropType<AsyncSelectFilter>;
70
+ default: () => {};
71
+ };
72
+ /**
73
+ * The parent form's current values. Only used when `filter` is a
74
+ * function — the function receives `{ values }` and returns a filter.
75
+ * The form (`FormField.vue`) automatically passes this prop down for
76
+ * custom components; for standalone use, default to `{}`.
77
+ */
78
+ values: {
79
+ type: PropType<Record<string, any>>;
50
80
  default: () => {};
51
81
  };
52
82
  disabled: {
@@ -75,7 +105,17 @@ export declare const createAsyncSelect: <T extends {
75
105
  default: string;
76
106
  };
77
107
  filter: {
78
- type: ObjectConstructor;
108
+ type: PropType<AsyncSelectFilter>;
109
+ default: () => {};
110
+ };
111
+ /**
112
+ * The parent form's current values. Only used when `filter` is a
113
+ * function — the function receives `{ values }` and returns a filter.
114
+ * The form (`FormField.vue`) automatically passes this prop down for
115
+ * custom components; for standalone use, default to `{}`.
116
+ */
117
+ values: {
118
+ type: PropType<Record<string, any>>;
79
119
  default: () => {};
80
120
  };
81
121
  disabled: {
@@ -93,7 +133,8 @@ export declare const createAsyncSelect: <T extends {
93
133
  "onUpdate:modelValue"?: (...args: any[]) => any;
94
134
  onOnChange?: (...args: any[]) => any;
95
135
  }>, {
96
- filter: Record<string, any>;
136
+ filter: {};
137
+ values: Record<string, any>;
97
138
  placeholder: string;
98
139
  disabled: boolean;
99
140
  multiple: boolean;
@@ -1,16 +1,16 @@
1
- import { defineComponent as P, ref as m, computed as i, watch as k, createVNode as s, mergeProps as S, nextTick as q, isVNode as $ } from "vue";
2
- import z from "../Dropdown/Dropdown.vue.js";
1
+ import { defineComponent as E, ref as y, computed as i, watch as I, createVNode as d, mergeProps as _, nextTick as H, isVNode as L } from "vue";
2
+ import Q from "../Dropdown/Dropdown.vue.js";
3
3
  import "@iconify/vue";
4
4
  import "../../core/config.js";
5
5
  /* empty css */
6
6
  /* empty css */
7
- import F from "../Button.vue.js";
8
- import H from "../MultiSelect/MultiSelect.vue.js";
9
- import L from "../Modal.vue.js";
10
- function V(t) {
11
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !$(t);
7
+ import R from "../Button.vue.js";
8
+ import T from "../MultiSelect/MultiSelect.vue.js";
9
+ import U from "../Modal.vue.js";
10
+ function j(t) {
11
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !L(t);
12
12
  }
13
- const X = (t) => /* @__PURE__ */ P({
13
+ const ne = (t) => /* @__PURE__ */ E({
14
14
  name: t.name,
15
15
  inheritAttrs: !1,
16
16
  props: {
@@ -29,6 +29,16 @@ const X = (t) => /* @__PURE__ */ P({
29
29
  default: "Select..."
30
30
  },
31
31
  filter: {
32
+ type: [Object, Function],
33
+ default: () => ({})
34
+ },
35
+ /**
36
+ * The parent form's current values. Only used when `filter` is a
37
+ * function — the function receives `{ values }` and returns a filter.
38
+ * The form (`FormField.vue`) automatically passes this prop down for
39
+ * custom components; for standalone use, default to `{}`.
40
+ */
41
+ values: {
32
42
  type: Object,
33
43
  default: () => ({})
34
44
  },
@@ -45,104 +55,125 @@ const X = (t) => /* @__PURE__ */ P({
45
55
  },
46
56
  emits: ["onChange", "update:modelValue", "change"],
47
57
  setup(l, {
48
- attrs: I,
49
- emit: y
58
+ attrs: M,
59
+ emit: m
50
60
  }) {
51
- const d = m([]), c = m(1), b = m(""), M = 20, h = i(() => l.value !== void 0 ? l.value : l.modelValue), v = i(() => l.optionsMapper || t.optionsMapper), j = i(() => ({
61
+ const c = y([]), s = y(1), b = y(""), B = 20, h = i(() => l.value !== void 0 ? l.value : l.modelValue), g = i(() => l.optionsMapper || t.optionsMapper), N = (e, a) => {
62
+ const r = l.filter;
63
+ if (typeof r != "function")
64
+ return r || {};
65
+ const o = a != null ? new Proxy(e || {}, {
66
+ get(n, u) {
67
+ return typeof u == "string" && !u.startsWith("__v_") && a.add(u), Reflect.get(n, u);
68
+ }
69
+ }) : e || {};
70
+ try {
71
+ return r({
72
+ values: o
73
+ }) || {};
74
+ } catch (n) {
75
+ return console.error(`[${t.name}] Error evaluating filter function:`, n), {};
76
+ }
77
+ }, w = /* @__PURE__ */ new Set(), P = N(l.values, w), f = y(P), S = Array.from(w), F = i(() => S.length > 0 ? JSON.stringify(S.map((e) => l.values?.[e])) : JSON.stringify(l.filter || {}));
78
+ I(F, () => {
79
+ const e = N(l.values), a = JSON.stringify(f.value), r = JSON.stringify(e);
80
+ a !== r && (f.value = e, s.value = 1);
81
+ });
82
+ const q = i(() => ({
52
83
  pagination: {
53
- page: c.value,
54
- limit: M
84
+ page: s.value,
85
+ limit: B
55
86
  },
56
87
  search: b.value || void 0,
57
88
  filter: {
58
- ...l.filter
89
+ ...f.value
59
90
  }
60
91
  })), {
61
- result: g,
62
- loading: w,
63
- refetch: N
64
- } = t.useQuery(j, {
92
+ result: K,
93
+ loading: A,
94
+ refetch: C
95
+ } = t.useQuery(q, {
65
96
  notifyOnNetworkStatusChange: !0,
66
97
  fetchPolicy: "cache-and-network"
67
- }), A = i(() => {
68
- const e = g.value?.[t.queryName]?.pageInfo;
98
+ }), O = i(() => {
99
+ const e = K.value?.[t.queryName]?.pageInfo;
69
100
  return e ? e.currentPage < e.totalPages : !1;
70
101
  });
71
- k(() => g.value?.[t.queryName], (e) => {
102
+ I(() => K.value?.[t.queryName], (e) => {
72
103
  if (!e) return;
73
- const n = Array.isArray(e) ? e : e.items;
74
- if (n)
75
- if (c.value === 1)
76
- d.value = [...n];
104
+ const a = Array.isArray(e) ? e : e.items;
105
+ if (a)
106
+ if (s.value === 1)
107
+ c.value = [...a];
77
108
  else {
78
- const r = new Set(d.value.map((a) => a.id)), o = n.filter((a) => !r.has(a.id));
79
- d.value.push(...o);
109
+ const r = new Set(c.value.map((n) => n.id)), o = a.filter((n) => !r.has(n.id));
110
+ c.value.push(...o);
80
111
  }
81
112
  }, {
82
113
  immediate: !0
83
114
  });
84
- const C = (e) => {
85
- if (v.value)
86
- return v.value(e);
87
- const n = typeof t.labelKey == "function" ? t.labelKey(e) : e[t.labelKey || "name"], r = typeof t.subtitleKey == "function" ? t.subtitleKey(e) : e[t.subtitleKey || ""], o = typeof t.descriptionKey == "function" ? t.descriptionKey(e) : e[t.descriptionKey || ""], a = t.iconKey ? typeof t.iconKey == "function" ? t.iconKey(e) : e[t.iconKey] : void 0;
115
+ const V = (e) => {
116
+ if (g.value)
117
+ return g.value(e);
118
+ const a = typeof t.labelKey == "function" ? t.labelKey(e) : e[t.labelKey || "name"], r = typeof t.subtitleKey == "function" ? t.subtitleKey(e) : e[t.subtitleKey || ""], o = typeof t.descriptionKey == "function" ? t.descriptionKey(e) : e[t.descriptionKey || ""], n = t.iconKey ? typeof t.iconKey == "function" ? t.iconKey(e) : e[t.iconKey] : void 0;
88
119
  return {
89
- label: n,
120
+ label: a,
90
121
  subtitle: r || void 0,
91
122
  description: o || void 0,
92
123
  value: e[t.valueKey || "id"],
93
- icon: a || void 0,
124
+ icon: n || void 0,
94
125
  data: e
95
126
  };
96
- }, f = i(() => d.value.map(C).filter(Boolean)), p = (e, n) => {
97
- let r = n;
98
- l.multiple && Array.isArray(e) && (r = e.map((a) => {
99
- const u = f.value.find((K) => K.value === a);
127
+ }, p = i(() => c.value.map(V).filter(Boolean)), v = (e, a) => {
128
+ let r = a;
129
+ l.multiple && Array.isArray(e) && (r = e.map((n) => {
130
+ const u = p.value.find((x) => x.value === n);
100
131
  return u ? u.data : null;
101
132
  }).filter(Boolean));
102
133
  const o = {
103
134
  value: e,
104
135
  data: r
105
136
  };
106
- y("update:modelValue", e), y("change", o), y("onChange", o);
107
- }, O = (e) => {
108
- b.value = e, c.value = 1;
109
- }, x = () => {
110
- !A.value || w.value || c.value++;
111
- }, B = async (e) => {
112
- const n = (Array.isArray(e) ? e : [e]).filter((a) => (typeof a == "string" || typeof a == "number") && a !== "");
113
- if (n.length === 0) return [];
114
- await q();
115
- const r = new Set(f.value.map((a) => a.value)), o = n.filter((a) => !r.has(a));
137
+ m("update:modelValue", e), m("change", o), m("onChange", o);
138
+ }, J = (e) => {
139
+ b.value = e, s.value = 1;
140
+ }, $ = () => {
141
+ !O.value || A.value || s.value++;
142
+ }, z = async (e) => {
143
+ const a = (Array.isArray(e) ? e : [e]).filter((n) => (typeof n == "string" || typeof n == "number") && n !== "");
144
+ if (a.length === 0) return [];
145
+ await H();
146
+ const r = new Set(p.value.map((n) => n.value)), o = a.filter((n) => !r.has(n));
116
147
  if (o.length === 0) return [];
117
148
  try {
118
149
  const {
119
- data: a
120
- } = await N({
150
+ data: n
151
+ } = await C({
121
152
  pagination: {
122
153
  page: 1,
123
154
  limit: o.length
124
155
  },
125
156
  filter: {
126
- ...l.filter,
157
+ ...f.value,
127
158
  ids: o
128
159
  }
129
- }), u = a?.[t.queryName];
130
- return (Array.isArray(u) ? u : u?.items || []).map(C).filter(Boolean);
131
- } catch (a) {
132
- return console.error(`[${t.name}] Hydration failed`, a), [];
160
+ }), u = n?.[t.queryName];
161
+ return (Array.isArray(u) ? u : u?.items || []).map(V).filter(Boolean);
162
+ } catch (n) {
163
+ return console.error(`[${t.name}] Hydration failed`, n), [];
133
164
  }
134
- }, _ = () => l.addNewConfig ? s("div", {
165
+ }, k = () => l.addNewConfig ? d("div", {
135
166
  class: "px-1 pb-1 pt-1 mt-1 border-t border-border bg-body sticky bottom-0 z-10"
136
- }, [s(L, {
167
+ }, [d(U, {
137
168
  title: l.addNewConfig.label || "Add New",
138
169
  titleI18n: l.addNewConfig.labelI18n,
139
170
  body: l.addNewConfig.component,
140
171
  bodyProps: l.addNewConfig.props,
141
172
  onClose: () => {
142
- N();
173
+ C();
143
174
  }
144
175
  }, {
145
- trigger: () => s(F, {
176
+ trigger: () => d(R, {
146
177
  class: "w-full justify-start text-primary hover:text-primary hover:bg-primary/10",
147
178
  variant: "ghost",
148
179
  size: "sm",
@@ -152,35 +183,35 @@ const X = (t) => /* @__PURE__ */ P({
152
183
  })]) : null;
153
184
  return () => {
154
185
  const e = {
155
- options: f.value,
156
- loading: w.value,
186
+ options: p.value,
187
+ loading: A.value,
157
188
  searchable: t.searchable ?? !0,
158
189
  remote: t.remote ?? !0,
159
- hasMore: A.value,
190
+ hasMore: O.value,
160
191
  placeholder: l.placeholder,
161
192
  disabled: l.disabled,
162
- fetchSelected: B,
163
- onSearch: O,
164
- onLoadMore: x,
165
- ...I
166
- }, n = {};
167
- return l.addNewConfig && (n.footer = () => _()), l.multiple ? s(H, S(e, {
193
+ fetchSelected: z,
194
+ onSearch: J,
195
+ onLoadMore: $,
196
+ ...M
197
+ }, a = {};
198
+ return l.addNewConfig && (a.footer = () => k()), l.multiple ? d(T, _(e, {
168
199
  modelValue: h.value,
169
- "onUpdate:modelValue": (r) => p(r),
170
- onChange: (r) => p(r)
171
- }), V(n) ? n : {
172
- default: () => [n]
173
- }) : s(z, S(e, {
200
+ "onUpdate:modelValue": (r) => v(r),
201
+ onChange: (r) => v(r)
202
+ }), j(a) ? a : {
203
+ default: () => [a]
204
+ }) : d(Q, _(e, {
174
205
  showSelectedIcon: !0,
175
206
  emptyMessage: "Data not found",
176
207
  modelValue: h.value,
177
- onOnSelect: (r) => p(r.value, r.data)
178
- }), V(n) ? n : {
179
- default: () => [n]
208
+ onOnSelect: (r) => v(r.value, r.data)
209
+ }), j(a) ? a : {
210
+ default: () => [a]
180
211
  });
181
212
  };
182
213
  }
183
214
  });
184
215
  export {
185
- X as createAsyncSelect
216
+ ne as createAsyncSelect
186
217
  };
@@ -16,7 +16,7 @@ import "v-datepicker-lite";
16
16
  import "v-datepicker-lite/style.css";
17
17
  import "@jaames/iro";
18
18
  import "@vueuse/core";
19
- /* empty css */
19
+ /* empty css */
20
20
  import Ue from "../IconPicker.vue.js";
21
21
  /* empty css */
22
22
  /* empty css */
@@ -1,5 +1,5 @@
1
- import o from "./ColorIro.vue2.js";
2
- /* empty css */
1
+ import o from "./ColorIro.vue.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -6,8 +6,8 @@ import O from "../Input.vue.js";
6
6
  import "../../core/config.js";
7
7
  /* empty css */
8
8
  import y from "../Button.vue.js";
9
- import E from "./ColorIro.vue2.js";
10
- /* empty css */
9
+ import E from "./ColorIro.vue.js";
10
+ /* empty css */
11
11
  import { useEyeDropper as P } from "@vueuse/core";
12
12
  const I = {
13
13
  key: 0,
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
4
4
  import { $t as E } from "../../utils/i18n.js";
5
5
  import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
6
6
  import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
7
- import ee from "./CommandPaletteItem.vue2.js";
7
+ import ee from "./CommandPaletteItem.vue.js";
8
8
  const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
9
9
  key: 0,
10
10
  class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
@@ -1,5 +1,5 @@
1
1
  import t from "./CommandPaletteItem.vue3.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-66b1ae06"]]);
5
5
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as m, computed as d, openBlock as a, createElementBlock as u, withModifiers as p, normalizeClass as f, createElementVNode as l, createBlock as g, createCommentVNode as h, toDisplayString as v, createVNode as b } from "vue";
1
+ import { defineComponent as m, computed as d, openBlock as a, createElementBlock as u, withModifiers as f, normalizeClass as p, createElementVNode as l, createBlock as g, createCommentVNode as v, toDisplayString as b, createVNode as h } from "vue";
2
2
  import x from "../Switch.vue.js";
3
3
  import y from "../Icon.vue.js";
4
4
  import { $t as k } from "../../utils/i18n.js";
@@ -19,11 +19,11 @@ const w = ["data-testid"], B = { class: "flex items-center gap-2 flex-1 min-w-0"
19
19
  return (t, i) => (a(), u("div", {
20
20
  tabindex: "0",
21
21
  "data-dropdown-item": "",
22
- class: f(["relative flex cursor-pointer select-none items-center justify-between rounded-sm px-2 py-1.5 text-sm outline-none transition-colors", [
22
+ class: p(["relative flex cursor-pointer select-none items-center justify-between rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus-visible:bg-accent focus-visible:text-accent-foreground", [
23
23
  e.focused ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground"
24
24
  ]]),
25
25
  "data-testid": t.$attrs["data-testid"] || `dropdown-item-bool-${e.option.key || e.option.label}`.toLowerCase().replace(/[^a-z0-9]+/g, "-"),
26
- onClick: i[0] || (i[0] = p((j) => n(!e.value), ["stop"]))
26
+ onClick: i[0] || (i[0] = f((j) => n(!e.value), ["stop"]))
27
27
  }, [
28
28
  l("div", B, [
29
29
  e.option.icon || e.option.emoji ? (a(), g(y, {
@@ -31,10 +31,10 @@ const w = ["data-testid"], B = { class: "flex items-center gap-2 flex-1 min-w-0"
31
31
  icon: e.option.icon,
32
32
  emoji: e.option.emoji,
33
33
  class: "h-4 w-4 shrink-0 opacity-70"
34
- }, null, 8, ["icon", "emoji"])) : h("", !0),
35
- l("span", $, v(r.value), 1)
34
+ }, null, 8, ["icon", "emoji"])) : v("", !0),
35
+ l("span", $, b(r.value), 1)
36
36
  ]),
37
- b(x, {
37
+ h(x, {
38
38
  "model-value": e.value,
39
39
  class: "ml-3 shrink-0 scale-75 origin-right",
40
40
  "onUpdate:modelValue": n
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, computed as a, openBlock as n, createElementBlock as s, withKeys as w, withModifiers as k, normalizeClass as h, renderSlot as $, normalizeProps as I, guardReactiveProps as B, createBlock as p, createCommentVNode as i, createElementVNode as c, toDisplayString as d } from "vue";
1
+ import { defineComponent as w, computed as l, openBlock as n, createElementBlock as s, withKeys as g, withModifiers as k, normalizeClass as h, renderSlot as $, normalizeProps as I, guardReactiveProps as B, createBlock as p, createCommentVNode as i, createElementVNode as d, toDisplayString as c } from "vue";
2
2
  import v from "../Icon.vue.js";
3
3
  import { $t as r } from "../../utils/i18n.js";
4
4
  const j = ["tabindex", "data-disabled", "data-testid"], C = { class: "flex flex-col flex-1 min-w-0" }, S = { class: "flex items-center justify-between gap-2" }, z = { class: "truncate font-medium" }, D = {
@@ -7,7 +7,7 @@ const j = ["tabindex", "data-disabled", "data-testid"], C = { class: "flex flex-
7
7
  }, E = {
8
8
  key: 0,
9
9
  class: "text-[10px] text-muted-foreground truncate opacity-70"
10
- }, N = /* @__PURE__ */ g({
10
+ }, N = /* @__PURE__ */ w({
11
11
  __name: "DropdownItem",
12
12
  props: {
13
13
  option: {},
@@ -18,41 +18,41 @@ const j = ["tabindex", "data-disabled", "data-testid"], C = { class: "flex flex-
18
18
  },
19
19
  emits: ["click", "mouseenter"],
20
20
  setup(e, { emit: x }) {
21
- const t = e, u = x, y = a(
21
+ const t = e, u = x, y = l(
22
22
  () => t.option.labelI18n ? r(t.option.labelI18n) : t.option.label
23
- ), m = a(
23
+ ), m = l(
24
24
  () => t.option.subtitleI18n ? r(t.option.subtitleI18n) : t.option.subtitle
25
- ), f = a(
25
+ ), b = l(
26
26
  () => t.option.descriptionI18n ? r(t.option.descriptionI18n) : t.option.description
27
27
  );
28
- return (l, o) => (n(), s("div", {
28
+ return (a, o) => (n(), s("div", {
29
29
  tabindex: e.option.disabled ? -1 : 0,
30
30
  "data-dropdown-item": "",
31
- class: h(["relative w-full flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-1 focus-visible:ring-primary focus-visible:ring-offset-1 data-disabled:pointer-events-none data-disabled:opacity-50", [
31
+ class: h(["relative w-full flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus-visible:bg-accent focus-visible:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", [
32
32
  e.selectable && e.selected && !e.option.children ? "bg-accent" : "",
33
33
  e.focused ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground",
34
34
  e.option.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
35
35
  e.option.class || ""
36
36
  ]]),
37
37
  "data-disabled": e.option.disabled ? !0 : void 0,
38
- "data-testid": l.$attrs["data-testid"] || (e.option.value ? `dropdown-item-${e.option.value}` : `dropdown-item-${e.option.label}`).toString().toLowerCase().replace(/[^a-z0-9]+/g, "-"),
39
- onClick: o[0] || (o[0] = (b) => u("click", e.option)),
40
- onKeydown: o[1] || (o[1] = w(k((b) => u("click", e.option), ["prevent"]), ["enter"])),
41
- onMouseenter: o[2] || (o[2] = (b) => l.$emit("mouseenter", e.index ?? -1))
38
+ "data-testid": a.$attrs["data-testid"] || (e.option.value ? `dropdown-item-${e.option.value}` : `dropdown-item-${e.option.label}`).toString().toLowerCase().replace(/[^a-z0-9]+/g, "-"),
39
+ onClick: o[0] || (o[0] = (f) => u("click", e.option)),
40
+ onKeydown: o[1] || (o[1] = g(k((f) => u("click", e.option), ["prevent"]), ["enter"])),
41
+ onMouseenter: o[2] || (o[2] = (f) => a.$emit("mouseenter", e.index ?? -1))
42
42
  }, [
43
- $(l.$slots, "default", I(B({ option: e.option, index: e.index, selected: e.selected })), () => [
43
+ $(a.$slots, "default", I(B({ option: e.option, index: e.index, selected: e.selected })), () => [
44
44
  e.option.icon || e.option.emoji ? (n(), p(v, {
45
45
  key: 0,
46
46
  icon: e.option.icon,
47
47
  emoji: e.option.emoji,
48
48
  class: "mr-2.5 h-4 w-4 shrink-0 mt-0.5"
49
49
  }, null, 8, ["icon", "emoji"])) : i("", !0),
50
- c("div", C, [
51
- c("div", S, [
52
- c("span", z, d(y.value), 1),
53
- m.value ? (n(), s("span", D, d(m.value), 1)) : i("", !0)
50
+ d("div", C, [
51
+ d("div", S, [
52
+ d("span", z, c(y.value), 1),
53
+ m.value ? (n(), s("span", D, c(m.value), 1)) : i("", !0)
54
54
  ]),
55
- f.value ? (n(), s("span", E, d(f.value), 1)) : i("", !0)
55
+ b.value ? (n(), s("span", E, c(b.value), 1)) : i("", !0)
56
56
  ]),
57
57
  e.selectable && e.selected ? (n(), p(v, {
58
58
  key: 1,
@@ -1,7 +1,7 @@
1
- import o from "./DropdownMenu.vue3.js";
1
+ import o from "./DropdownMenu.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1742cff5"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0df8084f"]]);
5
5
  export {
6
6
  m as default
7
7
  };