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.
Files changed (39) hide show
  1. package/README.md +1 -0
  2. package/components/AsyncSelect/createAsyncSelect.d.ts +12 -0
  3. package/components/AsyncSelect/createAsyncSelect.js +91 -61
  4. package/components/Button.vue.d.ts +2 -0
  5. package/components/Button.vue.js +66 -55
  6. package/components/Carousel/Carousel.vue.js +2 -2
  7. package/components/Carousel/Carousel.vue2.js +12 -10
  8. package/components/CategoryManager/CategoryManager.vue.d.ts +9 -1
  9. package/components/CategoryManager/CategoryManager.vue.js +5 -461
  10. package/components/CategoryManager/CategoryManager.vue2.js +515 -2
  11. package/components/CategoryManager/CategoryNode.vue.js +65 -64
  12. package/components/CategoryManager/types.d.ts +16 -0
  13. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  14. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  15. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  16. package/components/Dropdown/DropdownMenu.vue2.js +1 -1
  17. package/components/FadeOverlay/FadeOverlay.vue.d.ts +13 -0
  18. package/components/FadeOverlay/FadeOverlay.vue.js +59 -0
  19. package/components/FadeOverlay/index.d.ts +2 -0
  20. package/components/FadeOverlay/types.d.ts +72 -0
  21. package/components/FadeOverlay/utils.d.ts +6 -0
  22. package/components/FadeOverlay/utils.js +31 -0
  23. package/components/NavbarCommandPalette.vue.js +1 -1
  24. package/components/NumberInput.vue.js +2 -2
  25. package/components/Screen/Screen.vue.js +51 -51
  26. package/components/Screen/ScreenFilter.vue.js +1 -1
  27. package/components/Screen/components/ScreenQuickFilters.vue.js +3 -3
  28. package/components/Switch.vue.js +9 -3
  29. package/components/Tabes/Tabes.vue.d.ts +2 -1
  30. package/components/Tabes/Tabes.vue.js +2 -2
  31. package/components/Tabes/Tabes.vue2.js +200 -78
  32. package/components/index.d.ts +1 -0
  33. package/index.d.ts +1 -1
  34. package/index.js +1 -1
  35. package/package.json +1 -1
  36. package/style.css +17 -18
  37. package/components/FadeOverlay.vue.d.ts +0 -31
  38. package/components/FadeOverlay.vue.js +0 -55
  39. /package/components/{FadeOverlay.vue2.js → FadeOverlay/FadeOverlay.vue2.js} +0 -0
package/README.md CHANGED
@@ -482,6 +482,7 @@ Follow these rules strictly to ensure visual consistency and predictable styling
482
482
  - [x] **SidePanel**
483
483
  - [x] **Splitter**
484
484
  - [x] **Skeleton**
485
+ - [x] **FadeOverlay**
485
486
 
486
487
  ### Utilities & Tools
487
488
 
