vlite3 0.6.3 → 0.6.5
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/Dropdown/Dropdown.vue.js +123 -106
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +66 -63
- package/components/Screen/Screen.vue.d.ts +1 -0
- package/components/Screen/Screen.vue.js +105 -115
- package/components/SidePanel.vue.js +61 -59
- package/components/Tooltip.vue.js +5 -4
- package/package.json +2 -2
- package/style.css +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as J, ref as s, computed as h, watch as $, provide as K, reactive as Q, toRefs as W, openBlock as A, createElementBlock as X, normalizeStyle as Y, createVNode as T, unref as O, withCtx as u, renderSlot as d, createBlock as Z, normalizeClass as _, createSlots as ee, normalizeProps as M, guardReactiveProps as H, createCommentVNode as te } from "vue";
|
|
2
|
+
import le from "v-tooltip-lite";
|
|
3
3
|
import "v-tooltip-lite/style.css";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useDropdownIds as
|
|
8
|
-
import { useDropdownSelection as
|
|
9
|
-
const
|
|
4
|
+
import ne from "./DropdownMenu.vue.js";
|
|
5
|
+
import oe from "./DropdownTrigger.vue.js";
|
|
6
|
+
import ae from "../ConfirmationModal.vue.js";
|
|
7
|
+
import { useDropdownIds as ie } from "./composables/useDropdownIds.js";
|
|
8
|
+
import { useDropdownSelection as se } from "./composables/useDropdownSelection.js";
|
|
9
|
+
const pe = /* @__PURE__ */ J({
|
|
10
10
|
__name: "Dropdown",
|
|
11
11
|
props: {
|
|
12
12
|
selected: {},
|
|
@@ -45,47 +45,56 @@ const ve = /* @__PURE__ */ G({
|
|
|
45
45
|
isNested: { type: Boolean, default: !1 }
|
|
46
46
|
},
|
|
47
47
|
emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
|
|
48
|
-
setup(
|
|
49
|
-
const o =
|
|
48
|
+
setup(n, { emit: V }) {
|
|
49
|
+
const o = n, p = V, g = s(!1), f = s(null), r = s({
|
|
50
50
|
title: "Confirm Selection",
|
|
51
51
|
description: "Are you sure you want to select this option?",
|
|
52
52
|
confirmText: "Confirm",
|
|
53
53
|
cancelText: "Cancel",
|
|
54
54
|
variant: "primary"
|
|
55
|
-
}),
|
|
55
|
+
}), E = h(() => o.position ? o.position : o.direction === "rtl" ? "bottom-end" : "bottom-start"), L = h(() => o.nestedPosition ? o.nestedPosition : o.direction === "rtl" ? "left-start" : "right-start"), S = s(o.isOpen || !1), b = s(0);
|
|
56
56
|
$(
|
|
57
57
|
() => o.isOpen,
|
|
58
58
|
(e) => {
|
|
59
|
-
e !== void 0 && (
|
|
59
|
+
e !== void 0 && (S.value = e);
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
62
|
const B = (e) => {
|
|
63
|
-
|
|
64
|
-
}, C =
|
|
63
|
+
S.value = e, p("update:isOpen", e), p(e ? "onOpen" : "onClose");
|
|
64
|
+
}, C = () => {
|
|
65
|
+
B(!1);
|
|
66
|
+
};
|
|
67
|
+
K("dropdown-context", {
|
|
68
|
+
close: C,
|
|
69
|
+
onChildToggle: (e) => {
|
|
70
|
+
e ? b.value++ : b.value = Math.max(0, b.value - 1);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const w = h(() => o.options ? o.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), m = s([]);
|
|
65
74
|
$(
|
|
66
|
-
|
|
75
|
+
w,
|
|
67
76
|
(e) => {
|
|
68
77
|
if (e)
|
|
69
78
|
if (o.remote) {
|
|
70
|
-
const
|
|
79
|
+
const l = [...m.value];
|
|
71
80
|
e.forEach((t) => {
|
|
72
|
-
|
|
73
|
-
}), m.value =
|
|
81
|
+
l.some((a) => a.value !== void 0 && t.value !== void 0 ? typeof a.value == "object" && a.key && t.key ? a.key === t.key && a.value[a.key] === t.value[t.key] : a.value === t.value : a.label === t.label) || l.push(t);
|
|
82
|
+
}), m.value = l;
|
|
74
83
|
} else
|
|
75
84
|
m.value = e;
|
|
76
85
|
},
|
|
77
86
|
{ immediate: !0, deep: !0 }
|
|
78
87
|
);
|
|
79
|
-
const v =
|
|
88
|
+
const v = s(/* @__PURE__ */ new Map()), k = s(!1), j = async (e) => {
|
|
80
89
|
if (!o.fetchSelected || e === void 0 || e === null) return;
|
|
81
|
-
let
|
|
82
|
-
Array.isArray(e) ?
|
|
83
|
-
const t =
|
|
84
|
-
const a = v.value.has(i),
|
|
85
|
-
return !a && !
|
|
90
|
+
let l = [];
|
|
91
|
+
Array.isArray(e) ? l = e : typeof e == "object" ? l = Object.values(e) : l = [e];
|
|
92
|
+
const t = l.filter((i) => {
|
|
93
|
+
const a = v.value.has(i), x = m.value.some((c) => (c.value ?? c.label) === i);
|
|
94
|
+
return !a && !x;
|
|
86
95
|
});
|
|
87
96
|
if (t.length) {
|
|
88
|
-
|
|
97
|
+
k.value = !0;
|
|
89
98
|
try {
|
|
90
99
|
(await o.fetchSelected(t)).forEach((a) => {
|
|
91
100
|
v.value.set(a.value ?? a.label, a);
|
|
@@ -93,49 +102,58 @@ const ve = /* @__PURE__ */ G({
|
|
|
93
102
|
} catch (i) {
|
|
94
103
|
console.error("[Dropdown] Hydration failed:", i);
|
|
95
104
|
} finally {
|
|
96
|
-
|
|
105
|
+
k.value = !1;
|
|
97
106
|
}
|
|
98
107
|
}
|
|
99
108
|
}, y = h(() => {
|
|
100
|
-
const e = [...m.value],
|
|
109
|
+
const e = [...m.value], l = new Set(e.map((t) => t.value ?? t.label));
|
|
101
110
|
return v.value.forEach((t, i) => {
|
|
102
|
-
|
|
111
|
+
l.has(i) || (e.unshift(t), l.add(i));
|
|
103
112
|
}), e;
|
|
104
|
-
}), { getAllRecursiveIds:
|
|
105
|
-
...
|
|
113
|
+
}), { getAllRecursiveIds: z } = ie(), D = Q({
|
|
114
|
+
...W(o),
|
|
106
115
|
options: y
|
|
107
|
-
}), { currentValue:
|
|
108
|
-
|
|
116
|
+
}), { currentValue: P, selectedLabel: I, selectOption: R } = se(
|
|
117
|
+
D,
|
|
109
118
|
p
|
|
110
|
-
)
|
|
119
|
+
), F = h(() => {
|
|
120
|
+
const e = o.ignoreClickOutside || [], l = z(y.value);
|
|
121
|
+
return [
|
|
122
|
+
.../* @__PURE__ */ new Set([
|
|
123
|
+
...e,
|
|
124
|
+
...l,
|
|
125
|
+
".modal-body",
|
|
126
|
+
".v-modal-overlay",
|
|
127
|
+
".sidepanel-body",
|
|
128
|
+
".v-sidepanel-overlay"
|
|
129
|
+
])
|
|
130
|
+
];
|
|
131
|
+
});
|
|
111
132
|
$(
|
|
112
|
-
() =>
|
|
133
|
+
() => P.value,
|
|
113
134
|
(e) => {
|
|
114
|
-
|
|
135
|
+
j(e);
|
|
115
136
|
},
|
|
116
137
|
{ immediate: !0, deep: !0 }
|
|
117
138
|
);
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
return [.../* @__PURE__ */ new Set([...e, ...n])];
|
|
121
|
-
}), F = (e) => {
|
|
122
|
-
o.doubleConfirmation || !!e.confirmation ? (d.value = e, typeof e.confirmation == "object" ? s.value = {
|
|
139
|
+
const U = (e) => {
|
|
140
|
+
o.doubleConfirmation || !!e.confirmation ? (f.value = e, typeof e.confirmation == "object" ? r.value = {
|
|
123
141
|
title: e.confirmation.title || "Confirm Selection",
|
|
124
142
|
description: e.confirmation.description || "Are you sure you want to select this option?",
|
|
125
143
|
confirmText: e.confirmation.confirmText || "Confirm",
|
|
126
144
|
cancelText: e.confirmation.cancelText || "Cancel",
|
|
127
145
|
variant: e.confirmation.variant || "primary"
|
|
128
|
-
} :
|
|
146
|
+
} : r.value = {
|
|
129
147
|
title: "Confirm Selection",
|
|
130
148
|
description: `Are you sure you want to select "${e.label}"?`,
|
|
131
149
|
confirmText: "Confirm",
|
|
132
150
|
cancelText: "Cancel",
|
|
133
151
|
variant: "primary"
|
|
134
|
-
}, g.value = !0,
|
|
135
|
-
},
|
|
136
|
-
const
|
|
137
|
-
v.value.has(
|
|
138
|
-
const t =
|
|
152
|
+
}, g.value = !0, C()) : (N(e), o.closeOnSelect && C());
|
|
153
|
+
}, N = (e) => {
|
|
154
|
+
const l = e.value ?? e.label;
|
|
155
|
+
v.value.has(l) || v.value.set(l, e);
|
|
156
|
+
const t = R(e);
|
|
139
157
|
if (!o.isNested) {
|
|
140
158
|
const i = e._originalOption || e, a = i.value ?? i.label;
|
|
141
159
|
(e._path || [i]).forEach((c) => {
|
|
@@ -147,117 +165,116 @@ const ve = /* @__PURE__ */ G({
|
|
|
147
165
|
});
|
|
148
166
|
});
|
|
149
167
|
}
|
|
150
|
-
}, U = () => {
|
|
151
|
-
d.value && (I(d.value), d.value = null, g.value = !1);
|
|
152
168
|
}, q = () => {
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
|
|
169
|
+
f.value && (N(f.value), f.value = null, g.value = !1);
|
|
170
|
+
}, G = () => {
|
|
171
|
+
f.value = null, g.value = !1;
|
|
156
172
|
};
|
|
157
|
-
return (e,
|
|
173
|
+
return (e, l) => (A(), X("div", {
|
|
158
174
|
class: "relative inline-block text-left",
|
|
159
|
-
style:
|
|
175
|
+
style: Y({ direction: n.direction })
|
|
160
176
|
}, [
|
|
161
|
-
|
|
177
|
+
T(O(le), {
|
|
162
178
|
content: "",
|
|
163
179
|
trigger: "click",
|
|
164
180
|
arrow: !1,
|
|
165
|
-
teleport:
|
|
166
|
-
offset:
|
|
167
|
-
placement:
|
|
168
|
-
isOpen:
|
|
169
|
-
|
|
170
|
-
|
|
181
|
+
teleport: n.teleport,
|
|
182
|
+
offset: n.offset,
|
|
183
|
+
placement: E.value,
|
|
184
|
+
isOpen: S.value,
|
|
185
|
+
keepAlive: b.value > 0,
|
|
186
|
+
menuId: n.menuId,
|
|
187
|
+
ignoreClickOutside: F.value,
|
|
171
188
|
class: "w-full",
|
|
172
|
-
className: "dropdown " + (
|
|
173
|
-
onOnShow:
|
|
174
|
-
onOnHide:
|
|
189
|
+
className: "dropdown " + (n.className || ""),
|
|
190
|
+
onOnShow: l[2] || (l[2] = (t) => e.$emit("onOpen")),
|
|
191
|
+
onOnHide: l[3] || (l[3] = (t) => e.$emit("onClose")),
|
|
175
192
|
"onUpdate:isOpen": B,
|
|
176
193
|
triggerClass: "w-full",
|
|
177
194
|
styles: { padding: "0" }
|
|
178
195
|
}, {
|
|
179
196
|
trigger: u(({ isOpen: t }) => [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"selected-label":
|
|
197
|
+
d(e.$slots, "trigger", M(H({ selectedLabel: O(I), isOpen: t })), () => [
|
|
198
|
+
T(oe, {
|
|
199
|
+
"selected-label": O(I),
|
|
183
200
|
"is-open": t,
|
|
184
|
-
direction:
|
|
185
|
-
triggerProps:
|
|
201
|
+
direction: n.direction,
|
|
202
|
+
triggerProps: n.triggerProps,
|
|
186
203
|
class: "w-full"
|
|
187
204
|
}, null, 8, ["selected-label", "is-open", "direction", "triggerProps"])
|
|
188
205
|
])
|
|
189
206
|
]),
|
|
190
207
|
default: u(() => [
|
|
191
|
-
|
|
192
|
-
|
|
208
|
+
d(e.$slots, "default"),
|
|
209
|
+
w.value.length || y.value.length || e.$slots.menu || e.$slots.item || n.remote || n.searchable ? (A(), Z(ne, {
|
|
193
210
|
key: 0,
|
|
194
|
-
options:
|
|
211
|
+
options: w.value,
|
|
195
212
|
cachedOptions: y.value,
|
|
196
|
-
class:
|
|
197
|
-
selected:
|
|
198
|
-
selectedIndex:
|
|
199
|
-
maxHeight:
|
|
200
|
-
nestedPosition:
|
|
201
|
-
nestedOffset:
|
|
202
|
-
selectable:
|
|
203
|
-
direction:
|
|
204
|
-
layout:
|
|
205
|
-
columns:
|
|
206
|
-
loading:
|
|
207
|
-
hasMore:
|
|
208
|
-
searchable:
|
|
209
|
-
remote:
|
|
210
|
-
debounceTime:
|
|
211
|
-
onSelect:
|
|
212
|
-
onClose:
|
|
213
|
-
onLoadMore:
|
|
214
|
-
onSearch:
|
|
215
|
-
},
|
|
213
|
+
class: _(n.className),
|
|
214
|
+
selected: O(P),
|
|
215
|
+
selectedIndex: n.selectedIndex,
|
|
216
|
+
maxHeight: n.maxHeight,
|
|
217
|
+
nestedPosition: L.value,
|
|
218
|
+
nestedOffset: n.nestedOffset,
|
|
219
|
+
selectable: n.selectable,
|
|
220
|
+
direction: n.direction,
|
|
221
|
+
layout: n.layout,
|
|
222
|
+
columns: n.columns,
|
|
223
|
+
loading: n.loading || k.value,
|
|
224
|
+
hasMore: n.hasMore,
|
|
225
|
+
searchable: n.searchable,
|
|
226
|
+
remote: n.remote,
|
|
227
|
+
debounceTime: n.debounceTime,
|
|
228
|
+
onSelect: U,
|
|
229
|
+
onClose: C,
|
|
230
|
+
onLoadMore: l[0] || (l[0] = (t) => e.$emit("load-more")),
|
|
231
|
+
onSearch: l[1] || (l[1] = (t) => e.$emit("search", t))
|
|
232
|
+
}, ee({ _: 2 }, [
|
|
216
233
|
e.$slots.menu ? {
|
|
217
234
|
name: "menu",
|
|
218
235
|
fn: u(() => [
|
|
219
|
-
|
|
236
|
+
d(e.$slots, "menu")
|
|
220
237
|
]),
|
|
221
238
|
key: "0"
|
|
222
239
|
} : void 0,
|
|
223
240
|
e.$slots.item ? {
|
|
224
241
|
name: "item",
|
|
225
242
|
fn: u((t) => [
|
|
226
|
-
|
|
243
|
+
d(e.$slots, "item", M(H(t)))
|
|
227
244
|
]),
|
|
228
245
|
key: "1"
|
|
229
246
|
} : void 0,
|
|
230
247
|
e.$slots.header ? {
|
|
231
248
|
name: "header",
|
|
232
249
|
fn: u(() => [
|
|
233
|
-
|
|
250
|
+
d(e.$slots, "header")
|
|
234
251
|
]),
|
|
235
252
|
key: "2"
|
|
236
253
|
} : void 0,
|
|
237
254
|
e.$slots.footer ? {
|
|
238
255
|
name: "footer",
|
|
239
256
|
fn: u(() => [
|
|
240
|
-
|
|
257
|
+
d(e.$slots, "footer")
|
|
241
258
|
]),
|
|
242
259
|
key: "3"
|
|
243
260
|
} : void 0
|
|
244
|
-
]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) :
|
|
261
|
+
]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : te("", !0)
|
|
245
262
|
]),
|
|
246
263
|
_: 3
|
|
247
|
-
}, 8, ["teleport", "offset", "placement", "isOpen", "menuId", "ignoreClickOutside", "className"]),
|
|
248
|
-
|
|
264
|
+
}, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className"]),
|
|
265
|
+
T(ae, {
|
|
249
266
|
show: g.value,
|
|
250
|
-
title:
|
|
251
|
-
description:
|
|
252
|
-
"confirm-text":
|
|
253
|
-
"cancel-text":
|
|
254
|
-
variant:
|
|
255
|
-
onConfirm:
|
|
256
|
-
onCancel:
|
|
267
|
+
title: r.value.title,
|
|
268
|
+
description: r.value.description,
|
|
269
|
+
"confirm-text": r.value.confirmText,
|
|
270
|
+
"cancel-text": r.value.cancelText,
|
|
271
|
+
variant: r.value.variant,
|
|
272
|
+
onConfirm: q,
|
|
273
|
+
onCancel: G
|
|
257
274
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])
|
|
258
275
|
], 4));
|
|
259
276
|
}
|
|
260
277
|
});
|
|
261
278
|
export {
|
|
262
|
-
|
|
279
|
+
pe as default
|
|
263
280
|
};
|
package/components/Modal.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Modal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c26acbd9"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
package/components/Modal.vue2.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useKeyStroke as
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as M, ref as f, inject as N, watch as x, provide as P, nextTick as V, onMounted as K, onUnmounted as R, computed as C, openBlock as n, createElementBlock as d, Fragment as W, createElementVNode as c, mergeProps as w, withModifiers as T, renderSlot as m, createCommentVNode as u, createBlock as $, Teleport as A, createVNode as B, Transition as F, withCtx as U, normalizeClass as a, toDisplayString as I, resolveDynamicComponent as q } from "vue";
|
|
2
|
+
import G from "./Button.vue.js";
|
|
3
|
+
import { useKeyStroke as H } from "../composables/useKeyStroke.js";
|
|
4
|
+
import { $t as S } from "../utils/i18n.js";
|
|
5
|
+
const J = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex-none flex flex-col space-y-1.5 pb-0 border-b border-border/90"
|
|
8
|
-
},
|
|
8
|
+
}, L = { class: "text-lg font-semibold leading-none tracking-tight" }, Q = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "text-sm text-muted-foreground mb-6.5"
|
|
11
|
-
},
|
|
11
|
+
}, ee = /* @__PURE__ */ M({
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "Modal",
|
|
14
14
|
props: {
|
|
@@ -28,51 +28,54 @@ const q = {
|
|
|
28
28
|
bodyProps: {}
|
|
29
29
|
},
|
|
30
30
|
emits: ["close", "update:show", "onOpen"],
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
31
|
+
setup(o, { emit: O }) {
|
|
32
|
+
const t = o, y = O, l = f(t.show), p = f(!1), b = f(!1), v = f(null);
|
|
33
33
|
let i = null;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const r = N("dropdown-context", null);
|
|
35
|
+
x(
|
|
36
|
+
() => t.show,
|
|
36
37
|
(e) => {
|
|
37
|
-
|
|
38
|
+
l.value = e, e && (y("onOpen"), r?.close());
|
|
38
39
|
}
|
|
39
40
|
);
|
|
40
|
-
const
|
|
41
|
-
|
|
41
|
+
const j = () => {
|
|
42
|
+
l.value = !0, r?.close();
|
|
42
43
|
}, z = (e) => {
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
p.value = e;
|
|
45
|
+
}, s = () => {
|
|
46
|
+
if (p.value) {
|
|
47
|
+
b.value = !0, i && clearTimeout(i), i = setTimeout(() => {
|
|
48
|
+
b.value = !1;
|
|
48
49
|
}, 1e3);
|
|
49
50
|
return;
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
l.value = !1, y("update:show", !1), y("close");
|
|
52
53
|
};
|
|
53
|
-
P("modal-context", { close:
|
|
54
|
+
P("modal-context", { close: s, setSubmitting: z });
|
|
54
55
|
const D = () => {
|
|
55
|
-
|
|
56
|
-
}, { onKeyStroke: E } =
|
|
57
|
-
E("Escape",
|
|
58
|
-
e ? (document.body.style.overflow = "hidden", await V(),
|
|
59
|
-
}),
|
|
60
|
-
|
|
56
|
+
t.closeOutside && s();
|
|
57
|
+
}, { onKeyStroke: E } = H();
|
|
58
|
+
E("Escape", s), x(l, async (e) => {
|
|
59
|
+
r?.onChildToggle?.(e), e ? (document.body.style.overflow = "hidden", await V(), v.value?.focus()) : document.body.style.overflow = "";
|
|
60
|
+
}), K(() => {
|
|
61
|
+
l.value && r?.onChildToggle?.(!0);
|
|
62
|
+
}), R(() => {
|
|
63
|
+
l.value && r?.onChildToggle?.(!1), document.body.style.overflow = "", i && clearTimeout(i);
|
|
61
64
|
});
|
|
62
|
-
const
|
|
63
|
-
() =>
|
|
65
|
+
const h = C(() => t.titleI18n ? S(t.titleI18n) : t.title), g = C(
|
|
66
|
+
() => t.descriptionI18n ? S(t.descriptionI18n) : t.description
|
|
64
67
|
);
|
|
65
|
-
return (e, k) => (
|
|
66
|
-
|
|
67
|
-
onClick:
|
|
68
|
-
class: `${
|
|
68
|
+
return (e, k) => (n(), d(W, null, [
|
|
69
|
+
c("span", w({
|
|
70
|
+
onClick: T(j, ["stop"]),
|
|
71
|
+
class: `${o.triggerClass}`
|
|
69
72
|
}, e.$attrs), [
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
m(e.$slots, "trigger", {}, () => [
|
|
74
|
+
o.body ? m(e.$slots, "default", { key: 0 }, void 0, !0) : u("", !0)
|
|
72
75
|
], !0)
|
|
73
76
|
], 16),
|
|
74
|
-
(
|
|
75
|
-
B(
|
|
77
|
+
(n(), $(A, { to: "body" }, [
|
|
78
|
+
B(F, {
|
|
76
79
|
"enter-active-class": "transition duration-200 ease-out",
|
|
77
80
|
"enter-from-class": "opacity-0",
|
|
78
81
|
"enter-to-class": "opacity-100",
|
|
@@ -80,52 +83,52 @@ const q = {
|
|
|
80
83
|
"leave-from-class": "opacity-100",
|
|
81
84
|
"leave-to-class": "opacity-0"
|
|
82
85
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
|
|
86
|
+
default: U(() => [
|
|
87
|
+
l.value ? (n(), d("div", {
|
|
85
88
|
key: 0,
|
|
86
|
-
class: a(["fixed inset-0 z-50 flex items-center justify-center bg-[#00000051] p-4",
|
|
89
|
+
class: a(["fixed inset-0 z-50 flex items-center justify-center bg-[#00000051] p-4 v-modal-overlay", o.backdrop && "backdrop-blur-[2px]"]),
|
|
87
90
|
onClick: D
|
|
88
91
|
}, [
|
|
89
|
-
|
|
92
|
+
c("div", {
|
|
90
93
|
ref_key: "modalRef",
|
|
91
|
-
ref:
|
|
94
|
+
ref: v,
|
|
92
95
|
tabindex: "-1",
|
|
93
|
-
class: a(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [
|
|
94
|
-
onClick: k[0] || (k[0] =
|
|
96
|
+
class: a(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [o.maxWidth]]),
|
|
97
|
+
onClick: k[0] || (k[0] = T(() => {
|
|
95
98
|
}, ["stop"]))
|
|
96
99
|
}, [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
class: a(["flex items-center justify-between py-2 px-4 rounded-t-md",
|
|
100
|
+
h.value ? (n(), d("div", J, [
|
|
101
|
+
c("div", {
|
|
102
|
+
class: a(["flex items-center justify-between py-2 px-4 rounded-t-md", o.headerClass])
|
|
100
103
|
}, [
|
|
101
|
-
|
|
102
|
-
B(
|
|
104
|
+
c("h3", L, I(h.value), 1),
|
|
105
|
+
B(G, {
|
|
103
106
|
rounded: "full",
|
|
104
107
|
size: "sm",
|
|
105
108
|
icon: "lucide:x",
|
|
106
109
|
variant: "ghost",
|
|
107
|
-
class: a(["hover:bg-gray-250/25! transition-all", { "blink-bg":
|
|
108
|
-
onClick:
|
|
110
|
+
class: a(["hover:bg-gray-250/25! transition-all", { "blink-bg": b.value }]),
|
|
111
|
+
onClick: s
|
|
109
112
|
}, null, 8, ["class"])
|
|
110
113
|
], 2)
|
|
111
|
-
])) :
|
|
112
|
-
|
|
113
|
-
class: a(["flex-1 overflow-y-auto px-4 pt-4 pb-3.5 min-h-0",
|
|
114
|
+
])) : u("", !0),
|
|
115
|
+
c("div", {
|
|
116
|
+
class: a(["flex-1 overflow-y-auto px-4 pt-4 pb-3.5 min-h-0", o.bodyClass])
|
|
114
117
|
}, [
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
g.value ? (n(), d("p", Q, I(g.value), 1)) : u("", !0),
|
|
119
|
+
o.body ? (n(), $(q(o.body), w({ key: 1 }, { ...o.bodyProps, ...e.$attrs }, { close: s }), null, 16)) : m(e.$slots, "default", {
|
|
117
120
|
key: 2,
|
|
118
|
-
close:
|
|
121
|
+
close: s
|
|
119
122
|
}, void 0, !0)
|
|
120
123
|
], 2),
|
|
121
|
-
e.$slots.footer ? (
|
|
124
|
+
e.$slots.footer ? (n(), d("div", {
|
|
122
125
|
key: 1,
|
|
123
|
-
class: a([
|
|
126
|
+
class: a([o.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
|
|
124
127
|
}, [
|
|
125
|
-
|
|
126
|
-
], 2)) :
|
|
128
|
+
m(e.$slots, "footer", { close: s }, void 0, !0)
|
|
129
|
+
], 2)) : u("", !0)
|
|
127
130
|
], 2)
|
|
128
|
-
], 2)) :
|
|
131
|
+
], 2)) : u("", !0)
|
|
129
132
|
]),
|
|
130
133
|
_: 3
|
|
131
134
|
})
|
|
@@ -134,5 +137,5 @@ const q = {
|
|
|
134
137
|
}
|
|
135
138
|
});
|
|
136
139
|
export {
|
|
137
|
-
|
|
140
|
+
ee as default
|
|
138
141
|
};
|