vlite3 1.2.16 → 1.3.1

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 (40) hide show
  1. package/components/Button.vue.d.ts +2 -0
  2. package/components/Button.vue.js +66 -55
  3. package/components/Carousel/Carousel.vue.d.ts +210 -240
  4. package/components/Carousel/Carousel.vue.js +2 -2
  5. package/components/Carousel/Carousel.vue2.js +31 -21
  6. package/components/Carousel/types.d.ts +76 -14
  7. package/components/CategoryManager/CategoryManager.vue.d.ts +9 -1
  8. package/components/CategoryManager/CategoryManager.vue.js +5 -461
  9. package/components/CategoryManager/CategoryManager.vue2.js +515 -2
  10. package/components/CategoryManager/CategoryNode.vue.js +65 -64
  11. package/components/CategoryManager/types.d.ts +16 -0
  12. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  13. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  14. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  15. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  16. package/components/FadeOverlay/FadeOverlay.vue.d.ts +13 -0
  17. package/components/FadeOverlay/FadeOverlay.vue.js +59 -0
  18. package/components/FadeOverlay/FadeOverlay.vue2.js +4 -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.d.ts +4 -4
  25. package/components/NumberInput.vue.js +2 -2
  26. package/components/NumberInput.vue2.js +56 -56
  27. package/components/Screen/Screen.vue.js +51 -51
  28. package/components/Screen/ScreenFilter.vue.js +2 -2
  29. package/components/Screen/components/ScreenQuickFilters.vue.js +3 -3
  30. package/components/Switch.vue.js +9 -3
  31. package/components/Tabes/Tabes.vue.d.ts +2 -1
  32. package/components/Tabes/Tabes.vue.js +2 -2
  33. package/components/Tabes/Tabes.vue2.js +200 -78
  34. package/components/Workbook/WorkbookAddButton.vue.js +4 -4
  35. package/components/index.d.ts +1 -0
  36. package/index.d.ts +1 -0
  37. package/index.js +76 -74
  38. package/package.json +2 -2
  39. package/style.css +33 -32
  40. /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
@@ -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], "leading-tight w-full [&>: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
  });