@@ -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 q, ref as m, computed as s, watch as _, createVNode as w, mergeProps as I, nextTick as j } from "vue";
2
- import k from "../Dropdown/Dropdown.vue.js";
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 x from "../MultiSelect/MultiSelect.vue.js";
8
- const z = (t) => /* @__PURE__ */ q({
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: M,
41
- emit: c
48
+ attrs: I,
49
+ emit: y
42
50
  }) {
43
- const i = m([]), d = m(1), f = m(""), N = 20, h = s(() => l.value !== void 0 ? l.value : l.modelValue), v = s(() => l.optionsMapper || t.optionsMapper), B = s(() => ({
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: d.value,
46
- limit: N
53
+ page: c.value,
54
+ limit: M
47
55
  },
48
- search: f.value || void 0,
56
+ search: b.value || void 0,
49
57
  filter: {
50
58
  ...l.filter
51
59
  }
52
60
  })), {
53
- result: b,
54
- loading: K,
55
- refetch: g
56
- } = t.useQuery(B, {
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 = s(() => {
60
- const e = b.value?.[t.queryName]?.pageInfo;
67
+ }), A = i(() => {
68
+ const e = g.value?.[t.queryName]?.pageInfo;
61
69
  return e ? e.currentPage < e.totalPages : !1;
62
70
  });
63
- _(() => b.value?.[t.queryName], (e) => {
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 (d.value === 1)
68
- i.value = [...n];
75
+ if (c.value === 1)
76
+ d.value = [...n];
69
77
  else {
70
- const u = new Set(i.value.map((a) => a.id)), r = n.filter((a) => !u.has(a.id));
71
- i.value.push(...r);
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 S = (e) => {
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"], u = typeof t.subtitleKey == "function" ? t.subtitleKey(e) : e[t.subtitleKey || ""], r = 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;
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: u || void 0,
83
- description: r || void 0,
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
- }, p = s(() => i.value.map(S).filter(Boolean)), y = (e, n) => {
89
- let u = n;
90
- l.multiple && Array.isArray(e) && (u = e.map((a) => {
91
- const o = p.value.find((V) => V.value === a);
92
- return o ? o.data : null;
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 r = {
102
+ const o = {
95
103
  value: e,
96
- data: u
104
+ data: r
97
105
  };
98
- c("update:modelValue", e), c("change", r), c("onChange", r);
99
- }, C = (e) => {
100
- f.value = e, d.value = 1;
101
- }, O = () => {
102
- !A.value || K.value || d.value++;
103
- }, P = async (e) => {
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 j();
107
- const u = new Set(p.value.map((a) => a.value)), r = n.filter((a) => !u.has(a));
108
- if (r.length === 0) return [];
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 g({
120
+ } = await N({
113
121
  pagination: {
114
122
  page: 1,
115
- limit: r.length
123
+ limit: o.length
116
124
  },
117
125
  filter: {
118
126
  ...l.filter,
119
- ids: r
127
+ ids: o
120
128
  }
121
- }), o = a?.[t.queryName];
122
- return (Array.isArray(o) ? o : o?.items || []).map(S).filter(Boolean);
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: p.value,
130
- loading: K.value,
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: P,
137
- onSearch: C,
138
- onLoadMore: O,
139
- ...M
140
- };
141
- return l.multiple ? w(x, I(e, {
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": (n) => y(n),
144
- onChange: (n) => y(n)
145
- }), null) : w(k, I(e, {
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: (n) => y(n.value, n.data)
150
- }), null);
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
- z as createAsyncSelect
185
+ X as createAsyncSelect
156
186
  };
@@ -7,6 +7,8 @@ declare function __VLS_template(): {
7
7
  slots: {
8
8
  default?(_: {}): any;
9
9
  default?(_: {}): any;
10
+ default?(_: {}): any;
11
+ default?(_: {}): any;
10
12
  };
11
13
  refs: {};
12
14
  rootEl: HTMLButtonElement;
@@ -1,5 +1,5 @@
1
- import { defineComponent as L, useAttrs as N, computed as s, useSlots as G, Comment as F, Fragment as C, Text as H, withDirectives as M, openBlock as r, createElementBlock as c, normalizeClass as a, createElementVNode as $, createBlock as f, createCommentVNode as u, renderSlot as I, createTextVNode as j, toDisplayString as b, unref as O } from "vue";
2
- import x from "./Icon.vue.js";
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 k = {
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 = s(() => {
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
- }), h = s(() => o.value === "tile"), R = s(() => k[e.variant] ?? k.primary), y = s(() => ({
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 = s(() => e.textI18n ? q(e.textI18n) : e.text), S = G(), p = s(() => S.default ? S.default().some((i) => !(i.type === F || i.type === C && Array.isArray(i.children) && i.children.length === 0 || i.type === H && typeof i.children == "string" && i.children.trim() === "")) : !1), v = s(
69
- () => e?.asIcon || e.icon && !l.value && !p.value
70
- ), g = s(() => 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((i) => e.icon.toLowerCase().endsWith(i)) : !1), A = s(() => {
71
- const i = `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"} ${v.value ? "icon-only shrink-0" : ""}`, w = {
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 z = v.value ? T[e.size] : d[e.size];
118
- o.value === "tile" ? z = {
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" && (z = {
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 = h.value ? "group text-foreground focus:outline-none focus-visible:outline-none active:scale-100!" : w[e.variant];
134
- return [i, W, V[e.rounded], z, e.class].join(
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
- }), m = s(() => {
138
- if (h.value && g.value)
139
- return `${y.value} object-cover`;
140
- const n = e.description && o.value === "horizontal", i = {
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
- }, w = {
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 = v.value ? w[e.size] : i[e.size];
156
- return g.value && (d += " object-cover"), h.value ? d += " scale-[1.45]!" : o.value === "vertical" && (d += " scale-[1.35]! mt-1"), d;
157
- }), E = s(() => o.value === "vertical" ? "scale-[0.9]" : "");
158
- return (n, i) => M((r(), c("button", {
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: a([A.value, "cursor-pointer"]),
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
- h.value ? (r(), c(C, { key: 0 }, [
165
- $("span", {
166
- class: a(["inline-flex items-center justify-center shrink-0 transition-transform duration-150 ease-out group-active:scale-[0.92]", [
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 ? "" : y.value
169
+ g.value ? "" : C.value
170
170
  ]])
171
171
  }, [
172
- t.loading ? (r(), f(x, {
172
+ t.loading ? (i(), x(p, {
173
173
  key: 0,
174
174
  icon: "lucide:loader-2",
175
- class: a(["animate-spin pointer-events-none", [m.value, g.value ? y.value : ""]])
176
- }, null, 8, ["class"])) : t.icon ? (r(), f(x, {
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: a(["pointer-events-none", [t.iconClass, m.value]])
179
+ class: r(["pointer-events-none", [t.iconClass, f.value]])
180
180
  }, null, 8, ["icon", "class"])) : u("", !0)
181
181
  ], 2),
182
- l.value || p.value || e.description ? (r(), c("span", {
182
+ l.value || v.value || e.description ? (i(), c("span", {
183
183
  key: 0,
184
- class: a(["flex flex-col items-center max-w-full", t.textClass])
184
+ class: r(["flex flex-col items-center max-w-full", t.textClass])
185
185
  }, [
186
- l.value || p.value ? (r(), c("span", K, [
187
- I(n.$slots, "default", {}, () => [
188
- j(b(l.value), 1)
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 ? (r(), c("span", P, b(e.description), 1)) : u("", !0)
191
+ e.description ? (i(), c("span", P, h(e.description), 1)) : u("", !0)
192
192
  ], 2)) : u("", !0)
193
- ], 64)) : (r(), c(C, { key: 1 }, [
194
- t.loading ? (r(), f(x, {
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: a(["animate-spin pointer-events-none", m.value])
198
- }, null, 8, ["class"])) : t.icon ? (r(), f(x, {
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: a(["pointer-events-none", [t.iconClass, m.value, v.value ? "mx-auto" : ""]])
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
- l.value || p.value || e.description ? (r(), c("div", {
204
- key: 2,
205
- class: a(["flex flex-col justify-center", [
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
- $("div", {
211
- class: a([[t.textClass, E.value], "inline-flex items-center gap-1.5 leading-tight [&>:where(svg)]:mx-auto [&>:where(img)]:mx-auto"])
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
- I(n.$slots, "default", {}, () => [
214
- j(b(l.value), 1)
224
+ w(n.$slots, "default", {}, () => [
225
+ k(h(l.value), 1)
215
226
  ])
216
227
  ], 2),
217
- e.description ? (r(), c("span", Q, b(e.description), 1)) : u("", !0)
228
+ e.description ? (i(), c("span", Q, h(e.description), 1)) : u("", !0)
218
229
  ], 2)) : u("", !0),
219
- t.iconRight && !t.loading ? (r(), f(x, {
220
- key: 3,
230
+ t.iconRight && !t.loading ? (i(), x(p, {
231
+ key: 4,
221
232
  icon: t.iconRight,
222
- class: a([[t.iconRightClass, m.value], "h-4 w-4 pointer-events-none"])
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), !h.value]
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 m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2d3c51df"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4d544a95"]]);
5
5
  export {
6
- m as default
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: 700 },
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: 10 },
26
- paginationHoverInitialTimeout: { default: 500 },
25
+ paginationHoverEdgeThreshold: { default: 0.2 },
26
+ paginationHoverInitialTimeout: { default: 1e3 },
27
27
  wheelOptions: { default: () => ({
28
- threshold: 5,
29
- velocityThreshold: 0.5,
30
- pageScrollThreshold: 0.1,
31
- debounceTime: 50
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(n, { expose: r, emit: i }) {
39
- const s = n, u = i, o = g(null);
40
- return r({
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, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
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;