vlite3 0.6.7 → 0.6.9
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/_virtual/_commonjsHelpers.js +6 -0
- package/_virtual/dayjs.min.js +7 -0
- package/_virtual/dayjs.min2.js +4 -0
- package/components/Barcode/Barcode.vue.d.ts +1 -1
- package/components/Breadcrumb/BreadcrumbItem.vue.js +2 -2
- package/components/ConfirmationModal.vue.js +30 -25
- package/components/DataTable/DataTableRow.vue.js +70 -64
- package/components/Date/Date.vue.d.ts +8 -0
- package/components/Date/Date.vue.js +21 -0
- package/components/Date/Date.vue2.js +4 -0
- package/components/Date/index.d.ts +1 -0
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +39 -36
- package/components/List/ListFieldRow.vue.js +150 -107
- package/components/Modal.vue.js +2 -2
- package/components/Modal.vue2.js +43 -42
- package/components/Navbar/Navbar.vue.d.ts +33 -19
- package/components/Navbar/Navbar.vue.js +295 -185
- package/components/Navbar/NavbarTabs.vue.js +1 -1
- package/components/PermissionMatrix/PermissionEditor.vue.js +37 -37
- package/components/PermissionMatrix/PermissionEditorList.vue.js +5 -154
- package/components/PermissionMatrix/PermissionEditorList.vue2.js +160 -2
- package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +5 -205
- package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +204 -2
- package/components/PermissionMatrix/PermissionMatrix.vue.js +1 -1
- package/components/PermissionMatrix/PermissionMatrix.vue2.js +115 -126
- package/components/Price/Price.vue.d.ts +8 -0
- package/components/Price/Price.vue.js +26 -0
- package/components/Price/Price.vue2.js +4 -0
- package/components/Price/index.d.ts +1 -0
- package/components/Screen/Screen.vue.js +19 -19
- package/components/SidebarMenu/SidebarMenu.vue.js +95 -93
- package/components/SidebarMenu/SidebarMenuItem.vue.js +42 -42
- package/components/Tabes/Tabes.vue.d.ts +6 -0
- package/components/Tabes/Tabes.vue.js +63 -56
- package/core/config.d.ts +14 -1
- package/core/config.js +15 -9
- package/core/index.d.ts +0 -22
- package/core/index.js +17 -9
- package/index.d.ts +2 -0
- package/index.js +18 -14
- package/package.json +2 -1
- package/style.css +1 -1
- package/types/config.type.d.ts +6 -0
- package/types/navbar.type.d.ts +7 -17
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as j, ref as V, computed as c, openBlock as t, createElementBlock as s, normalizeClass as o, createElementVNode as v, createBlock as r, createCommentVNode as C, toDisplayString as w, renderSlot as T, resolveDynamicComponent as S, Fragment as m, createVNode as B } from "vue";
|
|
2
|
+
import x from "../Icon.vue.js";
|
|
3
|
+
import b from "../Price/Price.vue.js";
|
|
4
|
+
import h from "../Date/Date.vue.js";
|
|
5
|
+
import { $t as D } from "../../utils/i18n.js";
|
|
6
|
+
import { getObjectValue as I, formatNumber as N, getStatusColorClass as Y } from "./utils.js";
|
|
7
|
+
const F = { class: "flex items-center gap-1.5 min-w-0" }, A = { class: "text-xs font-normal text-muted-foreground leading-snug truncate" }, E = { class: "min-w-0" }, O = {
|
|
6
8
|
key: 2,
|
|
7
9
|
class: "flex items-center gap-1.5"
|
|
8
|
-
}, z = ["innerHTML"],
|
|
10
|
+
}, z = ["innerHTML"], R = {
|
|
9
11
|
key: 1,
|
|
10
12
|
class: "text-sm font-semibold text-foreground tracking-widest select-none",
|
|
11
13
|
"aria-hidden": "true"
|
|
12
|
-
},
|
|
14
|
+
}, q = ["aria-label"], G = ["src", "alt"], J = ["innerHTML"], K = { class: "flex items-center gap-1.5 shrink-0 min-w-0 max-w-[48%]" }, P = { class: "text-sm font-medium text-gray-800 truncate leading-snug" }, Q = { class: "flex items-center justify-end gap-2 min-w-0 flex-1" }, U = ["innerHTML"], W = {
|
|
13
15
|
key: 1,
|
|
14
16
|
class: "text-sm text-gray-600 tracking-widest select-none",
|
|
15
17
|
"aria-hidden": "true"
|
|
16
|
-
},
|
|
18
|
+
}, X = ["aria-label"], Z = ["src", "alt"], _ = ["innerHTML"], oe = /* @__PURE__ */ j({
|
|
17
19
|
__name: "ListFieldRow",
|
|
18
20
|
props: {
|
|
19
21
|
field: {},
|
|
@@ -27,157 +29,198 @@ const D = { class: "flex items-center gap-1.5 min-w-0" }, E = { class: "text-xs
|
|
|
27
29
|
stackedBorderStyle: { default: "none" }
|
|
28
30
|
},
|
|
29
31
|
setup(e) {
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
return
|
|
34
|
-
if (
|
|
35
|
-
return
|
|
36
|
-
switch (
|
|
37
|
-
case "date":
|
|
38
|
-
return k(l, !1);
|
|
39
|
-
case "dateTime":
|
|
40
|
-
return k(l, !0);
|
|
41
|
-
case "time":
|
|
42
|
-
return k(l, !0);
|
|
43
|
-
case "price":
|
|
44
|
-
return I(l);
|
|
32
|
+
const l = e, d = V(!1), n = c(() => I(l.field.key, l.data)), f = c(() => {
|
|
33
|
+
const a = n.value;
|
|
34
|
+
if (l.field.format)
|
|
35
|
+
return l.field.format(a, l.data);
|
|
36
|
+
if (a == null || a === "")
|
|
37
|
+
return l.field.emptyText ?? "--";
|
|
38
|
+
switch (l.field.type) {
|
|
45
39
|
case "number":
|
|
46
|
-
return
|
|
40
|
+
return N(a);
|
|
47
41
|
case "boolean":
|
|
48
|
-
return
|
|
42
|
+
return a ? "Yes" : "No";
|
|
49
43
|
default:
|
|
50
|
-
return String(
|
|
44
|
+
return String(a);
|
|
51
45
|
}
|
|
52
|
-
}),
|
|
53
|
-
() =>
|
|
54
|
-
),
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
|
|
46
|
+
}), y = c(
|
|
47
|
+
() => l.field.titleI18n ? D(l.field.titleI18n) : l.field.title ?? l.field.key
|
|
48
|
+
), i = c(() => {
|
|
49
|
+
const a = [];
|
|
50
|
+
if (l.field.addStatusColor) {
|
|
51
|
+
const u = Y(f.value);
|
|
52
|
+
u && a.push(u);
|
|
59
53
|
}
|
|
60
|
-
if (
|
|
61
|
-
if (typeof
|
|
62
|
-
const
|
|
63
|
-
|
|
54
|
+
if (l.field.class)
|
|
55
|
+
if (typeof l.field.class == "function") {
|
|
56
|
+
const u = l.field.class(n.value, l.data);
|
|
57
|
+
u && a.push(u);
|
|
64
58
|
} else
|
|
65
|
-
|
|
66
|
-
return
|
|
67
|
-
}),
|
|
68
|
-
|
|
59
|
+
a.push(l.field.class);
|
|
60
|
+
return a.join(" ");
|
|
61
|
+
}), p = c(() => l.field.type === "image"), L = c(() => l.variant === "striped" && l.index % 2 !== 0), H = c(() => l.variant === "stacked"), g = c(
|
|
62
|
+
() => ["date", "dateTime", "time"].includes(l.field.type || "")
|
|
63
|
+
), k = c(() => {
|
|
64
|
+
if (l.field.type === "dateTime") return "MM/DD/YYYY hh:mm A";
|
|
65
|
+
if (l.field.type === "time") return "hh:mm A";
|
|
66
|
+
}), M = c(() => l.stackedBorderStyle === "divider" && l.stackedColIndex !== 0 ? "border-l border-border pl-4 pr-3.5 py-2" : "px-3.5 py-2");
|
|
67
|
+
return (a, u) => H.value ? (t(), s("div", {
|
|
69
68
|
key: 0,
|
|
70
|
-
class:
|
|
69
|
+
class: o([
|
|
71
70
|
"list-field-row list-field-row--stacked flex flex-col gap-0.5 min-w-0",
|
|
72
|
-
|
|
71
|
+
M.value
|
|
73
72
|
]),
|
|
74
73
|
role: "row"
|
|
75
74
|
}, [
|
|
76
|
-
|
|
77
|
-
e.field.icon ? (
|
|
75
|
+
v("div", F, [
|
|
76
|
+
e.field.icon ? (t(), r(x, {
|
|
78
77
|
key: 0,
|
|
79
78
|
icon: e.field.icon,
|
|
80
79
|
class: "w-3 h-3 text-muted-foreground shrink-0"
|
|
81
|
-
}, null, 8, ["icon"])) :
|
|
82
|
-
|
|
80
|
+
}, null, 8, ["icon"])) : C("", !0),
|
|
81
|
+
v("span", A, w(y.value), 1)
|
|
83
82
|
]),
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
v("div", E, [
|
|
84
|
+
a.$slots[e.field.key] ? T(a.$slots, e.field.key, {
|
|
86
85
|
key: 0,
|
|
87
|
-
value:
|
|
88
|
-
resolved:
|
|
86
|
+
value: n.value,
|
|
87
|
+
resolved: f.value,
|
|
89
88
|
data: e.data
|
|
90
|
-
}) : e.field.component ? (
|
|
89
|
+
}) : e.field.component ? (t(), r(S(e.field.component), {
|
|
91
90
|
key: 1,
|
|
92
91
|
data: e.data,
|
|
93
|
-
value:
|
|
94
|
-
}, null, 8, ["data", "value"])) : e.field.isSensitive ? (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
value: n.value
|
|
93
|
+
}, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), s("div", O, [
|
|
94
|
+
d.value ? (t(), s(m, { key: 0 }, [
|
|
95
|
+
e.field.type === "price" ? (t(), r(b, {
|
|
96
|
+
key: 0,
|
|
97
|
+
value: n.value,
|
|
98
|
+
class: o(["text-sm font-semibold text-foreground break-words leading-snug", i.value])
|
|
99
|
+
}, null, 8, ["value", "class"])) : g.value ? (t(), r(h, {
|
|
100
|
+
key: 1,
|
|
101
|
+
value: n.value,
|
|
102
|
+
format: k.value,
|
|
103
|
+
class: o(["text-sm font-semibold text-foreground break-words leading-snug", i.value])
|
|
104
|
+
}, null, 8, ["value", "format", "class"])) : (t(), s("span", {
|
|
105
|
+
key: 2,
|
|
106
|
+
class: o(["text-sm font-semibold text-foreground break-words leading-snug", i.value]),
|
|
107
|
+
innerHTML: f.value
|
|
108
|
+
}, null, 10, z))
|
|
109
|
+
], 64)) : (t(), s("span", R, " •••••••• ")),
|
|
110
|
+
v("button", {
|
|
101
111
|
type: "button",
|
|
102
112
|
class: "shrink-0 p-0.5 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
|
|
103
|
-
"aria-label":
|
|
104
|
-
onClick:
|
|
113
|
+
"aria-label": d.value ? "Hide value" : "Show value",
|
|
114
|
+
onClick: u[0] || (u[0] = ($) => d.value = !d.value)
|
|
105
115
|
}, [
|
|
106
|
-
|
|
107
|
-
icon:
|
|
116
|
+
B(x, {
|
|
117
|
+
icon: d.value ? "lucide:eye-off" : "lucide:eye",
|
|
108
118
|
class: "w-3 h-3"
|
|
109
119
|
}, null, 8, ["icon"])
|
|
110
|
-
], 8,
|
|
111
|
-
])) :
|
|
120
|
+
], 8, q)
|
|
121
|
+
])) : p.value ? (t(), s("img", {
|
|
112
122
|
key: 3,
|
|
113
|
-
src:
|
|
114
|
-
alt:
|
|
123
|
+
src: f.value,
|
|
124
|
+
alt: y.value,
|
|
115
125
|
class: "w-8 h-8 rounded-full object-cover border border-border mt-0.5"
|
|
116
|
-
}, null, 8,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
}, null, 8, G)) : (t(), s(m, { key: 4 }, [
|
|
127
|
+
e.field.type === "price" ? (t(), r(b, {
|
|
128
|
+
key: 0,
|
|
129
|
+
value: n.value,
|
|
130
|
+
class: o(["text-sm font-semibold text-foreground break-words leading-snug", i.value])
|
|
131
|
+
}, null, 8, ["value", "class"])) : g.value ? (t(), r(h, {
|
|
132
|
+
key: 1,
|
|
133
|
+
value: n.value,
|
|
134
|
+
format: k.value,
|
|
135
|
+
class: o(["text-sm font-semibold text-foreground break-words leading-snug", i.value])
|
|
136
|
+
}, null, 8, ["value", "format", "class"])) : (t(), s("span", {
|
|
137
|
+
key: 2,
|
|
138
|
+
class: o(["text-sm font-semibold text-foreground break-words leading-snug", i.value]),
|
|
139
|
+
innerHTML: f.value
|
|
140
|
+
}, null, 10, J))
|
|
141
|
+
], 64))
|
|
121
142
|
])
|
|
122
|
-
], 2)) : (
|
|
143
|
+
], 2)) : (t(), s("div", {
|
|
123
144
|
key: 1,
|
|
124
|
-
class:
|
|
145
|
+
class: o(["list-field-row flex justify-between gap-3 px-3 py-2.5 transition-colors", [
|
|
125
146
|
e.showBorderBottom && !e.isLast ? "border-b border-border" : "",
|
|
126
|
-
|
|
147
|
+
L.value ? "bg-muted/40" : "",
|
|
127
148
|
e.variant === "compact" ? "py-1.5!" : "",
|
|
128
149
|
e.variant === "minimal" ? "px-0!" : ""
|
|
129
150
|
]]),
|
|
130
151
|
role: "row"
|
|
131
152
|
}, [
|
|
132
|
-
|
|
133
|
-
e.field.icon ? (
|
|
153
|
+
v("div", K, [
|
|
154
|
+
e.field.icon ? (t(), r(x, {
|
|
134
155
|
key: 0,
|
|
135
156
|
icon: e.field.icon,
|
|
136
157
|
class: "w-3.5 h-3.5 text-gray-800 shrink-0"
|
|
137
|
-
}, null, 8, ["icon"])) :
|
|
138
|
-
|
|
158
|
+
}, null, 8, ["icon"])) : C("", !0),
|
|
159
|
+
v("span", P, w(y.value) + w(e.showColon ? ":" : ""), 1)
|
|
139
160
|
]),
|
|
140
|
-
|
|
141
|
-
|
|
161
|
+
v("div", Q, [
|
|
162
|
+
a.$slots[e.field.key] ? T(a.$slots, e.field.key, {
|
|
142
163
|
key: 0,
|
|
143
|
-
value:
|
|
144
|
-
resolved:
|
|
164
|
+
value: n.value,
|
|
165
|
+
resolved: f.value,
|
|
145
166
|
data: e.data
|
|
146
|
-
}) : e.field.component ? (
|
|
167
|
+
}) : e.field.component ? (t(), r(S(e.field.component), {
|
|
147
168
|
key: 1,
|
|
148
169
|
data: e.data,
|
|
149
|
-
value:
|
|
150
|
-
}, null, 8, ["data", "value"])) : e.field.isSensitive ? (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
170
|
+
value: n.value
|
|
171
|
+
}, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), s(m, { key: 2 }, [
|
|
172
|
+
d.value ? (t(), s(m, { key: 0 }, [
|
|
173
|
+
e.field.type === "price" ? (t(), r(b, {
|
|
174
|
+
key: 0,
|
|
175
|
+
value: n.value,
|
|
176
|
+
class: o(["text-sm text-gray-600 text-right break-words", i.value])
|
|
177
|
+
}, null, 8, ["value", "class"])) : g.value ? (t(), r(h, {
|
|
178
|
+
key: 1,
|
|
179
|
+
value: n.value,
|
|
180
|
+
format: k.value,
|
|
181
|
+
class: o(["text-sm text-gray-600 text-right break-words", i.value])
|
|
182
|
+
}, null, 8, ["value", "format", "class"])) : (t(), s("span", {
|
|
183
|
+
key: 2,
|
|
184
|
+
class: o(["text-sm text-gray-600 text-right break-words", i.value]),
|
|
185
|
+
innerHTML: f.value
|
|
186
|
+
}, null, 10, U))
|
|
187
|
+
], 64)) : (t(), s("span", W, " •••••••• ")),
|
|
188
|
+
v("button", {
|
|
157
189
|
type: "button",
|
|
158
190
|
class: "shrink-0 p-1 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
|
|
159
|
-
"aria-label":
|
|
160
|
-
onClick:
|
|
191
|
+
"aria-label": d.value ? "Hide value" : "Show value",
|
|
192
|
+
onClick: u[1] || (u[1] = ($) => d.value = !d.value)
|
|
161
193
|
}, [
|
|
162
|
-
|
|
163
|
-
icon:
|
|
194
|
+
B(x, {
|
|
195
|
+
icon: d.value ? "lucide:eye-off" : "lucide:eye",
|
|
164
196
|
class: "w-3.5 h-3.5"
|
|
165
197
|
}, null, 8, ["icon"])
|
|
166
|
-
], 8,
|
|
167
|
-
], 64)) :
|
|
198
|
+
], 8, X)
|
|
199
|
+
], 64)) : p.value ? (t(), s("img", {
|
|
168
200
|
key: 3,
|
|
169
|
-
src:
|
|
170
|
-
alt:
|
|
201
|
+
src: f.value,
|
|
202
|
+
alt: y.value,
|
|
171
203
|
class: "w-8 h-8 rounded-full object-cover border border-border"
|
|
172
|
-
}, null, 8,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
204
|
+
}, null, 8, Z)) : (t(), s(m, { key: 4 }, [
|
|
205
|
+
e.field.type === "price" ? (t(), r(b, {
|
|
206
|
+
key: 0,
|
|
207
|
+
value: n.value,
|
|
208
|
+
class: o(["text-sm text-gray-900 text-right break-words leading-snug", i.value])
|
|
209
|
+
}, null, 8, ["value", "class"])) : g.value ? (t(), r(h, {
|
|
210
|
+
key: 1,
|
|
211
|
+
value: n.value,
|
|
212
|
+
format: k.value,
|
|
213
|
+
class: o(["text-sm text-gray-900 text-right break-words leading-snug", i.value])
|
|
214
|
+
}, null, 8, ["value", "format", "class"])) : (t(), s("span", {
|
|
215
|
+
key: 2,
|
|
216
|
+
class: o(["text-sm text-gray-900 text-right break-words leading-snug", i.value]),
|
|
217
|
+
innerHTML: f.value
|
|
218
|
+
}, null, 10, _))
|
|
219
|
+
], 64))
|
|
177
220
|
])
|
|
178
221
|
], 2));
|
|
179
222
|
}
|
|
180
223
|
});
|
|
181
224
|
export {
|
|
182
|
-
|
|
225
|
+
oe as default
|
|
183
226
|
};
|
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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2a2855f6"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
package/components/Modal.vue2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as N, ref as
|
|
1
|
+
import { defineComponent as N, ref as f, inject as P, watch as C, provide as V, nextTick as K, onMounted as R, onUnmounted as W, computed as w, openBlock as l, createElementBlock as a, Fragment as A, mergeProps as T, withModifiers as $, renderSlot as m, createCommentVNode as r, createBlock as B, Teleport as F, createVNode as I, Transition as U, withCtx as q, normalizeClass as d, createElementVNode as y, toDisplayString as S, resolveDynamicComponent as G } from "vue";
|
|
2
2
|
import H from "./Button.vue.js";
|
|
3
3
|
import { useKeyStroke as J } from "../composables/useKeyStroke.js";
|
|
4
4
|
import { $t as O } from "../utils/i18n.js";
|
|
@@ -7,7 +7,7 @@ const L = {
|
|
|
7
7
|
class: "flex-none flex flex-col space-y-1.5 pb-0 border-b border-border/90"
|
|
8
8
|
}, Q = { class: "text-lg font-semibold leading-none tracking-tight" }, X = {
|
|
9
9
|
key: 0,
|
|
10
|
-
class: "text-sm text-muted-foreground mb-
|
|
10
|
+
class: "text-sm text-muted-foreground mb-3.5"
|
|
11
11
|
}, oe = /* @__PURE__ */ N({
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "Modal",
|
|
@@ -29,54 +29,55 @@ const L = {
|
|
|
29
29
|
},
|
|
30
30
|
emits: ["close", "update:show", "onOpen"],
|
|
31
31
|
setup(o, { emit: j }) {
|
|
32
|
-
const t = o, b = j,
|
|
33
|
-
let
|
|
32
|
+
const t = o, b = j, s = f(t.show), p = f(!1), v = f(!1), g = f(null);
|
|
33
|
+
let c = null, u = null;
|
|
34
34
|
const i = P("dropdown-context", null);
|
|
35
35
|
C(
|
|
36
36
|
() => t.show,
|
|
37
37
|
(e) => {
|
|
38
|
-
|
|
38
|
+
s.value = e, e && (b("onOpen"), i?.close());
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
const z = () => {
|
|
42
|
-
|
|
42
|
+
s.value = !0, i?.close();
|
|
43
43
|
}, D = (e) => {
|
|
44
44
|
p.value = e;
|
|
45
|
-
},
|
|
45
|
+
}, n = () => {
|
|
46
46
|
if (p.value) {
|
|
47
|
-
v.value = !0,
|
|
47
|
+
v.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
48
48
|
v.value = !1;
|
|
49
49
|
}, 1e3);
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
s.value = !1, b("update:show", !1), b("close");
|
|
53
53
|
};
|
|
54
|
-
V("modal-context", { close:
|
|
54
|
+
V("modal-context", { close: n, setSubmitting: D });
|
|
55
55
|
const E = () => {
|
|
56
|
-
t.closeOutside &&
|
|
56
|
+
t.closeOutside && n();
|
|
57
57
|
}, { onKeyStroke: M } = J();
|
|
58
|
-
M("Escape",
|
|
59
|
-
|
|
58
|
+
M("Escape", n), C(s, async (e) => {
|
|
59
|
+
u && clearTimeout(u), e ? (i?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await K(), g.value?.focus()) : (document.body.style.overflow = "", u = setTimeout(() => {
|
|
60
60
|
i?.onChildToggle?.(!1);
|
|
61
61
|
}, 200));
|
|
62
62
|
}), R(() => {
|
|
63
|
-
|
|
63
|
+
s.value && i?.onChildToggle?.(!0);
|
|
64
64
|
}), W(() => {
|
|
65
|
-
|
|
65
|
+
u && clearTimeout(u), s.value && i?.onChildToggle?.(!1), document.body.style.overflow = "", c && clearTimeout(c);
|
|
66
66
|
});
|
|
67
67
|
const h = w(() => t.titleI18n ? O(t.titleI18n) : t.title), k = w(
|
|
68
68
|
() => t.descriptionI18n ? O(t.descriptionI18n) : t.description
|
|
69
69
|
);
|
|
70
|
-
return (e, x) => (
|
|
71
|
-
|
|
70
|
+
return (e, x) => (l(), a(A, null, [
|
|
71
|
+
e.$slots?.trigger ? (l(), a("span", T({
|
|
72
|
+
key: 0,
|
|
72
73
|
onClick: $(z, ["stop"]),
|
|
73
74
|
class: `${o.triggerClass}`
|
|
74
75
|
}, e.$attrs), [
|
|
75
|
-
|
|
76
|
-
o.body ?
|
|
76
|
+
m(e.$slots, "trigger", {}, () => [
|
|
77
|
+
o.body ? m(e.$slots, "default", { key: 0 }, void 0, !0) : r("", !0)
|
|
77
78
|
], !0)
|
|
78
|
-
], 16),
|
|
79
|
-
(
|
|
79
|
+
], 16)) : r("", !0),
|
|
80
|
+
(l(), B(F, { to: "body" }, [
|
|
80
81
|
I(U, {
|
|
81
82
|
"enter-active-class": "transition duration-200 ease-out",
|
|
82
83
|
"enter-from-class": "opacity-0",
|
|
@@ -86,51 +87,51 @@ const L = {
|
|
|
86
87
|
"leave-to-class": "opacity-0"
|
|
87
88
|
}, {
|
|
88
89
|
default: q(() => [
|
|
89
|
-
|
|
90
|
+
s.value ? (l(), a("div", {
|
|
90
91
|
key: 0,
|
|
91
|
-
class:
|
|
92
|
+
class: d(["fixed inset-0 z-50 flex items-center justify-center bg-[#00000051] p-4 v-modal-overlay", o.backdrop && "backdrop-blur-[2px]"]),
|
|
92
93
|
onClick: E
|
|
93
94
|
}, [
|
|
94
|
-
|
|
95
|
+
y("div", {
|
|
95
96
|
ref_key: "modalRef",
|
|
96
97
|
ref: g,
|
|
97
98
|
tabindex: "-1",
|
|
98
|
-
class:
|
|
99
|
+
class: d(["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]]),
|
|
99
100
|
onClick: x[0] || (x[0] = $(() => {
|
|
100
101
|
}, ["stop"]))
|
|
101
102
|
}, [
|
|
102
|
-
h.value ? (
|
|
103
|
-
|
|
104
|
-
class:
|
|
103
|
+
h.value ? (l(), a("div", L, [
|
|
104
|
+
y("div", {
|
|
105
|
+
class: d(["flex items-center justify-between py-2 px-4 rounded-t-md", o.headerClass])
|
|
105
106
|
}, [
|
|
106
|
-
|
|
107
|
+
y("h3", Q, S(h.value), 1),
|
|
107
108
|
I(H, {
|
|
108
109
|
rounded: "full",
|
|
109
110
|
size: "sm",
|
|
110
111
|
icon: "lucide:x",
|
|
111
112
|
variant: "ghost",
|
|
112
|
-
class:
|
|
113
|
-
onClick:
|
|
113
|
+
class: d(["hover:bg-gray-250/25! transition-all", { "blink-bg": v.value }]),
|
|
114
|
+
onClick: n
|
|
114
115
|
}, null, 8, ["class"])
|
|
115
116
|
], 2)
|
|
116
|
-
])) :
|
|
117
|
-
|
|
118
|
-
class:
|
|
117
|
+
])) : r("", !0),
|
|
118
|
+
y("div", {
|
|
119
|
+
class: d(["flex-1 overflow-y-auto px-4 pt-4 pb-3.5 min-h-0", o.bodyClass])
|
|
119
120
|
}, [
|
|
120
|
-
k.value ? (
|
|
121
|
-
o.body ? (
|
|
121
|
+
k.value ? (l(), a("p", X, S(k.value), 1)) : r("", !0),
|
|
122
|
+
o.body ? (l(), B(G(o.body), T({ key: 1 }, { ...o.bodyProps, ...e.$attrs }, { close: n }), null, 16)) : m(e.$slots, "default", {
|
|
122
123
|
key: 2,
|
|
123
|
-
close:
|
|
124
|
+
close: n
|
|
124
125
|
}, void 0, !0)
|
|
125
126
|
], 2),
|
|
126
|
-
e.$slots.footer ? (
|
|
127
|
+
e.$slots.footer ? (l(), a("div", {
|
|
127
128
|
key: 1,
|
|
128
|
-
class:
|
|
129
|
+
class: d([o.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
|
|
129
130
|
}, [
|
|
130
|
-
|
|
131
|
-
], 2)) :
|
|
131
|
+
m(e.$slots, "footer", { close: n }, void 0, !0)
|
|
132
|
+
], 2)) : r("", !0)
|
|
132
133
|
], 2)
|
|
133
|
-
], 2)) :
|
|
134
|
+
], 2)) : r("", !0)
|
|
134
135
|
]),
|
|
135
136
|
_: 3
|
|
136
137
|
})
|
|
@@ -2,7 +2,39 @@ import { NavbarProps } from '../../types/navbar.type';
|
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
4
|
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
default?(_: {}): any;
|
|
7
|
+
default?(_: {}): any;
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
right?(_: {}): any;
|
|
12
|
+
right?(_: {}): any;
|
|
13
|
+
right?(_: {}): any;
|
|
14
|
+
right?(_: {}): any;
|
|
15
|
+
right?(_: {}): any;
|
|
16
|
+
right?(_: {}): any;
|
|
17
|
+
right?(_: {}): any;
|
|
18
|
+
right?(_: {}): any;
|
|
5
19
|
header?(_: any): any;
|
|
20
|
+
header?(_: {
|
|
21
|
+
isOpen: any;
|
|
22
|
+
toggle: () => boolean;
|
|
23
|
+
sidebarVisible: any;
|
|
24
|
+
toggleSidebar: any;
|
|
25
|
+
breadcrumbItems: any;
|
|
26
|
+
}): any;
|
|
27
|
+
main?(_: {}): any;
|
|
28
|
+
main?(_: {}): any;
|
|
29
|
+
logo?(_: {}): any;
|
|
30
|
+
logo?(_: {}): any;
|
|
31
|
+
logo?(_: {}): any;
|
|
32
|
+
logo?(_: {}): any;
|
|
33
|
+
logo?(_: {}): any;
|
|
34
|
+
logo?(_: {}): any;
|
|
35
|
+
logo?(_: {}): any;
|
|
36
|
+
logo?(_: {}): any;
|
|
37
|
+
logo?(_: {}): any;
|
|
6
38
|
'mobile-trigger'?(_: {
|
|
7
39
|
isOpen: any;
|
|
8
40
|
toggle: () => boolean;
|
|
@@ -19,14 +51,6 @@ declare function __VLS_template(): {
|
|
|
19
51
|
isOpen: any;
|
|
20
52
|
toggle: () => boolean;
|
|
21
53
|
}): any;
|
|
22
|
-
logo?(_: {}): any;
|
|
23
|
-
logo?(_: {}): any;
|
|
24
|
-
logo?(_: {}): any;
|
|
25
|
-
logo?(_: {}): any;
|
|
26
|
-
logo?(_: {}): any;
|
|
27
|
-
logo?(_: {}): any;
|
|
28
|
-
logo?(_: {}): any;
|
|
29
|
-
logo?(_: {}): any;
|
|
30
54
|
left?(_: {}): any;
|
|
31
55
|
left?(_: {}): any;
|
|
32
56
|
left?(_: {}): any;
|
|
@@ -47,17 +71,6 @@ declare function __VLS_template(): {
|
|
|
47
71
|
center?(_: {}): any;
|
|
48
72
|
center?(_: {}): any;
|
|
49
73
|
center?(_: {}): any;
|
|
50
|
-
right?(_: {}): any;
|
|
51
|
-
right?(_: {}): any;
|
|
52
|
-
right?(_: {}): any;
|
|
53
|
-
right?(_: {}): any;
|
|
54
|
-
right?(_: {}): any;
|
|
55
|
-
right?(_: {}): any;
|
|
56
|
-
default?(_: {}): any;
|
|
57
|
-
default?(_: {}): any;
|
|
58
|
-
default?(_: {}): any;
|
|
59
|
-
default?(_: {}): any;
|
|
60
|
-
main?(_: {}): any;
|
|
61
74
|
'mobile-menu'?(_: {}): any;
|
|
62
75
|
'mobile-menu'?(_: {}): any;
|
|
63
76
|
'mobile-menu'?(_: {}): any;
|
|
@@ -100,6 +113,7 @@ declare const __VLS_component: import('vue').DefineComponent<NavbarProps, {}, {}
|
|
|
100
113
|
breadcrumbSize: import('../Breadcrumb').BreadcrumbSize;
|
|
101
114
|
breadcrumbHomeIcon: string;
|
|
102
115
|
breadcrumbClass: string;
|
|
116
|
+
layoutMode: import('../../types/navbar.type').NavbarLayoutMode;
|
|
103
117
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
104
118
|
mobileTriggerRef: HTMLButtonElement;
|
|
105
119
|
mobileMenuRef: HTMLDivElement;
|