vlite3 0.6.1 → 0.6.4
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/CheckBox.vue.js +13 -12
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPaletteContent.vue.js +1 -1
- package/components/CommandPaletteContent.vue2.js +2 -2
- package/components/Dropdown/Dropdown.vue.js +123 -106
- package/components/Form/Form.vue.d.ts +0 -23
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +146 -141
- package/components/Form/FormField.vue.js +6 -5
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +8 -8
- package/components/Input.vue.js +13 -13
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +66 -63
- package/components/Navbar/NavbarTabs.vue.js +3 -3
- package/components/Pagination/Pagination.vue.d.ts +2 -0
- package/components/Pagination/Pagination.vue.js +163 -118
- package/components/Pagination/index.d.ts +6 -0
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/SidePanel.vue.js +61 -59
- package/components/SidebarMenu/SidebarMenu.vue.js +89 -87
- package/components/SidebarMenu/SidebarMenuItem.vue.js +161 -139
- package/components/Switch.vue.js +2 -2
- package/components/Textarea.vue.js +4 -2
- package/components/Tooltip.vue.js +5 -4
- package/package.json +2 -2
- package/style.css +8 -8
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as X, inject as Y, computed as
|
|
1
|
+
import { defineComponent as X, inject as Y, computed as c, resolveComponent as Z, openBlock as r, createElementBlock as f, normalizeClass as u, createBlock as h, unref as n, withCtx as b, createElementVNode as p, normalizeStyle as M, createCommentVNode as d, toDisplayString as g, createVNode as S, resolveDynamicComponent as B, mergeProps as D, createTextVNode as ee, Fragment as V, withKeys as te, withModifiers as ae, Transition as ne, renderList as ie } from "vue";
|
|
2
2
|
import { useRouter as oe } from "vue-router";
|
|
3
3
|
import w from "../Icon.vue.js";
|
|
4
|
-
import
|
|
4
|
+
import K from "../Tooltip.vue.js";
|
|
5
5
|
import le from "../Dropdown/Dropdown.vue.js";
|
|
6
|
-
import { $t as
|
|
6
|
+
import { $t as O } from "../../utils/i18n.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
const re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "px-3 py-1.5 text-sm flex items-center gap-2 font-medium border-b bg-muted-light rounded-t-md text-center truncate"
|
|
11
|
-
},
|
|
11
|
+
}, se = { class: "w-full" }, ce = { class: "flex items-center w-full gap-2 text-sm" }, ue = { class: "truncate flex-1 font-medium" }, de = ["onKeydown"], me = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "overflow-hidden transition-all duration-300 ease-in-out relative"
|
|
14
|
-
},
|
|
14
|
+
}, fe = { class: "mt-0.5 space-y-0.5" }, we = /* @__PURE__ */ X({
|
|
15
15
|
__name: "SidebarMenuItem",
|
|
16
16
|
props: {
|
|
17
17
|
item: {},
|
|
@@ -19,146 +19,168 @@ const re = {
|
|
|
19
19
|
menuOffset: {},
|
|
20
20
|
itemClass: {}
|
|
21
21
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const t =
|
|
22
|
+
setup(s) {
|
|
23
|
+
const t = s, e = Y("sidebar-menu-ctx"), k = oe();
|
|
24
24
|
if (!e)
|
|
25
25
|
throw new Error("SidebarMenuItem must be used within a SidebarMenu");
|
|
26
|
-
const
|
|
26
|
+
const i = c(
|
|
27
|
+
() => e.currentOrientation === "horizontal" && t.depth === 0
|
|
28
|
+
), v = c(() => !!t.item.children?.length), R = c(() => i.value && v.value || e.compact && v.value ? "popover" : t.item.renderMode || e.renderMode || "tree"), I = c(() => e.renderNestedTabs && t.depth === 0 ? !1 : R.value === "popover" && v.value), y = c(() => t.item.id ? t.item.id : t.item.to && typeof t.item.to == "string" ? t.item.to : t.item.label), E = c(() => I.value || e.renderNestedTabs && t.depth === 0 ? !1 : e.expandedItems.includes(y.value)), j = c(() => !(!v.value || e.renderNestedTabs && t.depth === 0)), z = c(() => e.activeItem === y.value), L = (o) => {
|
|
27
29
|
if (!t.item.disabled) {
|
|
28
30
|
if (e.renderNestedTabs && t.depth === 0) {
|
|
29
|
-
t.item.action && t.item.action(t.item),
|
|
31
|
+
if (t.item.action && t.item.action(t.item), t.item.to)
|
|
32
|
+
k.push(t.item.to).catch(() => {
|
|
33
|
+
});
|
|
34
|
+
else if (t.item.href)
|
|
35
|
+
window.open(t.item.href, "_blank");
|
|
36
|
+
else if (v.value) {
|
|
37
|
+
const a = t.item.children?.[0];
|
|
38
|
+
a && (a.to ? k.push(a.to).catch(() => {
|
|
39
|
+
}) : a.href && window.open(a.href, "_blank"));
|
|
40
|
+
}
|
|
41
|
+
e.setActive(y.value);
|
|
30
42
|
return;
|
|
31
43
|
}
|
|
32
|
-
|
|
44
|
+
v.value && !t.item.to && !t.item.href && (I.value || e.toggleExpand(y.value)), t.item.action && t.item.action(t.item), (!v.value || t.item.to) && e.setActive(y.value);
|
|
33
45
|
}
|
|
34
|
-
},
|
|
46
|
+
}, N = (o) => {
|
|
35
47
|
if (o.stopPropagation(), e.renderNestedTabs && t.depth === 0) {
|
|
36
|
-
t.item.action && t.item.action(t.item),
|
|
48
|
+
if (t.item.action && t.item.action(t.item), t.item.to)
|
|
49
|
+
k.push(t.item.to).catch(() => {
|
|
50
|
+
});
|
|
51
|
+
else if (t.item.href)
|
|
52
|
+
window.open(t.item.href, "_blank");
|
|
53
|
+
else if (v.value) {
|
|
54
|
+
const a = t.item.children?.[0];
|
|
55
|
+
a && (a.to ? k.push(a.to).catch(() => {
|
|
56
|
+
}) : a.href && window.open(a.href, "_blank"));
|
|
57
|
+
}
|
|
58
|
+
e.setActive(y.value);
|
|
37
59
|
return;
|
|
38
60
|
}
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
marginLeft: `${t.depth *
|
|
42
|
-
width: `calc(100% - ${t.depth *
|
|
43
|
-
}),
|
|
44
|
-
const
|
|
61
|
+
I.value || e.toggleExpand(y.value);
|
|
62
|
+
}, $ = c(() => e.indentSize || 12), T = c(() => i.value ? {} : e.compact ? { width: "100%" } : {
|
|
63
|
+
marginLeft: `${t.depth * $.value}px`,
|
|
64
|
+
width: `calc(100% - ${t.depth * $.value}px)`
|
|
65
|
+
}), _ = c(() => {
|
|
66
|
+
const a = `group flex items-center justify-between font-medium rounded-md transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/50 relative border border-transparent select-none cursor-pointer ${i.value ? "w-auto" : "w-full"} ${t?.itemClass || ""} ${e.labelClass}`, x = e.compact ? `justify-center ${e.compactItemPadding}` : `justify-between ${e.itemPadding}`;
|
|
45
67
|
let l = "";
|
|
46
|
-
return
|
|
47
|
-
}), m =
|
|
48
|
-
() => t.item.labelI18n ?
|
|
68
|
+
return z.value ? l = "bg-primary-light text-primary-fg-light" : l = "text-muted hover:bg-accent/80 hover:text-foreground", t.item.disabled && (l = "opacity-50 cursor-not-allowed pointer-events-none"), `${a} ${x} ${l} ${t.item.class || ""}`;
|
|
69
|
+
}), m = c(() => e.compact && e.showCompactLabels), C = c(
|
|
70
|
+
() => t.item.labelI18n ? O(t.item.labelI18n) : t.item.label
|
|
49
71
|
), A = (o) => ({
|
|
50
|
-
label: o.labelI18n ?
|
|
72
|
+
label: o.labelI18n ? O(o.labelI18n) : o.label,
|
|
51
73
|
value: o.id || o.label,
|
|
52
74
|
icon: o.icon,
|
|
53
75
|
disabled: o.disabled,
|
|
54
76
|
children: o.children ? o.children.map(A) : void 0,
|
|
55
77
|
data: o
|
|
56
|
-
}), F =
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
|
|
60
|
-
const x =
|
|
61
|
-
x && e.setActive(x),
|
|
62
|
-
}) :
|
|
78
|
+
}), F = c(() => t.item.children ? t.item.children.map(A) : []), W = (o) => {
|
|
79
|
+
const a = o.data;
|
|
80
|
+
if (a) {
|
|
81
|
+
a.action && a.action(a);
|
|
82
|
+
const x = a.id || a.label || (typeof a.to == "string" ? a.to : "");
|
|
83
|
+
x && e.setActive(x), a.to ? k.push(a.to).catch(() => {
|
|
84
|
+
}) : a.href && window.open(a.href, "_blank");
|
|
63
85
|
}
|
|
64
86
|
}, q = (o) => {
|
|
65
|
-
const
|
|
66
|
-
|
|
87
|
+
const a = o;
|
|
88
|
+
a.style.height = "0", a.style.opacity = "0";
|
|
67
89
|
}, G = (o) => {
|
|
68
|
-
const
|
|
69
|
-
|
|
90
|
+
const a = o;
|
|
91
|
+
a.style.height = a.scrollHeight + "px", a.style.opacity = "1";
|
|
70
92
|
}, J = (o) => {
|
|
71
|
-
const
|
|
72
|
-
|
|
93
|
+
const a = o;
|
|
94
|
+
a.style.height = "auto", a.style.overflow = "visible";
|
|
73
95
|
}, Q = (o) => {
|
|
74
|
-
const
|
|
75
|
-
|
|
96
|
+
const a = o;
|
|
97
|
+
a.style.height = a.scrollHeight + "px", a.style.overflow = "hidden", a.style.opacity = "1";
|
|
76
98
|
}, U = (o) => {
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
}, H =
|
|
99
|
+
const a = o;
|
|
100
|
+
a.style.height = "0", a.style.opacity = "0";
|
|
101
|
+
}, H = c(() => t.item.to ? "router-link" : t.item.href ? "a" : "button"), P = c(() => t.item.to ? { to: t.item.to } : t.item.href ? {
|
|
80
102
|
href: t.item.href,
|
|
81
103
|
target: "_blank",
|
|
82
104
|
rel: "noopener noreferrer"
|
|
83
105
|
} : { type: "button" });
|
|
84
|
-
return (o,
|
|
106
|
+
return (o, a) => {
|
|
85
107
|
const x = Z("SidebarMenuItem", !0);
|
|
86
|
-
return r(),
|
|
87
|
-
class: u(["relative sidebar-manu-item",
|
|
108
|
+
return r(), f("div", {
|
|
109
|
+
class: u(["relative sidebar-manu-item", i.value ? "w-auto" : "w-full"])
|
|
88
110
|
}, [
|
|
89
|
-
|
|
111
|
+
I.value ? (r(), h(n(le), {
|
|
90
112
|
key: 0,
|
|
91
|
-
position:
|
|
92
|
-
offset:
|
|
113
|
+
position: i.value ? "bottom-start" : "right-start",
|
|
114
|
+
offset: s.menuOffset,
|
|
93
115
|
class: "w-full block",
|
|
94
116
|
searchable: !1,
|
|
95
|
-
width:
|
|
96
|
-
maxHeight:
|
|
117
|
+
width: n(e).nestedMenuWidth,
|
|
118
|
+
maxHeight: n(e).nestedMenuMaxHeight,
|
|
97
119
|
options: F.value,
|
|
98
120
|
onOnSelect: W
|
|
99
121
|
}, {
|
|
100
|
-
header:
|
|
101
|
-
|
|
102
|
-
|
|
122
|
+
header: b(() => [
|
|
123
|
+
n(e).compact && !i.value ? (r(), f("div", re, [
|
|
124
|
+
s.item.icon ? (r(), h(w, {
|
|
103
125
|
key: 0,
|
|
104
|
-
icon:
|
|
126
|
+
icon: s.item.icon,
|
|
105
127
|
class: "shrink-0 transition-colors opacity-80 group-hover:opacity-100"
|
|
106
128
|
}, null, 8, ["icon"])) : d("", !0),
|
|
107
|
-
ee(" " +
|
|
129
|
+
ee(" " + g(C.value), 1)
|
|
108
130
|
])) : d("", !0)
|
|
109
131
|
]),
|
|
110
|
-
trigger:
|
|
111
|
-
|
|
112
|
-
content:
|
|
113
|
-
placement:
|
|
132
|
+
trigger: b(({ isOpen: l }) => [
|
|
133
|
+
S(K, {
|
|
134
|
+
content: C.value,
|
|
135
|
+
placement: i.value ? "bottom" : "right",
|
|
114
136
|
className: "sidebar-menu-tooltip",
|
|
115
|
-
disabled: !
|
|
137
|
+
disabled: !n(e).showTooltip || !n(e).compact && !i.value || l,
|
|
116
138
|
class: "w-full block"
|
|
117
139
|
}, {
|
|
118
|
-
default:
|
|
119
|
-
|
|
120
|
-
(r(),
|
|
121
|
-
class: [
|
|
122
|
-
style:
|
|
140
|
+
default: b(() => [
|
|
141
|
+
p("div", se, [
|
|
142
|
+
(r(), h(B(H.value), D(P.value, {
|
|
143
|
+
class: [_.value, l ? "bg-muted text-foreground" : ""],
|
|
144
|
+
style: T.value,
|
|
123
145
|
"aria-haspopup": !0,
|
|
124
146
|
"aria-expanded": l,
|
|
125
|
-
onClick:
|
|
147
|
+
onClick: L
|
|
126
148
|
}), {
|
|
127
|
-
default:
|
|
128
|
-
|
|
149
|
+
default: b(() => [
|
|
150
|
+
p("div", {
|
|
129
151
|
class: u(["min-w-0 flex-1 flex", [
|
|
130
|
-
m.value && !
|
|
152
|
+
m.value && !i.value ? "flex-col items-center justify-center gap-1" : n(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
|
|
131
153
|
]])
|
|
132
154
|
}, [
|
|
133
|
-
|
|
155
|
+
s.item.icon ? (r(), h(w, {
|
|
134
156
|
key: 0,
|
|
135
|
-
icon:
|
|
136
|
-
class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [
|
|
137
|
-
style:
|
|
138
|
-
width:
|
|
139
|
-
height:
|
|
157
|
+
icon: s.item.icon,
|
|
158
|
+
class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [z.value || l ? "opacity-100" : ""]]),
|
|
159
|
+
style: M({
|
|
160
|
+
width: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize,
|
|
161
|
+
height: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize
|
|
140
162
|
})
|
|
141
163
|
}, null, 8, ["icon", "class", "style"])) : d("", !0),
|
|
142
|
-
|
|
164
|
+
p("span", {
|
|
143
165
|
class: u(["truncate leading-none pt-0.5", {
|
|
144
|
-
[
|
|
145
|
-
hidden:
|
|
146
|
-
"md:hidden":
|
|
166
|
+
[n(e).compactLabelClass]: m.value && !i.value,
|
|
167
|
+
hidden: n(e).compact && !m.value && !i.value,
|
|
168
|
+
"md:hidden": n(e).compact && !m.value && !i.value
|
|
147
169
|
}])
|
|
148
|
-
},
|
|
149
|
-
|
|
170
|
+
}, g(C.value), 3),
|
|
171
|
+
s.item.badge && (!n(e).compact || !m.value || i.value) ? (r(), f("span", {
|
|
150
172
|
key: 1,
|
|
151
173
|
class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
|
|
152
|
-
|
|
153
|
-
{ "md:hidden":
|
|
174
|
+
s.item.badgeClass || "bg-muted text-muted-foreground",
|
|
175
|
+
{ "md:hidden": n(e).compact && !i.value }
|
|
154
176
|
]])
|
|
155
|
-
},
|
|
177
|
+
}, g(s.item.badge), 3)) : d("", !0)
|
|
156
178
|
], 2),
|
|
157
|
-
|
|
158
|
-
class: u(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden":
|
|
179
|
+
p("div", {
|
|
180
|
+
class: u(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": n(e).compact && !i.value }])
|
|
159
181
|
}, [
|
|
160
|
-
|
|
161
|
-
icon:
|
|
182
|
+
S(w, {
|
|
183
|
+
icon: i.value ? "lucide:chevron-down" : "lucide:chevron-right",
|
|
162
184
|
class: "h-3 w-3"
|
|
163
185
|
}, null, 8, ["icon"])
|
|
164
186
|
], 2)
|
|
@@ -170,78 +192,78 @@ const re = {
|
|
|
170
192
|
_: 2
|
|
171
193
|
}, 1032, ["content", "placement", "disabled"])
|
|
172
194
|
]),
|
|
173
|
-
item:
|
|
174
|
-
|
|
175
|
-
l.icon ? (r(),
|
|
195
|
+
item: b(({ option: l }) => [
|
|
196
|
+
p("div", ce, [
|
|
197
|
+
l.icon ? (r(), h(w, {
|
|
176
198
|
key: 0,
|
|
177
199
|
icon: l.icon,
|
|
178
200
|
class: "shrink-0 opacity-80",
|
|
179
|
-
style:
|
|
201
|
+
style: M({ width: n(e).iconSize, height: n(e).iconSize })
|
|
180
202
|
}, null, 8, ["icon", "style"])) : d("", !0),
|
|
181
|
-
|
|
182
|
-
l.data?.badge ? (r(),
|
|
203
|
+
p("span", ue, g(l.label), 1),
|
|
204
|
+
l.data?.badge ? (r(), f("span", {
|
|
183
205
|
key: 1,
|
|
184
206
|
class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", l.data?.badgeClass || "bg-muted text-muted-foreground"])
|
|
185
|
-
},
|
|
207
|
+
}, g(l.data.badge), 3)) : d("", !0)
|
|
186
208
|
])
|
|
187
209
|
]),
|
|
188
210
|
_: 1
|
|
189
|
-
}, 8, ["position", "offset", "width", "maxHeight", "options"])) : (r(),
|
|
190
|
-
|
|
191
|
-
content:
|
|
192
|
-
placement:
|
|
193
|
-
disabled: !
|
|
211
|
+
}, 8, ["position", "offset", "width", "maxHeight", "options"])) : (r(), f(V, { key: 1 }, [
|
|
212
|
+
S(K, {
|
|
213
|
+
content: C.value,
|
|
214
|
+
placement: i.value ? "bottom" : "right",
|
|
215
|
+
disabled: !n(e).showTooltip || !n(e).compact && !i.value,
|
|
194
216
|
class: "w-full block"
|
|
195
217
|
}, {
|
|
196
|
-
default:
|
|
197
|
-
(r(),
|
|
198
|
-
class:
|
|
199
|
-
style:
|
|
200
|
-
"aria-expanded":
|
|
201
|
-
"aria-current":
|
|
202
|
-
onClick:
|
|
218
|
+
default: b(() => [
|
|
219
|
+
(r(), h(B(H.value), D(P.value, {
|
|
220
|
+
class: [_.value, "mb-0.5"],
|
|
221
|
+
style: T.value,
|
|
222
|
+
"aria-expanded": j.value ? E.value : void 0,
|
|
223
|
+
"aria-current": z.value ? "page" : void 0,
|
|
224
|
+
onClick: L
|
|
203
225
|
}), {
|
|
204
|
-
default:
|
|
205
|
-
|
|
206
|
-
class: u(["min-w-0 flex-1 flex", [
|
|
207
|
-
m.value && !
|
|
226
|
+
default: b(() => [
|
|
227
|
+
p("div", {
|
|
228
|
+
class: u(["min-w-0 flex-1 flex py-0.5", [
|
|
229
|
+
m.value && !i.value ? "flex-col items-center justify-center gap-1" : n(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
|
|
208
230
|
]])
|
|
209
231
|
}, [
|
|
210
|
-
|
|
232
|
+
s.item.icon ? (r(), h(w, {
|
|
211
233
|
key: 0,
|
|
212
|
-
icon:
|
|
213
|
-
class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [
|
|
214
|
-
style:
|
|
215
|
-
width:
|
|
216
|
-
height:
|
|
234
|
+
icon: s.item.icon,
|
|
235
|
+
class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [z.value ? "opacity-100" : ""]]),
|
|
236
|
+
style: M({
|
|
237
|
+
width: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize,
|
|
238
|
+
height: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize
|
|
217
239
|
})
|
|
218
240
|
}, null, 8, ["icon", "class", "style"])) : d("", !0),
|
|
219
|
-
|
|
241
|
+
p("span", {
|
|
220
242
|
class: u(["truncate leading-none pt-0.5 wrap-break-word flex-wrap text-wrap", {
|
|
221
|
-
[
|
|
222
|
-
hidden:
|
|
223
|
-
"md:hidden":
|
|
243
|
+
[n(e).compactLabelClass]: m.value && !i.value,
|
|
244
|
+
hidden: n(e).compact && !m.value && !i.value,
|
|
245
|
+
"md:hidden": n(e).compact && !m.value && !i.value
|
|
224
246
|
}])
|
|
225
|
-
},
|
|
226
|
-
|
|
247
|
+
}, g(C.value), 3),
|
|
248
|
+
s.item.badge && (!n(e).compact || !m.value || i.value) ? (r(), f("span", {
|
|
227
249
|
key: 1,
|
|
228
250
|
class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
|
|
229
|
-
|
|
230
|
-
{ "md:hidden":
|
|
251
|
+
s.item.badgeClass || "bg-muted text-muted-foreground",
|
|
252
|
+
{ "md:hidden": n(e).compact && !i.value }
|
|
231
253
|
]])
|
|
232
|
-
},
|
|
254
|
+
}, g(s.item.badge), 3)) : d("", !0)
|
|
233
255
|
], 2),
|
|
234
|
-
|
|
256
|
+
j.value ? (r(), f("div", {
|
|
235
257
|
key: 0,
|
|
236
258
|
role: "button",
|
|
237
259
|
tabindex: "0",
|
|
238
|
-
class: u(["ml-1.5 flex shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-all", { "md:hidden":
|
|
239
|
-
onClick:
|
|
240
|
-
onKeydown: te(ae(
|
|
260
|
+
class: u(["ml-1.5 flex shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-all", { "md:hidden": n(e).compact && !i.value }]),
|
|
261
|
+
onClick: N,
|
|
262
|
+
onKeydown: te(ae(N, ["prevent"]), ["enter", "space"])
|
|
241
263
|
}, [
|
|
242
|
-
|
|
264
|
+
S(w, {
|
|
243
265
|
icon: "lucide:chevron-down",
|
|
244
|
-
class: u(["h-3 w-3 transition-transform duration-200", { "rotate-180":
|
|
266
|
+
class: u(["h-3 w-3 transition-transform duration-200", { "rotate-180": E.value && !i.value }])
|
|
245
267
|
}, null, 8, ["class"])
|
|
246
268
|
], 42, de)) : d("", !0)
|
|
247
269
|
]),
|
|
@@ -250,7 +272,7 @@ const re = {
|
|
|
250
272
|
]),
|
|
251
273
|
_: 1
|
|
252
274
|
}, 8, ["content", "placement", "disabled"]),
|
|
253
|
-
|
|
275
|
+
S(ne, {
|
|
254
276
|
name: "sidebar-slide",
|
|
255
277
|
onBeforeEnter: q,
|
|
256
278
|
onEnter: G,
|
|
@@ -258,20 +280,20 @@ const re = {
|
|
|
258
280
|
onBeforeLeave: Q,
|
|
259
281
|
onLeave: U
|
|
260
282
|
}, {
|
|
261
|
-
default:
|
|
262
|
-
|
|
263
|
-
|
|
283
|
+
default: b(() => [
|
|
284
|
+
v.value && E.value && !i.value ? (r(), f("div", me, [
|
|
285
|
+
n(e).variant === "default" ? (r(), f("div", {
|
|
264
286
|
key: 0,
|
|
265
287
|
class: "absolute top-0 bottom-2 w-px bg-border",
|
|
266
|
-
style:
|
|
267
|
-
left: `${(
|
|
288
|
+
style: M({
|
|
289
|
+
left: `${(s.depth + 1) * $.value - $.value / 2}px`
|
|
268
290
|
})
|
|
269
291
|
}, null, 4)) : d("", !0),
|
|
270
|
-
|
|
271
|
-
(r(!0),
|
|
292
|
+
p("div", fe, [
|
|
293
|
+
(r(!0), f(V, null, ie(s.item.children, (l) => (r(), h(x, {
|
|
272
294
|
key: l.id || l.label,
|
|
273
295
|
item: l,
|
|
274
|
-
depth:
|
|
296
|
+
depth: s.depth + 1
|
|
275
297
|
}, null, 8, ["item", "depth"]))), 128))
|
|
276
298
|
])
|
|
277
299
|
])) : d("", !0)
|
package/components/Switch.vue.js
CHANGED
|
@@ -23,13 +23,13 @@ const p = { class: "flex items-center gap-2" }, g = ["id", "aria-checked", "aria
|
|
|
23
23
|
"aria-checked": e.modelValue,
|
|
24
24
|
"aria-label": a.value || "Toggle",
|
|
25
25
|
disabled: e.disabled,
|
|
26
|
-
class: t(["relative inline-flex h-
|
|
26
|
+
class: t(["relative inline-flex h-5.5 w-10.5 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", [e.modelValue ? "bg-primary" : "bg-input", l.class]]),
|
|
27
27
|
onClick: o
|
|
28
28
|
}, [
|
|
29
29
|
r("span", {
|
|
30
30
|
"aria-hidden": "true",
|
|
31
31
|
class: t([
|
|
32
|
-
"pointer-events-none inline-block h-5 w-5 transform rounded-full bg-background shadow-lg ring-0 transition duration-200 ease-in-out",
|
|
32
|
+
"pointer-events-none inline-block h-4.5 w-4.5 transform rounded-full bg-background shadow-lg ring-0 transition duration-200 ease-in-out",
|
|
33
33
|
e.modelValue ? "translate-x-5 rtl:translate-x-0" : "translate-x-0 rtl:-translate-x-5"
|
|
34
34
|
])
|
|
35
35
|
}, null, 2)
|
|
@@ -13,12 +13,14 @@ const x = ["value", "rows", "disabled", "placeholder"], g = /* @__PURE__ */ i({
|
|
|
13
13
|
emits: ["update:modelValue", "focus", "blur"],
|
|
14
14
|
setup(l, { emit: s }) {
|
|
15
15
|
const o = l, t = s, n = r(() => [
|
|
16
|
-
"flex min-h-[80px] w-full rounded-md border border-input px-3 py-2 text-sm placeholder:text-muted-foreground/50 focus-visible:outline-none focus-visible:border-
|
|
16
|
+
"flex min-h-[80px] w-full rounded-md border border-input px-3 py-2 text-sm placeholder:text-muted-foreground/50 focus-visible:outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 bg-background text-foreground",
|
|
17
17
|
o.class
|
|
18
18
|
].join(" ")), u = (d) => {
|
|
19
19
|
const e = d.target;
|
|
20
20
|
t("update:modelValue", e.value);
|
|
21
|
-
}, c = r(
|
|
21
|
+
}, c = r(
|
|
22
|
+
() => o.placeholderI18n ? b(o.placeholderI18n) : o.placeholder
|
|
23
|
+
);
|
|
22
24
|
return (d, e) => (p(), m("textarea", {
|
|
23
25
|
value: l.modelValue,
|
|
24
26
|
rows: l.rows,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as r, computed as c, openBlock as l, createElementBlock as i, renderSlot as n, createBlock as
|
|
1
|
+
import { defineComponent as r, computed as c, openBlock as l, createElementBlock as i, renderSlot as n, createBlock as p, unref as d, mergeProps as u, withCtx as a } from "vue";
|
|
2
2
|
import f from "v-tooltip-lite";
|
|
3
3
|
import "v-tooltip-lite/style.css";
|
|
4
4
|
import { $t as m } from "../utils/i18n.js";
|
|
5
|
-
const
|
|
5
|
+
const y = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "contents"
|
|
8
8
|
}, b = /* @__PURE__ */ r({
|
|
@@ -22,13 +22,14 @@ const g = {
|
|
|
22
22
|
styles: {},
|
|
23
23
|
ignoreClickOutside: {},
|
|
24
24
|
isOpen: { type: Boolean },
|
|
25
|
+
keepAlive: { type: Boolean },
|
|
25
26
|
menuId: {}
|
|
26
27
|
},
|
|
27
28
|
setup(t) {
|
|
28
29
|
const e = t, s = c(() => e.contentI18n ? m(e.contentI18n) : e.content);
|
|
29
|
-
return (o,
|
|
30
|
+
return (o, g) => t.disabled ? (l(), i("div", y, [
|
|
30
31
|
n(o.$slots, "default")
|
|
31
|
-
])) : (l(), d(
|
|
32
|
+
])) : (l(), p(d(f), u({ key: 1 }, { ...e, content: s.value }, {
|
|
32
33
|
class: "inline-block",
|
|
33
34
|
"class-name": `basic-tooltip ${t.className}`
|
|
34
35
|
}), {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "A Vue 3 UI component library built with Tailwind CSS.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.6.
|
|
6
|
+
"version": "0.6.4",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"module": "index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"scrollreveal": "^4.0.9",
|
|
48
48
|
"tailwindcss": "^4.1.18",
|
|
49
49
|
"v-datepicker-lite": "^0.1.6",
|
|
50
|
-
"v-tooltip-lite": "^0.2.
|
|
50
|
+
"v-tooltip-lite": "^0.2.5",
|
|
51
51
|
"vue-carousel-lite": "^0.2.7",
|
|
52
52
|
"vue-draggable-plus": "^0.5.3",
|
|
53
53
|
"vue3-google-signin": "^2.1.1",
|