vlite3 1.2.15 → 1.2.16

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.
@@ -1,17 +1,17 @@
1
- import { defineComponent as N, useAttrs as T, computed as s, useSlots as A, withDirectives as G, openBlock as i, createElementBlock as l, normalizeClass as a, Fragment as C, createElementVNode as k, createBlock as x, createCommentVNode as c, renderSlot as S, createTextVNode as $, toDisplayString as p, unref as F } from "vue";
2
- import v from "./Icon.vue.js";
3
- import { vRipple as H } from "../directives/vRipple.js";
4
- import { $t as M } from "../utils/i18n.js";
5
- const O = ["type", "disabled", "data-testid"], Z = {
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";
3
+ import { vRipple as Z } from "../directives/vRipple.js";
4
+ import { $t as q } from "../utils/i18n.js";
5
+ const J = ["type", "disabled", "data-testid"], K = {
6
6
  key: 0,
7
7
  class: "text-xs font-medium leading-tight truncate max-w-full"
8
- }, q = {
8
+ }, P = {
9
9
  key: 1,
10
10
  class: "text-[10px] font-normal opacity-70 mt-0.5 leading-tight truncate max-w-full"
11
- }, J = {
11
+ }, Q = {
12
12
  key: 0,
13
13
  class: "text-[0.75em] font-normal opacity-70 mt-0.5 leading-tight"
14
- }, X = /* @__PURE__ */ N({
14
+ }, ee = /* @__PURE__ */ L({
15
15
  __name: "Button",
16
16
  props: {
17
17
  description: {},
@@ -33,7 +33,7 @@ const O = ["type", "disabled", "data-testid"], Z = {
33
33
  layout: { default: "horizontal" }
34
34
  },
35
35
  setup(t) {
36
- const z = {
36
+ const k = {
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 O = ["type", "disabled", "data-testid"], Z = {
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, I = T(), o = s(() => {
59
- const n = e.layout || I.layout;
58
+ }, e = t, B = N(), o = s(() => {
59
+ const n = e.layout || B.layout;
60
60
  return n === "tile" ? "tile" : n === "vertical" ? "vertical" : "horizontal";
61
- }), h = s(() => o.value === "tile"), j = s(() => z[e.variant] ?? z.primary), b = s(() => ({
61
+ }), h = s(() => o.value === "tile"), R = s(() => k[e.variant] ?? k.primary), y = s(() => ({
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]), r = s(() => e.textI18n ? M(e.textI18n) : e.text), B = A(), m = s(
69
- () => e?.asIcon || e.icon && !r.value && !B.default
70
- ), u = 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((g) => e.icon.toLowerCase().endsWith(g)) : !1), R = s(() => {
71
- const g = `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"} ${m.value ? "icon-only shrink-0" : ""}`, y = {
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 = {
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",
@@ -97,14 +97,14 @@ const O = ["type", "disabled", "data-testid"], Z = {
97
97
  md: e.description ? "h-auto py-2.5 px-4" : "h-9 px-4 py-2",
98
98
  lg: e.description ? "h-auto py-3 px-4" : "h-10 px-4",
99
99
  xl: e.description ? "h-auto py-4 px-10" : "h-12 px-10"
100
- }, V = {
100
+ }, T = {
101
101
  xs: "h-6.5 w-6.5 min-h-6.5 min-w-6.5",
102
102
  sm: "h-7.5 w-7.5 min-h-7.5 min-w-7.5",
103
103
  sm2: "h-8 w-8 min-h-8 min-w-8",
104
104
  md: "h-9 w-9 min-h-9 min-w-9",
105
105
  lg: "h-10 w-10 min-h-10 min-w-10",
106
106
  xl: "h-12 w-12 min-h-12 min-w-12"
107
- }, W = {
107
+ }, V = {
108
108
  none: "rounded-none",
109
109
  sm: "rounded-sm",
110
110
  sm2: "rounded-sm",
@@ -114,15 +114,15 @@ const O = ["type", "disabled", "data-testid"], Z = {
114
114
  "2xl": "rounded-2xl",
115
115
  full: "rounded-full"
116
116
  };
117
- let w = m.value ? V[e.size] : d[e.size];
118
- o.value === "tile" ? w = {
117
+ let z = v.value ? T[e.size] : d[e.size];
118
+ o.value === "tile" ? z = {
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" && (w = {
125
+ }[e.size] : o.value === "vertical" && (z = {
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 O = ["type", "disabled", "data-testid"], Z = {
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 D = h.value ? "group text-foreground focus:outline-none focus-visible:outline-none active:scale-100!" : y[e.variant];
134
- return [g, D, W[e.rounded], w, e.class].join(
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(
135
135
  " "
136
136
  );
137
- }), f = s(() => {
138
- if (h.value && u.value)
139
- return `${b.value} object-cover`;
140
- const n = e.description && o.value === "horizontal", g = {
137
+ }), m = s(() => {
138
+ if (h.value && g.value)
139
+ return `${y.value} object-cover`;
140
+ const n = e.description && o.value === "horizontal", i = {
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
- }, y = {
147
+ }, w = {
148
148
  xs: "w-3 h-3",
149
149
  sm: "w-4 h-4",
150
150
  sm2: "w-4 h-4",
@@ -152,81 +152,81 @@ const O = ["type", "disabled", "data-testid"], Z = {
152
152
  lg: "w-4 h-4",
153
153
  xl: "w-4 h-4"
154
154
  };
155
- let d = m.value ? y[e.size] : g[e.size];
156
- return u.value && (d += " object-cover"), h.value ? d += " scale-[1.45]!" : o.value === "vertical" && (d += " scale-[1.35]! mt-1"), d;
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
157
  }), E = s(() => o.value === "vertical" ? "scale-[0.9]" : "");
158
- return (n, g) => G((i(), l("button", {
158
+ return (n, i) => M((r(), c("button", {
159
159
  type: t.type,
160
- class: a([R.value, "cursor-pointer"]),
160
+ class: a([A.value, "cursor-pointer"]),
161
161
  disabled: t.disabled || t.loading,
162
- "data-testid": n.$attrs["data-testid"] || (r.value ? `btn-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : t.icon ? `btn-${t.icon.replace(/[^a-zA-Z0-9]+/g, "-")}` : "button")
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 ? (i(), l(C, { key: 0 }, [
165
- k("span", {
164
+ h.value ? (r(), c(C, { key: 0 }, [
165
+ $("span", {
166
166
  class: a(["inline-flex items-center justify-center shrink-0 transition-transform duration-150 ease-out group-active:scale-[0.92]", [
167
- u.value ? "" : "rounded-full",
168
- u.value ? "" : j.value,
169
- u.value ? "" : b.value
167
+ g.value ? "" : "rounded-full",
168
+ g.value ? "" : R.value,
169
+ g.value ? "" : y.value
170
170
  ]])
171
171
  }, [
172
- t.loading ? (i(), x(v, {
172
+ t.loading ? (r(), f(x, {
173
173
  key: 0,
174
174
  icon: "lucide:loader-2",
175
- class: a(["animate-spin pointer-events-none", [f.value, u.value ? b.value : ""]])
176
- }, null, 8, ["class"])) : t.icon ? (i(), x(v, {
175
+ class: a(["animate-spin pointer-events-none", [m.value, g.value ? y.value : ""]])
176
+ }, null, 8, ["class"])) : t.icon ? (r(), f(x, {
177
177
  key: 1,
178
178
  icon: t.icon,
179
- class: a(["pointer-events-none", [t.iconClass, f.value]])
180
- }, null, 8, ["icon", "class"])) : c("", !0)
179
+ class: a(["pointer-events-none", [t.iconClass, m.value]])
180
+ }, null, 8, ["icon", "class"])) : u("", !0)
181
181
  ], 2),
182
- r.value || n.$slots.default || e.description ? (i(), l("span", {
182
+ l.value || p.value || e.description ? (r(), c("span", {
183
183
  key: 0,
184
184
  class: a(["flex flex-col items-center max-w-full", t.textClass])
185
185
  }, [
186
- r.value || n.$slots.default ? (i(), l("span", Z, [
187
- S(n.$slots, "default", {}, () => [
188
- $(p(r.value), 1)
186
+ l.value || p.value ? (r(), c("span", K, [
187
+ I(n.$slots, "default", {}, () => [
188
+ j(b(l.value), 1)
189
189
  ])
190
- ])) : c("", !0),
191
- e.description ? (i(), l("span", q, p(e.description), 1)) : c("", !0)
192
- ], 2)) : c("", !0)
193
- ], 64)) : (i(), l(C, { key: 1 }, [
194
- t.loading ? (i(), x(v, {
190
+ ])) : u("", !0),
191
+ e.description ? (r(), c("span", P, b(e.description), 1)) : u("", !0)
192
+ ], 2)) : u("", !0)
193
+ ], 64)) : (r(), c(C, { key: 1 }, [
194
+ t.loading ? (r(), f(x, {
195
195
  key: 0,
196
196
  icon: "lucide:loader-2",
197
- class: a(["animate-spin pointer-events-none", f.value])
198
- }, null, 8, ["class"])) : t.icon ? (i(), x(v, {
197
+ class: a(["animate-spin pointer-events-none", m.value])
198
+ }, null, 8, ["class"])) : t.icon ? (r(), f(x, {
199
199
  key: 1,
200
200
  icon: t.icon,
201
- class: a(["pointer-events-none", [t.iconClass, f.value, m.value ? "mx-auto" : ""]])
202
- }, null, 8, ["icon", "class"])) : c("", !0),
203
- !m.value && (r.value || n.$slots.default || e.description) ? (i(), l("div", {
201
+ class: a(["pointer-events-none", [t.iconClass, m.value, v.value ? "mx-auto" : ""]])
202
+ }, null, 8, ["icon", "class"])) : u("", !0),
203
+ l.value || p.value || e.description ? (r(), c("div", {
204
204
  key: 2,
205
205
  class: a(["flex flex-col justify-center", [
206
206
  o.value === "vertical" ? "items-center text-center" : e.description ? "items-start text-left" : "items-center text-center",
207
207
  !t.icon && !t.iconRight && !t.loading ? "flex-1 w-full" : ""
208
208
  ]])
209
209
  }, [
210
- k("div", {
210
+ $("div", {
211
211
  class: a([[t.textClass, E.value], "leading-tight w-full [&>:where(svg)]:mx-auto [&>:where(img)]:mx-auto"])
212
212
  }, [
213
- S(n.$slots, "default", {}, () => [
214
- $(p(r.value), 1)
213
+ I(n.$slots, "default", {}, () => [
214
+ j(b(l.value), 1)
215
215
  ])
216
216
  ], 2),
217
- e.description ? (i(), l("span", J, p(e.description), 1)) : c("", !0)
218
- ], 2)) : c("", !0),
219
- t.iconRight && !t.loading ? (i(), x(v, {
217
+ e.description ? (r(), c("span", Q, b(e.description), 1)) : u("", !0)
218
+ ], 2)) : u("", !0),
219
+ t.iconRight && !t.loading ? (r(), f(x, {
220
220
  key: 3,
221
221
  icon: t.iconRight,
222
- class: a([[t.iconRightClass, f.value], "h-4 w-4 pointer-events-none"])
223
- }, null, 8, ["icon", "class"])) : c("", !0)
222
+ class: a([[t.iconRightClass, m.value], "h-4 w-4 pointer-events-none"])
223
+ }, null, 8, ["icon", "class"])) : u("", !0)
224
224
  ], 64))
225
- ], 10, O)), [
226
- [F(H), !h.value]
225
+ ], 10, J)), [
226
+ [O(Z), !h.value]
227
227
  ]);
228
228
  }
229
229
  });
230
230
  export {
231
- X as default
231
+ ee as default
232
232
  };
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
4
4
  import { $t as E } from "../../utils/i18n.js";
5
5
  import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
6
6
  import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
7
- import ee from "./CommandPaletteItem.vue2.js";
7
+ import ee from "./CommandPaletteItem.vue.js";
8
8
  const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
9
9
  key: 0,
10
10
  class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
@@ -1,5 +1,5 @@
1
1
  import t from "./CommandPaletteItem.vue3.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-66b1ae06"]]);
5
5
  export {
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
3
3
  import v from "./Modal.vue.js";
4
4
  import N from "./CommandPalette/CommandPaletteContent.vue.js";
5
5
  import { $t as U } from "../utils/i18n.js";
6
- /* empty css */
6
+ /* empty css */
7
7
  const V = { class: "block truncate -text-fs-1.5" }, S = { class: "ml-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ml-1" }, A = /* @__PURE__ */ x({
8
8
  __name: "NavbarCommandPalette",
9
9
  props: {
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": "1.2.15",
6
+ "version": "1.2.16",
7
7
  "type": "module",
8
8
  "main": "index.js",
9
9
  "module": "index.js",