vlite3 1.2.17 → 1.3.2
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/README.md +1 -0
- package/components/AsyncSelect/createAsyncSelect.d.ts +12 -0
- package/components/AsyncSelect/createAsyncSelect.js +91 -61
- package/components/Button.vue.d.ts +2 -0
- package/components/Button.vue.js +66 -55
- package/components/Carousel/Carousel.vue.js +2 -2
- package/components/Carousel/Carousel.vue2.js +12 -10
- package/components/CategoryManager/CategoryManager.vue.d.ts +9 -1
- package/components/CategoryManager/CategoryManager.vue.js +5 -461
- package/components/CategoryManager/CategoryManager.vue2.js +515 -2
- package/components/CategoryManager/CategoryNode.vue.js +65 -64
- package/components/CategoryManager/types.d.ts +16 -0
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +1 -1
- package/components/FadeOverlay/FadeOverlay.vue.d.ts +13 -0
- package/components/FadeOverlay/FadeOverlay.vue.js +59 -0
- package/components/FadeOverlay/index.d.ts +2 -0
- package/components/FadeOverlay/types.d.ts +72 -0
- package/components/FadeOverlay/utils.d.ts +6 -0
- package/components/FadeOverlay/utils.js +31 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/Screen/Screen.vue.js +51 -51
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/Screen/components/ScreenQuickFilters.vue.js +3 -3
- package/components/Switch.vue.js +9 -3
- package/components/Tabes/Tabes.vue.d.ts +2 -1
- package/components/Tabes/Tabes.vue.js +2 -2
- package/components/Tabes/Tabes.vue2.js +200 -78
- package/components/index.d.ts +1 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/style.css +17 -18
- package/components/FadeOverlay.vue.d.ts +0 -31
- package/components/FadeOverlay.vue.js +0 -55
- /package/components/{FadeOverlay.vue2.js → FadeOverlay/FadeOverlay.vue2.js} +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
export interface AddNewConfig {
|
|
3
|
+
component: any;
|
|
4
|
+
props?: Record<string, any>;
|
|
5
|
+
label?: string;
|
|
6
|
+
labelI18n?: string;
|
|
7
|
+
}
|
|
2
8
|
export interface SelectOption<T = unknown> {
|
|
3
9
|
label: string;
|
|
4
10
|
value: string | number;
|
|
@@ -50,6 +56,9 @@ export declare const createAsyncSelect: <T extends {
|
|
|
50
56
|
optionsMapper: {
|
|
51
57
|
type: PropType<OptionsMapper<T>>;
|
|
52
58
|
};
|
|
59
|
+
addNewConfig: {
|
|
60
|
+
type: PropType<AddNewConfig>;
|
|
61
|
+
};
|
|
53
62
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("onChange" | "change" | "update:modelValue")[], "onChange" | "change" | "update:modelValue", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
54
63
|
value: {
|
|
55
64
|
type: (ObjectConstructor | ArrayConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
@@ -76,6 +85,9 @@ export declare const createAsyncSelect: <T extends {
|
|
|
76
85
|
optionsMapper: {
|
|
77
86
|
type: PropType<OptionsMapper<T>>;
|
|
78
87
|
};
|
|
88
|
+
addNewConfig: {
|
|
89
|
+
type: PropType<AddNewConfig>;
|
|
90
|
+
};
|
|
79
91
|
}>> & Readonly<{
|
|
80
92
|
onChange?: (...args: any[]) => any;
|
|
81
93
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as P, ref as m, computed as i, watch as k, createVNode as s, mergeProps as S, nextTick as q, isVNode as $ } from "vue";
|
|
2
|
+
import z from "../Dropdown/Dropdown.vue.js";
|
|
3
3
|
import "@iconify/vue";
|
|
4
4
|
import "../../core/config.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import
|
|
8
|
-
|
|
7
|
+
import F from "../Button.vue.js";
|
|
8
|
+
import H from "../MultiSelect/MultiSelect.vue.js";
|
|
9
|
+
import L from "../Modal.vue.js";
|
|
10
|
+
function V(t) {
|
|
11
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !$(t);
|
|
12
|
+
}
|
|
13
|
+
const X = (t) => /* @__PURE__ */ P({
|
|
9
14
|
name: t.name,
|
|
10
15
|
inheritAttrs: !1,
|
|
11
16
|
props: {
|
|
@@ -33,124 +38,149 @@ const z = (t) => /* @__PURE__ */ q({
|
|
|
33
38
|
},
|
|
34
39
|
optionsMapper: {
|
|
35
40
|
type: Function
|
|
41
|
+
},
|
|
42
|
+
addNewConfig: {
|
|
43
|
+
type: Object
|
|
36
44
|
}
|
|
37
45
|
},
|
|
38
46
|
emits: ["onChange", "update:modelValue", "change"],
|
|
39
47
|
setup(l, {
|
|
40
|
-
attrs:
|
|
41
|
-
emit:
|
|
48
|
+
attrs: I,
|
|
49
|
+
emit: y
|
|
42
50
|
}) {
|
|
43
|
-
const
|
|
51
|
+
const d = m([]), c = m(1), b = m(""), M = 20, h = i(() => l.value !== void 0 ? l.value : l.modelValue), v = i(() => l.optionsMapper || t.optionsMapper), j = i(() => ({
|
|
44
52
|
pagination: {
|
|
45
|
-
page:
|
|
46
|
-
limit:
|
|
53
|
+
page: c.value,
|
|
54
|
+
limit: M
|
|
47
55
|
},
|
|
48
|
-
search:
|
|
56
|
+
search: b.value || void 0,
|
|
49
57
|
filter: {
|
|
50
58
|
...l.filter
|
|
51
59
|
}
|
|
52
60
|
})), {
|
|
53
|
-
result:
|
|
54
|
-
loading:
|
|
55
|
-
refetch:
|
|
56
|
-
} = t.useQuery(
|
|
61
|
+
result: g,
|
|
62
|
+
loading: w,
|
|
63
|
+
refetch: N
|
|
64
|
+
} = t.useQuery(j, {
|
|
57
65
|
notifyOnNetworkStatusChange: !0,
|
|
58
66
|
fetchPolicy: "cache-and-network"
|
|
59
|
-
}), A =
|
|
60
|
-
const e =
|
|
67
|
+
}), A = i(() => {
|
|
68
|
+
const e = g.value?.[t.queryName]?.pageInfo;
|
|
61
69
|
return e ? e.currentPage < e.totalPages : !1;
|
|
62
70
|
});
|
|
63
|
-
|
|
71
|
+
k(() => g.value?.[t.queryName], (e) => {
|
|
64
72
|
if (!e) return;
|
|
65
73
|
const n = Array.isArray(e) ? e : e.items;
|
|
66
74
|
if (n)
|
|
67
|
-
if (
|
|
68
|
-
|
|
75
|
+
if (c.value === 1)
|
|
76
|
+
d.value = [...n];
|
|
69
77
|
else {
|
|
70
|
-
const
|
|
71
|
-
|
|
78
|
+
const r = new Set(d.value.map((a) => a.id)), o = n.filter((a) => !r.has(a.id));
|
|
79
|
+
d.value.push(...o);
|
|
72
80
|
}
|
|
73
81
|
}, {
|
|
74
82
|
immediate: !0
|
|
75
83
|
});
|
|
76
|
-
const
|
|
84
|
+
const C = (e) => {
|
|
77
85
|
if (v.value)
|
|
78
86
|
return v.value(e);
|
|
79
|
-
const n = typeof t.labelKey == "function" ? t.labelKey(e) : e[t.labelKey || "name"],
|
|
87
|
+
const n = typeof t.labelKey == "function" ? t.labelKey(e) : e[t.labelKey || "name"], r = typeof t.subtitleKey == "function" ? t.subtitleKey(e) : e[t.subtitleKey || ""], o = typeof t.descriptionKey == "function" ? t.descriptionKey(e) : e[t.descriptionKey || ""], a = t.iconKey ? typeof t.iconKey == "function" ? t.iconKey(e) : e[t.iconKey] : void 0;
|
|
80
88
|
return {
|
|
81
89
|
label: n,
|
|
82
|
-
subtitle:
|
|
83
|
-
description:
|
|
90
|
+
subtitle: r || void 0,
|
|
91
|
+
description: o || void 0,
|
|
84
92
|
value: e[t.valueKey || "id"],
|
|
85
93
|
icon: a || void 0,
|
|
86
94
|
data: e
|
|
87
95
|
};
|
|
88
|
-
},
|
|
89
|
-
let
|
|
90
|
-
l.multiple && Array.isArray(e) && (
|
|
91
|
-
const
|
|
92
|
-
return
|
|
96
|
+
}, f = i(() => d.value.map(C).filter(Boolean)), p = (e, n) => {
|
|
97
|
+
let r = n;
|
|
98
|
+
l.multiple && Array.isArray(e) && (r = e.map((a) => {
|
|
99
|
+
const u = f.value.find((K) => K.value === a);
|
|
100
|
+
return u ? u.data : null;
|
|
93
101
|
}).filter(Boolean));
|
|
94
|
-
const
|
|
102
|
+
const o = {
|
|
95
103
|
value: e,
|
|
96
|
-
data:
|
|
104
|
+
data: r
|
|
97
105
|
};
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
!A.value ||
|
|
103
|
-
},
|
|
106
|
+
y("update:modelValue", e), y("change", o), y("onChange", o);
|
|
107
|
+
}, O = (e) => {
|
|
108
|
+
b.value = e, c.value = 1;
|
|
109
|
+
}, x = () => {
|
|
110
|
+
!A.value || w.value || c.value++;
|
|
111
|
+
}, B = async (e) => {
|
|
104
112
|
const n = (Array.isArray(e) ? e : [e]).filter((a) => (typeof a == "string" || typeof a == "number") && a !== "");
|
|
105
113
|
if (n.length === 0) return [];
|
|
106
|
-
await
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
114
|
+
await q();
|
|
115
|
+
const r = new Set(f.value.map((a) => a.value)), o = n.filter((a) => !r.has(a));
|
|
116
|
+
if (o.length === 0) return [];
|
|
109
117
|
try {
|
|
110
118
|
const {
|
|
111
119
|
data: a
|
|
112
|
-
} = await
|
|
120
|
+
} = await N({
|
|
113
121
|
pagination: {
|
|
114
122
|
page: 1,
|
|
115
|
-
limit:
|
|
123
|
+
limit: o.length
|
|
116
124
|
},
|
|
117
125
|
filter: {
|
|
118
126
|
...l.filter,
|
|
119
|
-
ids:
|
|
127
|
+
ids: o
|
|
120
128
|
}
|
|
121
|
-
}),
|
|
122
|
-
return (Array.isArray(
|
|
129
|
+
}), u = a?.[t.queryName];
|
|
130
|
+
return (Array.isArray(u) ? u : u?.items || []).map(C).filter(Boolean);
|
|
123
131
|
} catch (a) {
|
|
124
132
|
return console.error(`[${t.name}] Hydration failed`, a), [];
|
|
125
133
|
}
|
|
126
|
-
}
|
|
134
|
+
}, _ = () => l.addNewConfig ? s("div", {
|
|
135
|
+
class: "px-1 pb-1 pt-1 mt-1 border-t border-border bg-body sticky bottom-0 z-10"
|
|
136
|
+
}, [s(L, {
|
|
137
|
+
title: l.addNewConfig.label || "Add New",
|
|
138
|
+
titleI18n: l.addNewConfig.labelI18n,
|
|
139
|
+
body: l.addNewConfig.component,
|
|
140
|
+
bodyProps: l.addNewConfig.props,
|
|
141
|
+
onClose: () => {
|
|
142
|
+
N();
|
|
143
|
+
}
|
|
144
|
+
}, {
|
|
145
|
+
trigger: () => s(F, {
|
|
146
|
+
class: "w-full justify-start text-primary hover:text-primary hover:bg-primary/10",
|
|
147
|
+
variant: "ghost",
|
|
148
|
+
size: "sm",
|
|
149
|
+
icon: "lucide:plus",
|
|
150
|
+
text: l.addNewConfig.label || "Add New"
|
|
151
|
+
}, null)
|
|
152
|
+
})]) : null;
|
|
127
153
|
return () => {
|
|
128
154
|
const e = {
|
|
129
|
-
options:
|
|
130
|
-
loading:
|
|
155
|
+
options: f.value,
|
|
156
|
+
loading: w.value,
|
|
131
157
|
searchable: t.searchable ?? !0,
|
|
132
158
|
remote: t.remote ?? !0,
|
|
133
159
|
hasMore: A.value,
|
|
134
160
|
placeholder: l.placeholder,
|
|
135
161
|
disabled: l.disabled,
|
|
136
|
-
fetchSelected:
|
|
137
|
-
onSearch:
|
|
138
|
-
onLoadMore:
|
|
139
|
-
...
|
|
140
|
-
};
|
|
141
|
-
return l.multiple ?
|
|
162
|
+
fetchSelected: B,
|
|
163
|
+
onSearch: O,
|
|
164
|
+
onLoadMore: x,
|
|
165
|
+
...I
|
|
166
|
+
}, n = {};
|
|
167
|
+
return l.addNewConfig && (n.footer = () => _()), l.multiple ? s(H, S(e, {
|
|
142
168
|
modelValue: h.value,
|
|
143
|
-
"onUpdate:modelValue": (
|
|
144
|
-
onChange: (
|
|
145
|
-
}),
|
|
169
|
+
"onUpdate:modelValue": (r) => p(r),
|
|
170
|
+
onChange: (r) => p(r)
|
|
171
|
+
}), V(n) ? n : {
|
|
172
|
+
default: () => [n]
|
|
173
|
+
}) : s(z, S(e, {
|
|
146
174
|
showSelectedIcon: !0,
|
|
147
175
|
emptyMessage: "Data not found",
|
|
148
176
|
modelValue: h.value,
|
|
149
|
-
onOnSelect: (
|
|
150
|
-
}),
|
|
177
|
+
onOnSelect: (r) => p(r.value, r.data)
|
|
178
|
+
}), V(n) ? n : {
|
|
179
|
+
default: () => [n]
|
|
180
|
+
});
|
|
151
181
|
};
|
|
152
182
|
}
|
|
153
183
|
});
|
|
154
184
|
export {
|
|
155
|
-
|
|
185
|
+
X as createAsyncSelect
|
|
156
186
|
};
|
package/components/Button.vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as L, useAttrs as N, computed as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as L, useAttrs as N, computed as a, useSlots as G, Comment as F, Fragment as b, Text as H, withDirectives as M, openBlock as i, createElementBlock as c, normalizeClass as r, createElementVNode as I, createBlock as x, createCommentVNode as u, renderSlot as w, createTextVNode as k, toDisplayString as h, unref as O } from "vue";
|
|
2
|
+
import p from "./Icon.vue.js";
|
|
3
3
|
import { vRipple as Z } from "../directives/vRipple.js";
|
|
4
4
|
import { $t as q } from "../utils/i18n.js";
|
|
5
5
|
const J = ["type", "disabled", "data-testid"], K = {
|
|
@@ -33,7 +33,7 @@ const J = ["type", "disabled", "data-testid"], K = {
|
|
|
33
33
|
layout: { default: "horizontal" }
|
|
34
34
|
},
|
|
35
35
|
setup(t) {
|
|
36
|
-
const
|
|
36
|
+
const $ = {
|
|
37
37
|
primary: "bg-primary text-primary-foreground",
|
|
38
38
|
"primary-light": "bg-primary-light text-primary-fg-light",
|
|
39
39
|
secondary: "bg-secondary text-secondary-foreground",
|
|
@@ -55,20 +55,20 @@ const J = ["type", "disabled", "data-testid"], K = {
|
|
|
55
55
|
ghost: "bg-accent text-accent-foreground",
|
|
56
56
|
link: "bg-primary/10 text-primary",
|
|
57
57
|
transparent: "bg-muted text-foreground"
|
|
58
|
-
}, e = t, B = N(), o =
|
|
58
|
+
}, e = t, B = N(), o = a(() => {
|
|
59
59
|
const n = e.layout || B.layout;
|
|
60
60
|
return n === "tile" ? "tile" : n === "vertical" ? "vertical" : "horizontal";
|
|
61
|
-
}),
|
|
61
|
+
}), m = a(() => o.value === "tile"), R = a(() => $[e.variant] ?? $.primary), C = a(() => ({
|
|
62
62
|
xs: "w-9 h-9",
|
|
63
63
|
sm: "w-10 h-10",
|
|
64
64
|
sm2: "w-11 h-11",
|
|
65
65
|
md: "w-12 h-12",
|
|
66
66
|
lg: "w-14 h-14",
|
|
67
67
|
xl: "w-16 h-16"
|
|
68
|
-
})[e.size]), l =
|
|
69
|
-
() => e?.asIcon || e.icon && !l.value && !
|
|
70
|
-
), g =
|
|
71
|
-
const
|
|
68
|
+
})[e.size]), l = a(() => e.textI18n ? q(e.textI18n) : e.text), j = G(), v = a(() => j.default ? j.default().some((s) => !(s.type === F || s.type === b && Array.isArray(s.children) && s.children.length === 0 || s.type === H && typeof s.children == "string" && s.children.trim() === "")) : !1), y = a(
|
|
69
|
+
() => e?.asIcon || e.icon && !l.value && !v.value
|
|
70
|
+
), g = a(() => e.icon ? e.icon.startsWith("http://") || e.icon.startsWith("https://") || e.icon.startsWith("data:image/") ? !0 : [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".ico", ".avif"].some((s) => e.icon.toLowerCase().endsWith(s)) : !1), A = a(() => {
|
|
71
|
+
const s = `inline-flex items-center justify-center whitespace-nowrap text-sm font-medium disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer ${o.value === "tile" ? "flex-col gap-1.5 items-center" : o.value === "vertical" ? "flex-col gap-2" : e.description ? "gap-3" : "gap-2"} ${y.value ? "icon-only shrink-0" : ""}`, z = {
|
|
72
72
|
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
73
73
|
"primary-light": "bg-primary-light text-primary-fg-light hover:bg-primary/15",
|
|
74
74
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
@@ -114,15 +114,15 @@ const J = ["type", "disabled", "data-testid"], K = {
|
|
|
114
114
|
"2xl": "rounded-2xl",
|
|
115
115
|
full: "rounded-full"
|
|
116
116
|
};
|
|
117
|
-
let
|
|
118
|
-
o.value === "tile" ?
|
|
117
|
+
let S = y.value ? T[e.size] : d[e.size];
|
|
118
|
+
o.value === "tile" ? S = {
|
|
119
119
|
xs: "h-auto p-0!",
|
|
120
120
|
sm: "h-auto p-0!",
|
|
121
121
|
sm2: "h-auto p-0!",
|
|
122
122
|
md: "h-auto p-0!",
|
|
123
123
|
lg: "h-auto p-0!",
|
|
124
124
|
xl: "h-auto p-0!"
|
|
125
|
-
}[e.size] : o.value === "vertical" && (
|
|
125
|
+
}[e.size] : o.value === "vertical" && (S = {
|
|
126
126
|
xs: "h-auto py-1.5 px-2 min-w-16",
|
|
127
127
|
sm: "h-auto py-2 px-3 min-w-20",
|
|
128
128
|
sm2: "h-auto py-2 px-3 min-w-20",
|
|
@@ -130,21 +130,21 @@ const J = ["type", "disabled", "data-testid"], K = {
|
|
|
130
130
|
lg: "h-auto py-3 px-4 min-w-28",
|
|
131
131
|
xl: "h-auto py-4 px-10 min-w-32"
|
|
132
132
|
}[e.size]);
|
|
133
|
-
const W =
|
|
134
|
-
return [
|
|
133
|
+
const W = m.value ? "group text-foreground focus:outline-none focus-visible:outline-none active:scale-100!" : z[e.variant];
|
|
134
|
+
return [s, W, V[e.rounded], S, e.class].join(
|
|
135
135
|
" "
|
|
136
136
|
);
|
|
137
|
-
}),
|
|
138
|
-
if (
|
|
139
|
-
return `${
|
|
140
|
-
const n = e.description && o.value === "horizontal",
|
|
137
|
+
}), f = a(() => {
|
|
138
|
+
if (m.value && g.value)
|
|
139
|
+
return `${C.value} object-cover`;
|
|
140
|
+
const n = e.description && o.value === "horizontal", s = {
|
|
141
141
|
xs: n ? "w-3.5 h-3.5" : "w-3 h-3",
|
|
142
142
|
sm: n ? "w-5 h-5" : "w-4 h-4",
|
|
143
143
|
sm2: n ? "w-5 h-5" : "w-4 h-4",
|
|
144
144
|
md: n ? "w-5 h-5" : "w-4 h-4",
|
|
145
145
|
lg: n ? "w-5 h-5" : "w-4 h-4",
|
|
146
146
|
xl: n ? "w-5 h-5" : "w-4 h-4"
|
|
147
|
-
},
|
|
147
|
+
}, z = {
|
|
148
148
|
xs: "w-3 h-3",
|
|
149
149
|
sm: "w-4 h-4",
|
|
150
150
|
sm2: "w-4 h-4",
|
|
@@ -152,78 +152,89 @@ const J = ["type", "disabled", "data-testid"], K = {
|
|
|
152
152
|
lg: "w-4 h-4",
|
|
153
153
|
xl: "w-4 h-4"
|
|
154
154
|
};
|
|
155
|
-
let d =
|
|
156
|
-
return g.value && (d += " object-cover"),
|
|
157
|
-
}), E =
|
|
158
|
-
return (n,
|
|
155
|
+
let d = y.value ? z[e.size] : s[e.size];
|
|
156
|
+
return g.value && (d += " object-cover"), m.value ? d += " scale-[1.45]!" : o.value === "vertical" && (d += " scale-[1.35]! mt-1"), d;
|
|
157
|
+
}), E = a(() => o.value === "vertical" ? "scale-[0.9]" : "");
|
|
158
|
+
return (n, s) => M((i(), c("button", {
|
|
159
159
|
type: t.type,
|
|
160
|
-
class:
|
|
160
|
+
class: r([A.value, "cursor-pointer"]),
|
|
161
161
|
disabled: t.disabled || t.loading,
|
|
162
162
|
"data-testid": n.$attrs["data-testid"] || (l.value ? `btn-${l.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : t.icon ? `btn-${t.icon.replace(/[^a-zA-Z0-9]+/g, "-")}` : "button")
|
|
163
163
|
}, [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
class:
|
|
164
|
+
m.value ? (i(), c(b, { key: 0 }, [
|
|
165
|
+
I("span", {
|
|
166
|
+
class: r(["inline-flex items-center justify-center shrink-0 transition-transform duration-150 ease-out group-active:scale-[0.92]", [
|
|
167
167
|
g.value ? "" : "rounded-full",
|
|
168
168
|
g.value ? "" : R.value,
|
|
169
|
-
g.value ? "" :
|
|
169
|
+
g.value ? "" : C.value
|
|
170
170
|
]])
|
|
171
171
|
}, [
|
|
172
|
-
t.loading ? (
|
|
172
|
+
t.loading ? (i(), x(p, {
|
|
173
173
|
key: 0,
|
|
174
174
|
icon: "lucide:loader-2",
|
|
175
|
-
class:
|
|
176
|
-
}, null, 8, ["class"])) : t.icon ? (
|
|
175
|
+
class: r(["animate-spin pointer-events-none", [f.value, g.value ? C.value : ""]])
|
|
176
|
+
}, null, 8, ["class"])) : t.icon ? (i(), x(p, {
|
|
177
177
|
key: 1,
|
|
178
178
|
icon: t.icon,
|
|
179
|
-
class:
|
|
179
|
+
class: r(["pointer-events-none", [t.iconClass, f.value]])
|
|
180
180
|
}, null, 8, ["icon", "class"])) : u("", !0)
|
|
181
181
|
], 2),
|
|
182
|
-
l.value ||
|
|
182
|
+
l.value || v.value || e.description ? (i(), c("span", {
|
|
183
183
|
key: 0,
|
|
184
|
-
class:
|
|
184
|
+
class: r(["flex flex-col items-center max-w-full", t.textClass])
|
|
185
185
|
}, [
|
|
186
|
-
l.value ||
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
l.value || v.value ? (i(), c("span", K, [
|
|
187
|
+
w(n.$slots, "default", {}, () => [
|
|
188
|
+
k(h(l.value), 1)
|
|
189
189
|
])
|
|
190
190
|
])) : u("", !0),
|
|
191
|
-
e.description ? (
|
|
191
|
+
e.description ? (i(), c("span", P, h(e.description), 1)) : u("", !0)
|
|
192
192
|
], 2)) : u("", !0)
|
|
193
|
-
], 64)) : (
|
|
194
|
-
t.loading ? (
|
|
193
|
+
], 64)) : (i(), c(b, { key: 1 }, [
|
|
194
|
+
t.loading ? (i(), x(p, {
|
|
195
195
|
key: 0,
|
|
196
196
|
icon: "lucide:loader-2",
|
|
197
|
-
class:
|
|
198
|
-
}, null, 8, ["class"])) : t.icon ? (
|
|
197
|
+
class: r(["animate-spin pointer-events-none shrink-0", f.value])
|
|
198
|
+
}, null, 8, ["class"])) : t.icon ? (i(), x(p, {
|
|
199
199
|
key: 1,
|
|
200
200
|
icon: t.icon,
|
|
201
|
-
class:
|
|
201
|
+
class: r(["pointer-events-none shrink-0", [t.iconClass, f.value, y.value ? "mx-auto" : ""]])
|
|
202
202
|
}, null, 8, ["icon", "class"])) : u("", !0),
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
!e.description && o.value === "horizontal" ? (i(), c(b, { key: 2 }, [
|
|
204
|
+
t.textClass ? (i(), c("div", {
|
|
205
|
+
key: 0,
|
|
206
|
+
class: r([t.textClass, "leading-tight truncate inline-flex items-center justify-center gap-1.5"])
|
|
207
|
+
}, [
|
|
208
|
+
w(n.$slots, "default", {}, () => [
|
|
209
|
+
k(h(l.value), 1)
|
|
210
|
+
])
|
|
211
|
+
], 2)) : w(n.$slots, "default", { key: 1 }, () => [
|
|
212
|
+
k(h(l.value), 1)
|
|
213
|
+
])
|
|
214
|
+
], 64)) : l.value || v.value || e.description ? (i(), c("div", {
|
|
215
|
+
key: 3,
|
|
216
|
+
class: r(["flex flex-col justify-center", [
|
|
206
217
|
o.value === "vertical" ? "items-center text-center" : e.description ? "items-start text-left" : "items-center text-center",
|
|
207
218
|
!t.icon && !t.iconRight && !t.loading ? "flex-1 w-full" : ""
|
|
208
219
|
]])
|
|
209
220
|
}, [
|
|
210
|
-
|
|
211
|
-
class:
|
|
221
|
+
I("div", {
|
|
222
|
+
class: r([[t.textClass, E.value], "inline-flex items-center gap-1.5 w-full leading-tight [&>:where(svg)]:mx-auto [&>:where(img)]:mx-auto"])
|
|
212
223
|
}, [
|
|
213
|
-
|
|
214
|
-
|
|
224
|
+
w(n.$slots, "default", {}, () => [
|
|
225
|
+
k(h(l.value), 1)
|
|
215
226
|
])
|
|
216
227
|
], 2),
|
|
217
|
-
e.description ? (
|
|
228
|
+
e.description ? (i(), c("span", Q, h(e.description), 1)) : u("", !0)
|
|
218
229
|
], 2)) : u("", !0),
|
|
219
|
-
t.iconRight && !t.loading ? (
|
|
220
|
-
key:
|
|
230
|
+
t.iconRight && !t.loading ? (i(), x(p, {
|
|
231
|
+
key: 4,
|
|
221
232
|
icon: t.iconRight,
|
|
222
|
-
class:
|
|
233
|
+
class: r([[t.iconRightClass, f.value], "h-4 w-4 pointer-events-none shrink-0"])
|
|
223
234
|
}, null, 8, ["icon", "class"])) : u("", !0)
|
|
224
235
|
], 64))
|
|
225
236
|
], 10, J)), [
|
|
226
|
-
[O(Z), !
|
|
237
|
+
[O(Z), !m.value]
|
|
227
238
|
]);
|
|
228
239
|
}
|
|
229
240
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Carousel.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4d544a95"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -7,7 +7,7 @@ const N = { class: "carousel-wrapper" }, V = /* @__PURE__ */ f({
|
|
|
7
7
|
data: { default: () => [] },
|
|
8
8
|
gap: { default: 0 },
|
|
9
9
|
loop: { type: Boolean, default: !1 },
|
|
10
|
-
speed: { default:
|
|
10
|
+
speed: { default: 850 },
|
|
11
11
|
easing: { default: "ease" },
|
|
12
12
|
autoPlay: { type: Boolean, default: !1 },
|
|
13
13
|
draggable: { type: Boolean, default: !1 },
|
|
@@ -22,22 +22,24 @@ const N = { class: "carousel-wrapper" }, V = /* @__PURE__ */ f({
|
|
|
22
22
|
pagination: { type: [String, Boolean, Array], default: "dots" },
|
|
23
23
|
paginationPosition: { default: "bottom-center" },
|
|
24
24
|
paginationVisibility: { default: "always" },
|
|
25
|
-
paginationHoverEdgeThreshold: { default:
|
|
26
|
-
paginationHoverInitialTimeout: { default:
|
|
25
|
+
paginationHoverEdgeThreshold: { default: 0.2 },
|
|
26
|
+
paginationHoverInitialTimeout: { default: 1e3 },
|
|
27
27
|
wheelOptions: { default: () => ({
|
|
28
|
-
threshold:
|
|
29
|
-
velocityThreshold:
|
|
30
|
-
pageScrollThreshold:
|
|
31
|
-
debounceTime:
|
|
28
|
+
threshold: 10,
|
|
29
|
+
velocityThreshold: 8,
|
|
30
|
+
pageScrollThreshold: 80,
|
|
31
|
+
debounceTime: 5,
|
|
32
|
+
preventDefault: !0,
|
|
33
|
+
stopPropagation: !0
|
|
32
34
|
}) },
|
|
33
35
|
bufferSize: { default: 5 },
|
|
34
36
|
maxDomElements: { default: 10 },
|
|
35
37
|
updateKey: { default: void 0 }
|
|
36
38
|
},
|
|
37
39
|
emits: ["slide-change"],
|
|
38
|
-
setup(
|
|
39
|
-
const s =
|
|
40
|
-
return
|
|
40
|
+
setup(r, { expose: n, emit: i }) {
|
|
41
|
+
const s = r, u = i, o = g(null);
|
|
42
|
+
return n({
|
|
41
43
|
goToSlide: (e, t) => {
|
|
42
44
|
o.value?.goToSlide(e, t);
|
|
43
45
|
},
|
|
@@ -8,7 +8,13 @@ declare function __VLS_template(): {
|
|
|
8
8
|
rootEl: HTMLDivElement;
|
|
9
9
|
};
|
|
10
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: import('vue').DefineComponent<CategoryManagerProps, {
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<CategoryManagerProps, {
|
|
12
|
+
expandedIds: import('vue').Ref<Set<string | number>>;
|
|
13
|
+
expandAll: () => void;
|
|
14
|
+
collapseAll: () => void;
|
|
15
|
+
expand: (...ids: (string | number)[]) => void;
|
|
16
|
+
collapse: (...ids: (string | number)[]) => void;
|
|
17
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
18
|
onDelete: (item: CategoryItem) => any;
|
|
13
19
|
"update:modelValue": (val: CategoryItem[]) => any;
|
|
14
20
|
onAdd: (item: CategoryItem) => any;
|
|
@@ -30,11 +36,13 @@ declare const __VLS_component: import('vue').DefineComponent<CategoryManagerProp
|
|
|
30
36
|
}) => any;
|
|
31
37
|
}>, {
|
|
32
38
|
size: "sm" | "md" | "lg";
|
|
39
|
+
loading: boolean;
|
|
33
40
|
readonly: boolean;
|
|
34
41
|
modelValue: CategoryItem[];
|
|
35
42
|
rawData: RawCategoryItem[];
|
|
36
43
|
emptyTitle: string;
|
|
37
44
|
emptyDescription: string;
|
|
45
|
+
defaultExpanded: (string | number)[];
|
|
38
46
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
39
47
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
40
48
|
export default _default;
|