vlite3 1.5.23 → 1.5.25
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/components/AppShell/AppShell.vue.d.ts +1 -1
- package/components/CategoryManager/CategoryManager2.vue.js +3 -3
- package/components/ColorPicker/ColorPicker.vue.d.ts +3 -0
- package/components/ColorPicker/ColorPicker.vue.js +16 -14
- package/components/DatePicker.vue.d.ts +2 -0
- package/components/DatePicker.vue.js +19 -17
- package/components/Dropdown/Dropdown.vue.d.ts +2 -0
- package/components/Dropdown/Dropdown.vue.js +111 -106
- package/components/Dropdown/DropdownMenu.vue.d.ts +2 -0
- package/components/Dropdown/DropdownMenu.vue.js +2 -2
- package/components/Dropdown/{DropdownMenu3.vue.js → DropdownMenu2.vue.js} +24 -23
- package/components/Form/{AccordionView2.vue.js → AccordionView.vue.js} +1 -1
- package/components/Form/index2.vue.js +1 -1
- package/components/Modal.vue.d.ts +4 -0
- package/components/Modal.vue.js +2 -2
- package/components/Modal2.vue.js +59 -55
- package/components/Navbar/Navbar.vue.d.ts +1 -1
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover3.vue.js +2 -2
- package/components/RichTextEditor/RichTextToolbar3.vue.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +3 -3
- package/components/SidePanel.vue.d.ts +3 -1
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel2.vue.js +39 -37
- package/components/ThemeProvider/themeVars.js +115 -115
- package/components/ThemeToggle.vue.d.ts +1 -1
- package/components/Tooltip.vue.d.ts +2 -0
- package/components/Tooltip.vue.js +13 -10
- package/composables/useOverlayPortal.d.ts +14 -0
- package/composables/useOverlayPortal.js +16 -0
- package/composables/useTheme.d.ts +2 -2
- package/composables/useTheme.js +64 -29
- package/docs/components/modal.md +18 -16
- package/docs-manifest.json +3 -3
- package/index.d.ts +1 -0
- package/index.js +334 -330
- package/package.json +2 -2
- package/style.css +193 -107
- /package/components/RichTextEditor/{RichTextLinkPopover2.vue.js → RichTextLinkPopover.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar2.vue.js → RichTextToolbar.vue.js} +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as me, ref as a, computed as r, watch as T, inject as ve, onMounted as ye, onUnmounted as ge, provide as q, reactive as he, toRefs as pe, openBlock as D, createElementBlock as be, normalizeStyle as Ce, createVNode as G, unref as d, withCtx as m, createBlock as J, normalizeClass as Oe, createSlots as Se, renderSlot as v, normalizeProps as K, guardReactiveProps as Q, createCommentVNode as X, createElementVNode as we } from "vue";
|
|
2
|
+
import Te from "v-tooltip-lite";
|
|
3
3
|
import "v-tooltip-lite/style.css";
|
|
4
4
|
import $e from "./DropdownMenu.vue.js";
|
|
5
5
|
import Ie from "./DropdownTrigger.vue.js";
|
|
6
6
|
import ke from "../ConfirmationModal.vue.js";
|
|
7
|
-
import { useDropdownIds as
|
|
8
|
-
import { useDropdownSelection as
|
|
9
|
-
import { useDropdownHydration as
|
|
10
|
-
import { useRtl as Pe, resolveDirFromAncestors as
|
|
11
|
-
|
|
7
|
+
import { useDropdownIds as Be } from "./composables/useDropdownIds.js";
|
|
8
|
+
import { useDropdownSelection as Me } from "./composables/useDropdownSelection.js";
|
|
9
|
+
import { useDropdownHydration as xe } from "./composables/useDropdownHydration.js";
|
|
10
|
+
import { useRtl as Pe, resolveDirFromAncestors as Ae } from "../../composables/useRtl.js";
|
|
11
|
+
import { useVLiteOverlayTarget as Ne, provideVLiteOverlayContext as De } from "../../composables/useOverlayPortal.js";
|
|
12
|
+
const Je = /* @__PURE__ */ me({
|
|
12
13
|
__name: "Dropdown",
|
|
13
14
|
props: {
|
|
14
15
|
selected: {},
|
|
@@ -25,6 +26,7 @@ const Fe = /* @__PURE__ */ fe({
|
|
|
25
26
|
offset: { default: () => [0, 8] },
|
|
26
27
|
isOpen: { type: Boolean, default: void 0 },
|
|
27
28
|
teleport: { type: Boolean, default: !0 },
|
|
29
|
+
teleportTarget: {},
|
|
28
30
|
selectedIndex: { default: null },
|
|
29
31
|
maxHeight: { default: "300px" },
|
|
30
32
|
width: { default: "min-content" },
|
|
@@ -55,35 +57,37 @@ const Fe = /* @__PURE__ */ fe({
|
|
|
55
57
|
trigger: { default: "click" }
|
|
56
58
|
},
|
|
57
59
|
emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
|
|
58
|
-
setup(t, { emit:
|
|
59
|
-
const l = t, E =
|
|
60
|
+
setup(t, { emit: Y }) {
|
|
61
|
+
const l = t, E = Ne(() => l.teleportTarget);
|
|
62
|
+
De({ target: E });
|
|
63
|
+
const V = Pe(), $ = a(null), y = r(() => l.direction === "rtl" ? "rtl" : l.direction === "ltr" ? "ltr" : $.value ? $.value : V.value ? "rtl" : "ltr"), g = Y, h = a(!1), p = a(null), Z = r(() => l.doubleConfirmation || h.value ? !0 : (l.options ?? []).some(
|
|
60
64
|
(e) => typeof e == "object" && e !== null && !!e.confirmation
|
|
61
|
-
)),
|
|
65
|
+
)), u = a({
|
|
62
66
|
title: "Confirm Selection",
|
|
63
67
|
description: "Are you sure you want to select this option?",
|
|
64
68
|
confirmText: "Confirm",
|
|
65
69
|
cancelText: "Cancel",
|
|
66
70
|
variant: "primary"
|
|
67
|
-
}),
|
|
68
|
-
|
|
71
|
+
}), _ = r(() => l.position ? l.position : y.value === "rtl" ? "bottom-end" : "bottom-start"), ee = r(() => l.nestedPosition ? l.nestedPosition : y.value === "rtl" ? "left-start" : "right-start"), C = a(l.isOpen || !1), O = a(0), L = a(null), I = a(null), H = () => {
|
|
72
|
+
$.value = Ae(L.value);
|
|
69
73
|
};
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
T(V, () => {
|
|
75
|
+
H();
|
|
72
76
|
});
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
const k = () => {
|
|
78
|
+
I.value && setTimeout(() => {
|
|
79
|
+
I.value?.focus({ preventScroll: !0 });
|
|
76
80
|
}, 10);
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
+
}, te = `dropdown-${Math.random().toString(36).substring(2, 9)}`, B = r(() => l.menuId || te), b = a([]), s = ve("dropdown-context", null), le = (e) => {
|
|
82
|
+
b.value.includes(e) || b.value.push(e), s?.registerChildId?.(e);
|
|
83
|
+
}, ne = (e) => {
|
|
84
|
+
b.value = b.value.filter((o) => o !== e), s?.unregisterChildId?.(e);
|
|
81
85
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}),
|
|
86
|
+
ye(() => {
|
|
87
|
+
H(), s?.registerChildId && s.registerChildId(`#${B.value}`);
|
|
88
|
+
}), ge(() => {
|
|
85
89
|
s?.unregisterChildId && s.unregisterChildId(`#${B.value}`);
|
|
86
|
-
}),
|
|
90
|
+
}), T(
|
|
87
91
|
() => l.isOpen,
|
|
88
92
|
(e) => {
|
|
89
93
|
if (e !== void 0) {
|
|
@@ -92,93 +96,93 @@ const Fe = /* @__PURE__ */ fe({
|
|
|
92
96
|
}
|
|
93
97
|
}
|
|
94
98
|
);
|
|
95
|
-
const
|
|
99
|
+
const R = (e) => {
|
|
96
100
|
if (l.disabled || l.readonly) {
|
|
97
|
-
C.value = !1,
|
|
101
|
+
C.value = !1, g("update:isOpen", !1);
|
|
98
102
|
return;
|
|
99
103
|
}
|
|
100
|
-
C.value = e,
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
e ?
|
|
104
|
+
C.value = e, g("update:isOpen", e), g(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
|
|
105
|
+
}, S = () => {
|
|
106
|
+
R(!1);
|
|
107
|
+
}, oe = (e) => {
|
|
108
|
+
e ? O.value++ : O.value = Math.max(0, O.value - 1);
|
|
105
109
|
};
|
|
106
|
-
|
|
107
|
-
close:
|
|
110
|
+
q("dropdown-context", {
|
|
111
|
+
close: S,
|
|
108
112
|
onChildToggle: (e) => {
|
|
109
|
-
|
|
113
|
+
oe(e), s?.onChildToggle?.(e);
|
|
110
114
|
},
|
|
111
|
-
registerChildId:
|
|
112
|
-
unregisterChildId:
|
|
113
|
-
}),
|
|
114
|
-
const M = r(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []),
|
|
115
|
-
|
|
115
|
+
registerChildId: le,
|
|
116
|
+
unregisterChildId: ne
|
|
117
|
+
}), q("modal-context", null);
|
|
118
|
+
const M = r(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), w = a([]), W = a(!1), x = a(!1);
|
|
119
|
+
T(
|
|
116
120
|
M,
|
|
117
121
|
(e) => {
|
|
118
122
|
if (e) {
|
|
119
123
|
if (l.remote) {
|
|
120
|
-
const o = [...
|
|
124
|
+
const o = [...w.value];
|
|
121
125
|
e.forEach((n) => {
|
|
122
126
|
o.some((i) => i.value !== void 0 && n.value !== void 0 ? typeof i.value == "object" && i.key && n.key ? i.key === n.key && i.value[i.key] === n.value[n.key] : i.value === n.value : i.label === n.label) || o.push(n);
|
|
123
|
-
}),
|
|
127
|
+
}), w.value = o;
|
|
124
128
|
} else
|
|
125
|
-
|
|
129
|
+
w.value = e;
|
|
126
130
|
!W.value && e.length > 0 && (W.value = !0, setTimeout(() => {
|
|
127
|
-
|
|
131
|
+
x.value = !0, j(A.value);
|
|
128
132
|
}, 10));
|
|
129
133
|
}
|
|
130
134
|
},
|
|
131
135
|
{ immediate: !0 }
|
|
132
136
|
);
|
|
133
137
|
const f = r(() => {
|
|
134
|
-
const e = [...
|
|
135
|
-
return
|
|
136
|
-
o.has(
|
|
138
|
+
const e = [...w.value], o = new Set(e.map((n) => n.value ?? n.label));
|
|
139
|
+
return P.value.forEach((n, c) => {
|
|
140
|
+
o.has(c) || (e.unshift(n), o.add(c));
|
|
137
141
|
}), e;
|
|
138
|
-
}), { selectedBuffer:
|
|
142
|
+
}), { selectedBuffer: P, isHydrating: ae, hydrateSelected: j } = xe({
|
|
139
143
|
fetchSelected: l.fetchSelected,
|
|
140
144
|
getAvailableOptions: () => f.value,
|
|
141
|
-
isReady: () =>
|
|
142
|
-
}), { getAllRecursiveIds:
|
|
143
|
-
...
|
|
145
|
+
isReady: () => x.value
|
|
146
|
+
}), { getAllRecursiveIds: ie } = Be(), se = he({
|
|
147
|
+
...pe(l),
|
|
144
148
|
options: f
|
|
145
|
-
}), { currentValue: A, selectedLabel:
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
),
|
|
149
|
-
const e = l.ignoreClickOutside || [], o =
|
|
150
|
-
return [.../* @__PURE__ */ new Set([...e, ...o, ...
|
|
149
|
+
}), { currentValue: A, selectedLabel: z, selectedIcon: F, selectOption: re } = Me(
|
|
150
|
+
se,
|
|
151
|
+
g
|
|
152
|
+
), de = r(() => {
|
|
153
|
+
const e = l.ignoreClickOutside || [], o = ie(f.value);
|
|
154
|
+
return [.../* @__PURE__ */ new Set([...e, ...o, ...b.value])];
|
|
151
155
|
});
|
|
152
|
-
|
|
156
|
+
T(
|
|
153
157
|
() => A.value,
|
|
154
158
|
(e) => {
|
|
155
|
-
|
|
159
|
+
x.value && j(e);
|
|
156
160
|
},
|
|
157
161
|
{ deep: !0 }
|
|
158
162
|
);
|
|
159
|
-
const
|
|
163
|
+
const ue = (e) => {
|
|
160
164
|
if (l.disabled || l.readonly || e.disabled) return;
|
|
161
|
-
l.doubleConfirmation || !!e.confirmation ? (
|
|
165
|
+
l.doubleConfirmation || !!e.confirmation ? (p.value = e, typeof e.confirmation == "object" ? u.value = {
|
|
162
166
|
title: e.confirmation.title || "Confirm Selection",
|
|
163
167
|
description: e.confirmation.description || "Are you sure you want to select this option?",
|
|
164
168
|
confirmText: e.confirmation.confirmText || "Confirm",
|
|
165
169
|
cancelText: e.confirmation.cancelText || "Cancel",
|
|
166
170
|
variant: e.confirmation.variant || "primary"
|
|
167
|
-
} :
|
|
171
|
+
} : u.value = {
|
|
168
172
|
title: "Confirm Selection",
|
|
169
173
|
description: `Are you sure you want to select "${e.label}"?`,
|
|
170
174
|
confirmText: "Confirm",
|
|
171
175
|
cancelText: "Cancel",
|
|
172
176
|
variant: "primary"
|
|
173
|
-
},
|
|
174
|
-
},
|
|
177
|
+
}, h.value = !0, S()) : (U(e), l.closeOnSelect && (S(), k()));
|
|
178
|
+
}, U = (e) => {
|
|
175
179
|
if (l.disabled || l.readonly || e.disabled) return;
|
|
176
180
|
const o = e.value ?? e.label;
|
|
177
|
-
|
|
178
|
-
const n =
|
|
181
|
+
P.value.has(o) || P.value.set(o, e);
|
|
182
|
+
const n = re(e);
|
|
179
183
|
if (!l.isNested) {
|
|
180
|
-
const
|
|
181
|
-
(e._path || [
|
|
184
|
+
const c = e._originalOption || e, i = c.value ?? c.label;
|
|
185
|
+
(e._path || [c]).forEach((N) => {
|
|
182
186
|
typeof N.onSelect == "function" && N.onSelect({
|
|
183
187
|
value: i,
|
|
184
188
|
option: N,
|
|
@@ -187,34 +191,35 @@ const Fe = /* @__PURE__ */ fe({
|
|
|
187
191
|
});
|
|
188
192
|
});
|
|
189
193
|
}
|
|
190
|
-
}, ue = () => {
|
|
191
|
-
b.value && (F(b.value), b.value = null, g.value = !1, T());
|
|
192
194
|
}, ce = () => {
|
|
193
|
-
|
|
195
|
+
p.value && (U(p.value), p.value = null, h.value = !1, k());
|
|
196
|
+
}, fe = () => {
|
|
197
|
+
p.value = null, h.value = !1, k();
|
|
194
198
|
};
|
|
195
199
|
return (e, o) => (D(), be("div", {
|
|
196
200
|
class: "relative inline-block text-start",
|
|
197
|
-
style:
|
|
201
|
+
style: Ce({ direction: y.value }),
|
|
198
202
|
ref_key: "dropdownWrapper",
|
|
199
|
-
ref:
|
|
203
|
+
ref: L
|
|
200
204
|
}, [
|
|
201
|
-
|
|
205
|
+
G(d(Te), {
|
|
202
206
|
content: "",
|
|
203
207
|
trigger: t.trigger,
|
|
204
208
|
arrow: !1,
|
|
205
209
|
disabled: t.disabled || t.readonly,
|
|
206
210
|
teleport: t.teleport,
|
|
211
|
+
"teleport-target": d(E),
|
|
207
212
|
offset: t.offset,
|
|
208
|
-
placement:
|
|
213
|
+
placement: _.value,
|
|
209
214
|
isOpen: C.value,
|
|
210
|
-
keepAlive:
|
|
215
|
+
keepAlive: O.value > 0,
|
|
211
216
|
menuId: B.value,
|
|
212
|
-
ignoreClickOutside:
|
|
217
|
+
ignoreClickOutside: de.value,
|
|
213
218
|
class: "w-full flex!",
|
|
214
219
|
className: "dropdown " + (t.className || "") + (t.variant === "transparent" ? " unstyled-dropdown" : "") + (t.variant === "secondary" ? " dropdown-secondary" : ""),
|
|
215
220
|
onOnShow: o[2] || (o[2] = (n) => e.$emit("onOpen")),
|
|
216
221
|
onOnHide: o[3] || (o[3] = (n) => e.$emit("onClose")),
|
|
217
|
-
"onUpdate:isOpen":
|
|
222
|
+
"onUpdate:isOpen": R,
|
|
218
223
|
triggerClass: "w-full flex items-center",
|
|
219
224
|
styles: {
|
|
220
225
|
...t.menuStyles || {},
|
|
@@ -225,14 +230,14 @@ const Fe = /* @__PURE__ */ fe({
|
|
|
225
230
|
}
|
|
226
231
|
}, {
|
|
227
232
|
trigger: m(({ isOpen: n }) => [
|
|
228
|
-
v(e.$slots, "trigger",
|
|
229
|
-
selectedLabel:
|
|
230
|
-
selectedIcon: t.showSelectedIcon ?
|
|
233
|
+
v(e.$slots, "trigger", K(Q({
|
|
234
|
+
selectedLabel: d(z),
|
|
235
|
+
selectedIcon: t.showSelectedIcon ? d(F) : void 0,
|
|
231
236
|
isOpen: n
|
|
232
237
|
})), () => [
|
|
233
|
-
|
|
234
|
-
"selected-label":
|
|
235
|
-
"selected-icon": t.showSelectedIcon ?
|
|
238
|
+
G(Ie, {
|
|
239
|
+
"selected-label": d(z),
|
|
240
|
+
"selected-icon": t.showSelectedIcon ? d(F) : void 0,
|
|
236
241
|
"is-open": n,
|
|
237
242
|
direction: y.value,
|
|
238
243
|
disabled: t.disabled,
|
|
@@ -243,31 +248,31 @@ const Fe = /* @__PURE__ */ fe({
|
|
|
243
248
|
])
|
|
244
249
|
]),
|
|
245
250
|
default: m(() => [
|
|
246
|
-
!(t.disabled || t.readonly) && (M.value.length || f.value.length || e.$slots.menu || e.$slots.item || e.$slots.default || t.remote || t.searchable) ? (D(),
|
|
251
|
+
!(t.disabled || t.readonly) && (M.value.length || f.value.length || e.$slots.menu || e.$slots.item || e.$slots.default || t.remote || t.searchable) ? (D(), J($e, {
|
|
247
252
|
key: 0,
|
|
248
253
|
options: M.value,
|
|
249
254
|
cachedOptions: f.value,
|
|
250
|
-
class:
|
|
255
|
+
class: Oe(t.className),
|
|
251
256
|
emptyMessage: t.emptyMessage,
|
|
252
257
|
searchEmptyMessage: t.searchEmptyMessage,
|
|
253
|
-
selected:
|
|
258
|
+
selected: d(A),
|
|
254
259
|
selectedIndex: t.selectedIndex,
|
|
255
260
|
maxHeight: t.maxHeight,
|
|
256
|
-
nestedPosition:
|
|
261
|
+
nestedPosition: ee.value,
|
|
257
262
|
nestedOffset: t.nestedOffset,
|
|
258
263
|
selectable: t.selectable,
|
|
259
264
|
direction: y.value,
|
|
260
265
|
isCustomSlotMenu: !!e.$slots?.default || !!e.$slots?.menu,
|
|
261
266
|
layout: t.layout,
|
|
262
267
|
columns: t.columns,
|
|
263
|
-
loading: t.loading ||
|
|
268
|
+
loading: t.loading || d(ae),
|
|
264
269
|
hasMore: t.hasMore,
|
|
265
270
|
searchable: t.searchable,
|
|
266
271
|
remote: t.remote,
|
|
267
272
|
debounceTime: t.debounceTime,
|
|
268
273
|
trigger: t.trigger,
|
|
269
|
-
onSelect:
|
|
270
|
-
onClose:
|
|
274
|
+
onSelect: ue,
|
|
275
|
+
onClose: S,
|
|
271
276
|
onLoadMore: o[0] || (o[0] = (n) => e.$emit("load-more")),
|
|
272
277
|
onSearch: o[1] || (o[1] = (n) => e.$emit("search", n))
|
|
273
278
|
}, Se({ _: 2 }, [
|
|
@@ -282,7 +287,7 @@ const Fe = /* @__PURE__ */ fe({
|
|
|
282
287
|
e.$slots.item ? {
|
|
283
288
|
name: "item",
|
|
284
289
|
fn: m((n) => [
|
|
285
|
-
v(e.$slots, "item",
|
|
290
|
+
v(e.$slots, "item", K(Q(n)))
|
|
286
291
|
]),
|
|
287
292
|
key: "1"
|
|
288
293
|
} : void 0,
|
|
@@ -300,24 +305,24 @@ const Fe = /* @__PURE__ */ fe({
|
|
|
300
305
|
]),
|
|
301
306
|
key: "3"
|
|
302
307
|
} : void 0
|
|
303
|
-
]), 1032, ["options", "cachedOptions", "class", "emptyMessage", "searchEmptyMessage", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "isCustomSlotMenu", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime", "trigger"])) :
|
|
308
|
+
]), 1032, ["options", "cachedOptions", "class", "emptyMessage", "searchEmptyMessage", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "isCustomSlotMenu", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime", "trigger"])) : X("", !0)
|
|
304
309
|
]),
|
|
305
310
|
_: 3
|
|
306
|
-
}, 8, ["trigger", "disabled", "teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className", "styles"]),
|
|
307
|
-
|
|
311
|
+
}, 8, ["trigger", "disabled", "teleport", "teleport-target", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className", "styles"]),
|
|
312
|
+
Z.value ? (D(), J(ke, {
|
|
308
313
|
key: 0,
|
|
309
|
-
show:
|
|
310
|
-
title:
|
|
311
|
-
description:
|
|
312
|
-
"confirm-text":
|
|
313
|
-
"cancel-text":
|
|
314
|
-
variant:
|
|
315
|
-
onConfirm:
|
|
316
|
-
onCancel:
|
|
317
|
-
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])) :
|
|
314
|
+
show: h.value,
|
|
315
|
+
title: u.value.title,
|
|
316
|
+
description: u.value.description,
|
|
317
|
+
"confirm-text": u.value.confirmText,
|
|
318
|
+
"cancel-text": u.value.cancelText,
|
|
319
|
+
variant: u.value.variant,
|
|
320
|
+
onConfirm: ce,
|
|
321
|
+
onCancel: fe
|
|
322
|
+
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])) : X("", !0),
|
|
318
323
|
we("span", {
|
|
319
324
|
ref_key: "focusTrapAfter",
|
|
320
|
-
ref:
|
|
325
|
+
ref: I,
|
|
321
326
|
tabindex: "-1",
|
|
322
327
|
class: "outline-none pointer-events-none absolute opacity-0 w-0 h-0",
|
|
323
328
|
"aria-hidden": "true"
|
|
@@ -326,5 +331,5 @@ const Fe = /* @__PURE__ */ fe({
|
|
|
326
331
|
}
|
|
327
332
|
});
|
|
328
333
|
export {
|
|
329
|
-
|
|
334
|
+
Je as default
|
|
330
335
|
};
|
|
@@ -19,6 +19,7 @@ interface Props {
|
|
|
19
19
|
debounceTime?: number;
|
|
20
20
|
direction?: 'ltr' | 'rtl';
|
|
21
21
|
emptyMessage?: string;
|
|
22
|
+
menuClass?: string;
|
|
22
23
|
searchEmptyMessage?: string;
|
|
23
24
|
trigger?: import('v-tooltip-lite/types').TooltTipTrigger;
|
|
24
25
|
}
|
|
@@ -70,6 +71,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
70
71
|
remote: boolean;
|
|
71
72
|
debounceTime: number;
|
|
72
73
|
emptyMessage: string;
|
|
74
|
+
menuClass: string;
|
|
73
75
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
74
76
|
containerRef: HTMLDivElement;
|
|
75
77
|
}, HTMLDivElement>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import o from "./
|
|
1
|
+
import o from "./DropdownMenu2.vue.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-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b2b8e35e"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ee, ref as
|
|
1
|
+
import { defineComponent as ee, ref as _, computed as g, watch as E, onMounted as te, onBeforeUnmount as le, openBlock as o, createElementBlock as d, normalizeClass as O, createVNode as $, createCommentVNode as f, renderSlot as k, unref as a, normalizeStyle as se, createElementVNode as w, toDisplayString as N, createBlock as h, Fragment as D, renderList as oe, withCtx as P, createSlots as ne, mergeProps as re, nextTick as ae } from "vue";
|
|
2
2
|
import p from "../Icon.vue.js";
|
|
3
3
|
import ie from "../Input.vue.js";
|
|
4
4
|
/* empty css */
|
|
@@ -7,7 +7,7 @@ import ce from "./DropdownBooleanItem.vue.js";
|
|
|
7
7
|
import ue from "./DropdownGroupedLayout2.vue.js";
|
|
8
8
|
import { useDropdownNavigation as fe } from "./composables/useDropdownNavigation.js";
|
|
9
9
|
import { useDropdownIds as me } from "./composables/useDropdownIds.js";
|
|
10
|
-
import { $t as
|
|
10
|
+
import { $t as C } from "../../utils/i18n.js";
|
|
11
11
|
import he from "./Dropdown.vue.js";
|
|
12
12
|
const ve = ["dir"], ye = {
|
|
13
13
|
key: 0,
|
|
@@ -49,23 +49,24 @@ const ve = ["dir"], ye = {
|
|
|
49
49
|
debounceTime: { default: 300 },
|
|
50
50
|
direction: { default: "ltr" },
|
|
51
51
|
emptyMessage: { default: "No options found" },
|
|
52
|
+
menuClass: { default: "" },
|
|
52
53
|
searchEmptyMessage: {},
|
|
53
54
|
trigger: { default: "click" }
|
|
54
55
|
},
|
|
55
56
|
emits: ["select", "close", "load-more", "search"],
|
|
56
57
|
setup(r, { emit: V }) {
|
|
57
|
-
const t = r, m = V, B =
|
|
58
|
+
const t = r, m = V, B = _(null), i = _(""), { getMenuId: z, getAllRecursiveIds: H } = me(), L = g(() => {
|
|
58
59
|
if (i.value && i.value.trim() !== "")
|
|
59
60
|
return t.searchEmptyMessage ? t.searchEmptyMessage : `No results found for
|
|
60
61
|
"${i.value}"`;
|
|
61
|
-
const e =
|
|
62
|
+
const e = C("vlite.dropdown.empty");
|
|
62
63
|
return e !== "vlite.dropdown.empty" ? e : t.emptyMessage;
|
|
63
64
|
}), R = g(() => {
|
|
64
|
-
const e =
|
|
65
|
+
const e = C("vlite.dropdown.search");
|
|
65
66
|
return e !== "vlite.dropdown.search" ? e : "Search...";
|
|
66
|
-
}), u = g(() => t.options ? t.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []),
|
|
67
|
+
}), u = g(() => t.options ? t.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), I = g(() => t.searchable ? i.value && i.value.trim() !== "" ? !0 : t.remote ? t.loading ? !0 : t.hasMore || (u.value.length || 0) > 5 : (u.value.length || 0) > 5 : !1);
|
|
67
68
|
let v = null;
|
|
68
|
-
|
|
69
|
+
E(i, (e) => {
|
|
69
70
|
t.remote && (v && clearTimeout(v), v = setTimeout(() => {
|
|
70
71
|
e !== void 0 && m("search", e);
|
|
71
72
|
}, t.debounceTime));
|
|
@@ -79,8 +80,8 @@ const ve = ["dir"], ye = {
|
|
|
79
80
|
focusedIndex: b,
|
|
80
81
|
isKeyboardMode: M,
|
|
81
82
|
filteredOptions: F,
|
|
82
|
-
handleKeyDown:
|
|
83
|
-
handleMouseMove:
|
|
83
|
+
handleKeyDown: j,
|
|
84
|
+
handleMouseMove: T,
|
|
84
85
|
onMouseEnterItem: S,
|
|
85
86
|
scrollToIndex: K
|
|
86
87
|
} = fe({
|
|
@@ -120,23 +121,23 @@ const ve = ["dir"], ye = {
|
|
|
120
121
|
let e = -1;
|
|
121
122
|
t.layout !== "grouped" && (t.selectedIndex !== null && t.selectedIndex >= 0 ? e = t.selectedIndex : t.selected !== void 0 && typeof t.selected != "object" && (e = u.value.findIndex((s) => s.value === t.selected)), e !== -1 && K(e));
|
|
122
123
|
};
|
|
123
|
-
|
|
124
|
+
E(
|
|
124
125
|
() => y.value,
|
|
125
126
|
() => {
|
|
126
127
|
b.value = -1;
|
|
127
128
|
}
|
|
128
129
|
), te(() => {
|
|
129
|
-
W(), window.addEventListener("keydown",
|
|
130
|
+
W(), window.addEventListener("keydown", j);
|
|
130
131
|
}), le(() => {
|
|
131
|
-
window.removeEventListener("keydown",
|
|
132
|
+
window.removeEventListener("keydown", j), v && clearTimeout(v), i.value && t.remote && m("search", "");
|
|
132
133
|
});
|
|
133
|
-
const X = (e) => e.labelI18n ?
|
|
134
|
+
const X = (e) => e.labelI18n ? C(e.labelI18n) : e.label, Y = (e) => e.showChevron !== !1;
|
|
134
135
|
return (e, s) => (o(), d("div", {
|
|
135
|
-
class: "dropdown-menu w-full flex flex-col",
|
|
136
|
+
class: O(["dropdown-menu w-full flex flex-col", r.menuClass]),
|
|
136
137
|
dir: r.direction
|
|
137
138
|
}, [
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
I.value ? (o(), d("div", ye, [
|
|
140
|
+
$(ie, {
|
|
140
141
|
modelValue: i.value,
|
|
141
142
|
"onUpdate:modelValue": s[0] || (s[0] = (l) => i.value = l),
|
|
142
143
|
placeholder: R.value,
|
|
@@ -157,19 +158,19 @@ const ve = ["dir"], ye = {
|
|
|
157
158
|
key: 2,
|
|
158
159
|
ref_key: "containerRef",
|
|
159
160
|
ref: B,
|
|
160
|
-
tabindex:
|
|
161
|
+
tabindex: I.value ? -1 : 0,
|
|
161
162
|
role: "menu",
|
|
162
|
-
class:
|
|
163
|
+
class: O([
|
|
163
164
|
"w-full p-1 space-y-0.5 overflow-y-auto overflow-x-hidden focus:outline-none flex-1 scrollbar-thin",
|
|
164
165
|
t.class
|
|
165
166
|
]),
|
|
166
167
|
style: se({ maxHeight: t.maxHeight }),
|
|
167
168
|
onMousemove: s[1] || (s[1] = //@ts-ignore
|
|
168
|
-
(...l) => a(
|
|
169
|
+
(...l) => a(T) && a(T)(...l)),
|
|
169
170
|
onScroll: A
|
|
170
171
|
}, [
|
|
171
172
|
!r.isCustomSlotMenu && y.value.length === 0 && !r.loading && !(u.value.length === 0 && e.$slots.menu) ? (o(), d("div", ke, [
|
|
172
|
-
|
|
173
|
+
$(p, {
|
|
173
174
|
icon: "lucide:inbox",
|
|
174
175
|
class: "w-8 h-8 mb-2 opacity-70"
|
|
175
176
|
}),
|
|
@@ -211,7 +212,7 @@ const ve = ["dir"], ye = {
|
|
|
211
212
|
w("div", {
|
|
212
213
|
tabindex: 0,
|
|
213
214
|
"data-dropdown-item": "",
|
|
214
|
-
class:
|
|
215
|
+
class: O(["relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none transition-colors justify-between w-full focus-visible:bg-accent focus-visible:text-accent-foreground", [
|
|
215
216
|
a(M) && a(b) === n ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground",
|
|
216
217
|
l.disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
217
218
|
l.triggerClass || l.class || ""
|
|
@@ -255,7 +256,7 @@ const ve = ["dir"], ye = {
|
|
|
255
256
|
]), 1032, ["option", "index", "selected", "focused", "selectable", "onClick", "onMouseenter"]))
|
|
256
257
|
], 64))), 128)),
|
|
257
258
|
r.loading ? (o(), d("div", Se, [
|
|
258
|
-
|
|
259
|
+
$(p, {
|
|
259
260
|
icon: "lucide:loader-2",
|
|
260
261
|
class: "w-4 h-4 animate-spin text-muted-foreground"
|
|
261
262
|
})
|
|
@@ -265,7 +266,7 @@ const ve = ["dir"], ye = {
|
|
|
265
266
|
e.$slots.footer ? (o(), d("div", Oe, [
|
|
266
267
|
k(e.$slots, "footer", {}, void 0, !0)
|
|
267
268
|
])) : f("", !0)
|
|
268
|
-
],
|
|
269
|
+
], 10, ve));
|
|
269
270
|
}
|
|
270
271
|
});
|
|
271
272
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as g, computed as d, openBlock as n, createElementBlock as R, createElementVNode as x, createBlock as s, withCtx as k, createTextVNode as B, toDisplayString as I, createCommentVNode as y, unref as l } from "vue";
|
|
2
2
|
import T from "./TableView.vue.js";
|
|
3
|
-
import C from "./
|
|
3
|
+
import C from "./AccordionView.vue.js";
|
|
4
4
|
import U from "../Label.vue.js";
|
|
5
5
|
import z from "../Button.vue.js";
|
|
6
6
|
import { useCustomFieldRows as N } from "./composables/useCustomFieldRows.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
|
+
import { VLiteOverlayTarget } from '../composables/useOverlayPortal';
|
|
2
3
|
interface Props {
|
|
3
4
|
show?: boolean;
|
|
4
5
|
title?: string;
|
|
@@ -10,11 +11,14 @@ interface Props {
|
|
|
10
11
|
descriptionI18n?: string;
|
|
11
12
|
triggerClass?: string;
|
|
12
13
|
bodyClass?: string;
|
|
14
|
+
modalClass?: string;
|
|
15
|
+
overlayClass?: string;
|
|
13
16
|
headerClass?: string;
|
|
14
17
|
footerClass?: string;
|
|
15
18
|
body?: Component;
|
|
16
19
|
styles?: any;
|
|
17
20
|
bodyProps?: Record<string, any>;
|
|
21
|
+
teleportTarget?: VLiteOverlayTarget;
|
|
18
22
|
}
|
|
19
23
|
declare function __VLS_template(): {
|
|
20
24
|
attrs: Partial<{}>;
|
package/components/Modal.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Modal2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bfcc2e50"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|